Generates a 2D map of the SINR from the strongest transmitter in the downlink of an LTE FDD system. More...
#include "radio-environment-map-helper.h"
Classes | |
struct | RemPoint |
A complete Radio Environment Map is composed of many of this structure. More... | |
Public Member Functions | |
RadioEnvironmentMapHelper () | |
~RadioEnvironmentMapHelper () override | |
void | DoDispose () override |
Destructor implementation. More... | |
uint16_t | GetBandwidth () const |
void | Install () |
Deploy the RemSpectrumPhy objects that generate the map according to the specified settings. More... | |
void | SetBandwidth (uint16_t bw) |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
~Object () override | |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose () |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. More... | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::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 (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized () const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
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 errors. 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 () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Private Member Functions | |
void | DelayedInstall () |
Scheduled by Install() to perform the actual generation of map. More... | |
void | Finalize () |
Called when the map generation procedure has been completed. More... | |
void | PrintAndReset () |
Go through every listener, write the computed SINR, and then reset it. More... | |
void | RunOneIteration (double xMin, double xMax, double yMin, double yMax) |
Mobilize all the listeners to a specified area. More... | |
Private Attributes | |
uint16_t | m_bandwidth |
The Bandwidth attribute. More... | |
Ptr< SpectrumChannel > | m_channel |
The Channel attribute, which is a direct pointer to the DL channel object for which will be created the REM. More... | |
std::string | m_channelPath |
The ChannelPath attribute. More... | |
uint16_t | m_earfcn |
The Earfcn attribute. More... | |
uint32_t | m_maxPointsPerIteration |
The MaxPointsPerIteration attribute. More... | |
double | m_noisePower |
The NoisePower attribute. More... | |
std::ofstream | m_outFile |
Stream the output to a file. More... | |
std::string | m_outputFile |
The OutputFile attribute. More... | |
int32_t | m_rbId |
The RbId attribute. More... | |
std::list< RemPoint > | m_rem |
List of listeners in the environment. More... | |
bool | m_stopWhenDone |
The StopWhenDone attribute. More... | |
bool | m_useDataChannel |
The UseDataChannel attribute. More... | |
double | m_xMax |
The XMax attribute. More... | |
double | m_xMin |
The XMin attribute. More... | |
uint16_t | m_xRes |
The XRes attribute. More... | |
double | m_xStep |
Distance along X axis between adjacent listening points. More... | |
double | m_yMax |
The YMax attribute. More... | |
double | m_yMin |
The YMin attribute. More... | |
uint16_t | m_yRes |
The YRes attribute. More... | |
double | m_yStep |
Distance along Y axis between adjacent listening points. More... | |
double | m_z |
The Z attribute. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize () |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Generates a 2D map of the SINR from the strongest transmitter in the downlink of an LTE FDD system.
For instructions on usage, please refer to the User Documentation.
Definition at line 44 of file radio-environment-map-helper.h.
ns3::RadioEnvironmentMapHelper::RadioEnvironmentMapHelper | ( | ) |
Definition at line 50 of file radio-environment-map-helper.cc.
|
override |
Definition at line 54 of file radio-environment-map-helper.cc.
|
private |
Scheduled by Install() to perform the actual generation of map.
If control channel is used for SINR calculation (the default), the delay is 2.6 milliseconds from the start of simulation. Otherwise, if data channel is used, the delay is 500.1 milliseconds from the start of simulation.
The method will divide the whole map into parts (each contains at most a certain number of SINR listening points), and then call RunOneIteration() on each part, one by one.
Definition at line 242 of file radio-environment-map-helper.cc.
References ns3::Object::AggregateObject(), ns3::RadioEnvironmentMapHelper::RemPoint::bmm, Finalize(), ns3::LteSpectrumValueHelper::GetSpectrumModel(), m_bandwidth, m_channel, m_earfcn, m_maxPointsPerIteration, m_rbId, m_rem, m_useDataChannel, m_xMax, m_xMin, m_xRes, m_xStep, m_yMax, m_yMin, m_yRes, m_yStep, NS_LOG_FUNCTION, ns3::RadioEnvironmentMapHelper::RemPoint::phy, RunOneIteration(), ns3::Simulator::Schedule(), ns3::Seconds(), and two-ray-to-three-gpp-ch-calibration::x.
Referenced by Install().
|
overridevirtual |
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 59 of file radio-environment-map-helper.cc.
References NS_LOG_FUNCTION.
|
private |
Called when the map generation procedure has been completed.
Definition at line 363 of file radio-environment-map-helper.cc.
References m_outFile, m_stopWhenDone, NS_LOG_FUNCTION, and ns3::Simulator::Stop().
Referenced by DelayedInstall().
uint16_t ns3::RadioEnvironmentMapHelper::GetBandwidth | ( | ) | const |
Definition at line 177 of file radio-environment-map-helper.cc.
References m_bandwidth.
Referenced by GetTypeId().
|
static |
Register this type.
Definition at line 65 of file radio-environment-map-helper.cc.
References GetBandwidth(), m_channel, m_channelPath, m_earfcn, m_maxPointsPerIteration, m_noisePower, m_outputFile, m_rbId, m_stopWhenDone, m_useDataChannel, m_xMax, m_xMin, m_xRes, m_yMax, m_yMin, m_yRes, m_z, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeDoubleAccessor(), ns3::MakeIntegerAccessor(), ns3::MakePointerAccessor(), ns3::MakeStringAccessor(), ns3::MakeStringChecker(), ns3::MakeUintegerAccessor(), max, NS_LOG_FUNCTION, SetBandwidth(), and ns3::TypeId::SetParent().
void ns3::RadioEnvironmentMapHelper::Install | ( | ) |
Deploy the RemSpectrumPhy objects that generate the map according to the specified settings.
Definition at line 203 of file radio-environment-map-helper.cc.
References DelayedInstall(), ns3::Config::MatchContainer::Get(), ns3::Config::MatchContainer::GetN(), ns3::Object::GetObject(), ns3::Config::LookupMatches(), m_channel, m_channelPath, m_outFile, m_outputFile, m_rem, m_useDataChannel, NS_ABORT_MSG_IF, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and ns3::Seconds().
|
private |
Go through every listener, write the computed SINR, and then reset it.
Definition at line 341 of file radio-environment-map-helper.cc.
References m_noisePower, m_outFile, m_rem, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by RunOneIteration().
|
private |
Mobilize all the listeners to a specified area.
Afterwards, schedule a call to PrintAndReset() in 0.5 milliseconds.
xMin | X coordinate of the first SINR listening point to deploy. |
xMax | X coordinate of the last SINR listening point to deploy. |
yMin | Y coordinate of the first SINR listening point to deploy. |
yMax | Y coordinate of the last SINR listening point to deploy. |
Definition at line 306 of file radio-environment-map-helper.cc.
References m_rem, m_xMax, m_xStep, m_yMax, m_yMin, m_yStep, m_z, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, PrintAndReset(), ns3::Simulator::Schedule(), ns3::Seconds(), and two-ray-to-three-gpp-ch-calibration::x.
Referenced by DelayedInstall().
void ns3::RadioEnvironmentMapHelper::SetBandwidth | ( | uint16_t | bw | ) |
bw | the bandwidth (in num of RBs) over which SINR is calculated |
Definition at line 183 of file radio-environment-map-helper.cc.
References m_bandwidth, and NS_FATAL_ERROR.
Referenced by GetTypeId().
|
private |
The Bandwidth
attribute.
Definition at line 132 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), GetBandwidth(), and SetBandwidth().
|
private |
The Channel
attribute, which is a direct pointer to the DL channel object for which will be created the REM.
Alternatively, ChannelPath
attribute can be used. If ChannelPath
attribute is being used then the m_channel object is configured by using the ChannelPath
attribute value.
Definition at line 153 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), GetTypeId(), and Install().
|
private |
The ChannelPath
attribute.
If Channel
attribute is not set, then ChannelPath
will be used to determine the DL channel object for which the REM will be created.
Definition at line 141 of file radio-environment-map-helper.h.
Referenced by GetTypeId(), and Install().
|
private |
The Earfcn
attribute.
Definition at line 131 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), and GetTypeId().
|
private |
The MaxPointsPerIteration
attribute.
Definition at line 129 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), and GetTypeId().
|
private |
The NoisePower
attribute.
Definition at line 155 of file radio-environment-map-helper.h.
Referenced by GetTypeId(), and PrintAndReset().
|
private |
Stream the output to a file.
Definition at line 157 of file radio-environment-map-helper.h.
Referenced by Finalize(), Install(), and PrintAndReset().
|
private |
The OutputFile
attribute.
Definition at line 143 of file radio-environment-map-helper.h.
Referenced by GetTypeId(), and Install().
|
private |
The RbId
attribute.
Definition at line 160 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), and GetTypeId().
List of listeners in the environment.
Definition at line 117 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), Install(), PrintAndReset(), and RunOneIteration().
|
private |
The StopWhenDone
attribute.
Definition at line 145 of file radio-environment-map-helper.h.
Referenced by Finalize(), and GetTypeId().
|
private |
The UseDataChannel
attribute.
Definition at line 159 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), GetTypeId(), and Install().
|
private |
The XMax
attribute.
Definition at line 120 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), GetTypeId(), and RunOneIteration().
|
private |
The XMin
attribute.
Definition at line 119 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), and GetTypeId().
|
private |
The XRes
attribute.
Definition at line 121 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), and GetTypeId().
|
private |
Distance along X axis between adjacent listening points.
Definition at line 122 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), and RunOneIteration().
|
private |
The YMax
attribute.
Definition at line 125 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), GetTypeId(), and RunOneIteration().
|
private |
The YMin
attribute.
Definition at line 124 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), GetTypeId(), and RunOneIteration().
|
private |
The YRes
attribute.
Definition at line 126 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), and GetTypeId().
|
private |
Distance along Y axis between adjacent listening points.
Definition at line 127 of file radio-environment-map-helper.h.
Referenced by DelayedInstall(), and RunOneIteration().
|
private |
The Z
attribute.
Definition at line 134 of file radio-environment-map-helper.h.
Referenced by GetTypeId(), and RunOneIteration().