20 #include <ns3/applications-module.h>
21 #include <ns3/buildings-module.h>
22 #include <ns3/config-store-module.h>
23 #include <ns3/core-module.h>
24 #include <ns3/internet-module.h>
26 #include <ns3/lte-module.h>
27 #include <ns3/mobility-module.h>
28 #include <ns3/network-module.h>
29 #include <ns3/point-to-point-helper.h>
88 bool OverlapsWithAnyPrevious(
Box box);
101 m_nApartmentsX(nApartmentsX),
103 m_xSize(nApartmentsX * 10 + 20),
106 m_xMinVar = CreateObject<UniformRandomVariable>();
109 m_yMinVar = CreateObject<UniformRandomVariable>();
117 for (uint32_t i = 0; i < n; ++i)
127 uint32_t attempt = 0;
131 "Too many failed attempts to position apartment block. Too many blocks? Too "
140 NS_LOG_LOGIC(
"allocated non overlapping block " << box);
143 gridBuildingAllocator = CreateObject<GridBuildingAllocator>();
144 gridBuildingAllocator->SetAttribute(
"GridWidth",
UintegerValue(1));
146 gridBuildingAllocator->SetAttribute(
"LengthY",
DoubleValue(10 * 2));
147 gridBuildingAllocator->SetAttribute(
"DeltaX",
DoubleValue(10));
148 gridBuildingAllocator->SetAttribute(
"DeltaY",
DoubleValue(10));
151 gridBuildingAllocator->SetBuildingAttribute(
"NRoomsY",
UintegerValue(2));
153 gridBuildingAllocator->SetAttribute(
"MinX",
DoubleValue(box.
xMin + 10));
154 gridBuildingAllocator->SetAttribute(
"MinY",
DoubleValue(box.
yMin + 10));
155 gridBuildingAllocator->Create(2);
179 std::ofstream outFile;
180 outFile.open(filename, std::ios_base::out | std::ios_base::trunc);
181 if (!outFile.is_open())
187 for (
auto it = BuildingList::Begin(); it != BuildingList::End(); ++it)
190 Box box = (*it)->GetBoundaries();
191 outFile <<
"set object " << index <<
" rect from " << box.
xMin <<
"," << box.
yMin <<
" to "
192 << box.
xMax <<
"," << box.
yMax <<
" front fs empty " << std::endl;
204 std::ofstream outFile;
205 outFile.open(filename, std::ios_base::out | std::ios_base::trunc);
206 if (!outFile.is_open())
211 for (
auto it = NodeList::Begin(); it != NodeList::End(); ++it)
215 for (
int j = 0; j < nDevs; j++)
221 outFile <<
"set label \"" << uedev->GetImsi() <<
"\" at " << pos.x <<
"," << pos.y
222 <<
" left font \"Helvetica,4\" textcolor rgb \"grey\" front point pt 1 ps "
223 "0.3 lc rgb \"grey\" offset 0,0"
238 std::ofstream outFile;
239 outFile.open(filename, std::ios_base::out | std::ios_base::trunc);
240 if (!outFile.is_open())
245 for (
auto it = NodeList::Begin(); it != NodeList::End(); ++it)
249 for (
int j = 0; j < nDevs; j++)
255 outFile <<
"set label \"" << enbdev->
GetCellId() <<
"\" at " << pos.x <<
","
257 <<
" left font \"Helvetica,4\" textcolor rgb \"white\" front point pt 2 "
258 "ps 0.3 lc rgb \"white\" offset 0,0"
267 "Number of femtocell blocks",
269 ns3::MakeUintegerChecker<uint32_t>());
273 "Number of apartments along the X axis in a femtocell block",
275 ns3::MakeUintegerChecker<uint32_t>());
281 ns3::MakeUintegerChecker<uint32_t>());
285 "How many macro sites there are",
287 ns3::MakeUintegerChecker<uint32_t>());
292 "(minimum) number of sites along the X-axis of the hex grid",
294 ns3::MakeUintegerChecker<uint32_t>());
298 "min distance between two nearby macro cell sites",
300 ns3::MakeDoubleChecker<double>());
306 "how much the UE area extends outside the macrocell grid, "
307 "expressed as fraction of the interSiteDistance",
309 ns3::MakeDoubleChecker<double>());
313 "How many macrocell UEs there are per square meter",
315 ns3::MakeDoubleChecker<double>());
319 "The HeNB deployment ratio as per 3GPP R4-092042",
321 ns3::MakeDoubleChecker<double>());
325 "The HeNB activation ratio as per 3GPP R4-092042",
327 ns3::MakeDoubleChecker<double>());
331 "homeUesHomeEnbRatio",
332 "How many (on average) home UEs per HeNB there are in the simulation",
334 ns3::MakeDoubleChecker<double>());
338 "TX power [dBm] used by macro eNBs",
340 ns3::MakeDoubleChecker<double>());
344 "TX power [dBm] used by HeNBs",
346 ns3::MakeDoubleChecker<double>());
350 "DL EARFCN used by macro eNBs",
352 ns3::MakeUintegerChecker<uint16_t>());
356 "DL EARFCN used by HeNBs",
358 ns3::MakeUintegerChecker<uint16_t>());
362 "bandwidth [num RBs] used by macro eNBs",
364 ns3::MakeUintegerChecker<uint16_t>());
368 "bandwidth [num RBs] used by HeNBs",
370 ns3::MakeUintegerChecker<uint16_t>());
374 "Total duration of the simulation [s]",
376 ns3::MakeDoubleChecker<double>());
381 "if true, will generate a REM and then abort the simulation;"
382 "if false, will run the simulation normally (without generating any REM)",
389 "Resource Block Id of Data Channel, for which REM will be generated;"
390 "default value is -1, what means REM will be averaged from all RBs of "
393 MakeIntegerChecker<int32_t>());
398 "If true, will setup the EPC to simulate an end-to-end topology, "
399 "with real IP applications over PDCP and RLC UM (or RLC AM by changing "
400 "the default value of EpsBearerToRlcMapping e.g. to RLC_AM_ALWAYS). "
401 "If false, only the LTE radio access will be simulated with RLC SM.",
408 "if true, will activate data flows in the downlink when EPC is being used. "
409 "If false, downlink flows won't be activated. "
410 "If EPC is not used, this parameter will be ignored.",
417 "if true, will activate data flows in the uplink when EPC is being used. "
418 "If false, uplink flows won't be activated. "
419 "If EPC is not used, this parameter will be ignored.",
426 "if true, the UdpClient application will be used. "
427 "Otherwise, the BulkSend application will be used over a TCP connection. "
428 "If EPC is not used, this parameter will be ignored.",
435 "The path of the fading trace (by default no fading trace "
436 "is loaded, i.e., fading is not considered)",
442 "How many bearers per UE there are in the simulation",
444 ns3::MakeUintegerChecker<uint16_t>());
448 "SRS Periodicity (has to be at least "
449 "greater than the number of UEs per eNB)",
451 ns3::MakeUintegerChecker<uint16_t>());
456 "Minimum speed value of macro UE with random waypoint model [m/s].",
458 ns3::MakeDoubleChecker<double>());
463 "Maximum speed value of macro UE with random waypoint model [m/s].",
465 ns3::MakeDoubleChecker<double>());
468 main(
int argc,
char* argv[])
478 cmd.Parse(argc, argv);
482 cmd.Parse(argc, argv);
490 GlobalValue::GetValueByName(
"nBlocks", uintegerValue);
491 uint32_t nBlocks = uintegerValue.
Get();
492 GlobalValue::GetValueByName(
"nApartmentsX", uintegerValue);
493 uint32_t nApartmentsX = uintegerValue.
Get();
494 GlobalValue::GetValueByName(
"nFloors", uintegerValue);
495 uint32_t nFloors = uintegerValue.
Get();
496 GlobalValue::GetValueByName(
"nMacroEnbSites", uintegerValue);
497 uint32_t nMacroEnbSites = uintegerValue.
Get();
498 GlobalValue::GetValueByName(
"nMacroEnbSitesX", uintegerValue);
499 uint32_t nMacroEnbSitesX = uintegerValue.
Get();
500 GlobalValue::GetValueByName(
"interSiteDistance", doubleValue);
501 double interSiteDistance = doubleValue.
Get();
502 GlobalValue::GetValueByName(
"areaMarginFactor", doubleValue);
503 double areaMarginFactor = doubleValue.
Get();
504 GlobalValue::GetValueByName(
"macroUeDensity", doubleValue);
505 double macroUeDensity = doubleValue.
Get();
506 GlobalValue::GetValueByName(
"homeEnbDeploymentRatio", doubleValue);
507 double homeEnbDeploymentRatio = doubleValue.
Get();
508 GlobalValue::GetValueByName(
"homeEnbActivationRatio", doubleValue);
509 double homeEnbActivationRatio = doubleValue.
Get();
510 GlobalValue::GetValueByName(
"homeUesHomeEnbRatio", doubleValue);
511 double homeUesHomeEnbRatio = doubleValue.
Get();
512 GlobalValue::GetValueByName(
"macroEnbTxPowerDbm", doubleValue);
513 double macroEnbTxPowerDbm = doubleValue.
Get();
514 GlobalValue::GetValueByName(
"homeEnbTxPowerDbm", doubleValue);
515 double homeEnbTxPowerDbm = doubleValue.
Get();
516 GlobalValue::GetValueByName(
"macroEnbDlEarfcn", uintegerValue);
517 uint32_t macroEnbDlEarfcn = uintegerValue.
Get();
518 GlobalValue::GetValueByName(
"homeEnbDlEarfcn", uintegerValue);
519 uint32_t homeEnbDlEarfcn = uintegerValue.
Get();
520 GlobalValue::GetValueByName(
"macroEnbBandwidth", uintegerValue);
521 uint16_t macroEnbBandwidth = uintegerValue.
Get();
522 GlobalValue::GetValueByName(
"homeEnbBandwidth", uintegerValue);
523 uint16_t homeEnbBandwidth = uintegerValue.
Get();
524 GlobalValue::GetValueByName(
"simTime", doubleValue);
525 double simTime = doubleValue.
Get();
526 GlobalValue::GetValueByName(
"epc", booleanValue);
527 bool epc = booleanValue.
Get();
528 GlobalValue::GetValueByName(
"epcDl", booleanValue);
529 bool epcDl = booleanValue.
Get();
530 GlobalValue::GetValueByName(
"epcUl", booleanValue);
531 bool epcUl = booleanValue.
Get();
532 GlobalValue::GetValueByName(
"useUdp", booleanValue);
533 bool useUdp = booleanValue.
Get();
534 GlobalValue::GetValueByName(
"generateRem", booleanValue);
535 bool generateRem = booleanValue.
Get();
536 GlobalValue::GetValueByName(
"remRbId", integerValue);
537 int32_t remRbId = integerValue.
Get();
538 GlobalValue::GetValueByName(
"fadingTrace", stringValue);
539 std::string fadingTrace = stringValue.
Get();
540 GlobalValue::GetValueByName(
"numBearersPerUe", uintegerValue);
541 uint16_t numBearersPerUe = uintegerValue.
Get();
542 GlobalValue::GetValueByName(
"srsPeriodicity", uintegerValue);
543 uint16_t srsPeriodicity = uintegerValue.
Get();
544 GlobalValue::GetValueByName(
"outdoorUeMinSpeed", doubleValue);
545 uint16_t outdoorUeMinSpeed = doubleValue.
Get();
546 GlobalValue::GetValueByName(
"outdoorUeMaxSpeed", doubleValue);
547 uint16_t outdoorUeMaxSpeed = doubleValue.
Get();
553 if (nMacroEnbSites > 0)
555 uint32_t currentSite = nMacroEnbSites - 1;
556 uint32_t biRowIndex = (currentSite / (nMacroEnbSitesX + nMacroEnbSitesX + 1));
557 uint32_t biRowRemainder = currentSite % (nMacroEnbSitesX + nMacroEnbSitesX + 1);
558 uint32_t rowIndex = biRowIndex * 2 + 1;
559 if (biRowRemainder >= nMacroEnbSitesX)
563 uint32_t nMacroEnbSitesY = rowIndex;
566 macroUeBox =
Box(-areaMarginFactor * interSiteDistance,
567 (nMacroEnbSitesX + areaMarginFactor) * interSiteDistance,
568 -areaMarginFactor * interSiteDistance,
569 (nMacroEnbSitesY - 1) * interSiteDistance * sqrt(0.75) +
570 areaMarginFactor * interSiteDistance,
577 macroUeBox =
Box(0, 150, 0, 150, ueZ, ueZ);
581 blockAllocator.Create(nBlocks);
583 uint32_t nHomeEnbs = round(4 * nApartmentsX * nBlocks * nFloors * homeEnbDeploymentRatio *
584 homeEnbActivationRatio);
586 uint32_t nHomeUes = round(nHomeEnbs * homeUesHomeEnbRatio);
588 double macroUeAreaSize =
590 uint32_t nMacroUes = round(macroUeAreaSize * macroUeDensity);
591 NS_LOG_LOGIC(
"nMacroUes = " << nMacroUes <<
" (density=" << macroUeDensity <<
")");
594 homeEnbs.
Create(nHomeEnbs);
596 macroEnbs.
Create(3 * nMacroEnbSites);
600 macroUes.
Create(nMacroUes);
603 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
607 StringValue(
"ns3::HybridBuildingsPropagationLossModel"));
618 if (!fadingTrace.empty())
628 epcHelper = CreateObject<PointToPointEpcHelper>();
635 BuildingsHelper::Install(macroEnbs);
637 CreateObject<LteHexGridEnbTopologyHelper>();
638 lteHexGridEnbTopologyHelper->SetLteHelper(lteHelper);
639 lteHexGridEnbTopologyHelper->SetAttribute(
"InterSiteDistance",
DoubleValue(interSiteDistance));
640 lteHexGridEnbTopologyHelper->SetAttribute(
"MinX",
DoubleValue(interSiteDistance / 2));
641 lteHexGridEnbTopologyHelper->SetAttribute(
"GridWidth",
UintegerValue(nMacroEnbSitesX));
651 lteHexGridEnbTopologyHelper->SetPositionAndInstallEnbDevice(macroEnbs);
662 mobility.SetPositionAllocator(positionAlloc);
664 BuildingsHelper::Install(homeEnbs);
676 positionAlloc = CreateObject<SameRoomPositionAllocator>(homeEnbs);
677 mobility.SetPositionAllocator(positionAlloc);
679 BuildingsHelper::Install(homeUes);
685 NS_LOG_LOGIC(
"randomly allocating macro UEs in " << macroUeBox <<
" speedMin "
686 << outdoorUeMinSpeed <<
" speedMax "
687 << outdoorUeMaxSpeed);
688 if (outdoorUeMaxSpeed != 0.0)
690 mobility.SetMobilityModel(
"ns3::SteadyStateRandomWaypointMobilityModel");
710 positionAlloc = CreateObject<RandomBoxPositionAllocator>();
711 mobility.SetPositionAllocator(positionAlloc);
717 for (
auto it = macroUes.
Begin(); it != macroUes.
End(); ++it)
724 positionAlloc = CreateObject<RandomBoxPositionAllocator>();
737 mobility.SetPositionAllocator(positionAlloc);
740 BuildingsHelper::Install(macroUes);
757 remoteHostContainer.
Create(1);
758 remoteHost = remoteHostContainer.
Get(0);
760 internet.Install(remoteHostContainer);
770 ipv4h.
SetBase(
"1.0.0.0",
"255.0.0.0");
773 remoteHostAddr = internetIpIfaces.
GetAddress(1);
778 remoteHostStaticRouting->AddNetworkRouteTo(
Ipv4Address(
"7.0.0.0"),
785 ueDevs.
Add(homeUeDevs);
786 ueDevs.
Add(macroUeDevs);
794 lteHelper->
Attach(macroUeDevs);
795 lteHelper->
Attach(homeUeDevs);
805 for (ueDevIt = homeUeDevs.
Begin(), enbDevIt = homeEnbDevs.
Begin();
806 ueDevIt != homeUeDevs.
End();
807 ++ueDevIt, ++enbDevIt)
811 if (enbDevIt == homeEnbDevs.
End())
813 enbDevIt = homeEnbDevs.
Begin();
815 lteHelper->
Attach(*ueDevIt, *enbDevIt);
824 uint16_t dlPort = 10000;
825 uint16_t ulPort = 20000;
844 for (uint32_t u = 0; u < ues.
GetN(); ++u)
852 for (uint32_t b = 0; b < numBearersPerUe; ++b)
866 clientApps.Add(dlClientHelper.Install(remoteHost));
868 "ns3::UdpSocketFactory",
870 serverApps.Add(dlPacketSinkHelper.Install(ue));
878 "ns3::UdpSocketFactory",
880 serverApps.Add(ulPacketSinkHelper.Install(remoteHost));
889 "ns3::TcpSocketFactory",
892 clientApps.Add(dlClientHelper.Install(remoteHost));
894 "ns3::TcpSocketFactory",
896 serverApps.Add(dlPacketSinkHelper.Install(ue));
906 "ns3::TcpSocketFactory",
908 serverApps.Add(ulPacketSinkHelper.Install(remoteHost));
930 EpsBearer bearer(EpsBearer::NGBR_VIDEO_TCP_DEFAULT);
944 ueDevs.
Add(homeUeDevs);
945 ueDevs.
Add(macroUeDevs);
946 for (uint32_t u = 0; u < ueDevs.
GetN(); ++u)
949 for (uint32_t b = 0; b < numBearersPerUe; ++b)
965 remHelper = CreateObject<RadioEnvironmentMapHelper>();
967 remHelper->SetAttribute(
"OutputFile",
StringValue(
"lena-dual-stripe.rem"));
976 remHelper->SetAttribute(
"UseDataChannel",
BooleanValue(
true));
980 remHelper->Install();
985 Simulator::Stop(
Seconds(simTime));
1000 lteHelper =
nullptr;
1001 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.
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.
A helper to make it easier to instantiate an ns3::BulkSendApplication on a set of nodes.
Parse command-line arguments.
void ConfigureDefaults()
Configure the default values.
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.
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
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 ...
Ptr< SpectrumChannel > GetDownlinkSpectrumChannel() const
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
void EnablePdcpTraces()
Enable trace sinks for PDCP layer.
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()
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 EnableMacTraces()
Enable trace sinks for MAC layer.
void AddX2Interface(NodeContainer enbNodes)
Create an X2 interface between all the eNBs in a given set.
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.
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
uint32_t GetN() const
Get the number of Ptr<NetDevice> stored in this container.
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
Iterator Begin() 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.
Iterator End() const
Get an iterator which indicates past-the-last NetDevice in the container.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Ptr< Node > GetPgwNode() const override
Get the PGW node.
Ipv4Address GetUeDefaultGatewayAddress() override
Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices) override
Assign IPv4 addresses to UE devices.
keep track of a set of node pointers.
Iterator End() const
Get an iterator which indicates past-the-last Node in the container.
uint32_t GetN() const
Get the number of Ptr<Node> stored in this container.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void Add(const NodeContainer &nc)
Append the contents of another NodeContainer to the end of this container.
Iterator Begin() const
Get an iterator which refers to the first Node in the container.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
uint32_t GetNDevices() const
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Ptr< T > GetObject() 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.
Simulation virtual time values and global simulation resolution.
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...
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.
void(* DataRate)(DataRate oldValue, DataRate newValue)
TracedValue callback signature for DataRate.
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 >())
TX power [dBm] used by macro eNBs.
static ns3::GlobalValue g_nMacroEnbSites("nMacroEnbSites", "How many macro sites there are", ns3::UintegerValue(3), ns3::MakeUintegerChecker< uint32_t >())
How many macro sites there are.
bool AreOverlapping(Box a, Box b)
Check if two boxes are overlapping.
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())
If true, will generate a REM and then abort the simulation.
static ns3::GlobalValue g_homeEnbDeploymentRatio("homeEnbDeploymentRatio", "The HeNB deployment ratio as per 3GPP R4-092042", ns3::DoubleValue(0.2), ns3::MakeDoubleChecker< double >())
The HeNB deployment ratio as per 3GPP R4-092042.
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 >())
SRS Periodicity (has to be at least greater than the number of UEs per eNB)
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())
The path of the fading trace (by default no fading trace is loaded, i.e., fading is not considered)
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 >())
Maximum speed value of macro UE with random waypoint model [m/s].
static ns3::GlobalValue g_macroUeDensity("macroUeDensity", "How many macrocell UEs there are per square meter", ns3::DoubleValue(0.00002), ns3::MakeDoubleChecker< double >())
How many macrocell UEs there are per square meter.
static ns3::GlobalValue g_homeEnbTxPowerDbm("homeEnbTxPowerDbm", "TX power [dBm] used by HeNBs", ns3::DoubleValue(20.0), ns3::MakeDoubleChecker< double >())
TX power [dBm] used by HeNBs.
static ns3::GlobalValue g_homeEnbBandwidth("homeEnbBandwidth", "bandwidth [num RBs] used by HeNBs", ns3::UintegerValue(25), ns3::MakeUintegerChecker< uint16_t >())
Bandwidth [num RBs] used by HeNBs.
static ns3::GlobalValue g_simTime("simTime", "Total duration of the simulation [s]", ns3::DoubleValue(0.25), ns3::MakeDoubleChecker< double >())
Total duration of the simulation [s].
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 >())
Minimum speed value of macro UE with random waypoint model [m/s].
static ns3::GlobalValue g_homeEnbDlEarfcn("homeEnbDlEarfcn", "DL EARFCN used by HeNBs", ns3::UintegerValue(100), ns3::MakeUintegerChecker< uint16_t >())
DL EARFCN used by HeNBs.
static ns3::GlobalValue g_nApartmentsX("nApartmentsX", "Number of apartments along the X axis in a femtocell block", ns3::UintegerValue(10), ns3::MakeUintegerChecker< uint32_t >())
Number of apartments along the X axis in a femtocell block.
void PrintGnuplottableEnbListToFile(std::string filename)
Print a list of ENBs that can be plotted using Gnuplot.
static ns3::GlobalValue g_homeEnbActivationRatio("homeEnbActivationRatio", "The HeNB activation ratio as per 3GPP R4-092042", ns3::DoubleValue(0.5), ns3::MakeDoubleChecker< double >())
The HeNB activation ratio as per 3GPP R4-092042.
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 >())
(minimum) number of sites along the X-axis of the hex grid
static ns3::GlobalValue g_nFloors("nFloors", "Number of floors", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint32_t >())
Number of floors.
void PrintGnuplottableBuildingListToFile(std::string filename)
Print a list of buildings that can be plotted using Gnuplot.
static ns3::GlobalValue g_macroEnbBandwidth("macroEnbBandwidth", "bandwidth [num RBs] used by macro eNBs", ns3::UintegerValue(25), ns3::MakeUintegerChecker< uint16_t >())
Bandwidth [num RBs] used by macro eNBs.
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 >())
Resource Block Id of Data Channel, for which REM will be generated.
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())
if true, will activate data flows in the downlink when EPC is being used.
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 >())
How many (on average) home UEs per HeNB there are in the simulation.
static ns3::GlobalValue g_nBlocks("nBlocks", "Number of femtocell blocks", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint32_t >())
Number of femtocell blocks.
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())
if true, the UdpClient application will be used.
static ns3::GlobalValue g_numBearersPerUe("numBearersPerUe", "How many bearers per UE there are in the simulation", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint16_t >())
How many bearers per UE there are in the simulation.
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())
If true, will setup the EPC to simulate an end-to-end topology.
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 >())
how much the UE area extends outside the macrocell grid, expressed as fraction of the interSiteDistan...
void PrintGnuplottableUeListToFile(std::string filename)
Print a list of UEs that can be plotted using Gnuplot.
static ns3::GlobalValue g_interSiteDistance("interSiteDistance", "min distance between two nearby macro cell sites", ns3::DoubleValue(500), ns3::MakeDoubleChecker< double >())
min distance between two nearby macro cell sites
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())
if true, will activate data flows in the uplink when EPC is being used.
static ns3::GlobalValue g_macroEnbDlEarfcn("macroEnbDlEarfcn", "DL EARFCN used by macro eNBs", ns3::UintegerValue(100), ns3::MakeUintegerChecker< uint16_t >())
DL EARFCN used by macro eNBs.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeBooleanChecker()
Ptr< const AttributeChecker > MakeStringChecker()
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