22 #include <ns3/simulator.h> 
   24 #include <ns3/callback.h> 
   25 #include <ns3/config.h> 
   26 #include <ns3/string.h> 
   27 #include <ns3/double.h> 
   29 #include <ns3/boolean.h> 
   30 #include <ns3/pointer.h> 
   31 #include "ns3/ff-mac-scheduler.h" 
   32 #include "ns3/mobility-helper.h" 
   33 #include "ns3/lte-helper.h" 
   36 #include "ns3/lte-rrc-sap.h" 
   52                              uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
 
   53                              uint8_t mcs, uint16_t sizeTb, uint8_t ccId)
 
   55   testcase->
UlScheduling (frameNo, subframeNo, rnti, mcs, sizeTb);
 
   67                               uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
 
   68                               uint8_t mcs, uint16_t sizeTb, uint8_t componentCarrierId)
 
   70   testcase->
UlScheduling (frameNo, subframeNo, rnti, mcs, sizeTb);
 
   79   : 
TestSuite (
"lte-cqi-generation", SYSTEM)
 
   89                                                            LteRrcSap::PdschConfigDedicated::dB0, LteRrcSap::PdschConfigDedicated::dB0, 4, 2), TestCase::QUICK);
 
   91                                                            LteRrcSap::PdschConfigDedicated::dB0, LteRrcSap::PdschConfigDedicated::dB_3, 8, 2), TestCase::QUICK);
 
   93                                                            LteRrcSap::PdschConfigDedicated::dB0, LteRrcSap::PdschConfigDedicated::dB_6, 10, 2), TestCase::QUICK);
 
   95                                                            LteRrcSap::PdschConfigDedicated::dB1, LteRrcSap::PdschConfigDedicated::dB_6, 12, 2), TestCase::QUICK);
 
   97                                                            LteRrcSap::PdschConfigDedicated::dB2, LteRrcSap::PdschConfigDedicated::dB_6, 14, 2), TestCase::QUICK);
 
   99                                                            LteRrcSap::PdschConfigDedicated::dB3, LteRrcSap::PdschConfigDedicated::dB_6, 14, 2), TestCase::QUICK);
 
  101                                                            LteRrcSap::PdschConfigDedicated::dB3, LteRrcSap::PdschConfigDedicated::dB0, 8, 2), TestCase::QUICK);
 
  108                                                     uint16_t dlMcs, uint16_t ulMcs)
 
  109   : 
TestCase (
"Downlink Power Control: " + name),
 
  134                                         uint8_t mcs, uint16_t sizeTb)
 
  178   positionAlloc->
Add (Vector (0.0, 0.0, 0.0));   
 
  179   positionAlloc->
Add (Vector (1000, 0.0, 0.0)); 
 
  180   positionAlloc->
Add (Vector (500.0, 0.0, 0.0));  
 
  181   positionAlloc->
