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>
60 bool OverlapsWithAnyPrevious (
Box);
74 m_nApartmentsX (nApartmentsX),
76 m_xSize (nApartmentsX*10 + 20),
79 m_xMinVar = CreateObject<UniformRandomVariable> ();
82 m_yMinVar = CreateObject<UniformRandomVariable> ();
90 for (uint32_t i = 0; i < n; ++i)
100 uint32_t attempt = 0;
103 NS_ASSERT_MSG (attempt < 100,
"Too many failed attemtps to position apartment block. Too many blocks? Too small area?");
112 NS_LOG_LOGIC (
"allocated non overlapping block " << box);
115 gridBuildingAllocator = CreateObject<GridBuildingAllocator> ();
127 gridBuildingAllocator->
Create (2);
146 std::ofstream outFile;
147 outFile.open (filename.c_str (), std::ios_base::out | std::ios_base::trunc);
148 if (!outFile.is_open ())
157 Box box = (*it)->GetBoundaries ();
158 outFile <<
"set object " << index
159 <<
" rect from " << box.
xMin <<
"," << box.
yMin
160 <<
" to " << box.
xMax <<
"," << box.
yMax
161 <<
" front fs empty "
169 std::ofstream outFile;
170 outFile.open (filename.c_str (), std::ios_base::out | std::ios_base::trunc);
171 if (!outFile.is_open ())
180 for (
int j = 0; j < nDevs; j++)
186 outFile <<
"set label \"" << uedev->
GetImsi ()
187 <<
"\" 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"
197 std::ofstream outFile;
198 outFile.open (filename.c_str (), std::ios_base::out | std::ios_base::trunc);
199 if (!outFile.is_open ())
208 for (
int j = 0; j < nDevs; j++)
214 outFile <<
"set label \"" << enbdev->
GetCellId ()
215 <<
"\" at "<< pos.
x <<
"," << pos.
y
216 <<
" left font \"Helvetica,4\" textcolor rgb \"white\" front point pt 2 ps 0.3 lc rgb \"white\" offset 0,0"
225 "Number of femtocell blocks",
227 ns3::MakeUintegerChecker<uint32_t> ());
229 "Number of apartments along the X axis in a femtocell block",
231 ns3::MakeUintegerChecker<uint32_t> ());
235 ns3::MakeUintegerChecker<uint32_t> ());
237 "How many macro sites there are",
239 ns3::MakeUintegerChecker<uint32_t> ());
241 "(minimum) number of sites along the X-axis of the hex grid",
243 ns3::MakeUintegerChecker<uint32_t> ());
245 "min distance between two nearby macro cell sites",
247 ns3::MakeDoubleChecker<double> ());
249 "how much the UE area extends outside the macrocell grid, "
250 "expressed as fraction of the interSiteDistance",
252 ns3::MakeDoubleChecker<double> ());
254 "How many macrocell UEs there are per square meter",
256 ns3::MakeDoubleChecker<double> ());
258 "The HeNB deployment ratio as per 3GPP R4-092042",
260 ns3::MakeDoubleChecker<double> ());
262 "The HeNB activation ratio as per 3GPP R4-092042",
264 ns3::MakeDoubleChecker<double> ());
266 "How many (on average) home UEs per HeNB there are in the simulation",
268 ns3::MakeDoubleChecker<double> ());
270 "TX power [dBm] used by macro eNBs",
272 ns3::MakeDoubleChecker<double> ());
274 "TX power [dBm] used by HeNBs",
276 ns3::MakeDoubleChecker<double> ());
278 "DL EARFCN used by macro eNBs",
280 ns3::MakeUintegerChecker<uint16_t> ());
282 "DL EARFCN used by HeNBs",
284 ns3::MakeUintegerChecker<uint16_t> ());
286 "bandwidth [num RBs] used by macro eNBs",
288 ns3::MakeUintegerChecker<uint16_t> ());
290 "bandwidth [num RBs] used by HeNBs",
292 ns3::MakeUintegerChecker<uint16_t> ());
294 "Total duration of the simulation [s]",
296 ns3::MakeDoubleChecker<double> ());
298 "if true, will generate a REM and then abort the simulation;"
299 "if false, will run the simulation normally (without generating any REM)",
301 ns3::MakeBooleanChecker ());
303 "Resource Block Id of Data Channel, for which REM will be generated;"
304 "default value is -1, what means REM will be averaged from all RBs of "
307 MakeIntegerChecker<int32_t> ());
309 "If true, will setup the EPC to simulate an end-to-end topology, "
310 "with real IP applications over PDCP and RLC UM (or RLC AM by changing "
311 "the default value of EpsBearerToRlcMapping e.g. to RLC_AM_ALWAYS). "
312 "If false, only the LTE radio access will be simulated with RLC SM. ",
314 ns3::MakeBooleanChecker ());
316 "if true, will activate data flows in the downlink when EPC is being used. "
317 "If false, downlink flows won't be activated. "
318 "If EPC is not used, this parameter will be ignored.",
320 ns3::MakeBooleanChecker ());
322 "if true, will activate data flows in the uplink when EPC is being used. "
323 "If false, uplink flows won't be activated. "
324 "If EPC is not used, this parameter will be ignored.",
326 ns3::MakeBooleanChecker ());
328 "if true, the UdpClient application will be used. "
329 "Otherwise, the BulkSend application will be used over a TCP connection. "
330 "If EPC is not used, this parameter will be ignored.",
332 ns3::MakeBooleanChecker ());
334 "The path of the fading trace (by default no fading trace "
335 "is loaded, i.e., fading is not considered)",
337 ns3::MakeStringChecker ());
339 "How many bearers per UE there are in the simulation",
341 ns3::MakeUintegerChecker<uint16_t> ());
343 "SRS Periodicity (has to be at least "
344 "greater than the number of UEs per eNB)",
346 ns3::MakeUintegerChecker<uint16_t> ());
348 "Minimum speed value of macor UE with random waypoint model [m/s].",
350 ns3::MakeDoubleChecker<double> ());
352 "Maximum speed value of macor UE with random waypoint model [m/s].",
354 ns3::MakeDoubleChecker<double> ());
367 cmd.
Parse (argc, argv);
371 cmd.
Parse (argc, argv);
379 GlobalValue::GetValueByName (
"nBlocks", uintegerValue);
380 uint32_t nBlocks = uintegerValue.
Get ();
381 GlobalValue::GetValueByName (
"nApartmentsX", uintegerValue);
382 uint32_t nApartmentsX = uintegerValue.
Get ();
383 GlobalValue::GetValueByName (
"nFloors", uintegerValue);
384 uint32_t nFloors = uintegerValue.
Get ();
385 GlobalValue::GetValueByName (
"nMacroEnbSites", uintegerValue);
386 uint32_t nMacroEnbSites = uintegerValue.
Get ();
387 GlobalValue::GetValueByName (
"nMacroEnbSitesX", uintegerValue);
388 uint32_t nMacroEnbSitesX = uintegerValue.
Get ();
389 GlobalValue::GetValueByName (
"interSiteDistance", doubleValue);
390 double interSiteDistance = doubleValue.
Get ();
391 GlobalValue::GetValueByName (
"areaMarginFactor", doubleValue);
392 double areaMarginFactor = doubleValue.
Get ();
393 GlobalValue::GetValueByName (
"macroUeDensity", doubleValue);
394 double macroUeDensity = doubleValue.
Get ();
395 GlobalValue::GetValueByName (
"homeEnbDeploymentRatio", doubleValue);
396 double homeEnbDeploymentRatio = doubleValue.
Get ();
397 GlobalValue::GetValueByName (
"homeEnbActivationRatio", doubleValue);
398 double homeEnbActivationRatio = doubleValue.
Get ();
399 GlobalValue::GetValueByName (
"homeUesHomeEnbRatio", doubleValue);
400 double homeUesHomeEnbRatio = doubleValue.
Get ();
401 GlobalValue::GetValueByName (
"macroEnbTxPowerDbm", doubleValue);
402 double macroEnbTxPowerDbm = doubleValue.
Get ();
403 GlobalValue::GetValueByName (
"homeEnbTxPowerDbm", doubleValue);
404 double homeEnbTxPowerDbm = doubleValue.
Get ();
405 GlobalValue::GetValueByName (
"macroEnbDlEarfcn", uintegerValue);
406 uint16_t macroEnbDlEarfcn = uintegerValue.
Get ();
407 GlobalValue::GetValueByName (
"homeEnbDlEarfcn", uintegerValue);
408 uint16_t homeEnbDlEarfcn = uintegerValue.
Get ();
409 GlobalValue::GetValueByName (
"macroEnbBandwidth", uintegerValue);
410 uint16_t macroEnbBandwidth = uintegerValue.
Get ();
411 GlobalValue::GetValueByName (
"homeEnbBandwidth", uintegerValue);
412 uint16_t homeEnbBandwidth = uintegerValue.
Get ();
413 GlobalValue::GetValueByName (
"simTime", doubleValue);
414 double simTime = doubleValue.
Get ();
415 GlobalValue::GetValueByName (
"epc", booleanValue);
416 bool epc = booleanValue.
Get ();
417 GlobalValue::GetValueByName (
"epcDl", booleanValue);
418 bool epcDl = booleanValue.
Get ();
419 GlobalValue::GetValueByName (
"epcUl", booleanValue);
420 bool epcUl = booleanValue.
Get ();
421 GlobalValue::GetValueByName (
"useUdp", booleanValue);
422 bool useUdp = booleanValue.
Get ();
423 GlobalValue::GetValueByName (
"generateRem", booleanValue);
424 bool generateRem = booleanValue.
Get ();
425 GlobalValue::GetValueByName (
"remRbId", integerValue);
426 int32_t remRbId = integerValue.
Get ();
427 GlobalValue::GetValueByName (
"fadingTrace", stringValue);
428 std::string fadingTrace = stringValue.
Get ();
429 GlobalValue::GetValueByName (
"numBearersPerUe", uintegerValue);
430 uint16_t numBearersPerUe = uintegerValue.
Get ();
431 GlobalValue::GetValueByName (
"srsPeriodicity", uintegerValue);
432 uint16_t srsPeriodicity = uintegerValue.
Get ();
433 GlobalValue::GetValueByName (
"outdoorUeMinSpeed", doubleValue);
434 uint16_t outdoorUeMinSpeed = doubleValue.
Get ();
435 GlobalValue::GetValueByName (
"outdoorUeMaxSpeed", doubleValue);
436 uint16_t outdoorUeMaxSpeed = doubleValue.
Get ();
442 if (nMacroEnbSites > 0)
444 uint32_t currentSite = nMacroEnbSites -1;
445 uint32_t biRowIndex = (currentSite / (nMacroEnbSitesX + nMacroEnbSitesX + 1));
446 uint32_t biRowRemainder = currentSite % (nMacroEnbSitesX + nMacroEnbSitesX + 1);
447 uint32_t rowIndex = biRowIndex*2 + 1;
448 if (biRowRemainder >= nMacroEnbSitesX)
452 uint32_t nMacroEnbSitesY = rowIndex;
455 macroUeBox =
Box (-areaMarginFactor*interSiteDistance,
456 (nMacroEnbSitesX + areaMarginFactor)*interSiteDistance,
457 -areaMarginFactor*interSiteDistance,
458 (nMacroEnbSitesY -1)*interSiteDistance*sqrt (0.75) + areaMarginFactor*interSiteDistance,
464 macroUeBox =
Box (0, 150, 0, 150, ueZ, ueZ);
468 blockAllocator.
Create (nBlocks);
471 uint32_t nHomeEnbs = round (4 * nApartmentsX * nBlocks * nFloors * homeEnbDeploymentRatio * homeEnbActivationRatio);
473 uint32_t nHomeUes = round (nHomeEnbs * homeUesHomeEnbRatio);
475 double macroUeAreaSize = (macroUeBox.
xMax - macroUeBox.
xMin) * (macroUeBox.
yMax - macroUeBox.
yMin);
476 uint32_t nMacroUes = round (macroUeAreaSize * macroUeDensity);
477 NS_LOG_LOGIC (
"nMacroUes = " << nMacroUes <<
" (density=" << macroUeDensity <<
")");
480 homeEnbs.
Create (nHomeEnbs);
482 macroEnbs.
Create (3 * nMacroEnbSites);
484 homeUes.
Create (nHomeUes);
486 macroUes.
Create (nMacroUes);
504 if (!fadingTrace.empty ())
514 epcHelper = CreateObject<PointToPointEpcHelper> ();
521 BuildingsHelper::Install (macroEnbs);
548 BuildingsHelper::Install (homeEnbs);
560 positionAlloc = CreateObject<SameRoomPositionAllocator> (homeEnbs);
563 BuildingsHelper::Install (homeUes);
569 NS_LOG_LOGIC (
"randomly allocating macro UEs in " << macroUeBox <<
" speedMin " << outdoorUeMinSpeed <<
" speedMax " << outdoorUeMaxSpeed);
570 if (outdoorUeMaxSpeed!=0.0)
586 positionAlloc = CreateObject<RandomBoxPositionAllocator> ();
594 it != macroUes.
End ();
597 (*it)->Initialize ();
602 positionAlloc = CreateObject<RandomBoxPositionAllocator> ();
618 BuildingsHelper::Install (macroUes);
635 remoteHostContainer.
Create (1);
636 remoteHost = remoteHostContainer.
Get (0);
638 internet.
Install (remoteHostContainer);
648 ipv4h.
SetBase (
"1.0.0.0",
"255.0.0.0");
651 remoteHostAddr = internetIpIfaces.
GetAddress (1);
660 ueDevs.
Add (homeUeDevs);
661 ueDevs.
Add (macroUeDevs);
669 lteHelper->
Attach (macroUeDevs);
670 lteHelper->
Attach (homeUeDevs);
680 for (ueDevIt = homeUeDevs.
Begin (), enbDevIt = homeEnbDevs.
Begin ();
681 ueDevIt != homeUeDevs.
End (); ++ueDevIt, ++enbDevIt)
685 if (enbDevIt == homeEnbDevs.
End ())
687 enbDevIt = homeEnbDevs.
Begin ();
689 lteHelper->
Attach (*ueDevIt, *enbDevIt);
698 uint16_t dlPort = 10000;
699 uint16_t ulPort = 20000;
718 for (uint32_t u = 0; u < ues.
GetN (); ++u)
725 for (uint32_t b = 0; b < numBearersPerUe; ++b)
739 clientApps.
Add (dlClientHelper.Install (remoteHost));
742 serverApps.
Add (dlPacketSinkHelper.
Install (ue));
751 serverApps.
Add (ulPacketSinkHelper.
Install (remoteHost));
762 clientApps.
Add (dlClientHelper.
Install (remoteHost));
765 serverApps.
Add (dlPacketSinkHelper.
Install (ue));
776 serverApps.
Add (ulPacketSinkHelper.
Install (remoteHost));
798 EpsBearer bearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT);
802 serverApps.
Start (startTime);
803 clientApps.
Start (startTime);
813 ueDevs.
Add (homeUeDevs);
814 ueDevs.
Add (macroUeDevs);
815 for (uint32_t u = 0; u < ueDevs.
GetN (); ++u)
818 for (uint32_t b = 0; b < numBearersPerUe; ++b)
827 BuildingsHelper::MakeMobilityModelConsistent ();
836 remHelper = CreateObject<RadioEnvironmentMapHelper> ();
856 Simulator::Stop (
Seconds (simTime));
872 Simulator::Destroy ();
holds a vector of ns3::Application pointers.
Doxygen introspection did not find any typical Config paths.
double x
x coordinate of vector
Iterator Begin(void) const
Get an iterator which refers to the first NetDevice in the container.
uint8_t Add(PacketFilter f)
add a PacketFilter to the Traffic Flow Template
Simulation virtual time values and global simulation resolution.
void SetPathlossModelAttribute(std::string n, const AttributeValue &v)
set an attribute for the pathloss model to be created
bool AreOverlapping(Box a, Box b)
std::string Get(void) const
void PrintGnuplottableEnbListToFile(std::string filename)
NetDeviceContainer InstallEnbDevice(NodeContainer c)
create a set of eNB devices
A helper to make it easier to instantiate an ns3::BulkSendApplication on a set of nodes...
holds a vector of std::pair of Ptr and interface index.
uint16_t GetCellId() const
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())
void SetDefaultRoute(Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a default route to the static routing table.
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
static ns3::GlobalValue g_macroEnbTxPowerDbm("macroEnbTxPowerDbm","TX power [dBm] used by macro eNBs", ns3::DoubleValue(46.0), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_homeEnbBandwidth("homeEnbBandwidth","bandwidth [num RBs] used by HeNBs", ns3::UintegerValue(25), ns3::MakeUintegerChecker< uint16_t >())
hold variables of type string
Ptr< UniformRandomVariable > m_xMinVar
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
static ns3::GlobalValue g_outdoorUeMaxSpeed("outdoorUeMaxSpeed","Maximum speed value of macor UE with random waypoint model [m/s].", ns3::DoubleValue(0.0), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_interSiteDistance("interSiteDistance","min distance between two nearby macro cell sites", ns3::DoubleValue(500), ns3::MakeDoubleChecker< double >())
NetDeviceContainer Install(NodeContainer c)
a class to represent an Ipv4 address mask
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container. ...
static Vector GetPosition(Ptr< Node > node)
virtual Ptr< Node > GetPgwNode()
Hold a signed integer type.
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.
void EnableRlcTraces(void)
Enable trace sinks for RLC layer.
aggregate IP/TCP/UDP functionality to existing Nodes.
uint16_t localPortEnd
end of the port number range of the UE
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
void SetUeDeviceAttribute(std::string n, const AttributeValue &v)
set an attribute for the LteUeNetDevice to be created
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 >())
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes...
void SetLteHelper(Ptr< LteHelper > h)
Set the LteHelper to be used to actually create the EnbNetDevices.
Build a set of PointToPointNetDevice objects.
FemtocellBlockAllocator(Box area, uint32_t nApartmentsX, uint32_t nFloors)
hold a so-called 'global value'.
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Call ActivateDataRadioBearer (ueDevice, bearer) for each UE device in a given set.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
NetDeviceContainer SetPositionAndInstallEnbDevice(NodeContainer c)
Position the nodes on a hex grid and install the corresponding EnbNetDevices with antenna boresight c...
static ns3::GlobalValue g_macroUeDensity("macroUeDensity","How many macrocell UEs there are per square meter", ns3::DoubleValue(0.00002), ns3::MakeDoubleChecker< double >())
ApplicationContainer Install(NodeContainer c)
Ptr< UniformRandomVariable > m_yMinVar
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())
uint32_t GetN(void) const
Get the number of Ptr stored in this container.
uint32_t GetN(void) const
Get the number of Ptr stored in this container.
Class for representing data rates.
void EnablePdcpTraces(void)
Enable trace sinks for PDCP layer.
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 >())
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...
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())
Keep track of the current position and velocity of an object.
ApplicationContainer Install(NodeContainer c) const
Install an ns3::BulkSendApplication on each node of the input container configured with all the attri...
This class contains the specification of EPS Bearers.
static ns3::GlobalValue g_homeEnbActivationRatio("homeEnbActivationRatio","The HeNB activation ratio as per 3GPP R4-092042", ns3::DoubleValue(0.5), ns3::MakeDoubleChecker< double >())
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
Attribute for objects of type ns3::Time.
static ns3::GlobalValue g_simTime("simTime","Total duration of the simulation [s]", ns3::DoubleValue(0.25), ns3::MakeDoubleChecker< double >())
static ns3::GlobalValue g_nMacroEnbSites("nMacroEnbSites","How many macro sites there are", ns3::UintegerValue(3), ns3::MakeUintegerChecker< uint32_t >())
static ns3::GlobalValue g_homeEnbDeploymentRatio("homeEnbDeploymentRatio","The HeNB deployment ratio as per 3GPP R4-092042", ns3::DoubleValue(0.2), ns3::MakeDoubleChecker< double >())
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
BuildingContainer Create(uint32_t n) const
Create a set of buildings allocated on a grid.
Hold an unsigned integer type.
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_outdoorUeMinSpeed("outdoorUeMinSpeed","Minimum speed value of macor UE with random waypoint model [m/s].", ns3::DoubleValue(0.0), ns3::MakeDoubleChecker< double >())
holds a vector of ns3::NetDevice pointers
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
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 >())
std::vector< Ptr< Building > >::const_iterator Iterator
static ns3::GlobalValue g_homeEnbDlEarfcn("homeEnbDlEarfcn","DL EARFCN used by HeNBs", ns3::UintegerValue(100), ns3::MakeUintegerChecker< uint16_t >())
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter...
Parse command-line arguments.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
void SetEnbAntennaModelType(std::string type)
void SetSpectrumChannelType(std::string type)
void ConfigureDefaults(void)
Access to the Ipv4 forwarding table, interfaces, and configuration.
uint32_t GetNDevices(void) const
void SetFadingModelAttribute(std::string n, const AttributeValue &v)
set an attribute of the fading model
void PrintGnuplottableUeListToFile(std::string filename)
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 >())
uint16_t remotePortEnd
end of the port number range of the remote host
void SetDefault(std::string name, const AttributeValue &value)
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 ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, EpsBearer bearer, Ptr< EpcTft > tft)
Activate a dedicated EPS bearer on a given set of UE devices.
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())
virtual Ipv4Address GetUeDefaultGatewayAddress()
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_nBlocks("nBlocks","Number of femtocell blocks", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint32_t >())
keep track of a set of node pointers.
static ns3::GlobalValue g_nFloors("nFloors","Number of floors", ns3::UintegerValue(1), ns3::MakeUintegerChecker< uint32_t >())
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
static ns3::GlobalValue g_homeEnbTxPowerDbm("homeEnbTxPowerDbm","TX power [dBm] used by HeNBs", ns3::DoubleValue(20.0), ns3::MakeDoubleChecker< double >())
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
int main(int argc, char *argv[])
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())
void Install()
Deploy the RemSpectrumPhy objects that generate the map according to the specified settings...
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
void AddX2Interface(NodeContainer enbNodes)
Create an X2 interface between all the eNBs in a given set.
double y
y coordinate of vector
std::list< Box > m_previousBlocks
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
NetDeviceContainer InstallUeDevice(NodeContainer c)
create a set of UE devices
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Assign IPv4 addresses to UE devices.
void SetBuildingAttribute(std::string n, const AttributeValue &v)
Set an attribute to be used for each new building to be created.
Helper class used to assign positions and mobility models to nodes.
void AddNetworkRouteTo(Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a network route to the static routing table.
Ipv4 addresses are stored in host order in this class.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
void Add(NodeContainer other)
Append the contents of another NodeContainer to the end of this container.
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...
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 ...
static ns3::GlobalValue g_macroEnbBandwidth("macroEnbBandwidth","bandwidth [num RBs] used by macro eNBs", ns3::UintegerValue(25), ns3::MakeUintegerChecker< uint16_t >())
Helper class that adds ns3::Ipv4StaticRouting objects.
hold objects of type ns3::DataRate
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
Time Seconds(double value)
Construct a Time in the indicated unit.
void PrintGnuplottableBuildingListToFile(std::string filename)
void SetEnbAntennaModelAttribute(std::string n, const AttributeValue &v)
set an attribute for the AntennaModel to be used for the eNBs
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
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 >())
void Parse(int argc, char *argv[])
Parse the program arguments.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes, not the socket attributes...
void EnableMacTraces(void)
Enable trace sinks for MAC layer.
bool OverlapsWithAnyPrevious(Box)
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
Iterator End(void) const
Get an iterator which indicates past-the-last NetDevice in the container.
Hold a floating point type.
void SetAttribute(std::string name, const AttributeValue &value)
The eNodeB device implementation.
Ptr< T > GetObject(void) const
static ns3::GlobalValue g_macroEnbDlEarfcn("macroEnbDlEarfcn","DL EARFCN used by macro eNBs", ns3::UintegerValue(100), ns3::MakeUintegerChecker< uint16_t >())
uint16_t remotePortStart
start of the port number range of the remote host
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Implement the data structure representing a TrafficFlowTemplate Packet Filter.
void SetEnbDeviceAttribute(std::string n, const AttributeValue &v)
set an attribute for the LteEnbNetDevice to be created
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
uint16_t localPortStart
start of the port number range of the UE
The LteUeNetDevice class implements the UE net device.