A Discrete-Event Network Simulator
API
ns3::RadioEnvironmentMapHelper Class Reference

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"

+ Inheritance diagram for ns3::RadioEnvironmentMapHelper:
+ Collaboration diagram for ns3::RadioEnvironmentMapHelper:

Classes

struct  RemPoint
 A complete Radio Environment Map is composed of many of this structure. More...
 

Public Member Functions

 RadioEnvironmentMapHelper ()
 
virtual ~RadioEnvironmentMapHelper ()
 
virtual void DoDispose (void)
 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...
 
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...
 
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...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) 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 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)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 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< SpectrumChannelm_channel
 The channel object taken from the ChannelPath attribute. 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< RemPointm_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 (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 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 (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

Generates a 2D map of the SINR from the strongest transmitter in the downlink of an LTE FDD system.


Introspection did not find any typical Config paths.

For instructions on usage, please refer to the User Documentation.


Attributes

  • ChannelPath: The path to the channel for which the Radio Environment Map is to be generated
    • Set with class: StringValue
    • Underlying type:
    • Initial value: /ChannelList/0
    • Flags: construct write read
  • OutputFile: the filename to which the Radio Environment Map is saved
    • Set with class: StringValue
    • Underlying type:
    • Initial value: rem.out
    • Flags: construct write read
  • XMin: The min x coordinate of the map.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • YMin: The min y coordinate of the map.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • XMax: The max x coordinate of the map.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 1
    • Flags: construct write read
  • YMax: The max y coordinate of the map.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 1
    • Flags: construct write read
  • XRes: The resolution (number of points) of the map along the x axis.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 2:65535
    • Initial value: 100
    • Flags: construct write read
  • YRes: The resolution (number of points) of the map along the y axis.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 2:65535
    • Initial value: 100
    • Flags: construct write read
  • Z: The value of the z coordinate for which the map is to be generated
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • StopWhenDone: If true, Simulator::Stop () will be called as soon as the REM has been generated
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • NoisePower: the power of the measuring instrument noise, in Watts. Default to a kT of -174 dBm with a noise figure of 9 dB and a bandwidth of 25 LTE Resource Blocks
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 1.423e-13
    • Flags: construct write read
  • MaxPointsPerIteration: Maximum number of REM points to be calculated per iteration. Every point consumes approximately 5KB of memory.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 1:4294967295
    • Initial value: 20000
    • Flags: construct write read
  • Earfcn: E-UTRA Absolute Radio Frequency Channel Number (EARFCN) as per 3GPP 36.101 Section 5.7.3.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 100
    • Flags: construct write read
  • Bandwidth: Transmission Bandwidth Configuration (in number of RBs) over which the SINR will be calculated
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 25
    • Flags: construct write read
  • UseDataChannel: If true, REM will be generated for PDSCH and for PDCCH otherwise
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • RbId: Resource block Id, for which REM will be generated,default value is -1, what means REM will be averaged from all RBs
    • Set with class: ns3::IntegerValue
    • Underlying type: int32_t -2147483648:2147483647
    • Initial value: -1
    • Flags: construct write read

No TraceSources are defined for this type.
Size of this type is 688 bytes (on a 64-bit architecture).

Definition at line 46 of file radio-environment-map-helper.h.

Constructor & Destructor Documentation

◆ RadioEnvironmentMapHelper()

ns3::RadioEnvironmentMapHelper::RadioEnvironmentMapHelper ( )

Definition at line 50 of file radio-environment-map-helper.cc.

◆ ~RadioEnvironmentMapHelper()

ns3::RadioEnvironmentMapHelper::~RadioEnvironmentMapHelper ( )
virtual

Definition at line 55 of file radio-environment-map-helper.cc.

Member Function Documentation

◆ DelayedInstall()

void ns3::RadioEnvironmentMapHelper::DelayedInstall ( )
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 218 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 sample-rng-plot::x.

Referenced by Install().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::RadioEnvironmentMapHelper::DoDispose ( void  )
virtual

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 62 of file radio-environment-map-helper.cc.

References NS_LOG_FUNCTION.

◆ Finalize()

void ns3::RadioEnvironmentMapHelper::Finalize ( )
private

Called when the map generation procedure has been completed.

Definition at line 345 of file radio-environment-map-helper.cc.

References m_outFile, m_stopWhenDone, NS_LOG_FUNCTION, and ns3::Simulator::Stop().

Referenced by DelayedInstall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBandwidth()

uint16_t ns3::RadioEnvironmentMapHelper::GetBandwidth ( ) const
Returns
the bandwidth (in num of RBs) over which SINR is calculated

Definition at line 153 of file radio-environment-map-helper.cc.

References m_bandwidth.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

◆ Install()

void ns3::RadioEnvironmentMapHelper::Install ( )

◆ PrintAndReset()

void ns3::RadioEnvironmentMapHelper::PrintAndReset ( )
private

Go through every listener, write the computed SINR, and then reset it.

Definition at line 316 of file radio-environment-map-helper.cc.

References m_noisePower, m_outFile, m_rem, NS_LOG_FUNCTION, and NS_LOG_LOGIC().

Referenced by RunOneIteration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RunOneIteration()

void ns3::RadioEnvironmentMapHelper::RunOneIteration ( double  xMin,
double  xMax,
double  yMin,
double  yMax 
)
private

Mobilize all the listeners to a specified area.

Afterwards, schedule a call to PrintAndReset() in 0.5 milliseconds.

Parameters
xMinX coordinate of the first SINR listening point to deploy.
xMaxX coordinate of the last SINR listening point to deploy.
yMinY coordinate of the first SINR listening point to deploy.
yMaxY coordinate of the last SINR listening point to deploy.

Definition at line 281 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 sample-rng-plot::x.

Referenced by DelayedInstall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBandwidth()

void ns3::RadioEnvironmentMapHelper::SetBandwidth ( uint16_t  bw)
Parameters
bwthe bandwidth (in num of RBs) over which SINR is calculated

Definition at line 159 of file radio-environment-map-helper.cc.

References m_bandwidth, and NS_FATAL_ERROR.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_bandwidth

uint16_t ns3::RadioEnvironmentMapHelper::m_bandwidth
private

The Bandwidth attribute.

Definition at line 136 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), GetBandwidth(), and SetBandwidth().

◆ m_channel

Ptr<SpectrumChannel> ns3::RadioEnvironmentMapHelper::m_channel
private

The channel object taken from the ChannelPath attribute.

Definition at line 146 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), and Install().

