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

Takes care of storing the information generated at PHY layer regarding reception. More...

#include "phy-rx-stats-calculator.h"

+ Inheritance diagram for ns3::PhyRxStatsCalculator:
+ Collaboration diagram for ns3::PhyRxStatsCalculator:

Public Member Functions

 PhyRxStatsCalculator ()
 Constructor. More...
 
 ~PhyRxStatsCalculator () override
 Destructor. More...
 
void DlPhyReception (PhyReceptionStatParameters params)
 Notifies the stats calculator that an downlink reception has occurred. More...
 
std::string GetDlRxOutputFilename ()
 Get the name of the file where the DL RX PHY statistics will be stored. More...
 
std::string GetUlRxOutputFilename ()
 Get the name of the file where the UL RX PHY statistics will be stored. More...
 
void SetDlRxOutputFilename (std::string outputFilename)
 Set the name of the file where the DL RX PHY statistics will be stored. More...
 
void SetUlRxOutputFilename (std::string outputFilename)
 Set the name of the file where the UL Rx PHY statistics will be stored. More...
 
void UlPhyReception (PhyReceptionStatParameters params)
 Notifies the stats calculator that an uplink reception has occurred. More...
 
- Public Member Functions inherited from ns3::LteStatsCalculator
 LteStatsCalculator ()
 Constructor. More...
 
 ~LteStatsCalculator () override
 Destructor. More...
 
bool ExistsCellIdPath (std::string path)
 Checks if there is an already stored cell id for the given path. More...
 
bool ExistsImsiPath (std::string path)
 Checks if there is an already stored IMSI for the given path. More...
 
uint16_t GetCellIdPath (std::string path)
 Retrieves the cell id information for the given path. More...
 
std::string GetDlOutputFilename ()
 Get the name of the file where the downlink statistics will be stored. More...
 
uint64_t GetImsiPath (std::string path)
 Retrieves the imsi information for the given path. More...
 
std::string GetUlOutputFilename ()
 Get the name of the file where the uplink statistics will be stored. More...
 
void SetCellIdPath (std::string path, uint16_t cellId)
 Stores the (path, cellId) pairs in a map. More...
 
void SetDlOutputFilename (std::string outputFilename)
 Set the name of the file where the downlink statistics will be stored. More...
 
void SetImsiPath (std::string path, uint64_t imsi)
 Stores the (path, imsi) pairs in a map. More...
 
void SetUlOutputFilename (std::string outputFilename)
 Set the name of the file where the uplink statistics will be stored. More...
 
