|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
20 #ifndef CHANNEL_CONDITION_MODEL_H
21 #define CHANNEL_CONDITION_MODEL_H
23 #include "ns3/object.h"
24 #include "ns3/random-variable-stream.h"
25 #include "ns3/vector.h"
26 #include "ns3/nstime.h"
27 #include <unordered_map>
bool IsLos() const
Return true if the channel condition is LOS.
a unique identifier for an interface.
virtual ~NeverLosVehicleChannelConditionModel()
Destructor.
AlwaysLosChannelConditionModel()
Constructor.
virtual ~AlwaysLosChannelConditionModel()
Destructor.
LosConditionValue m_losCondition
contains the information about the LOS state of the channel
Models an always in-LoS condition model.
ChannelConditionModel & operator=(const ChannelConditionModel &)=delete
Copy constructor.
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...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool IsO2o() const
Return true if the channel is outdoor-to-outdoor.
Time m_updatePeriod
the update period for the channel condition
@ O2I_ND
Outdoor to Indoor condition not defined.
ChannelConditionModel()
Constructor for the ChannelConditionModel class.
bool IsNlosv() const
Return true if the channel condition is NLOSv.
virtual double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Compute the NLOS probability.
Carries information about the LOS/NLOS channel state.
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...
virtual int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
@ LC_ND
Los condition not defined.
virtual void DoDispose() override
Destructor implementation.
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...
Computes the channel condition for the Indoor Mixed Office scenario.
Computes the channel condition for the RMa scenario.
Computes the channel condition for the UMa scenario.
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...
ThreeGppIndoorMixedOfficeChannelConditionModel()
Constructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class.
O2iConditionValue m_o2iCondition
contains the information about the O2I state of the channel
NeverLosChannelConditionModel(const NeverLosChannelConditionModel &)=delete
Copy constructor.
static TypeId GetTypeId(void)
Get the type ID.
virtual Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Retrieve the condition of the channel between a and b.
LosConditionValue
Possible values for Line-of-Sight condition.
static TypeId GetTypeId(void)
Get the type ID.
ChannelCondition()
Constructor for the ChannelCondition class.
static TypeId GetTypeId(void)
Get the type ID.
NeverLosVehicleChannelConditionModel & operator=(const NeverLosVehicleChannelConditionModel &)=delete
Copy constructor.
virtual Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const =0
Computes the condition of the channel between a and b.
void SetLosCondition(LosConditionValue losCondition)
Set the LosConditionValue with the information about the LOS/NLOS state of the channel.
bool IsO2i() const
Return true if the channel is outdoor-to-indoor.
virtual ~ChannelConditionModel()
Destructor for the ChannelConditionModel class.
bool IsI2i() const
Return true if the channel is indoor-to-indoor.
static TypeId GetTypeId(void)
Get the type ID.
Smart pointer class similar to boost::intrusive_ptr.
friend std::ostream & operator<<(std::ostream &os, LosConditionValue cond)
Prints a LosConditionValue to output.
Time m_generatedTime
the time when the condition was generated
virtual double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const =0
Compute the LOS probability.
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.
AlwaysLosChannelConditionModel & operator=(const AlwaysLosChannelConditionModel &)=delete
Copy constructor.
virtual ~ThreeGppUmiStreetCanyonChannelConditionModel() override
Destructor for the ThreeGppUmiStreetCanyonChannelConditionModel class.
NeverLosVehicleChannelConditionModel(const NeverLosVehicleChannelConditionModel &)=delete
Copy constructor.
static TypeId GetTypeId(void)
Get the type ID.
Ptr< ChannelCondition > m_condition
the channel condition
static TypeId GetTypeId(void)
Get the type ID.
A base class which provides memory management and object aggregation.
virtual ~ThreeGppUmaChannelConditionModel() override
Destructor for the ThreeGppUmaChannelConditionModel class.
NeverLosVehicleChannelConditionModel()
Constructor.
LosConditionValue GetLosCondition() const
Get the LosConditionValue contaning the information about the LOS/NLOS state of the channel.
void SetO2iCondition(O2iConditionValue o2iCondition)
Set the O2iConditionValue contaning the information about the O2I state of the channel.
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.
virtual int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
ThreeGppIndoorOpenOfficeChannelConditionModel()
Constructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class.
ChannelConditionModel(const ChannelConditionModel &)=delete
Copy constructor.
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.
NeverLosChannelConditionModel & operator=(const NeverLosChannelConditionModel &)=delete
Copy constructor.
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.
Simulation virtual time values and global simulation resolution.
virtual ~ThreeGppRmaChannelConditionModel() override
Destructor for the ThreeGppRmaChannelConditionModel class.
static TypeId GetTypeId(void)
Get the type ID.
virtual ~ThreeGppIndoorMixedOfficeChannelConditionModel() override
Destructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class.
virtual ~ThreeGppChannelConditionModel() override
Destructor for the ThreeGppRmaChannelConditionModel class.
O2iConditionValue GetO2iCondition() const
Get the O2iConditionValue contaning the information about the O2I state of the channel.
bool IsNlos() const
Return true if the channel condition is NLOS.
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.
Computes the channel condition for the Indoor Open Office scenario.
std::unordered_map< uint32_t, Item > m_channelConditionMap
map to store the channel conditions
VehicleDensity
Determine the density of vehicles in a V2V scenario.
bool IsEqual(Ptr< const ChannelCondition > otherCondition) const
Return true if this instance is equivalent to the one passed as argument.
virtual ~NeverLosChannelConditionModel()
Destructor.
@ NLOSv
Non Line of Sight due to a vehicle.
Models the channel condition.
static TypeId GetTypeId(void)
Get the type ID.
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 NLOSv.
ThreeGppChannelConditionModel()
Constructor for the ThreeGppRmaChannelConditionModel class.
virtual ~ThreeGppIndoorOpenOfficeChannelConditionModel() override
Destructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class.
O2iConditionValue
Possible values for Outdoor to Indoor condition.
NeverLosChannelConditionModel()
Constructor.
static TypeId GetTypeId(void)
Get the type ID.
Models a never in-LoS condition model caused by a blocking vehicle.
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...
ThreeGppUmaChannelConditionModel()
Constructor for the ThreeGppUmaChannelConditionModel class.
AlwaysLosChannelConditionModel(const AlwaysLosChannelConditionModel &)=delete
Copy constructor.
Computes the channel condition for the UMi-Street canyon scenario.
Models a never in-LoS condition model.
virtual ~ChannelCondition()
Destructor for the ChannelCondition class.
ThreeGppRmaChannelConditionModel()
Constructor for the ThreeGppRmaChannelConditionModel class.
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 double Calculate2dDistance(const Vector &a, const Vector &b)
Computes the 2D distance between two 3D vectors.
Ptr< UniformRandomVariable > m_uniformVar
uniform random variable
Base class for the 3GPP channel condition models.
ThreeGppUmiStreetCanyonChannelConditionModel()
Constructor for the ThreeGppUmiStreetCanyonChannelConditionModel class.
Struct to store the channel condition in the m_channelConditionMap.
virtual int64_t AssignStreams(int64_t stream)=0
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...