◆ m_channelPath

std::string ns3::RadioEnvironmentMapHelper::m_channelPath
private

The ChannelPath attribute.

Definition at line 140 of file radio-environment-map-helper.h.

Referenced by GetTypeId(), and Install().

◆ m_earfcn

uint16_t ns3::RadioEnvironmentMapHelper::m_earfcn
private

The Earfcn attribute.

Definition at line 135 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), and GetTypeId().

◆ m_maxPointsPerIteration

uint32_t ns3::RadioEnvironmentMapHelper::m_maxPointsPerIteration
private

The MaxPointsPerIteration attribute.

Definition at line 133 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), and GetTypeId().

◆ m_noisePower

double ns3::RadioEnvironmentMapHelper::m_noisePower
private

The NoisePower attribute.

Definition at line 148 of file radio-environment-map-helper.h.

Referenced by GetTypeId(), and PrintAndReset().

◆ m_outFile

std::ofstream ns3::RadioEnvironmentMapHelper::m_outFile
private

Stream the output to a file.

Definition at line 150 of file radio-environment-map-helper.h.

Referenced by Finalize(), Install(), and PrintAndReset().

◆ m_outputFile

std::string ns3::RadioEnvironmentMapHelper::m_outputFile
private

The OutputFile attribute.

Definition at line 141 of file radio-environment-map-helper.h.

Referenced by GetTypeId(), and Install().

◆ m_rbId

int32_t ns3::RadioEnvironmentMapHelper::m_rbId
private

The RbId attribute.

Definition at line 153 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), and GetTypeId().

◆ m_rem

std::list<RemPoint> ns3::RadioEnvironmentMapHelper::m_rem
private

List of listeners in the environment.

Definition at line 121 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), Install(), PrintAndReset(), and RunOneIteration().

◆ m_stopWhenDone

bool ns3::RadioEnvironmentMapHelper::m_stopWhenDone
private

The StopWhenDone attribute.

Definition at line 143 of file radio-environment-map-helper.h.

Referenced by Finalize(), and GetTypeId().

◆ m_useDataChannel

bool ns3::RadioEnvironmentMapHelper::m_useDataChannel
private

The UseDataChannel attribute.

Definition at line 152 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), GetTypeId(), and Install().

◆ m_xMax

double ns3::RadioEnvironmentMapHelper::m_xMax
private

The XMax attribute.

Definition at line 124 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), GetTypeId(), and RunOneIteration().

◆ m_xMin

double ns3::RadioEnvironmentMapHelper::m_xMin
private

The XMin attribute.

Definition at line 123 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), and GetTypeId().

◆ m_xRes

uint16_t ns3::RadioEnvironmentMapHelper::m_xRes
private

The XRes attribute.

Definition at line 125 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), and GetTypeId().

◆ m_xStep

double ns3::RadioEnvironmentMapHelper::m_xStep
private

Distance along X axis between adjacent listening points.

Definition at line 126 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), and RunOneIteration().

◆ m_yMax

double ns3::RadioEnvironmentMapHelper::m_yMax
private

The YMax attribute.

Definition at line 129 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), GetTypeId(), and RunOneIteration().

◆ m_yMin

double ns3::RadioEnvironmentMapHelper::m_yMin
private

The YMin attribute.

Definition at line 128 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), GetTypeId(), and RunOneIteration().

◆ m_yRes

uint16_t ns3::RadioEnvironmentMapHelper::m_yRes
private

The YRes attribute.

Definition at line 130 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), and GetTypeId().

◆ m_yStep

double ns3::RadioEnvironmentMapHelper::m_yStep
private

Distance along Y axis between adjacent listening points.

Definition at line 131 of file radio-environment-map-helper.h.

Referenced by DelayedInstall(), and RunOneIteration().

◆ m_z

double ns3::RadioEnvironmentMapHelper::m_z
private

The Z attribute.

Definition at line 138 of file radio-environment-map-helper.h.

Referenced by GetTypeId(), and RunOneIteration().


The documentation for this class was generated from the following files: