A Discrete-Event Network Simulator
API
channel-condition-model.cc
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2019 SIGNET Lab, Department of Information Engineering,
4 * University of Padova
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation;
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
21#include "ns3/log.h"
22#include "ns3/double.h"
23#include "ns3/mobility-model.h"
24#include <cmath>
25#include "ns3/node.h"
26#include "ns3/simulator.h"
27#include "ns3/string.h"
28
29namespace ns3 {
30
31NS_LOG_COMPONENT_DEFINE ("ChannelConditionModel");
32
33NS_OBJECT_ENSURE_REGISTERED (ChannelCondition);
34
35TypeId
37{
38 static TypeId tid = TypeId ("ns3::ChannelCondition")
39 .SetParent<Object> ()
40 .SetGroupName ("Propagation")
41 ;
42 return tid;
43}
44
46 : m_losCondition (LosConditionValue::LC_ND),
47 m_o2iCondition (O2iConditionValue::O2I_ND)
48{}
49
51{
52 m_losCondition = losCondition;
53 m_o2iCondition = o2iCondition;
54}
55
57{}
58
61{
62 return m_losCondition;
63}
64
65void
67{
68 m_losCondition = cond;
69}
70
73{
74 return m_o2iCondition;
75}
76
77void
79{
80 m_o2iCondition = o2iCondition;
81}
82
83bool
85{
87}
88
89bool
91{
93}
94
95bool
97{
99}
100
101bool
103{
105}
106
107bool
109{
111}
112
113bool
115{
117}
118
119bool
121{
122 return (m_losCondition == losCondition && m_o2iCondition == o2iCondition);
123}
124
125std::ostream& operator<< (std::ostream& os, ChannelCondition::LosConditionValue cond)
126{
127 if (cond == ChannelCondition::LosConditionValue::LOS)
128 {
129 os << "LOS";
130 }
131 else if (cond == ChannelCondition::LosConditionValue::NLOS)
132 {
133 os << "NLOS";
134 }
135 else if (cond == ChannelCondition::LosConditionValue::NLOSv)
136 {
137 os << "NLOSv";
138 }
139
140 return os;
141}
142// ------------------------------------------------------------------------- //
143
145
146TypeId
148{
149 static TypeId tid = TypeId ("ns3::ChannelConditionModel")
150 .SetParent<Object> ()
151 .SetGroupName ("Propagation")
152 ;
153 return tid;
154}
155
157{}
158
160{}
161
162// ------------------------------------------------------------------------- //
163
165
166TypeId
168{
169 static TypeId tid = TypeId ("ns3::AlwaysLosChannelConditionModel")
170 .SetParent<Object> ()
171 .SetGroupName ("Propagation")
172 .AddConstructor<AlwaysLosChannelConditionModel> ()
173 ;
174 return tid;
175}
176
178{}
179
181{}
182
185 [[maybe_unused]] Ptr<const MobilityModel> b) const
186{
187 Ptr<ChannelCondition> c = CreateObject<ChannelCondition> (ChannelCondition::LOS);
188
189 return c;
190}
191
192int64_t
194{
195 return 0;
196}
197
198// ------------------------------------------------------------------------- //
199
201
202TypeId
204{
205 static TypeId tid = TypeId ("ns3::NeverLosChannelConditionModel")
206 .SetParent<Object> ()
207 .SetGroupName ("Propagation")
208 .AddConstructor<NeverLosChannelConditionModel> ()
209 ;
210 return tid;
211}
212
214{}
215
217{}
218
221 [[maybe_unused]] Ptr<const MobilityModel> b) const
222{
223 Ptr<ChannelCondition> c = CreateObject<ChannelCondition> (ChannelCondition::NLOS);
224
225 return c;
226}
227
228int64_t
230{
231 return 0;
232}
233
234// ------------------------------------------------------------------------- //
235
237
238TypeId
240{
241 static TypeId tid = TypeId ("ns3::NeverLosVehicleChannelConditionModel")
243 .SetGroupName ("Propagation")
244 .AddConstructor<NeverLosVehicleChannelConditionModel> ()
245 ;
246 return tid;
247}
248
250{}
251
253{}
254
257 Ptr<const MobilityModel> /* b */) const
258{
259
260 Ptr<ChannelCondition> c = CreateObject<ChannelCondition> (ChannelCondition::NLOSv);
261
262 return c;
263}
264
265int64_t
267{
268 return 0;
269}
270
271// ------------------------------------------------------------------------- //
272
274
275TypeId
277{
278 static TypeId tid = TypeId ("ns3::ThreeGppChannelConditionModel")
280 .SetGroupName ("Propagation")
281 .AddAttribute ("UpdatePeriod", "Specifies the time period after which the channel condition is recomputed. If set to 0, the channel condition is never updated.",
285 ;
286 return tid;
287}
288
291{
292 m_uniformVar = CreateObject<UniformRandomVariable> ();
295}
296
298{}
299
301{
302 m_channelConditionMap.clear ();
303 m_updatePeriod = Seconds (0.0);
304}
305
309{
311
312 // get the key for this channel
313 uint32_t key = GetKey (a, b);
314
315 bool notFound = false; // indicates if the channel condition is not present in the map
316 bool update = false; // indicates if the channel condition has to be updated
317
318 // look for the channel condition in m_channelConditionMap
319 auto mapItem = m_channelConditionMap.find (key);
320 if (mapItem != m_channelConditionMap.end ())
321 {
322 NS_LOG_DEBUG ("found the channel condition in the map");
323 cond = mapItem->second.m_condition;
324
325 // check if it has to be updated
326 if (!m_updatePeriod.IsZero () && Simulator::Now () - mapItem->second.m_generatedTime > m_updatePeriod)
327 {
328 NS_LOG_DEBUG ("it has to be updated");
329 update = true;
330 }
331 }
332 else
333 {
334 NS_LOG_DEBUG ("channel condition not found");
335 notFound = true;
336 }
337
338 // if the channel condition was not found or if it has to be updated
339 // generate a new channel condition
340 if (notFound || update)
341 {
342 cond = ComputeChannelCondition (a, b);
343 // store the channel condition in m_channelConditionMap, used as cache.
344 // For this reason you see a const_cast.
345 Item mapItem;
346 mapItem.m_condition = cond;
347 mapItem.m_generatedTime = Simulator::Now ();
348 const_cast<ThreeGppChannelConditionModel*> (this)->m_channelConditionMap [key] = mapItem;
349 }
350
351 return cond;
352}
353
357{
358 NS_LOG_FUNCTION (this << a << b);
359 Ptr<ChannelCondition> cond = CreateObject<ChannelCondition> ();
360
361 // compute the LOS probability
362 double pLos = ComputePlos (a, b);
363 double pNlos = ComputePnlos (a, b);
364
365 // draw a random value
366 double pRef = m_uniformVar->GetValue ();
367
368 NS_LOG_DEBUG ("pRef " << pRef << " pLos " << pLos << " pNlos " << pNlos);
369
370 // get the channel condition
371 if (pRef <= pLos)
372 {
373 // LOS
374 cond->SetLosCondition (ChannelCondition::LosConditionValue::LOS);
375 }
376 else if (pRef <= pLos + pNlos)
377 {
378 // NLOS
379 cond->SetLosCondition (ChannelCondition::LosConditionValue::NLOS);
380 }
381 else
382 {
383 // NLOSv (added to support vehicular scenarios)
384 cond->SetLosCondition (ChannelCondition::LosConditionValue::NLOSv);
385 }
386
387 return cond;
388}
389
390double
393{
394 NS_LOG_FUNCTION (this << a << b);
395 // by default returns 1 - PLOS
396 return (1 - ComputePlos (a, b));
397}
398
399int64_t
401{
402 m_uniformVar->SetStream (stream);
403 return 1;
404}
405
406double
408{
409 double x = a.x - b.x;
410 double y = a.y - b.y;
411 double distance2D = sqrt (x * x + y * y);
412
413 return distance2D;
414}
415
418{
419 // use the nodes ids to obtain a unique key for the channel between a and b
420 // sort the nodes ids so that the key is reciprocal
421 uint32_t x1 = std::min (a->GetObject<Node> ()->GetId (), b->GetObject<Node> ()->GetId ());
422 uint32_t x2 = std::max (a->GetObject<Node> ()->GetId (), b->GetObject<Node> ()->GetId ());
423
424 // use the cantor function to obtain the key
425 uint32_t key = (((x1 + x2) * (x1 + x2 + 1)) / 2) + x2;
426
427 return key;
428}
429
430// ------------------------------------------------------------------------- //
431
433
434TypeId
436{
437 static TypeId tid = TypeId ("ns3::ThreeGppRmaChannelConditionModel")
439 .SetGroupName ("Propagation")
440 .AddConstructor<ThreeGppRmaChannelConditionModel> ()
441 ;
442 return tid;
443}
444
447{}
448
450{}
451
452double
455{
456 // compute the 2D distance between a and b
457 double distance2D = Calculate2dDistance (a->GetPosition (), b->GetPosition ());
458
459 // NOTE: no indication is given about the heights of the BS and the UT used
460 // to derive the LOS probability
461
462 // compute the LOS probability (see 3GPP TR 38.901, Sec. 7.4.2)
463 double pLos = 0.0;
464 if (distance2D <= 10.0)
465 {
466 pLos = 1.0;
467 }
468 else
469 {
470 pLos = exp (-(distance2D - 10.0) / 1000.0);
471 }
472
473 return pLos;
474}
475
476// ------------------------------------------------------------------------- //
477
479
480TypeId
482{
483 static TypeId tid = TypeId ("ns3::ThreeGppUmaChannelConditionModel")
485 .SetGroupName ("Propagation")
486 .AddConstructor<ThreeGppUmaChannelConditionModel> ()
487 ;
488 return tid;
489}
490
493{}
494
496{}
497
498double
501{
502 // compute the 2D distance between a and b
503 double distance2D = Calculate2dDistance (a->GetPosition (), b->GetPosition ());
504
505 // retrieve h_UT, it should be smaller than 23 m
506 double h_UT = std::min (a->GetPosition ().z, b->GetPosition ().z);
507 if (h_UT > 23.0)
508 {
509 NS_LOG_WARN ("The height of the UT should be smaller than 23 m (see TR 38.901, Table 7.4.2-1)");
510 }
511
512 // retrieve h_BS, it should be equal to 25 m
513 double h_BS = std::max (a->GetPosition ().z, b->GetPosition ().z);
514 if (h_BS != 25.0)
515 {
516 NS_LOG_WARN ("The LOS probability was derived assuming BS antenna heights of 25 m (see TR 38.901, Table 7.4.2-1)");
517 }
518
519 // compute the LOS probability (see 3GPP TR 38.901, Sec. 7.4.2)
520 double pLos = 0.0;
521 if (distance2D <= 18.0)
522 {
523 pLos = 1.0;
524 }
525 else
526 {
527 // compute C'(h_UT)
528 double c = 0.0;
529 if (h_UT <= 13.0)
530 {
531 c = 0;
532 }
533 else
534 {
535 c = pow ((h_UT - 13.0) / 10.0, 1.5);
536 }
537
538 pLos = (18.0 / distance2D + exp (-distance2D / 63.0) * (1.0 - 18.0 / distance2D)) * (1.0 + c * 5.0 / 4.0 * pow (distance2D / 100.0, 3.0) * exp (-distance2D / 150.0));
539 }
540
541 return pLos;
542}
543
544// ------------------------------------------------------------------------- //
545
547
548TypeId
550{
551 static TypeId tid = TypeId ("ns3::ThreeGppUmiStreetCanyonChannelConditionModel")
553 .SetGroupName ("Propagation")
555 ;
556 return tid;
557}
558
561{}
562
564{}
565
566double
569{
570 // compute the 2D distance between a and b
571 double distance2D = Calculate2dDistance (a->GetPosition (), b->GetPosition ());
572
573 // NOTE: no idication is given about the UT height used to derive the
574 // LOS probability
575
576 // h_BS should be equal to 10 m. We check if at least one of the two
577 // nodes has height equal to 10 m
578 if (a->GetPosition ().z != 10.0 && b->GetPosition ().z != 10.0)
579 {
580 NS_LOG_WARN ("The LOS probability was derived assuming BS antenna heights of 10 m (see TR 38.901, Table 7.4.2-1)");
581 }
582
583 // compute the LOS probability (see 3GPP TR 38.901, Sec. 7.4.2)
584 double pLos = 0.0;
585 if (distance2D <= 18.0)
586 {
587 pLos = 1.0;
588 }
589 else
590 {
591 pLos = 18.0 / distance2D + exp (-distance2D / 36.0) * (1.0 - 18.0 / distance2D);
592 }
593
594 return pLos;
595}
596
597// ------------------------------------------------------------------------- //
598
600
601TypeId
603{
604 static TypeId tid = TypeId ("ns3::ThreeGppIndoorMixedOfficeChannelConditionModel")
606 .SetGroupName ("Propagation")
608 ;
609 return tid;
610}
611
614{}
615
617{}
618
619double
622{
623 // compute the 2D distance between a and b
624 double distance2D = Calculate2dDistance (a->GetPosition (), b->GetPosition ());
625
626 // NOTE: no idication is given about the UT height used to derive the
627 // LOS probability
628
629 // retrieve h_BS, it should be equal to 3 m
630 double h_BS = std::max (a->GetPosition ().z, b->GetPosition ().z);
631 if (h_BS != 3.0)
632 {
633 NS_LOG_WARN ("The LOS probability was derived assuming BS antenna heights of 3 m (see TR 38.901, Table 7.4.2-1)");
634 }
635
636 // compute the LOS probability (see 3GPP TR 38.901, Sec. 7.4.2)
637 double pLos = 0.0;
638 if (distance2D <= 1.2)
639 {
640 pLos = 1.0;
641 }
642 else if (distance2D > 1.2 && distance2D < 6.5)
643 {
644 pLos = exp (-(distance2D - 1.2) / 4.7);
645 }
646 else
647 {
648 pLos = exp (-(distance2D - 6.5) / 32.6) * 0.32;
649 }
650
651 return pLos;
652}
653
654// ------------------------------------------------------------------------- //
655
657
658TypeId
660{
661 static TypeId tid = TypeId ("ns3::ThreeGppIndoorOpenOfficeChannelConditionModel")
663 .SetGroupName ("Propagation")
665 ;
666 return tid;
667}
668
671{}
672
674{}
675
676double
679{
680 // compute the 2D distance between a and b
681 double distance2D = Calculate2dDistance (a->GetPosition (), b->GetPosition ());
682
683 // NOTE: no idication is given about the UT height used to derive the
684 // LOS probability
685
686 // retrieve h_BS, it should be equal to 3 m
687 double h_BS = std::max (a->GetPosition ().z, b->GetPosition ().z);
688 if (h_BS != 3.0)
689 {
690 NS_LOG_WARN ("The LOS probability was derived assuming BS antenna heights of 3 m (see TR 38.901, Table 7.4.2-1)");
691 }
692
693 // compute the LOS probability (see 3GPP TR 38.901, Sec. 7.4.2)
694 double pLos = 0.0;
695 if (distance2D <= 5.0)
696 {
697 pLos = 1.0;
698 }
699 else if (distance2D > 5.0 && distance2D <= 49.0)
700 {
701 pLos = exp (-(distance2D - 5.0) / 70.8);
702 }
703 else
704 {
705 pLos = exp (-(distance2D - 49.0) / 211.7) * 0.54;
706 }
707
708 return pLos;
709}
710
711} // end namespace ns3
#define min(a, b)
Definition: 80211b.c:42
#define max(a, b)
Definition: 80211b.c:43
Models an always in-LoS condition model.
virtual int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
static TypeId GetTypeId(void)
Get the type ID.
virtual Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b, that will be always LoS.
LosConditionValue m_losCondition
contains the information about the LOS state of the channel
bool IsO2i() const
Return true if the channel is outdoor-to-indoor.
ChannelCondition()
Constructor for the ChannelCondition class.
void SetLosCondition(LosConditionValue losCondition)
Set the LosConditionValue with the information about the LOS/NLOS state of the channel.
LosConditionValue GetLosCondition() const
Get the LosConditionValue contaning the information about the LOS/NLOS state of the channel.
bool IsNlos() const
Return true if the channel condition is NLOS.
bool IsEqual(LosConditionValue losCondition, O2iConditionValue o2iCondition) const
Return true if this instance is equivalent to the one passed as argument.
O2iConditionValue m_o2iCondition
contains the information about the O2I state of the channel
bool IsNlosv() const
Return true if the channel condition is NLOSv.
bool IsLos() const
Return true if the channel condition is LOS.
void SetO2iCondition(O2iConditionValue o2iCondition)
Set the O2iConditionValue contaning the information about the O2I state of the channel.
static TypeId GetTypeId(void)
Get the type ID.
bool IsO2o() const
Return true if the channel is outdoor-to-outdoor.
bool IsI2i() const
Return true if the channel is indoor-to-indoor.
virtual ~ChannelCondition()
Destructor for the ChannelCondition class.
O2iConditionValue
Possible values for Outdoor to Indoor condition.
@ O2O
Outdoor to Outdoor.
O2iConditionValue GetO2iCondition() const
Get the O2iConditionValue contaning the information about the O2I state of the channel.
LosConditionValue
Possible values for Line-of-Sight condition.
@ NLOSv
Non Line of Sight due to a vehicle.
Models the channel condition.
ChannelConditionModel()
Constructor for the ChannelConditionModel class.
static TypeId GetTypeId(void)
Get the type ID.
virtual ~ChannelConditionModel()
Destructor for the ChannelConditionModel class.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:41
Models a never in-LoS condition model.
virtual Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b, that will be always non-LoS.
virtual int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
static TypeId GetTypeId(void)
Get the type ID.
Models a never in-LoS condition model caused by a blocking vehicle.
static TypeId GetTypeId(void)
Get the type ID.
virtual int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
virtual Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b, that will be always NLOSv.
A network Node.
Definition: node.h:57
uint32_t GetId(void) const
Definition: node.cc:109
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:256
A base class which provides memory management and object aggregation.
Definition: object.h:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:195
Base class for the 3GPP channel condition models.
virtual int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
virtual void DoDispose() override
Destructor implementation.
static uint32_t GetKey(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b)
Returns a unique and reciprocal key for the channel between a and b.
virtual Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Retrieve the condition of the channel between a and b.
virtual ~ThreeGppChannelConditionModel() override
Destructor for the ThreeGppRmaChannelConditionModel class.
static TypeId GetTypeId(void)
Get the type ID.
static double Calculate2dDistance(const Vector &a, const Vector &b)
Computes the 2D distance between two 3D vectors.
virtual double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Compute the NLOS probability.
virtual double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const =0
Compute the LOS probability.
std::unordered_map< uint32_t, Item > m_channelConditionMap
map to store the channel conditions
Ptr< UniformRandomVariable > m_uniformVar
uniform random variable
ThreeGppChannelConditionModel()
Constructor for the ThreeGppRmaChannelConditionModel class.
Ptr< ChannelCondition > ComputeChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
This method computes the channel condition based on a probabilistic model that is specific for the sc...
Time m_updatePeriod
the update period for the channel condition
Computes the channel condition for the Indoor Mixed Office scenario.
ThreeGppIndoorMixedOfficeChannelConditionModel()
Constructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class.
virtual ~ThreeGppIndoorMixedOfficeChannelConditionModel() override
Destructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class.
virtual double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the Indoor Mixed Offi...
Computes the channel condition for the Indoor Open Office scenario.
ThreeGppIndoorOpenOfficeChannelConditionModel()
Constructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class.
virtual double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the Indoor Open Offic...
virtual ~ThreeGppIndoorOpenOfficeChannelConditionModel() override
Destructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class.
Computes the channel condition for the RMa scenario.
virtual ~ThreeGppRmaChannelConditionModel() override
Destructor for the ThreeGppRmaChannelConditionModel class.
virtual double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the RMa scenario.
ThreeGppRmaChannelConditionModel()
Constructor for the ThreeGppRmaChannelConditionModel class.
static TypeId GetTypeId(void)
Get the type ID.
Computes the channel condition for the UMa scenario.
static TypeId GetTypeId(void)
Get the type ID.
ThreeGppUmaChannelConditionModel()
Constructor for the ThreeGppUmaChannelConditionModel class.
virtual double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the UMa scenario.
virtual ~ThreeGppUmaChannelConditionModel() override
Destructor for the ThreeGppUmaChannelConditionModel class.
Computes the channel condition for the UMi-Street canyon scenario.
ThreeGppUmiStreetCanyonChannelConditionModel()
Constructor for the ThreeGppUmiStreetCanyonChannelConditionModel class.
virtual ~ThreeGppUmiStreetCanyonChannelConditionModel() override
Destructor for the ThreeGppUmiStreetCanyonChannelConditionModel class.
virtual double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the UMi-Street Canyon...
bool IsZero(void) const
Exactly equivalent to t == 0.
Definition: nstime.h:301
AttributeValue implementation for Time.
Definition: nstime.h:1309
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:922
double GetValue(double min, double max)
Get the next random value, as a double in the specified range .
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Definition: nstime.h:1310
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:265
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1245
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1253
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:139
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:522
Struct to store the channel condition in the m_channelConditionMap.
Ptr< ChannelCondition > m_condition
the channel condition
Time m_generatedTime
the time when the condition was generated