- 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< ObjectGetObject () 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< ObjectGetObject (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...
 
SimpleRefCountoperator= (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 void DlPhyReceptionCallback (Ptr< PhyRxStatsCalculator > phyRxStats, std::string path, PhyReceptionStatParameters params)
 trace sink More...
 
static TypeId GetTypeId ()
 Register this type. More...
 
static void UlPhyReceptionCallback (Ptr< PhyRxStatsCalculator > phyRxStats, std::string path, PhyReceptionStatParameters params)
 trace sink More...
 
- Static Public Member Functions inherited from ns3::LteStatsCalculator
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 Attributes

bool m_dlRxFirstWrite
 When writing DL RX PHY statistics first time to file, columns description is added. More...
 
std::ofstream m_dlRxOutFile
 DL RX PHY output trace file. More...
 
bool m_ulRxFirstWrite
 When writing UL RX PHY statistics first time to file, columns description is added. More...
 
std::ofstream m_ulRxOutFile
 UL RX PHY output trace file. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoDispose ()
 Destructor implementation. 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...
 
- Static Protected Member Functions inherited from ns3::LteStatsCalculator
static uint16_t FindCellIdFromEnbMac (std::string path, uint16_t rnti)
 Retrieves CellId from Enb MAC path in the attribute system. More...
 
static uint16_t FindCellIdFromEnbRlcPath (std::string path)
 Retrieves CellId from Enb RLC path in the attribute system. More...
 
static uint64_t FindImsiForEnb (std::string path, uint16_t rnti)
 Retrieves IMSI from path for Enb in the attribute system. More...
 
static uint64_t FindImsiForUe (std::string path, uint16_t rnti)
 Retrieves IMSI from path for Ue in the attribute system. More...
 
static uint64_t FindImsiFromEnbMac (std::string path, uint16_t rnti)
 Retrieves IMSI from Enb MAC path in the attribute system. More...
 
static uint64_t FindImsiFromEnbRlcPath (std::string path)
 Retrieves IMSI from Enb RLC path in the attribute system. More...
 
static uint64_t FindImsiFromLteNetDevice (std::string path)
 Retrieves IMSI from LteNetDevice path in the attribute system. More...
 
static uint64_t FindImsiFromUePhy (std::string path)
 Retrieves IMSI from Ue PHY path in the attribute system. More...
 

Detailed Description

Takes care of storing the information generated at PHY layer regarding reception.

Metrics saved are:

  • Timestamp (in seconds)
  • Frame index
  • Subframe index
  • C-RNTI
  • MCS for transport block 1
  • Size of transport block 1
  • MCS for transport block 2 (0 if not used)
  • Size of transport block 2 (0 if not used)

Definition at line 52 of file phy-rx-stats-calculator.h.

Constructor & Destructor Documentation

◆ PhyRxStatsCalculator()

ns3::PhyRxStatsCalculator::PhyRxStatsCalculator ( )

Constructor.

Definition at line 35 of file phy-rx-stats-calculator.cc.

References NS_LOG_FUNCTION.

◆ ~PhyRxStatsCalculator()

ns3::PhyRxStatsCalculator::~PhyRxStatsCalculator ( )
override

Destructor.

Definition at line 42 of file phy-rx-stats-calculator.cc.

References m_dlRxOutFile, m_ulRxOutFile, and NS_LOG_FUNCTION.

Member Function Documentation

◆ DlPhyReception()

void ns3::PhyRxStatsCalculator::DlPhyReception ( PhyReceptionStatParameters  params)

Notifies the stats calculator that an downlink reception has occurred.

Parameters
paramsTrace information regarding PHY reception stats

Definition at line 102 of file phy-rx-stats-calculator.cc.

References GetDlRxOutputFilename(), m_dlRxFirstWrite, m_dlRxOutFile, NS_LOG_ERROR, NS_LOG_FUNCTION, NS_LOG_INFO, and two-ray-to-three-gpp-ch-calibration::params.

+ Here is the call graph for this function:

◆ DlPhyReceptionCallback()

void ns3::PhyRxStatsCalculator::DlPhyReceptionCallback ( Ptr< PhyRxStatsCalculator phyRxStats,
std::string  path,
PhyReceptionStatParameters  params 
)
static

trace sink

Parameters
phyRxStats
path
params

Definition at line 172 of file phy-rx-stats-calculator.cc.

References ns3::LteStatsCalculator::FindImsiFromLteNetDevice(), NS_LOG_FUNCTION, and two-ray-to-three-gpp-ch-calibration::params.

Referenced by ns3::LteHelper::EnableDlRxPhyTraces().

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

◆ GetDlRxOutputFilename()

std::string ns3::PhyRxStatsCalculator::GetDlRxOutputFilename ( )

Get the name of the file where the DL RX PHY statistics will be stored.

Returns
the name of the file where the DL RX PHY statistics will be stored

Definition at line 96 of file phy-rx-stats-calculator.cc.

References ns3::LteStatsCalculator::GetDlOutputFilename().

Referenced by DlPhyReception().

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

◆ GetTypeId()

TypeId ns3::PhyRxStatsCalculator::GetTypeId ( void  )
static

Register this type.

Returns
The object TypeId.

Definition at line 57 of file phy-rx-stats-calculator.cc.

References ns3::MakeStringAccessor(), ns3::MakeStringChecker(), SetDlRxOutputFilename(), ns3::TypeId::SetParent(), and SetUlRxOutputFilename().

+ Here is the call graph for this function:

◆ GetUlRxOutputFilename()

std::string ns3::PhyRxStatsCalculator::GetUlRxOutputFilename ( )

Get the name of the file where the UL RX PHY statistics will be stored.

Returns
the name of the file where the UL RX PHY statistics will be stored

Definition at line 84 of file phy-rx-stats-calculator.cc.

References ns3::LteStatsCalculator::GetUlOutputFilename().

Referenced by UlPhyReception().

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

◆ SetDlRxOutputFilename()

void ns3::PhyRxStatsCalculator::SetDlRxOutputFilename ( std::string  outputFilename)

Set the name of the file where the DL RX PHY statistics will be stored.

Parameters
outputFilenamestring with the name of the file

Definition at line 90 of file phy-rx-stats-calculator.cc.

References ns3::LteStatsCalculator::SetDlOutputFilename().

Referenced by GetTypeId().

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

◆ SetUlRxOutputFilename()

void ns3::PhyRxStatsCalculator::SetUlRxOutputFilename ( std::string  outputFilename)

Set the name of the file where the UL Rx PHY statistics will be stored.

Parameters
outputFilenamestring with the name of the file

Definition at line 78 of file phy-rx-stats-calculator.cc.

References ns3::LteStatsCalculator::SetUlOutputFilename().

Referenced by GetTypeId().

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

◆ UlPhyReception()

void ns3::PhyRxStatsCalculator::UlPhyReception ( PhyReceptionStatParameters  params)

Notifies the stats calculator that an uplink reception has occurred.

Parameters
paramsTrace information regarding PHY reception stats

Definition at line 138 of file phy-rx-stats-calculator.cc.

References GetUlRxOutputFilename(), m_ulRxFirstWrite, m_ulRxOutFile, NS_LOG_ERROR, NS_LOG_FUNCTION, NS_LOG_INFO, and two-ray-to-three-gpp-ch-calibration::params.

+ Here is the call graph for this function:

◆ UlPhyReceptionCallback()

void ns3::PhyRxStatsCalculator::UlPhyReceptionCallback ( Ptr< PhyRxStatsCalculator phyRxStats,
std::string  path,
PhyReceptionStatParameters  params 
)
static

trace sink

Parameters
phyRxStats
path
params

Definition at line 196 of file phy-rx-stats-calculator.cc.

References ns3::LteStatsCalculator::FindImsiFromEnbRlcPath(), NS_LOG_FUNCTION, and two-ray-to-three-gpp-ch-calibration::params.

Referenced by ns3::LteHelper::EnableUlRxPhyTraces().

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

Member Data Documentation

◆ m_dlRxFirstWrite

bool ns3::PhyRxStatsCalculator::m_dlRxFirstWrite
private

When writing DL RX PHY statistics first time to file, columns description is added.

Then next lines are appended to file. This value is true if output files have not been opened yet

Definition at line 139 of file phy-rx-stats-calculator.h.

Referenced by DlPhyReception().

◆ m_dlRxOutFile

std::ofstream ns3::PhyRxStatsCalculator::m_dlRxOutFile
private

DL RX PHY output trace file.

Definition at line 152 of file phy-rx-stats-calculator.h.

Referenced by ~PhyRxStatsCalculator(), and DlPhyReception().

◆ m_ulRxFirstWrite

bool ns3::PhyRxStatsCalculator::m_ulRxFirstWrite
private

When writing UL RX PHY statistics first time to file, columns description is added.

Then next lines are appended to file. This value is true if output files have not been opened yet

Definition at line 147 of file phy-rx-stats-calculator.h.

Referenced by UlPhyReception().

◆ m_ulRxOutFile

std::ofstream ns3::PhyRxStatsCalculator::m_ulRxOutFile
private

UL RX PHY output trace file.

Definition at line 157 of file phy-rx-stats-calculator.h.

Referenced by ~PhyRxStatsCalculator(), and UlPhyReception().


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