Add (Vector (500, 0.0, 0.0));  
 
  212   lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
 
  213   lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
 
  221   Config::Connect (
"/NodeList/0/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/DlScheduling",
 
  224   Config::Connect (
"/NodeList/0/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/UlScheduling",
 
  227   Config::Connect (
"/NodeList/1/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/DlScheduling",
 
  230   Config::Connect (
"/NodeList/1/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/UlScheduling",
 
  233   Simulator::Stop (
Seconds (1.100));
 
  236   Simulator::Destroy ();
 
  240                                                                                 uint8_t cell0Pa, uint8_t cell1Pa, uint16_t dlMcs, uint16_t ulMcs)
 
  241   : 
TestCase (
"Downlink Power Control: " + name),
 
  267                                                       uint8_t mcs, uint16_t sizeTb)
 
  313   positionAlloc->
Add (Vector (0.0, 0.0, 0.0));   
 
  314   positionAlloc->
Add (Vector (1000, 0.0, 0.0)); 
 
  315   positionAlloc->
Add (Vector (500.0, 0.0, 0.0));  
 
  316   positionAlloc->
Add (Vector (500, 0.0, 0.0));  
 
  317   positionAlloc->
Add (Vector (1050, 0.0, 0.0));  
 
  334   lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
 
  335   lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
 
  344   enbDevs.
Get (0)->GetAttribute (
"LteFfrAlgorithm", tmp);
 
  352   enbDevs.
Get (1)->GetAttribute (
"LteFfrAlgorithm", tmp);
 
  361   Config::Connect (
"/NodeList/0/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/DlScheduling",
 
  364   Config::Connect (
"/NodeList/0/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/UlScheduling",
 
  367   Simulator::Stop (
Seconds (1.100));
 
  370   Simulator::Destroy ();
 
AttributeValue implementation for Boolean. 
 
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices. 
 
uint8_t m_cell0Pa
cell #0 PA 
 
This test is very similar to LteCqiGenerationTestCase. 
 
Ptr< NetDevice > Get(uint32_t i) const 
Get the Ptr stored in this container at a given index. 
 
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument. 
 
void LteTestUlSchedulingCallback(LteCqiGenerationTestCase *testcase, std::string path, uint32_t frameNo, uint32_t subframeNo, uint16_t rnti, uint8_t mcs, uint16_t sizeTb, uint8_t ccId)
 
Ptr< Object > GetObject(void) const 
Get the Object referenced by the PointerValue. 
 
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit. 
 
virtual ~LteCqiGenerationDlPowerControlTestCase()
 
LteCqiGenerationTestSuite()
TestSuite. 
 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
 
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO. 
 
LteCqiGenerationTestCase(std::string name, bool usePdcchForCqiGeneration, uint16_t dlMcs, uint16_t ulMcs)
 
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation). 
 
uint16_t m_ulMcs
the UL MCS 
 
void SetFfrAlgorithmType(std::string type)
Set the type of FFR algorithm to be used by eNodeB devices. 
 
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices. 
 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
 
This class contains the specification of EPS Bearers. 
 
uint16_t m_dlMcs
the DL MCS 
 
void Install(Ptr< Node > node) const 
"Layout" a single node according to the current position allocator type. 
 
Hold variables of type enum. 
 
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite. 
 
void ChangePdschConfigDedicated(bool change)
Callback function that is used to be connected to trace ChangePdschConfigDedicated. 
 
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container. 
 
Hold an unsigned integer type. 
 
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the scheduler to be created. 
 
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not. 
 
holds a vector of ns3::NetDevice pointers 
 
LteCqiGenerationDlPowerControlTestCase(std::string name, uint8_t cell0Pa, uint8_t cell1Pa, uint16_t dlMcs, uint16_t ulMcs)
Constructor. 
 
void DlScheduling(DlSchedulingCallbackInfo dlInfo)
DL Scheduling function. 
 
uint16_t m_ulMcs
the UL MCS 
 
void Connect(std::string path, const CallbackBase &cb)
 
void UlScheduling(uint32_t frameNo, uint32_t subframeNo, uint16_t rnti, uint8_t mcs, uint16_t sizeTb)
UL Scheduling function. 
 
static LteCqiGenerationTestSuite lteCqiGenerationTestSuite
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
keep track of a set of node pointers. 
 
Hold objects of type Ptr. 
 
void UlScheduling(uint32_t frameNo, uint32_t subframeNo, uint16_t rnti, uint8_t mcs, uint16_t sizeTb)
UL Scheduling function. 
 
void SetMobilityModel(std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
 
bool m_usePdschForCqiGeneration
use PDCCH for CQI generation 
 
This is the test case for testing different configuration of CQI generation. 
 
void Reset(void)
Reset the initial value of every attribute as well as the value of every global to what they were bef...
 
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices. 
 
Helper class used to assign positions and mobility models to nodes. 
 
void LteTestUlSchedulingCallback2(LteCqiGenerationDlPowerControlTestCase *testcase, std::string path, uint32_t frameNo, uint32_t subframeNo, uint16_t rnti, uint8_t mcs, uint16_t sizeTb, uint8_t componentCarrierId)
 
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG. 
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
void SetDefault(std::string name, const AttributeValue &value)
 
void LteTestDlSchedulingCallback2(LteCqiGenerationDlPowerControlTestCase *testcase, std::string path, DlSchedulingCallbackInfo dlInfo)
 
void SetPdschConfigDedicated(LteRrcSap::PdschConfigDedicated pdschConfigDedicated)
Set PDSCH config dedicated function. 
 
void Add(Vector v)
Add a position to the list of positions. 
 
uint8_t m_cell1Pa
cell #1 PA 
 
Time Now(void)
create an ns3::Time instance which contains the current simulation time. 
 
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer. 
 
DlSchedulingCallbackInfo structure. 
 
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
 
PdschConfigDedicated structure. 
 
virtual ~LteCqiGenerationTestCase()
 
void SetFfrAlgorithmAttribute(std::string n, const AttributeValue &v)
Set an attribute for the FFR algorithm to be created. 
 
void LteTestDlSchedulingCallback(LteCqiGenerationTestCase *testcase, std::string path, DlSchedulingCallbackInfo dlInfo)
 
Lte Cqi Generation Test Suite. 
 
uint16_t m_dlMcs
the DL MCS 
 
void DlScheduling(DlSchedulingCallbackInfo dlInfo)
DL Scheduling function.