Base class for the 3GPP channel condition models. More...
#include "channel-condition-model.h"
Classes | |
struct | Item |
Struct to store the channel condition in the m_channelConditionMap. More... | |
Public Member Functions | |
ThreeGppChannelConditionModel () | |
Constructor for the ThreeGppRmaChannelConditionModel class. More... | |
virtual | ~ThreeGppChannelConditionModel () override |
Destructor for the ThreeGppRmaChannelConditionModel class. More... | |
virtual int64_t | AssignStreams (int64_t stream) override |
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers starting with the offset 'stream'. More... | |
virtual Ptr< ChannelCondition > | GetChannelCondition (Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override |
Retrieve the condition of the channel between a and b. More... | |
![]() | |
ChannelConditionModel () | |
Constructor for the ChannelConditionModel class. More... | |
ChannelConditionModel (const ChannelConditionModel &)=delete | |
Copy constructor. More... | |
virtual | ~ChannelConditionModel () |
Destructor for the ChannelConditionModel class. More... | |
ChannelConditionModel & | operator= (const ChannelConditionModel &)=delete |
Copy constructor. More... | |
![]() | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject () const |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized (void) const |
Check if the object has been initialized. More... | |
![]() | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Protected Member Functions | |
virtual void | DoDispose () override |
Destructor implementation. More... | |
![]() | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
Static Protected Member Functions | |
static double | Calculate2dDistance (const Vector &a, const Vector &b) |
Computes the 2D distance between two 3D vectors. More... | |
Private Member Functions | |
virtual double | ComputePlos (Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const =0 |
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901. More... | |
Static Private Member Functions | |
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. More... | |
Private Attributes | |
std::unordered_map< uint32_t, Item > | m_channelConditionMap |
map to store the channel conditions More... | |
Ptr< UniformRandomVariable > | m_uniformVar |
uniform random variable More... | |
Time | m_updatePeriod |
the update period for the channel condition More... | |
Additional Inherited Members | |
![]() | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Base class for the 3GPP channel condition models.
ns3::ThreeGppChannelConditionModel is accessible through the following paths with Config::Set and Config::Connect:
No TraceSources are defined for this type.
Size of this type is 104 bytes (on a 64-bit architecture).
Definition at line 285 of file channel-condition-model.h.
ns3::ThreeGppChannelConditionModel::ThreeGppChannelConditionModel | ( | ) |
Constructor for the ThreeGppRmaChannelConditionModel class.
Definition at line 188 of file channel-condition-model.cc.
References m_uniformVar, and ns3::ObjectBase::SetAttribute().
|
overridevirtual |
Destructor for the ThreeGppRmaChannelConditionModel class.
Definition at line 196 of file channel-condition-model.cc.
|
overridevirtual |
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers starting with the offset 'stream'.
Return the number of streams (possibly zero) that have been assigned.
stream |
Implements ns3::ChannelConditionModel.
Definition at line 275 of file channel-condition-model.cc.
References m_uniformVar, and ns3::RandomVariableStream::SetStream().
|
staticprotected |
Computes the 2D distance between two 3D vectors.
a | the first 3D vector |
b | the second 3D vector |
Definition at line 282 of file channel-condition-model.cc.
References sample-rng-plot::x.
Referenced by ns3::ThreeGppRmaChannelConditionModel::ComputePlos(), ns3::ThreeGppUmaChannelConditionModel::ComputePlos(), ns3::ThreeGppUmiStreetCanyonChannelConditionModel::ComputePlos(), ns3::ThreeGppIndoorMixedOfficeChannelConditionModel::ComputePlos(), and ns3::ThreeGppIndoorOpenOfficeChannelConditionModel::ComputePlos().
|
privatepure virtual |
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901.
a | tx mobility model |
b | rx mobility model |
Implemented in ns3::ThreeGppIndoorOpenOfficeChannelConditionModel, ns3::ThreeGppIndoorMixedOfficeChannelConditionModel, ns3::ThreeGppUmiStreetCanyonChannelConditionModel, ns3::ThreeGppUmaChannelConditionModel, and ns3::ThreeGppRmaChannelConditionModel.
Referenced by GetChannelCondition().
|
overrideprotectedvirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 200 of file channel-condition-model.cc.
References m_channelConditionMap, m_updatePeriod, and ns3::Seconds().
|
overridevirtual |
Retrieve the condition of the channel between a and b.
If the channel condition does not exists, the method creates it and store it in a local cache, that will be updated following the "UpdatePeriod" parameter.
a | mobility model |
b | mobility model |
Implements ns3::ChannelConditionModel.
Definition at line 207 of file channel-condition-model.cc.
References ComputePlos(), GetKey(), ns3::UniformRandomVariable::GetValue(), ns3::Time::IsZero(), m_channelConditionMap, ns3::ThreeGppChannelConditionModel::Item::m_condition, ns3::ThreeGppChannelConditionModel::Item::m_generatedTime, m_uniformVar, m_updatePeriod, ns3::Simulator::Now(), and NS_LOG_DEBUG.
Referenced by ThreeGppChannelConditionModelTestCase::EvaluateChannelCondition().
|
staticprivate |
Returns a unique and reciprocal key for the channel between a and b.
a | tx mobility model |
b | rx mobility model |
Definition at line 292 of file channel-condition-model.cc.
References ns3::Node::GetId(), max, and min.
Referenced by GetChannelCondition().
|
static |
Get the type ID.
Get the type ID.
Definition at line 175 of file channel-condition-model.cc.
References m_updatePeriod, ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MilliSeconds(), and ns3::TypeId::SetParent().
|
private |
map to store the channel conditions
Definition at line 367 of file channel-condition-model.h.
Referenced by DoDispose(), and GetChannelCondition().
|
private |
uniform random variable
Definition at line 369 of file channel-condition-model.h.
Referenced by AssignStreams(), GetChannelCondition(), and ThreeGppChannelConditionModel().
|
private |
the update period for the channel condition
Definition at line 368 of file channel-condition-model.h.
Referenced by DoDispose(), GetChannelCondition(), and GetTypeId().