21 #include <ns3/core-module.h>
22 #include <ns3/network-module.h>
23 #include <ns3/mobility-module.h>
24 #include <ns3/internet-module.h>
25 #include <ns3/lte-module.h>
26 #include <ns3/config-store-module.h>
27 #include <ns3/buildings-module.h>
28 #include <ns3/point-to-point-helper.h>
29 #include <ns3/applications-module.h>
79 bool OverlapsWithAnyPrevious (
Box box);
93 m_nApartmentsX (nApartmentsX),
95 m_xSize (nApartmentsX*10 + 20),
98 m_xMinVar = CreateObject<UniformRandomVariable> ();
101 m_yMinVar = CreateObject<UniformRandomVariable> ();
109 for (uint32_t i = 0; i < n; ++i)
119 uint32_t attempt = 0;
122 NS_ASSERT_MSG (attempt < 100,
"Too many failed attempts to position apartment block. Too many blocks? Too small area?");
131 NS_LOG_LOGIC (
"allocated non overlapping block " << box);
134 gridBuildingAllocator = CreateObject<GridBuildingAllocator> ();
135 gridBuildingAllocator->SetAttribute (
"GridWidth",
UintegerValue (1));
137 gridBuildingAllocator->SetAttribute (
"LengthY",
DoubleValue (10*2));
138 gridBuildingAllocator->SetAttribute (
"DeltaX",
DoubleValue (10));
139 gridBuildingAllocator->SetAttribute (
"DeltaY",
DoubleValue (10));
142 gridBuildingAllocator->SetBuildingAttribute (
"NRoomsY",
UintegerValue (2));
144 gridBuildingAllocator->SetAttribute (
"MinX",
DoubleValue (box.
xMin + 10));
145 gridBuildingAllocator->SetAttribute (
"MinY",
DoubleValue (box.
yMin + 10));
146 gridBuildingAllocator->Create (2);
165 std::ofstream outFile;
166 outFile.open (filename.c_str (), std::ios_base::out | std::ios_base::trunc);
167 if (!outFile.is_open ())
176 Box box = (*it)->GetBoundaries ();
177 outFile <<
"set object " << index
178 <<
" rect from " << box.
xMin <<
"," << box.
yMin
179 <<
" to " << box.
xMax <<
"," << box.
yMax
180 <<
" front fs empty "
188 std::ofstream outFile;
189 outFile.open (filename.c_str (), std::ios_base::out | std::ios_base::trunc);
190 if (!outFile.is_open ())
199 for (
int j = 0; j < nDevs; j++)
205 outFile <<
"set label \"" << uedev->GetImsi ()
206 <<
"\" at "<< pos.x <<
"," << pos.y <<
" left font \"Helvetica,4\" textcolor rgb \"grey\" front point pt 1 ps 0.3 lc rgb \"grey\" offset 0,0"
216 std::ofstream outFile;
217 outFile.open (filename.c_str (), std::ios_base::out | std::ios_base::trunc);
218 if (!outFile.is_open ())
227 for (
int j = 0; j < nDevs; j++)
233 outFile <<
"set label \"" << enbdev->
GetCellId ()
234 <<
"\" at "<< pos.x <<
"," << pos.y
235 <<
" left font \"Helvetica,4\" textcolor rgb \"white\" front point pt 2 ps 0.3 lc rgb \"white\" offset 0,0"
244 "Number of femtocell blocks",
246 ns3::MakeUintegerChecker<uint32_t> ());
248 "Number of apartments along the X axis in a femtocell block",
250 ns3::MakeUintegerChecker<uint32_t> ());
254 ns3::MakeUintegerChecker<uint32_t> ());
256 "How many macro sites there are",
258 ns3::MakeUintegerChecker<uint32_t> ());
260 "(minimum) number of sites along the X-axis of the hex grid",
262 ns3::MakeUintegerChecker<uint32_t> ());
264 "min distance between two nearby macro cell sites",
266 ns3::MakeDoubleChecker<double> ());
268 "how much the UE area extends outside the macrocell grid, "
269 "expressed as fraction of the interSiteDistance",
271 ns3::MakeDoubleChecker<double> ());
273 "How many macrocell UEs there are per square meter",
275 ns3::MakeDoubleChecker<double> ());
277 "The HeNB deployment ratio as per 3GPP R4-092042",
279 ns3::MakeDoubleChecker<double> ());
281 "The HeNB activation ratio as per 3GPP R4-092042",
283 ns3::MakeDoubleChecker<double> ());
285 "How many (on average) home UEs per HeNB there are in the simulation",
287 ns3::MakeDoubleChecker<double> ());
289 "TX power [dBm] used by macro eNBs",
291 ns3::MakeDoubleChecker<double> ());
293 "TX power [dBm] used by HeNBs",
295 ns3::MakeDoubleChecker<double> ());
297 "DL EARFCN used by macro eNBs",
299 ns3::MakeUintegerChecker<uint16_t> ());
301 "DL EARFCN used by HeNBs",
303 ns3::MakeUintegerChecker<uint16_t> ());
305 "bandwidth [num RBs] used by macro eNBs",
307 ns3::MakeUintegerChecker<uint16_t> ());
309 "bandwidth [num RBs] used by HeNBs",
311 ns3::MakeUintegerChecker<uint16_t> ());
313 "Total duration of the simulation [s]",
315 ns3::MakeDoubleChecker<double> ());
317 "if true, will generate a REM and then abort the simulation;"
318 "if false, will run the simulation normally (without generating any REM)",
322 "Resource Block Id of Data Channel, for which REM will be generated;"
323 "default value is -1, what means REM will be averaged from all RBs of "
326 MakeIntegerChecker<int32_t> ());
328 "If true, will setup the EPC to simulate an end-to-end topology, "
329 "with real IP applications over PDCP and RLC UM (or RLC AM by changing "
330 "the default value of EpsBearerToRlcMapping e.g. to RLC_AM_ALWAYS). "
331 "If false, only the LTE radio access will be simulated with RLC SM. ",
335 "if true, will activate data flows in the downlink when EPC is being used. "
336 "If false, downlink flows won't be activated. "
337 "If EPC is not used, this parameter will be ignored.",
341 "if true, will activate data flows in the uplink when EPC is being used. "
342 "If false, uplink flows won't be activated. "
343 "If EPC is not used, this parameter will be ignored.",
347 "if true, the UdpClient application will be used. "
348 "Otherwise, the BulkSend application will be used over a TCP connection. "
349 "If EPC is not used, this parameter will be ignored.",
353 "The path of the fading trace (by default no fading trace "
354 "is loaded, i.e., fading is not considered)",
358 "How many bearers per UE there are in the simulation",
360 ns3::MakeUintegerChecker<uint16_t> ());
362 "SRS Periodicity (has to be at least "
363 "greater than the number of UEs per eNB)",
365 ns3::MakeUintegerChecker<uint16_t> ());
367 "Minimum speed value of macro UE with random waypoint model [m/s].",
369 ns3::MakeDoubleChecker<double> ());
371 "Maximum speed value of macro UE with random waypoint model [m/s].",
373 ns3::MakeDoubleChecker<double> ());
376 main (
int argc,
char *argv[])
386 cmd.Parse (argc, argv);
390 cmd.Parse (argc, argv);
398 GlobalValue::GetValueByName (
"nBlocks", uintegerValue);
399 uint32_t nBlocks = uintegerValue.
Get ();
400 GlobalValue::GetValueByName (
"nApartmentsX", uintegerValue);
401 uint32_t nApartmentsX = uintegerValue.
Get ();
402 GlobalValue::GetValueByName (
"nFloors", uintegerValue);
403 uint32_t nFloors = uintegerValue.
Get ();
404 GlobalValue::GetValueByName (
"nMacroEnbSites", uintegerValue);
405 uint32_t nMacroEnbSites = uintegerValue.
Get ();
406 GlobalValue::GetValueByName (
"nMacroEnbSitesX", uintegerValue);
407 uint32_t nMacroEnbSitesX = uintegerValue.
Get ();
408 GlobalValue::GetValueByName (
"interSiteDistance", doubleValue);
409 double interSiteDistance = doubleValue.
Get ();
410 GlobalValue::GetValueByName (
"areaMarginFactor", doubleValue);
411 double areaMarginFactor = doubleValue.
Get ();
412 GlobalValue::GetValueByName (
"macroUeDensity", doubleValue);
413 double macroUeDensity = doubleValue.
Get ();
414 GlobalValue::GetValueByName (
"homeEnbDeploymentRatio", doubleValue);
415 double homeEnbDeploymentRatio = doubleValue.
Get ();
416 GlobalValue::GetValueByName (
"homeEnbActivationRatio", doubleValue);
417 double homeEnbActivationRatio = doubleValue.
Get ();
418 GlobalValue::GetValueByName (
"homeUesHomeEnbRatio", doubleValue);
419 double homeUesHomeEnbRatio = doubleValue.
Get ();
420 GlobalValue::GetValueByName (
"macroEnbTxPowerDbm", doubleValue);
421 double macroEnbTxPowerDbm = doubleValue.
Get ();
422 GlobalValue::GetValueByName (
"homeEnbTxPowerDbm", doubleValue);
423 double homeEnbTxPowerDbm = doubleValue.
Get ();
424 GlobalValue::GetValueByName (
"macroEnbDlEarfcn", uintegerValue);
425 uint32_t macroEnbDlEarfcn = uintegerValue.
Get ();
426 GlobalValue::GetValueByName (
"homeEnbDlEarfcn", uintegerValue);
427 uint32_t homeEnbDlEarfcn = uintegerValue.
Get ();
428 GlobalValue::GetValueByName (
"macroEnbBandwidth", uintegerValue);
429 uint16_t macroEnbBandwidth = uintegerValue.
Get ();
430 GlobalValue::GetValueByName (
"homeEnbBandwidth", uintegerValue);
431 uint16_t homeEnbBandwidth = uintegerValue.
Get ();
432 GlobalValue::GetValueByName (
"simTime", doubleValue);
433 double simTime = doubleValue.
Get ();
434 GlobalValue::GetValueByName (
"epc", booleanValue);
435 bool epc = booleanValue.
Get ();
436 GlobalValue::GetValueByName (
"epcDl", booleanValue);
437 bool epcDl = booleanValue.
Get ();
438 GlobalValue::GetValueByName (
"epcUl", booleanValue);
439 bool epcUl = booleanValue.
Get ();
440 GlobalValue::GetValueByName (
"useUdp", booleanValue);
441 bool useUdp = booleanValue.
Get ();
442 GlobalValue::GetValueByName (
"generateRem", booleanValue);
443 bool generateRem = booleanValue.
Get ();
444 GlobalValue::GetValueByName (
"remRbId", integerValue);
445 int32_t remRbId = integerValue.
Get ();
446 GlobalValue::GetValueByName (
"fadingTrace", stringValue);
447 std::string fadingTrace = stringValue.
Get ();
448 GlobalValue::GetValueByName (
"numBearersPerUe", uintegerValue);
449 uint16_t numBearersPerUe = uintegerValue.
Get ();
450 GlobalValue::GetValueByName (
"srsPeriodicity", uintegerValue);
451 uint16_t srsPeriodicity = uintegerValue.
Get ();
452 GlobalValue::GetValueByName (
"outdoorUeMinSpeed", doubleValue);
453 uint16_t outdoorUeMinSpeed = doubleValue.
Get ();
454 GlobalValue::GetValueByName (
"outdoorUeMaxSpeed", doubleValue);
455 uint16_t outdoorUeMaxSpeed = doubleValue.
Get ();
461 if (nMacroEnbSites > 0)
463 uint32_t currentSite = nMacroEnbSites -1;
464 uint32_t biRowIndex = (currentSite / (nMacroEnbSitesX + nMacroEnbSitesX + 1));
465 uint32_t biRowRemainder = currentSite % (nMacroEnbSitesX + nMacroEnbSitesX + 1);
466 uint32_t rowIndex = biRowIndex*2 + 1;
467 if (biRowRemainder >= nMacroEnbSitesX)
471 uint32_t nMacroEnbSitesY = rowIndex;
474 macroUeBox =
Box (-areaMarginFactor*interSiteDistance,
475 (nMacroEnbSitesX + areaMarginFactor)*interSiteDistance,
476 -areaMarginFactor*interSiteDistance,
477 (nMacroEnbSitesY -1)*interSiteDistance*sqrt (0.75) + areaMarginFactor*interSiteDistance,
483 macroUeBox =
Box (0, 150, 0, 150, ueZ, ueZ);
487 blockAllocator.Create (nBlocks);
490 uint32_t nHomeEnbs = round (4 * nApartmentsX * nBlocks * nFloors * homeEnbDeploymentRatio * homeEnbActivationRatio);
492 uint32_t nHomeUes = round (nHomeEnbs * homeUesHomeEnbRatio);
494 double macroUeAreaSize = (macroUeBox.
xMax - macroUeBox.
xMin) * (macroUeBox.
yMax - macroUeBox.
yMin);
495 uint32_t nMacroUes = round (macroUeAreaSize * macroUeDensity);
496 NS_LOG_LOGIC (
"nMacroUes = " << nMacroUes <<
" (density=" << macroUeDensity <<
")");
499 homeEnbs.
Create (nHomeEnbs);
501 macroEnbs.
Create (3 * nMacroEnbSites);
503 homeUes.
Create (nHomeUes);
505 macroUes.
Create (nMacroUes);
508 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
523 if (!fadingTrace.empty ())
533 epcHelper = CreateObject<PointToPointEpcHelper> ();
540 BuildingsHelper::Install (macroEnbs);
542 lteHexGridEnbTopologyHelper->SetLteHelper (lteHelper);
543 lteHexGridEnbTopologyHelper->SetAttribute (
"InterSiteDistance",
DoubleValue (interSiteDistance));
544 lteHexGridEnbTopologyHelper->SetAttribute (
"MinX",
DoubleValue (interSiteDistance/2));
545 lteHexGridEnbTopologyHelper->SetAttribute (
"GridWidth",
UintegerValue (nMacroEnbSitesX));
554 NetDeviceContainer macroEnbDevs = lteHexGridEnbTopologyHelper->SetPositionAndInstallEnbDevice (macroEnbs);
565 mobility.SetPositionAllocator (positionAlloc);
567 BuildingsHelper::Install (homeEnbs);
579 positionAlloc = CreateObject<SameRoomPositionAllocator> (homeEnbs);
580 mobility.SetPositionAllocator (positionAlloc);
582 BuildingsHelper::Install (homeUes);
588 NS_LOG_LOGIC (
"randomly allocating macro UEs in " << macroUeBox <<
" speedMin " << outdoorUeMinSpeed <<
" speedMax " << outdoorUeMaxSpeed);
589 if (outdoorUeMaxSpeed!=0.0)
591 mobility.SetMobilityModel (
"ns3::SteadyStateRandomWaypointMobilityModel");
605 positionAlloc = CreateObject<RandomBoxPositionAllocator> ();
606 mobility.SetPositionAllocator (positionAlloc);
613 it != macroUes.
End ();
616 (*it)->Initialize ();
621 positionAlloc = CreateObject<RandomBoxPositionAllocator> ();
634 mobility.SetPositionAllocator (positionAlloc);
637 BuildingsHelper::Install (macroUes);
654 remoteHostContainer.
Create (1);
655 remoteHost = remoteHostContainer.
Get (0);
657 internet.
Install (remoteHostContainer);
667 ipv4h.
SetBase (
"1.0.0.0",
"255.0.0.0");
670 remoteHostAddr = internetIpIfaces.
GetAddress (1);
674 remoteHostStaticRouting->AddNetworkRouteTo (
Ipv4Address (
"7.0.0.0"),
Ipv4Mask (
"255.0.0.0"), 1);
679 ueDevs.
Add (homeUeDevs);
680 ueDevs.
Add (macroUeDevs);
688 lteHelper->
Attach (macroUeDevs);
689 lteHelper->
Attach (homeUeDevs);
699 for (ueDevIt = homeUeDevs.
Begin (), enbDevIt = homeEnbDevs.
Begin ();
700 ueDevIt != homeUeDevs.
End (); ++ueDevIt, ++enbDevIt)
704 if (enbDevIt == homeEnbDevs.
End ())
706 enbDevIt = homeEnbDevs.
Begin ();
708 lteHelper->
Attach (*ueDevIt, *enbDevIt);
717 uint16_t dlPort = 10000;
718 uint16_t ulPort = 20000;
737 for (uint32_t u = 0; u < ues.
GetN (); ++u)
744 for (uint32_t b = 0; b < numBearersPerUe; ++b)
758 clientApps.Add (dlClientHelper.Install (remoteHost));
761 serverApps.Add (dlPacketSinkHelper.Install (ue));
770 serverApps.Add (ulPacketSinkHelper.Install (remoteHost));
781 clientApps.Add (dlClientHelper.Install (remoteHost));
784 serverApps.Add (dlPacketSinkHelper.Install (ue));
795 serverApps.Add (ulPacketSinkHelper.Install (remoteHost));
817 EpsBearer bearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT);
832 ueDevs.
Add (homeUeDevs);
833 ueDevs.
Add (macroUeDevs);
834 for (uint32_t u = 0; u < ueDevs.
GetN (); ++u)
837 for (uint32_t b = 0; b < numBearersPerUe; ++b)
853 remHelper = CreateObject<RadioEnvironmentMapHelper> ();
855 remHelper->SetAttribute (
"OutputFile",
StringValue (
"lena-dual-stripe.rem"));
864 remHelper->SetAttribute (
"UseDataChannel",
BooleanValue (
true));
865 remHelper->SetAttribute (
"RbId",
IntegerValue (remRbId));
868 remHelper->Install ();
873 Simulator::Stop (
Seconds (simTime));
889 Simulator::Destroy ();
Class that takes care of installing blocks of the buildings in a given area.
std::list< Box > m_previousBlocks
previous bocks
Ptr< UniformRandomVariable > m_xMinVar
X minimum variance.
Ptr< UniformRandomVariable > m_yMinVar
Y minimum variance.
uint32_t m_nApartmentsX
X apartments.
FemtocellBlockAllocator(Box area, uint32_t nApartmentsX, uint32_t nFloors)
Constructor.
uint32_t m_nFloors
number of floors
bool OverlapsWithAnyPrevious(Box box)
Function that checks if the box area is overlapping with some of previously created building blocks.
void Create()
Create function.
holds a vector of ns3::Application pointers.
AttributeValue implementation for Boolean.
double yMax
The y coordinate of the top bound of the box.
double xMin
The x coordinate of the left bound of the box.
double yMin
The y coordinate of the bottom bound of the box.
double xMax
The x coordinate of the right bound of the box.
double zMin
The z coordinate of the down bound of the box.
double zMax
The z coordinate of the up bound of the box.
std::vector< Ptr< Building > >::const_iterator Iterator
Const Iterator.
A helper to make it easier to instantiate an ns3::BulkSendApplication on a set of nodes.
Parse command-line arguments.
Introspection did not find any typical Config paths.
void ConfigureDefaults(void)
Configure the default values.
Class for representing data rates.
AttributeValue implementation for DataRate.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
This class contains the specification of EPS Bearers.
Hold a so-called 'global value'.
Hold a signed integer type.
aggregate IP/TCP/UDP functionality to existing Nodes.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Ipv4 addresses are stored in host order in this class.
Access to the IPv4 forwarding table, interfaces, and configuration.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
a class to represent an Ipv4 address mask
Helper class that adds ns3::Ipv4StaticRouting objects.
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const
Try and find the static routing protocol as either the main routing protocol or in the list of routin...
The eNodeB device implementation.
uint16_t GetCellId() const
Ptr< SpectrumChannel > GetDownlinkSpectrumChannel(void) const
void SetEpcHelper(Ptr< EpcHelper > h)
Set the EpcHelper to be used to setup the EPC network in conjunction with the setup of the LTE radio ...
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
void SetEnbAntennaModelType(std::string type)
Set the type of antenna model to be used by eNodeB devices.
void SetSpectrumChannelType(std::string type)
Set the type of spectrum channel to be used in both DL and UL.
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
void SetPathlossModelAttribute(std::string n, const AttributeValue &v)
Set an attribute for the path loss models to be created.
void EnableRlcTraces(void)
Enable trace sinks for RLC layer.
void SetEnbAntennaModelAttribute(std::string n, const AttributeValue &v)
Set an attribute for the eNodeB antenna model to be created.
void SetEnbDeviceAttribute(std::string n, const AttributeValue &v)
Set an attribute for the eNodeB devices (LteEnbNetDevice) to be created.
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
void AddX2Interface(NodeContainer enbNodes)
Create an X2 interface between all the eNBs in a given set.
void EnablePdcpTraces(void)
Enable trace sinks for PDCP layer.
void SetUeDeviceAttribute(std::string n, const AttributeValue &v)
Set an attribute for the UE devices (LteUeNetDevice) to be created.
void SetFadingModelAttribute(std::string n, const AttributeValue &v)
Set an attribute for the fading model to be created (both DL and UL).
void AttachToClosestEnb(NetDeviceContainer ueDevices, NetDeviceContainer enbDevices)
Manual attachment of a set of UE devices to the network via the closest eNodeB (with respect to dista...
uint8_t ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, EpsBearer bearer, Ptr< EpcTft > tft)
Activate a dedicated EPS bearer on a given set of UE devices.
void EnableMacTraces(void)
Enable trace sinks for MAC layer.
The LteUeNetDevice class implements the UE net device.
Helper class used to assign positions and mobility models to nodes.
Keep track of the current position and velocity of an object.
holds a vector of ns3::NetDevice pointers
Iterator End(void) const
Get an iterator which indicates past-the-last NetDevice in the container.
uint32_t GetN(void) const
Get the number of Ptr<NetDevice> stored in this container.
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
Iterator Begin(void) const
Get an iterator which refers to the first NetDevice in the container.
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
virtual Ipv4Address GetUeDefaultGatewayAddress()
virtual Ptr< Node > GetPgwNode() const
Get the PGW node.
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Assign IPv4 addresses to UE devices.
keep track of a set of node pointers.
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
uint32_t GetN(void) const
Get the number of Ptr<Node> stored in this container.
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
void Add(NodeContainer other)
Append the contents of another NodeContainer to the end of this container.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
uint32_t GetNDevices(void) const
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Build a set of PointToPointNetDevice objects.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
NetDeviceContainer Install(NodeContainer c)
Hold objects of type Ptr<T>.
Hold variables of type string.
std::string Get(void) const
Simulation virtual time values and global simulation resolution.
AttributeValue implementation for Time.
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
Hold an unsigned integer type.
Vector3D Vector
Vector alias typedef for compatibility with mobility models.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Ptr< const AttributeChecker > MakeStringChecker(void)
void SetDefault(std::string name, const AttributeValue &value)
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
static ns3::GlobalValue g_macroEnbTxPowerDbm("macroEnbTxPowerDbm", "TX power [dBm] used by macro eNBs", ns3::DoubleValue(46.0), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_nMacroEnbSites("nMacroEnbSites", "How many macro sites there are", ns3::UintegerValue(3), ns3::MakeUintegerChecker< uint32_t >())
bool AreOverlapping(Box a, Box b)
static ns3::GlobalValue g_generateRem("generateRem", "if true, will generate a REM and then abort the simulation;" "if false, will run the simulation normally (without generating any REM)", ns3::BooleanValue(false), ns3::MakeBooleanChecker())
static ns3::GlobalValue g_homeEnbDeploymentRatio("homeEnbDeploymentRatio", "The HeNB deployment ratio as per 3GPP R4-092042", ns3::DoubleValue(0.2), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_srsPeriodicity("srsPeriodicity", "SRS Periodicity (has to be at least " "greater than the number of UEs per eNB)", ns3::UintegerValue(80), ns3::MakeUintegerChecker< uint16_t >())
static ns3::GlobalValue g_fadingTrace("fadingTrace", "The path of the fading trace (by default no fading trace " "is loaded, i.e., fading is not considered)", ns3::StringValue(""), ns3::MakeStringChecker())
static ns3::GlobalValue g_outdoorUeMaxSpeed("outdoorUeMaxSpeed", "Maximum speed value of macro UE with random waypoint model [m/s].", ns3::DoubleValue(0.0), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_macroUeDensity("macroUeDensity", "How many macrocell UEs there are per square meter", ns3::DoubleValue(0.00002), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_homeEnbTxPowerDbm("homeEnbTxPowerDbm", "TX power [dBm] used by HeNBs", ns3::DoubleValue(20.0), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_homeEnbBandwidth("homeEnbBandwidth", "bandwidth [num RBs] used by HeNBs", ns3::UintegerValue(25), ns3::MakeUintegerChecker< uint16_t >())
static ns3::GlobalValue g_simTime("simTime", "Total duration of the simulation [s]", ns3::DoubleValue(0.25), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_outdoorUeMinSpeed("outdoorUeMinSpeed", "Minimum speed value of macro UE with random waypoint model [m/s].", ns3::DoubleValue(0.0), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_homeEnbDlEarfcn("homeEnbDlEarfcn", "DL EARFCN used by HeNBs", ns3::UintegerValue(100), ns3::MakeUintegerChecker< uint16_t >())
static ns3::GlobalValue g_nApartmentsX("nApartmentsX", "Number of apartments along the X axis in a femtocell block", ns3::UintegerValue(10), ns3::MakeUintegerChecker< uint32_t >())
void PrintGnuplottableEnbListToFile(std::string filename)
static ns3::GlobalValue g_homeEnbActivationRatio("homeEnbActivationRatio", "The HeNB activation ratio as per 3GPP R4-092042", ns3::DoubleValue(0.5), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_nMacroEnbSitesX("nMacroEnbSitesX", "(minimum) number of sites along the X-axis of the hex grid", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint32_t >())
static ns3::GlobalValue g_nFloors("nFloors", "Number of floors", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint32_t >())
void PrintGnuplottableBuildingListToFile(std::string filename)
static ns3::GlobalValue g_macroEnbBandwidth("macroEnbBandwidth", "bandwidth [num RBs] used by macro eNBs", ns3::UintegerValue(25), ns3::MakeUintegerChecker< uint16_t >())
static ns3::GlobalValue g_remRbId("remRbId", "Resource Block Id of Data Channel, for which REM will be generated;" "default value is -1, what means REM will be averaged from all RBs of " "Control Channel", ns3::IntegerValue(-1), MakeIntegerChecker< int32_t >())
static ns3::GlobalValue g_epc("epc", "If true, will setup the EPC to simulate an end-to-end topology, " "with real IP applications over PDCP and RLC UM (or RLC AM by changing " "the default value of EpsBearerToRlcMapping e.g. to RLC_AM_ALWAYS). " "If false, only the LTE radio access will be simulated with RLC SM. ", ns3::BooleanValue(false), ns3::MakeBooleanChecker())
static ns3::GlobalValue g_epcDl("epcDl", "if true, will activate data flows in the downlink when EPC is being used. " "If false, downlink flows won't be activated. " "If EPC is not used, this parameter will be ignored.", ns3::BooleanValue(true), ns3::MakeBooleanChecker())
static ns3::GlobalValue g_homeUesHomeEnbRatio("homeUesHomeEnbRatio", "How many (on average) home UEs per HeNB there are in the simulation", ns3::DoubleValue(1.0), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_nBlocks("nBlocks", "Number of femtocell blocks", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint32_t >())
static ns3::GlobalValue g_useUdp("useUdp", "if true, the UdpClient application will be used. " "Otherwise, the BulkSend application will be used over a TCP connection. " "If EPC is not used, this parameter will be ignored.", ns3::BooleanValue(true), ns3::MakeBooleanChecker())
static ns3::GlobalValue g_numBearersPerUe("numBearersPerUe", "How many bearers per UE there are in the simulation", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint16_t >())
static ns3::GlobalValue g_areaMarginFactor("areaMarginFactor", "how much the UE area extends outside the macrocell grid, " "expressed as fraction of the interSiteDistance", ns3::DoubleValue(0.5), ns3::MakeDoubleChecker< double >())
void PrintGnuplottableUeListToFile(std::string filename)
static ns3::GlobalValue g_interSiteDistance("interSiteDistance", "min distance between two nearby macro cell sites", ns3::DoubleValue(500), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_epcUl("epcUl", "if true, will activate data flows in the uplink when EPC is being used. " "If false, uplink flows won't be activated. " "If EPC is not used, this parameter will be ignored.", ns3::BooleanValue(true), ns3::MakeBooleanChecker())
static ns3::GlobalValue g_macroEnbDlEarfcn("macroEnbDlEarfcn", "DL EARFCN used by macro eNBs", ns3::UintegerValue(100), ns3::MakeUintegerChecker< uint16_t >())
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Implement the data structure representing a TrafficFlowTemplate Packet Filter.
uint16_t localPortEnd
end of the port number range of the UE
uint16_t remotePortEnd
end of the port number range of the remote host
uint16_t remotePortStart
start of the port number range of the remote host
uint16_t localPortStart
start of the port number range of the UE
static Vector GetPosition(Ptr< Node > node)