A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
three-gpp-channel-test-suite.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 SIGNET Lab, Department of Information Engineering,
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
18#include "ns3/abort.h"
19#include "ns3/angles.h"
20#include "ns3/channel-condition-model.h"
21#include "ns3/config.h"
22#include "ns3/constant-position-mobility-model.h"
23#include "ns3/double.h"
24#include "ns3/ism-spectrum-value-helper.h"
25#include "ns3/isotropic-antenna-model.h"
26#include "ns3/log.h"
27#include "ns3/node-container.h"
28#include "ns3/pointer.h"
29#include "ns3/simple-net-device.h"
30#include "ns3/simulator.h"
31#include "ns3/spectrum-signal-parameters.h"
32#include "ns3/string.h"
33#include "ns3/test.h"
34#include "ns3/three-gpp-channel-model.h"
35#include "ns3/three-gpp-spectrum-propagation-loss-model.h"
36#include "ns3/uinteger.h"
37#include "ns3/uniform-planar-array.h"
38
39using namespace ns3;
40
41NS_LOG_COMPONENT_DEFINE("ThreeGppChannelTestSuite");
42
51{
52 public:
57
62
63 private:
67 void DoRun() override;
68
80 Ptr<PhasedArrayModel> txAntenna,
81 Ptr<PhasedArrayModel> rxAntenna);
82
83 std::vector<double> m_normVector;
84};
85
87 : TestCase("Check the dimensions and the norm of the channel matrix")
88{
89}
90
92{
93}
94
95void
99 Ptr<PhasedArrayModel> txAntenna,
100 Ptr<PhasedArrayModel> rxAntenna)
101{
102 uint64_t txAntennaElements = txAntenna->GetNumberOfElements();
103 uint64_t rxAntennaElements = rxAntenna->GetNumberOfElements();
104
106 channelModel->GetChannel(txMob, rxMob, txAntenna, rxAntenna);
107
108 double channelNorm = 0;
109 uint16_t numTotalClusters = channelMatrix->m_channel.GetNumPages();
110 for (uint16_t cIndex = 0; cIndex < numTotalClusters; cIndex++)
111 {
112 double clusterNorm = 0;
113 for (uint64_t sIndex = 0; sIndex < txAntennaElements; sIndex++)
114 {
115 for (uint64_t uIndex = 0; uIndex < rxAntennaElements; uIndex++)
116 {
117 clusterNorm +=
118 std::pow(std::abs(channelMatrix->m_channel(uIndex, sIndex, cIndex)), 2);
119 }
120 }
121 channelNorm += clusterNorm;
122 }
123 m_normVector.push_back(channelNorm);
124}
125
126void
128{
129 // Build the scenario for the test
130 uint8_t txAntennaElements[]{2, 2}; // tx antenna dimensions
131 uint8_t rxAntennaElements[]{2, 2}; // rx antenna dimensions
132 uint32_t updatePeriodMs = 100; // update period in ms
133
134 // create the channel condition model
135 Ptr<ChannelConditionModel> channelConditionModel =
136 CreateObject<NeverLosChannelConditionModel>();
137
138 // create the ThreeGppChannelModel object used to generate the channel matrix
139 Ptr<ThreeGppChannelModel> channelModel = CreateObject<ThreeGppChannelModel>();
140 channelModel->SetAttribute("Frequency", DoubleValue(60.0e9));
141 channelModel->SetAttribute("Scenario", StringValue("RMa"));
142 channelModel->SetAttribute("ChannelConditionModel", PointerValue(channelConditionModel));
143 channelModel->SetAttribute("UpdatePeriod", TimeValue(MilliSeconds(updatePeriodMs - 1)));
144
145 // create the tx and rx nodes
147 nodes.Create(2);
148
149 // create the tx and rx devices
150 Ptr<SimpleNetDevice> txDev = CreateObject<SimpleNetDevice>();
151 Ptr<SimpleNetDevice> rxDev = CreateObject<SimpleNetDevice>();
152
153 // associate the nodes and the devices
154 nodes.Get(0)->AddDevice(txDev);
155 txDev->SetNode(nodes.Get(0));
156 nodes.Get(1)->AddDevice(rxDev);
157 rxDev->SetNode(nodes.Get(1));
158
159 // create the tx and rx mobility models and set their positions
160 Ptr<MobilityModel> txMob = CreateObject<ConstantPositionMobilityModel>();
161 txMob->SetPosition(Vector(0.0, 0.0, 10.0));
162 Ptr<MobilityModel> rxMob = CreateObject<ConstantPositionMobilityModel>();
163 rxMob->SetPosition(Vector(100.0, 0.0, 10.0));
164
165 // associate the nodes and the mobility models
166 nodes.Get(0)->AggregateObject(txMob);
167 nodes.Get(1)->AggregateObject(rxMob);
168
169 // create the tx and rx antennas and set the their dimensions
170 Ptr<PhasedArrayModel> txAntenna = CreateObjectWithAttributes<UniformPlanarArray>(
171 "NumColumns",
172 UintegerValue(txAntennaElements[0]),
173 "NumRows",
174 UintegerValue(txAntennaElements[1]),
175 "AntennaElement",
176 PointerValue(CreateObject<IsotropicAntennaModel>()));
177 Ptr<PhasedArrayModel> rxAntenna = CreateObjectWithAttributes<UniformPlanarArray>(
178 "NumColumns",
179 UintegerValue(rxAntennaElements[0]),
180 "NumRows",
181 UintegerValue(rxAntennaElements[1]),
182 "AntennaElement",
183 PointerValue(CreateObject<IsotropicAntennaModel>()));
184
185 // generate the channel matrix
187 channelModel->GetChannel(txMob, rxMob, txAntenna, rxAntenna);
188
189 // check the channel matrix dimensions, expected H[cluster][rx][tx]
191 channelMatrix->m_channel.GetNumCols(),
192 txAntennaElements[0] * txAntennaElements[1],
193 "The third dimension of H should be equal to the number of tx antenna elements");
195 channelMatrix->m_channel.GetNumRows(),
196 rxAntennaElements[0] * rxAntennaElements[1],
197 "The second dimension of H should be equal to the number of rx antenna elements");
198
199 // test if the channel matrix is correctly generated
200 uint16_t numIt = 1000;
201 for (uint16_t i = 0; i < numIt; i++)
202 {
203 Simulator::Schedule(MilliSeconds(updatePeriodMs * i),
205 this,
206 channelModel,
207 txMob,
208 rxMob,
209 txAntenna,
210 rxAntenna);
211 }
212
214
215 // compute the sample mean
216 double sampleMean = 0;
217 for (auto i : m_normVector)
218 {
219 sampleMean += i;
220 }
221 sampleMean /= numIt;
222
223 // compute the sample standard deviation
224 double sampleStd = 0;
225 for (auto i : m_normVector)
226 {
227 sampleStd += ((i - sampleMean) * (i - sampleMean));
228 }
229 sampleStd = std::sqrt(sampleStd / (numIt - 1));
230
231 // perform the one sample t-test with a significance level of 0.05 to test
232 // the hypothesis "E [|H|^2] = M*N, where |H| indicates the Frobenius norm of
233 // H, M is the number of transmit antenna elements, and N is the number of
234 // the receive antenna elements"
235 double t = (sampleMean - txAntennaElements[0] * txAntennaElements[1] * rxAntennaElements[0] *
236 rxAntennaElements[1]) /
237 (sampleMean / std::sqrt(numIt));
238
239 // Using a significance level of 0.05, we reject the null hypothesis if |t| is
240 // greater than the critical value from a t-distribution with df = numIt-1
242 std::abs(t),
243 0,
244 1.65,
245 "We reject the hypothesis E[|H|^2] = M*N with a significance level of 0.05");
246
248}
249
258{
259 public:
264
269
270 private:
274 void DoRun() override;
275
286 void DoGetChannel(Ptr<ThreeGppChannelModel> channelModel,
287 Ptr<MobilityModel> txMob,
288 Ptr<MobilityModel> rxMob,
289 Ptr<PhasedArrayModel> txAntenna,
290 Ptr<PhasedArrayModel> rxAntenna,
291 bool update);
292
295};
296
298 : TestCase("Check if the channel realizations are correctly updated during the simulation")
299{
300}
301
303{
304}
305
306void
308 Ptr<MobilityModel> txMob,
309 Ptr<MobilityModel> rxMob,
310 Ptr<PhasedArrayModel> txAntenna,
311 Ptr<PhasedArrayModel> rxAntenna,
312 bool update)
313{
314 // retrieve the channel matrix
316 channelModel->GetChannel(txMob, rxMob, txAntenna, rxAntenna);
317
318 if (!m_currentChannel)
319 {
320 // this is the first time we compute the channel matrix, we initialize
321 // m_currentChannel
322 m_currentChannel = channelMatrix;
323 }
324 else
325 {
326 // compare the old and the new channel matrices
327 NS_TEST_ASSERT_MSG_EQ((m_currentChannel != channelMatrix),
328 update,
329 Simulator::Now().GetMilliSeconds()
330 << " The channel matrix is not correctly updated");
331 }
332}
333
334void
336{
337 // Build the scenario for the test
338
339 uint8_t txAntennaElements[]{2, 2}; // tx antenna dimensions
340 uint8_t rxAntennaElements[]{4, 4}; // rx antenna dimensions
341 uint32_t updatePeriodMs = 100; // update period in ms
342
343 // create the channel condition model
344 Ptr<ChannelConditionModel> channelConditionModel =
345 CreateObject<AlwaysLosChannelConditionModel>();
346
347 // create the ThreeGppChannelModel object used to generate the channel matrix
348 Ptr<ThreeGppChannelModel> channelModel = CreateObject<ThreeGppChannelModel>();
349 channelModel->SetAttribute("Frequency", DoubleValue(60.0e9));
350 channelModel->SetAttribute("Scenario", StringValue("UMa"));
351 channelModel->SetAttribute("ChannelConditionModel", PointerValue(channelConditionModel));
352 channelModel->SetAttribute("UpdatePeriod", TimeValue(MilliSeconds(updatePeriodMs)));
353
354 // create the tx and rx nodes
356 nodes.Create(2);
357
358 // create the tx and rx devices
359 Ptr<SimpleNetDevice> txDev = CreateObject<SimpleNetDevice>();
360 Ptr<SimpleNetDevice> rxDev = CreateObject<SimpleNetDevice>();
361
362 // associate the nodes and the devices
363 nodes.Get(0)->AddDevice(txDev);
364 txDev->SetNode(nodes.Get(0));
365 nodes.Get(1)->AddDevice(rxDev);
366 rxDev->SetNode(nodes.Get(1));
367
368 // create the tx and rx mobility models and set their positions
369 Ptr<MobilityModel> txMob = CreateObject<ConstantPositionMobilityModel>();
370 txMob->SetPosition(Vector(0.0, 0.0, 10.0));
371 Ptr<MobilityModel> rxMob = CreateObject<ConstantPositionMobilityModel>();
372 rxMob->SetPosition(Vector(100.0, 0.0, 1.6));
373
374 // associate the nodes and the mobility models
375 nodes.Get(0)->AggregateObject(txMob);
376 nodes.Get(1)->AggregateObject(rxMob);
377
378 // create the tx and rx antennas and set the their dimensions
379 Ptr<PhasedArrayModel> txAntenna = CreateObjectWithAttributes<UniformPlanarArray>(
380 "NumColumns",
381 UintegerValue(txAntennaElements[0]),
382 "NumRows",
383 UintegerValue(txAntennaElements[1]),
384 "AntennaElement",
385 PointerValue(CreateObject<IsotropicAntennaModel>()));
386 Ptr<PhasedArrayModel> rxAntenna = CreateObjectWithAttributes<UniformPlanarArray>(
387 "NumColumns",
388 UintegerValue(rxAntennaElements[0]),
389 "NumRows",
390 UintegerValue(rxAntennaElements[1]),
391 "AntennaElement",
392 PointerValue(CreateObject<IsotropicAntennaModel>()));
393
394 // check if the channel matrix is correctly updated
395
396 // compute the channel matrix for the first time
397 uint32_t firstTimeMs =
398 1; // time instant at which the channel matrix is generated for the first time
401 this,
402 channelModel,
403 txMob,
404 rxMob,
405 txAntenna,
406 rxAntenna,
407 true);
408
409 // call GetChannel before the update period is exceeded, the channel matrix
410 // should not be updated
411 Simulator::Schedule(MilliSeconds(firstTimeMs + updatePeriodMs / 2),
413 this,
414 channelModel,
415 txMob,
416 rxMob,
417 txAntenna,
418 rxAntenna,
419 false);
420
421 // call GetChannel when the update period is exceeded, the channel matrix
422 // should be recomputed
423 Simulator::Schedule(MilliSeconds(firstTimeMs + updatePeriodMs + 1),
425 this,
426 channelModel,
427 txMob,
428 rxMob,
429 txAntenna,
430 rxAntenna,
431 true);
432
435}
436
444{
453};
454
466{
467 public:
472
477
478 private:
482 void DoRun() override;
483
491 void DoBeamforming(Ptr<NetDevice> thisDevice,
492 Ptr<PhasedArrayModel> thisAntenna,
493 Ptr<NetDevice> otherDevice,
494 Ptr<PhasedArrayModel> otherAntenna);
495
503
511};
512
514 : TestCase("Test case for the ThreeGppSpectrumPropagationLossModel class")
515{
516}
517
519{
520}
521
522void
524 Ptr<PhasedArrayModel> thisAntenna,
525 Ptr<NetDevice> otherDevice,
526 Ptr<PhasedArrayModel> otherAntenna)
527{
528 Vector aPos = thisDevice->GetNode()->GetObject<MobilityModel>()->GetPosition();
529 Vector bPos = otherDevice->GetNode()->GetObject<MobilityModel>()->GetPosition();
530
531 // compute the azimuth and the elevation angles
532 Angles completeAngle(bPos, aPos);
533
534 PhasedArrayModel::ComplexVector antennaWeights =
535 thisAntenna->GetBeamformingVector(completeAngle);
536 thisAntenna->SetBeamformingVector(antennaWeights);
537}
538
539bool
542{
543 bool ret = true;
544 for (uint8_t i = 0; i < first->GetSpectrumModel()->GetNumBands(); i++)
545 {
546 if ((*first)[i] != (*second)[i])
547 {
548 ret = false;
549 continue;
550 }
551 }
552 return ret;
553}
554
555void
557 const CheckLongTermUpdateParams& params)
558{
559 Ptr<SpectrumValue> rxPsdNew = params.lossModel->DoCalcRxPowerSpectralDensity(params.txParams,
560 params.txMob,
561 params.rxMob,
562 params.txAntenna,
563 params.rxAntenna);
564 NS_TEST_ASSERT_MSG_EQ(ArePsdEqual(params.rxPsdOld, rxPsdNew),
565 false,
566 "The long term is not updated when the channel matrix is recomputed");
567}
568
569void
571{
572 // Build the scenario for the test
573 Config::SetDefault("ns3::ThreeGppChannelModel::UpdatePeriod", TimeValue(MilliSeconds(100)));
574
575 uint8_t txAntennaElements[]{4, 4}; // tx antenna dimensions
576 uint8_t rxAntennaElements[]{4, 4}; // rx antenna dimensions
577
578 // create the ChannelConditionModel object to be used to retrieve the
579 // channel condition
580 Ptr<ChannelConditionModel> condModel = CreateObject<AlwaysLosChannelConditionModel>();
581
582 // create the ThreeGppSpectrumPropagationLossModel object, set frequency,
583 // scenario and channel condition model to be used
585 CreateObject<ThreeGppSpectrumPropagationLossModel>();
586 lossModel->SetChannelModelAttribute("Frequency", DoubleValue(2.4e9));
587 lossModel->SetChannelModelAttribute("Scenario", StringValue("UMa"));
588 lossModel->SetChannelModelAttribute(
589 "ChannelConditionModel",
590 PointerValue(condModel)); // create the ThreeGppChannelModel object used to generate the
591 // channel matrix
592
593 // create the tx and rx nodes
595 nodes.Create(2);
596
597 // create the tx and rx devices
598 Ptr<SimpleNetDevice> txDev = CreateObject<SimpleNetDevice>();
599 Ptr<SimpleNetDevice> rxDev = CreateObject<SimpleNetDevice>();
600
601 // associate the nodes and the devices
602 nodes.Get(0)->AddDevice(txDev);
603 txDev->SetNode(nodes.Get(0));
604 nodes.Get(1)->AddDevice(rxDev);
605 rxDev->SetNode(nodes.Get(1));
606
607 // create the tx and rx mobility models and set their positions
608 Ptr<MobilityModel> txMob = CreateObject<ConstantPositionMobilityModel>();
609 txMob->SetPosition(Vector(0.0, 0.0, 10.0));
610 Ptr<MobilityModel> rxMob = CreateObject<ConstantPositionMobilityModel>();
611 rxMob->SetPosition(
612 Vector(15.0, 0.0, 10.0)); // in this position the channel condition is always LOS
613
614 // associate the nodes and the mobility models
615 nodes.Get(0)->AggregateObject(txMob);
616 nodes.Get(1)->AggregateObject(rxMob);
617
618 // create the tx and rx antennas and set the their dimensions
619 Ptr<PhasedArrayModel> txAntenna = CreateObjectWithAttributes<UniformPlanarArray>(
620 "NumColumns",
621 UintegerValue(txAntennaElements[0]),
622 "NumRows",
623 UintegerValue(txAntennaElements[1]),
624 "AntennaElement",
625 PointerValue(CreateObject<IsotropicAntennaModel>()));
626 Ptr<PhasedArrayModel> rxAntenna = CreateObjectWithAttributes<UniformPlanarArray>(
627 "NumColumns",
628 UintegerValue(rxAntennaElements[0]),
629 "NumRows",
630 UintegerValue(rxAntennaElements[1]),
631 "AntennaElement",
632 PointerValue(CreateObject<IsotropicAntennaModel>()));
633
634 // set the beamforming vectors
635 DoBeamforming(txDev, txAntenna, rxDev, rxAntenna);
636 DoBeamforming(rxDev, rxAntenna, txDev, txAntenna);
637
638 // create the tx psd
640 double txPower = 0.1; // Watts
641 uint32_t channelNumber = 1;
642 Ptr<SpectrumValue> txPsd = sf.CreateTxPowerSpectralDensity(txPower, channelNumber);
643 Ptr<SpectrumSignalParameters> txParams = Create<SpectrumSignalParameters>();
644 txParams->psd = txPsd->Copy();
645
646 // compute the rx psd
647 Ptr<SpectrumValue> rxPsdOld =
648 lossModel->DoCalcRxPowerSpectralDensity(txParams, txMob, rxMob, txAntenna, rxAntenna);
649
650 // 1) check that the rx PSD is equal for both the direct and the reverse channel
651 Ptr<SpectrumValue> rxPsdNew =
652 lossModel->DoCalcRxPowerSpectralDensity(txParams, rxMob, txMob, rxAntenna, txAntenna);
653 NS_TEST_ASSERT_MSG_EQ(ArePsdEqual(rxPsdOld, rxPsdNew),
654 true,
655 "The long term for the direct and the reverse channel are different");
656
657 // 2) check if the long term is updated when changing the BF vector
658 // change the position of the rx device and recompute the beamforming vectors
659 rxMob->SetPosition(Vector(10.0, 5.0, 10.0));
660 PhasedArrayModel::ComplexVector txBfVector = txAntenna->GetBeamformingVector();
661 txBfVector[0] = std::complex<double>(0.0, 0.0);
662 txAntenna->SetBeamformingVector(txBfVector);
663
664 rxPsdNew =
665 lossModel->DoCalcRxPowerSpectralDensity(txParams, rxMob, txMob, rxAntenna, txAntenna);
666 NS_TEST_ASSERT_MSG_EQ(ArePsdEqual(rxPsdOld, rxPsdNew),
667 false,
668 "Changing the BF vectors the rx PSD does not change");
669
670 // update rxPsdOld
671 rxPsdOld = rxPsdNew;
672
673 // 3) check if the long term is updated when the channel matrix is recomputed
675 params{lossModel, txParams, txMob, rxMob, rxPsdOld, txAntenna, rxAntenna};
678 this,
679 params);
680
683}
684
691{
692 public:
697};
698
700 : TestSuite("three-gpp-channel", UNIT)
701{
705}
706
Test case for the ThreeGppChannelModel class.
void DoRun() override
Build the test scenario.
std::vector< double > m_normVector
each element is the norm of a channel realization
void DoComputeNorm(Ptr< ThreeGppChannelModel > channelModel, Ptr< MobilityModel > txMob, Ptr< MobilityModel > rxMob, Ptr< PhasedArrayModel > txAntenna, Ptr< PhasedArrayModel > rxAntenna)
Compute the Frobenius norm of the channel matrix and stores it in m_normVector.
Test case for the ThreeGppChannelModel class.
void DoGetChannel(Ptr< ThreeGppChannelModel > channelModel, Ptr< MobilityModel > txMob, Ptr< MobilityModel > rxMob, Ptr< PhasedArrayModel > txAntenna, Ptr< PhasedArrayModel > rxAntenna, bool update)
This method is used to schedule the channel matrix computation at different time instants and to chec...
void DoRun() override
Build the test scenario.
Ptr< const ThreeGppChannelModel::ChannelMatrix > m_currentChannel
used by DoGetChannel to store the current channel matrix
Test suite for the ThreeGppChannelModel class.
Test case for the ThreeGppSpectrumPropagationLossModelTest class.
void DoRun() override
Build the test scenario.
static bool ArePsdEqual(Ptr< SpectrumValue > first, Ptr< SpectrumValue > second)
Checks if two PSDs are equal.
void CheckLongTermUpdate(const CheckLongTermUpdateParams &params)
Test of the long term component is correctly updated when the channel matrix is recomputed.
void DoBeamforming(Ptr< NetDevice > thisDevice, Ptr< PhasedArrayModel > thisAntenna, Ptr< NetDevice > otherDevice, Ptr< PhasedArrayModel > otherAntenna)
Points the beam of thisDevice towards otherDevice.
Class holding the azimuth and inclination angles of spherical coordinates.
Definition: angles.h:118
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:42
MatrixArray class inherits ValArray class and provides additional interfaces to ValArray which enable...
Definition: matrix-array.h:83
Keep track of the current position and velocity of an object.
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.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
Definition: node.cc:138
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
Definition: object.cc:259
Hold objects of type Ptr<T>.
Definition: pointer.h:37
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:568
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:140
static Time Now()
Return the current simulation virtual time.
Definition: simulator.cc:199
static void Run()
Run the simulation.
Definition: simulator.cc:176
Implements Wifi SpectrumValue for the 2.4 GHz ISM band only, with a 5 MHz spectrum resolution.
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity(double txPower, uint8_t channel)
Creates a SpectrumValue instance that represents the TX Power Spectral Density of a wifi device corre...
Hold variables of type string.
Definition: string.h:56
encapsulates test code
Definition: test.h:1060
@ QUICK
Fast test.
Definition: test.h:1065
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:301
A suite of tests to run.
Definition: test.h:1256
AttributeValue implementation for Time.
Definition: nstime.h:1423
Hold an unsigned integer type.
Definition: uinteger.h:45
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:891
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Definition: test.h:144
#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:337
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1348
NodeContainer nodes
Definition: first.py:1
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Definition: second.py:1
A structure that holds the parameters for the function CheckLongTermUpdate.
Ptr< ThreeGppSpectrumPropagationLossModel > lossModel
the ThreeGppSpectrumPropagationLossModel object used to compute the rx PSD
Ptr< MobilityModel > txMob
the mobility model of the tx device
Ptr< SpectrumValue > rxPsdOld
the previously received PSD
Ptr< SpectrumSignalParameters > txParams
the params of the tx signal
Ptr< PhasedArrayModel > rxAntenna
the antenna array of the rx device
Ptr< MobilityModel > rxMob
the mobility model of the rx device
Ptr< PhasedArrayModel > txAntenna
the antenna array of the tx device
static ThreeGppChannelTestSuite myTestSuite
Static variable for test initialization.