A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-test-phy-error-model.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2013 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Marco Miozzo <marco.miozzo@cttc.es>
18 * Nicola Baldo <nbaldo@cttc.es>
19 */
20
22
23#include <ns3/boolean.h>
24#include <ns3/buildings-helper.h>
25#include <ns3/config.h>
26#include <ns3/double.h>
27#include <ns3/enum.h>
28#include <ns3/eps-bearer.h>
29#include <ns3/ff-mac-scheduler.h>
30#include <ns3/hybrid-buildings-propagation-loss-model.h>
31#include <ns3/integer.h>
32#include <ns3/log.h>
33#include <ns3/lte-enb-net-device.h>
34#include <ns3/lte-enb-phy.h>
35#include <ns3/lte-helper.h>
36#include <ns3/lte-ue-net-device.h>
37#include <ns3/lte-ue-phy.h>
38#include <ns3/lte-ue-rrc.h>
39#include <ns3/mobility-building-info.h>
40#include <ns3/mobility-helper.h>
41#include <ns3/net-device-container.h>
42#include <ns3/node-container.h>
43#include <ns3/object.h>
44#include <ns3/packet.h>
45#include <ns3/ptr.h>
46#include <ns3/radio-bearer-stats-calculator.h>
47#include <ns3/simulator.h>
48#include <ns3/spectrum-error-model.h>
49#include <ns3/spectrum-interference.h>
50#include <ns3/string.h>
51#include <ns3/test.h>
52
53#include <iostream>
54
55using namespace ns3;
56
57NS_LOG_COMPONENT_DEFINE("LteTestPhyErrorModel");
58
60 : TestSuite("lte-phy-error-model", Type::SYSTEM)
61{
62 NS_LOG_INFO("creating LenaTestPhyErrorModelTestCase");
63
64 for (uint32_t rngRun = 1; rngRun <= 3; ++rngRun)
65 {
66 // Tests on DL Control Channels (PCFICH+PDCCH)
67 // the tolerance is calculated with the following octave code:
68 //
69 // n = 1000; # TX packets
70 // for p=1-[0.007 0.045 0.206 0.343]
71 // tol = n*p - binoinv(0.001, n, p)
72 // endfor
73
74 // 1 interfering eNB SINR -2.0 BLER 0.007 TB size 217
75 AddTestCase(new LenaDlCtrlPhyErrorModelTestCase(2, 1078, 0.007, 9, Seconds(0.04), rngRun),
76 (rngRun == 1) ? TestCase::Duration::QUICK : TestCase::Duration::TAKES_FOREVER);
77 // 2 interfering eNBs SINR -4.0 BLER 0.037 TB size 217
78 AddTestCase(new LenaDlCtrlPhyErrorModelTestCase(3, 1040, 0.045, 21, Seconds(0.04), rngRun),
79 (rngRun == 1) ? TestCase::Duration::EXTENSIVE
80 : TestCase::Duration::TAKES_FOREVER);
81 // 3 interfering eNBs SINR -6.0 BLER 0.21 TB size 133
82 AddTestCase(new LenaDlCtrlPhyErrorModelTestCase(4, 1250, 0.206, 40, Seconds(0.12), rngRun),
83 (rngRun == 1) ? TestCase::Duration::EXTENSIVE
84 : TestCase::Duration::TAKES_FOREVER);
85 // 4 interfering eNBs SINR -7.0 BLER 0.34 TB size 133
86 AddTestCase(new LenaDlCtrlPhyErrorModelTestCase(5, 1260, 0.343, 47, Seconds(0.12), rngRun),
87 (rngRun == 1) ? TestCase::Duration::EXTENSIVE
88 : TestCase::Duration::TAKES_FOREVER);
89
90 // Tests on DL Data channels (PDSCH)
91 // the tolerance is calculated with the following octave code:
92 //
93 // n = 1000; # TX packets
94 // for p=1-[0.33 0.11 0.2 0.3 0.55 0.14]
95 // tol = n*p - binoinv(0.005, n, p)
96 // endfor
97
98 // MCS 2 TB size of 256 bits BLER 0.33 SINR -5.51
99 AddTestCase(new LenaDataPhyErrorModelTestCase(4, 1800, 0.33, 39, Seconds(0.04), rngRun),
100 (rngRun == 1) ? TestCase::Duration::QUICK : TestCase::Duration::TAKES_FOREVER);
101 // MCS 2 TB size of 528 bits BLER 0.11 SINR -5.51
102 AddTestCase(new LenaDataPhyErrorModelTestCase(2, 1800, 0.11, 26, Seconds(0.04), rngRun),
103 (rngRun == 1) ? TestCase::Duration::EXTENSIVE
104 : TestCase::Duration::TAKES_FOREVER);
105 // MCS 2 TB size of 1088 bits BLER 0.02 SINR -5.51
106 AddTestCase(new LenaDataPhyErrorModelTestCase(1, 1800, 0.02, 33, Seconds(0.04), rngRun),
107 (rngRun == 1) ? TestCase::Duration::EXTENSIVE
108 : TestCase::Duration::TAKES_FOREVER);
109 // MCS 12 TB size of 4800 bits BLER 0.3 SINR 4.43
110 AddTestCase(new LenaDataPhyErrorModelTestCase(1, 600, 0.3, 38, Seconds(0.04), rngRun),
111 (rngRun == 1) ? TestCase::Duration::EXTENSIVE
112 : TestCase::Duration::TAKES_FOREVER);
113 // MCS 12 TB size of 1632 bits BLER 0.55 SINR 4.43
114 AddTestCase(new LenaDataPhyErrorModelTestCase(3, 600, 0.55, 40, Seconds(0.04), rngRun),
115 (rngRun == 1) ? TestCase::Duration::EXTENSIVE
116 : TestCase::Duration::TAKES_FOREVER);
117 // MCS 16 TB size of 7272 bits (3648 x 3584) BLER 0.14 SINR 8.48
118 // BLER 0.14 = 1 - ((1-0.075)*(1-0.075))
119 AddTestCase(new LenaDataPhyErrorModelTestCase(1, 470, 0.14, 29, Seconds(0.04), rngRun),
120 (rngRun == 1) ? TestCase::Duration::EXTENSIVE
121 : TestCase::Duration::TAKES_FOREVER);
122 }
123}
124
125/**
126 * \ingroup lte-test
127 * Static variable for test initialization
128 */
130
131std::string
132LenaDataPhyErrorModelTestCase::BuildNameString(uint16_t nUser, uint16_t dist, uint32_t rngRun)
133{
134 std::ostringstream oss;
135 oss << "DataPhyErrorModel " << nUser << " UEs, distance " << dist << " m, RngRun " << rngRun;
136 return oss.str();
137}
138
140 uint16_t dist,
141 double blerRef,
142 uint16_t toleranceRxPackets,
143 Time statsStartTime,
144 uint32_t rngRun)
145 : TestCase(BuildNameString(nUser, dist, rngRun)),
146 m_nUser(nUser),
147 m_dist(dist),
148 m_blerRef(blerRef),
149 m_toleranceRxPackets(toleranceRxPackets),
150 m_statsStartTime(statsStartTime),
151 m_rngRun(rngRun)
152{
153}
154
156{
157}
158
159void
161{
162 double ber = 0.03;
163 Config::SetDefault("ns3::LteAmc::Ber", DoubleValue(ber));
164 Config::SetDefault("ns3::LteAmc::AmcModel", EnumValue(LteAmc::PiroEW2010));
165 Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
166 Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(true));
167 Config::SetDefault("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue(false));
169
170 // Disable Uplink Power Control
171 Config::SetDefault("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue(false));
172
173 /*
174 * Initialize Simulation Scenario: 1 eNB and m_nUser UEs
175 */
176
177 int64_t stream = 1;
178 Ptr<LteHelper> lena = CreateObject<LteHelper>();
179
180 // Create Nodes: eNodeB and UE
181 NodeContainer enbNodes;
182 NodeContainer ueNodes;
183 enbNodes.Create(1);
184 ueNodes.Create(m_nUser);
185
186 // Install Mobility Model
187 MobilityHelper mobility;
188 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
189 mobility.Install(enbNodes);
190 BuildingsHelper::Install(enbNodes);
191 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
192 mobility.Install(ueNodes);
194
195 // remove random shadowing component
196 lena->SetAttribute("PathlossModel", StringValue("ns3::HybridBuildingsPropagationLossModel"));
197 lena->SetPathlossModelAttribute("ShadowSigmaOutdoor", DoubleValue(0.0));
198 lena->SetPathlossModelAttribute("ShadowSigmaIndoor", DoubleValue(0.0));
199 lena->SetPathlossModelAttribute("ShadowSigmaExtWalls", DoubleValue(0.0));
200
201 // Create Devices and install them in the Nodes (eNB and UE)
202 NetDeviceContainer enbDevs;
203 NetDeviceContainer ueDevs;
204 lena->SetSchedulerType("ns3::RrFfMacScheduler");
205 lena->SetSchedulerAttribute("UlCqiFilter", EnumValue(FfMacScheduler::PUSCH_UL_CQI));
206
207 enbDevs = lena->InstallEnbDevice(enbNodes);
208 stream += lena->AssignStreams(enbDevs, stream);
209 ueDevs = lena->InstallUeDevice(ueNodes);
210 stream += lena->AssignStreams(ueDevs, stream);
211
212 // Attach a UE to a eNB
213 lena->Attach(ueDevs, enbDevs.Get(0));
214
215 // Activate an EPS bearer
217 EpsBearer bearer(q);
218 lena->ActivateDataRadioBearer(ueDevs, bearer);
219
220 Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
221 Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy();
222 enbPhy->SetAttribute("TxPower", DoubleValue(43.0));
223 enbPhy->SetAttribute("NoiseFigure", DoubleValue(5.0));
224 // place the HeNB over the default rooftop level (20 mt.)
225 Ptr<MobilityModel> mm = enbNodes.Get(0)->GetObject<MobilityModel>();
226 mm->SetPosition(Vector(0.0, 0.0, 30.0));
227
228 // Set UEs' position and power
229 for (int i = 0; i < m_nUser; i++)
230 {
231 Ptr<MobilityModel> mm1 = ueNodes.Get(i)->GetObject<MobilityModel>();
232 mm1->SetPosition(Vector(m_dist, 0.0, 1.0));
233 Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get(i)->GetObject<LteUeNetDevice>();
234 Ptr<LteUePhy> uePhy = lteUeDev->GetPhy();
235 uePhy->SetAttribute("TxPower", DoubleValue(23.0));
236 uePhy->SetAttribute("NoiseFigure", DoubleValue(9.0));
237 }
238
239 Time statsDuration = Seconds(1.0);
240 Simulator::Stop(m_statsStartTime + statsDuration - Seconds(0.0001));
241
242 lena->EnableRlcTraces();
243 Ptr<RadioBearerStatsCalculator> rlcStats = lena->GetRlcStats();
244 rlcStats->SetAttribute("StartTime", TimeValue(m_statsStartTime));
245 rlcStats->SetAttribute("EpochDuration", TimeValue(statsDuration));
246
248
249 NS_LOG_INFO("\tTest downlink data shared channels (PDSCH)");
250 NS_LOG_INFO("Test with " << m_nUser << " user(s) at distance " << m_dist << " expected BLER "
251 << m_blerRef);
252 for (int i = 0; i < m_nUser; i++)
253 {
254 // get the imsi
255 uint64_t imsi = ueDevs.Get(i)->GetObject<LteUeNetDevice>()->GetImsi();
256 uint8_t lcId = 3;
257
258 double dlRxPackets = rlcStats->GetDlRxPackets(imsi, lcId);
259 double dlTxPackets = rlcStats->GetDlTxPackets(imsi, lcId);
260 double dlBler [[maybe_unused]] = 1.0 - (dlRxPackets / dlTxPackets);
261 double expectedDlRxPackets = dlTxPackets - dlTxPackets * m_blerRef;
262 NS_LOG_INFO("\tUser " << i << " imsi " << imsi << " DOWNLINK"
263 << " pkts rx " << dlRxPackets << " tx " << dlTxPackets << " BLER "
264 << dlBler << " Err " << std::fabs(m_blerRef - dlBler)
265 << " expected rx " << expectedDlRxPackets << " difference "
266 << std::abs(expectedDlRxPackets - dlRxPackets) << " tolerance "
268
269 // sanity check for whether the tx packets reported by the stats are correct
270 // we expect one packet per TTI
271 auto expectedDlTxPackets = static_cast<double>(statsDuration.GetMilliSeconds());
272 NS_TEST_ASSERT_MSG_EQ_TOL(dlTxPackets,
273 expectedDlTxPackets,
274 expectedDlTxPackets * 0.005,
275 " too different DL TX packets reported");
276
277 // this is the main test condition: check that the RX packets are within the expected range
278 NS_TEST_ASSERT_MSG_EQ_TOL(dlRxPackets,
279 expectedDlRxPackets,
281 " too different DL RX packets reported");
282 }
283
285}
286
287std::string
289{
290 std::ostringstream oss;
291 oss << "DlCtrlPhyErrorModel " << nEnb << " eNBs, distance " << dist << " m, RngRun " << rngRun;
292 return oss.str();
293}
294
296 uint16_t dist,
297 double blerRef,
298 uint16_t toleranceRxPackets,
299 Time statsStartTime,
300 uint32_t rngRun)
301 : TestCase(BuildNameString(nEnb, dist, rngRun)),
302 m_nEnb(nEnb),
303 m_dist(dist),
304 m_blerRef(blerRef),
305 m_toleranceRxPackets(toleranceRxPackets),
306 m_statsStartTime(statsStartTime),
307 m_rngRun(rngRun)
308{
309}
310
312{
313}
314
315void
317{
318 double ber = 0.03;
319 Config::SetDefault("ns3::LteAmc::Ber", DoubleValue(ber));
320 Config::SetDefault("ns3::LteAmc::AmcModel", EnumValue(LteAmc::PiroEW2010));
321 Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(true));
322 Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
323 Config::SetDefault("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue(false));
325
326 Config::SetDefault("ns3::RadioBearerStatsCalculator::DlRlcOutputFilename",
327 StringValue(CreateTempDirFilename("DlRlcStats.txt")));
328 Config::SetDefault("ns3::RadioBearerStatsCalculator::UlRlcOutputFilename",
329 StringValue(CreateTempDirFilename("UlRlcStats.txt")));
330
331 // Disable Uplink Power Control
332 Config::SetDefault("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue(false));
333
334 /*
335 * Initialize Simulation Scenario: 1 eNB and m_nUser UEs
336 */
337
338 int64_t stream = 1;
339 Ptr<LteHelper> lena = CreateObject<LteHelper>();
340
341 // Create Nodes: eNodeB and UE
342 NodeContainer enbNodes;
343 NodeContainer ueNodes;
344 enbNodes.Create(m_nEnb);
345 ueNodes.Create(1);
346
347 // Install Mobility Model
348 MobilityHelper mobility;
349 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
350 mobility.Install(enbNodes);
351 BuildingsHelper::Install(enbNodes);
352 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
353 mobility.Install(ueNodes);
355
356 // remove random shadowing component
357 lena->SetAttribute("PathlossModel", StringValue("ns3::HybridBuildingsPropagationLossModel"));
358 lena->SetPathlossModelAttribute("ShadowSigmaOutdoor", DoubleValue(0.0));
359 lena->SetPathlossModelAttribute("ShadowSigmaIndoor", DoubleValue(0.0));
360 lena->SetPathlossModelAttribute("ShadowSigmaExtWalls", DoubleValue(0.0));
361
362 // Create Devices and install them in the Nodes (eNB and UE)
363 NetDeviceContainer enbDevs;
364 NetDeviceContainer ueDevs;
365 lena->SetSchedulerType("ns3::RrFfMacScheduler");
366 lena->SetSchedulerAttribute("UlCqiFilter", EnumValue(FfMacScheduler::PUSCH_UL_CQI));
367
368 enbDevs = lena->InstallEnbDevice(enbNodes);
369 stream += lena->AssignStreams(enbDevs, stream);
370 ueDevs = lena->InstallUeDevice(ueNodes);
371 stream += lena->AssignStreams(ueDevs, stream);
372
373 // Attach a UE to one eNB (the others are interfering ones)
374 lena->Attach(ueDevs, enbDevs.Get(0));
375
376 // Activate an EPS bearer
378 EpsBearer bearer(q);
379 lena->ActivateDataRadioBearer(ueDevs, bearer);
380
381 // Set UEs' position and power
382 for (int i = 0; i < m_nEnb; i++)
383 {
384 // place the HeNB over the default rooftop level (20 mt.)
385 Ptr<MobilityModel> mm = enbNodes.Get(i)->GetObject<MobilityModel>();
386 mm->SetPosition(Vector(0.0, 0.0, 30.0));
387 Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get(i)->GetObject<LteEnbNetDevice>();
388 Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy();
389 enbPhy->SetAttribute("TxPower", DoubleValue(43.0));
390 enbPhy->SetAttribute("NoiseFigure", DoubleValue(5.0));
391 }
392
393 // Set UEs' position and power
394 Ptr<MobilityModel> mm = ueNodes.Get(0)->GetObject<MobilityModel>();
395 mm->SetPosition(Vector(m_dist, 0.0, 1.0));
396 Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get(0)->GetObject<LteUeNetDevice>();
397 Ptr<LteUePhy> uePhy = lteUeDev->GetPhy();
398 uePhy->SetAttribute("TxPower", DoubleValue(23.0));
399 uePhy->SetAttribute("NoiseFigure", DoubleValue(9.0));
400
401 Time statsDuration = Seconds(1.0);
402 Simulator::Stop(m_statsStartTime + statsDuration - Seconds(0.0001));
403
404 lena->EnableRlcTraces();
405 Ptr<RadioBearerStatsCalculator> rlcStats = lena->GetRlcStats();
406 rlcStats->SetAttribute("StartTime", TimeValue(m_statsStartTime));
407 rlcStats->SetAttribute("EpochDuration", TimeValue(statsDuration));
408
410
411 NS_LOG_INFO("\tTest downlink control channels (PCFICH+PDCCH)");
412 NS_LOG_INFO("Test with " << m_nEnb << " eNB(s) at distance " << m_dist << " expected BLER "
413 << m_blerRef);
414 int nUser = 1;
415 for (int i = 0; i < nUser; i++)
416 {
417 // get the imsi
418 uint64_t imsi = ueDevs.Get(i)->GetObject<LteUeNetDevice>()->GetImsi();
419 uint8_t lcId = 3;
420 double dlRxPackets = rlcStats->GetDlRxPackets(imsi, lcId);
421 double dlTxPackets = rlcStats->GetDlTxPackets(imsi, lcId);
422 double dlBler [[maybe_unused]] = 1.0 - (dlRxPackets / dlTxPackets);
423 double expectedDlRxPackets = dlTxPackets - dlTxPackets * m_blerRef;
424 NS_LOG_INFO("\tUser " << i << " imsi " << imsi << " DOWNLINK"
425 << " pkts rx " << dlRxPackets << " tx " << dlTxPackets << " BLER "
426 << dlBler << " Err " << std::fabs(m_blerRef - dlBler)
427 << " expected rx " << expectedDlRxPackets << " difference "
428 << std::abs(expectedDlRxPackets - dlRxPackets) << " tolerance "
430
431 // sanity check for whether the tx packets reported by the stats are correct
432 // we expect one packet per TTI
433 auto expectedDlTxPackets = static_cast<double>(statsDuration.GetMilliSeconds());
434 NS_TEST_ASSERT_MSG_EQ_TOL(dlTxPackets,
435 expectedDlTxPackets,
436 expectedDlTxPackets * 0.005,
437 " too different DL TX packets reported");
438
439 // this is the main test condition: check that the RX packets are within the expected range
440 NS_TEST_ASSERT_MSG_EQ_TOL(dlRxPackets,
441 expectedDlRxPackets,
443 "too different DL RX packets reported");
444 }
445
447}
This system test program creates different test cases with a single eNB and several UEs,...
LenaDataPhyErrorModelTestCase(uint16_t nUser, uint16_t dist, double blerRef, uint16_t toleranceRxPackets, Time statsStartTime, uint32_t rngRun)
Constructor.
static std::string BuildNameString(uint16_t nUser, uint16_t dist, uint32_t rngRun)
Builds the test name string based on provided parameter values.
uint16_t m_nUser
number of UE nodes
double m_dist
the distance between nodes
void DoRun() override
Implementation to actually run this TestCase.
uint16_t m_toleranceRxPackets
receive packet tolerance loss
Time m_statsStartTime
Extra time in the beginning of simulation to allow RRC connection establishment + SRS.
Lena Dl Ctrl Phy Error Model Test Case.
LenaDlCtrlPhyErrorModelTestCase(uint16_t nEnb, uint16_t dist, double blerRef, uint16_t toleranceRxPackets, Time statsStartTime, uint32_t rngRun)
Constructor.
uint16_t m_nEnb
the number of ENB nodes
static std::string BuildNameString(uint16_t nUser, uint16_t dist, uint32_t rngRun)
Build name string.
void DoRun() override
Implementation to actually run this TestCase.
Time m_statsStartTime
Extra time in the beginning of simulation to allow RRC connection establishment + SRS.
double m_dist
the distance between nodes
uint16_t m_toleranceRxPackets
receive packet tolerance loss
Lena Test Phy Error Model Suite.
AttributeValue implementation for Boolean.
Definition: boolean.h:37
static void Install(Ptr< Node > node)
Install the MobilityBuildingInfo to a node.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:42
Hold variables of type enum.
Definition: enum.h:62
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
Qci
QoS Class Indicator.
Definition: eps-bearer.h:106
@ GBR_CONV_VOICE
GBR Conversational Voice.
Definition: eps-bearer.h:107
@ PiroEW2010
Definition: lte-amc.h:63
The eNodeB device implementation.
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
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Definition: object.h:522
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:142
static void Run()
Run the simulation.
Definition: simulator.cc:178
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:186
Hold variables of type string.
Definition: string.h:56
encapsulates test code
Definition: test.h:1061
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:301
std::string CreateTempDirFilename(std::string filename)
Construct the full path to a file in a temporary directory.
Definition: test.cc:438
A suite of tests to run.
Definition: test.h:1268
Type
Type of test.
Definition: test.h:1275
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
int64_t GetMilliSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:408
AttributeValue implementation for Time.
Definition: nstime.h:1413
Hold an unsigned integer type.
Definition: uinteger.h:45
void SetGlobal(std::string name, const AttributeValue &value)
Definition: config.cc:940
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:894
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:275
static LenaTestPhyErrorModelSuite lenaTestPhyErrorModelSuite
Static variable for test initialization.
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
Definition: test.h:338
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1326
Every class exported by the ns3 library is enclosed in the ns3 namespace.