A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::PhyTxStatsCalculator Class Reference

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

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

+ Inheritance diagram for ns3::PhyTxStatsCalculator:
+ Collaboration diagram for ns3::PhyTxStatsCalculator:

Public Member Functions

 PhyTxStatsCalculator ()
 Constructor.
 
 ~PhyTxStatsCalculator () override
 Destructor.
 
void DlPhyTransmission (PhyTransmissionStatParameters params)
 Notifies the stats calculator that an downlink transmission has occurred.
 
std::string GetDlTxOutputFilename ()
 Get the name of the file where the DL TX PHY statistics will be stored.
 
std::string GetUlTxOutputFilename ()
 Get the name of the file where the UL RX PHY statistics will be stored.
 
void SetDlTxOutputFilename (std::string outputFilename)
 Set the name of the file where the DL TX PHY statistics will be stored.
 
void SetUlTxOutputFilename (std::string outputFilename)
 Set the name of the file where the UL Tx PHY statistics will be stored.
 
void UlPhyTransmission (PhyTransmissionStatParameters params)
 Notifies the stats calculator that an uplink transmission has occurred.
 
- Public Member Functions inherited from ns3::LteStatsCalculator
 LteStatsCalculator ()
 Constructor.
 
 ~LteStatsCalculator () override
 Destructor.
 
bool ExistsCellIdPath (std::string path)
 Checks if there is an already stored cell id for the given path.
 
bool ExistsImsiPath (std::string path)
 Checks if there is an already stored IMSI for the given path.
 
uint16_t GetCellIdPath (std::string path)
 Retrieves the cell id information for the given path.
 
std::string GetDlOutputFilename ()
 Get the name of the file where the downlink statistics will be stored.
 
uint64_t GetImsiPath (std::string path)
 Retrieves the imsi information for the given path.
 
std::string GetUlOutputFilename ()
 Get the name of the file where the uplink statistics will be stored.
 
void SetCellIdPath (std::string path, uint16_t cellId)
 Stores the (path, cellId) pairs in a map.
 
void SetDlOutputFilename (std::string outputFilename)
 Set the name of the file where the downlink statistics will be stored.
 
void SetImsiPath (std::string path, uint64_t imsi)
 Stores the (path, imsi) pairs in a map.
 
void SetUlOutputFilename (std::string outputFilename)
 Set the name of the file where the uplink statistics will be stored.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static void DlPhyTransmissionCallback (Ptr< PhyTxStatsCalculator > phyTxStats, std::string path, PhyTransmissionStatParameters params)
 trace sink
 
static TypeId GetTypeId ()
 Register this type.
 
static void UlPhyTransmissionCallback (Ptr< PhyTxStatsCalculator > phyTxStats, std::string path, PhyTransmissionStatParameters params)
 trace sink
 
- Static Public Member Functions inherited from ns3::LteStatsCalculator
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Private Attributes

bool m_dlTxFirstWrite
 When writing DL TX PHY statistics first time to file, columns description is added.
 
std::ofstream m_dlTxOutFile
 DL TX PHY statistics output trace file.
 
bool m_ulTxFirstWrite
 When writing UL TX PHY statistics first time to file, columns description is added.
 
std::ofstream m_ulTxOutFile
 UL TX PHY statistics output trace file.
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 
- 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.
 
static uint16_t FindCellIdFromEnbRlcPath (std::string path)
 Retrieves CellId from Enb RLC path in the attribute system.
 
static uint64_t FindImsiForEnb (std::string path, uint16_t rnti)
 Retrieves IMSI from path for Enb in the attribute system.
 
static uint64_t FindImsiForUe (std::string path, uint16_t rnti)
 Retrieves IMSI from path for Ue in the attribute system.
 
static uint64_t FindImsiFromEnbMac (std::string path, uint16_t rnti)
 Retrieves IMSI from Enb MAC path in the attribute system.
 
static uint64_t FindImsiFromEnbRlcPath (std::string path)
 Retrieves IMSI from Enb RLC path in the attribute system.
 
static uint64_t FindImsiFromLteNetDevice (std::string path)
 Retrieves IMSI from LteNetDevice path in the attribute system.
 
static uint64_t FindImsiFromUePhy (std::string path)
 Retrieves IMSI from Ue PHY path in the attribute system.
 

Detailed Description

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

Introspection did not find any typical Config paths.

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)


Attributes

  • DlTxOutputFilename: Name of the file where the downlink results will be saved.
    • Set with class: ns3::StringValue
    • Underlying type: std::string
    • Initial value: DlTxPhyStats.txt
    • Flags: constructwrite
    • Support level: SUPPORTED
  • UlTxOutputFilename: Name of the file where the uplink results will be saved.
    • Set with class: ns3::StringValue
    • Underlying type: std::string
    • Initial value: UlTxPhyStats.txt
    • Flags: constructwrite
    • Support level: SUPPORTED

No TraceSources are defined for this type.
Group: Lte

Size of this type is 1248 bytes (on a 64-bit architecture).

Definition at line 41 of file phy-tx-stats-calculator.h.

Constructor & Destructor Documentation

◆ PhyTxStatsCalculator()

ns3::PhyTxStatsCalculator::PhyTxStatsCalculator ( )

Constructor.

Definition at line 24 of file phy-tx-stats-calculator.cc.

References NS_LOG_FUNCTION.

◆ ~PhyTxStatsCalculator()

ns3::PhyTxStatsCalculator::~PhyTxStatsCalculator ( )
override

Destructor.

Definition at line 31 of file phy-tx-stats-calculator.cc.

References m_dlTxOutFile, m_ulTxOutFile, and NS_LOG_FUNCTION.

Member Function Documentation

◆ DlPhyTransmission()

void ns3::PhyTxStatsCalculator::DlPhyTransmission ( PhyTransmissionStatParameters params)

Notifies the stats calculator that an downlink transmission has occurred.

Parameters
paramsTrace information regarding PHY transmission stats

Definition at line 91 of file phy-tx-stats-calculator.cc.

References ns3::LteStatsCalculator::GetDlOutputFilename(), GetDlTxOutputFilename(), m_dlTxFirstWrite, m_dlTxOutFile, NS_LOG_ERROR, NS_LOG_FUNCTION, and NS_LOG_INFO.

+ Here is the call graph for this function:

◆ DlPhyTransmissionCallback()

void ns3::PhyTxStatsCalculator::DlPhyTransmissionCallback ( Ptr< PhyTxStatsCalculator > phyTxStats,
std::string path,
PhyTransmissionStatParameters params )
static

trace sink

Parameters
phyTxStats
path
params

Definition at line 160 of file phy-tx-stats-calculator.cc.

References ns3::LteStatsCalculator::FindImsiFromEnbRlcPath(), and NS_LOG_FUNCTION.

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

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

◆ GetDlTxOutputFilename()

std::string ns3::PhyTxStatsCalculator::GetDlTxOutputFilename ( )

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

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

Definition at line 85 of file phy-tx-stats-calculator.cc.

References ns3::LteStatsCalculator::GetDlOutputFilename().

Referenced by DlPhyTransmission().

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

◆ GetTypeId()

TypeId ns3::PhyTxStatsCalculator::GetTypeId ( )
static

Register this type.

Returns
The object TypeId.

Definition at line 46 of file phy-tx-stats-calculator.cc.

References ns3::MakeStringAccessor(), ns3::MakeStringChecker(), SetDlTxOutputFilename(), ns3::TypeId::SetParent(), and SetUlTxOutputFilename().

+ Here is the call graph for this function:

◆ GetUlTxOutputFilename()

std::string ns3::PhyTxStatsCalculator::GetUlTxOutputFilename ( )

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 73 of file phy-tx-stats-calculator.cc.

References ns3::LteStatsCalculator::GetUlOutputFilename().

Referenced by UlPhyTransmission().

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

◆ SetDlTxOutputFilename()

void ns3::PhyTxStatsCalculator::SetDlTxOutputFilename ( std::string outputFilename)

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

Parameters
outputFilenamestring with the name of the file

Definition at line 79 of file phy-tx-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:

◆ SetUlTxOutputFilename()

void ns3::PhyTxStatsCalculator::SetUlTxOutputFilename ( std::string outputFilename)

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

Parameters
outputFilenamestring with the name of the file

Definition at line 67 of file phy-tx-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:

◆ UlPhyTransmission()

void ns3::PhyTxStatsCalculator::UlPhyTransmission ( PhyTransmissionStatParameters params)

Notifies the stats calculator that an uplink transmission has occurred.

Parameters
paramsTrace information regarding PHY transmission stats

Definition at line 125 of file phy-tx-stats-calculator.cc.

References GetUlTxOutputFilename(), m_ulTxFirstWrite, m_ulTxOutFile, NS_LOG_ERROR, NS_LOG_FUNCTION, and NS_LOG_INFO.

+ Here is the call graph for this function:

◆ UlPhyTransmissionCallback()

void ns3::PhyTxStatsCalculator::UlPhyTransmissionCallback ( Ptr< PhyTxStatsCalculator > phyTxStats,
std::string path,
PhyTransmissionStatParameters params )
static

trace sink

Parameters
phyTxStats
path
params

Definition at line 184 of file phy-tx-stats-calculator.cc.

References ns3::LteStatsCalculator::FindImsiFromLteNetDevice(), and NS_LOG_FUNCTION.

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

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

Member Data Documentation

◆ m_dlTxFirstWrite

bool ns3::PhyTxStatsCalculator::m_dlTxFirstWrite
private

When writing DL TX 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 128 of file phy-tx-stats-calculator.h.

Referenced by DlPhyTransmission().

◆ m_dlTxOutFile

std::ofstream ns3::PhyTxStatsCalculator::m_dlTxOutFile
private

DL TX PHY statistics output trace file.

Definition at line 141 of file phy-tx-stats-calculator.h.

Referenced by ~PhyTxStatsCalculator(), and DlPhyTransmission().

◆ m_ulTxFirstWrite

bool ns3::PhyTxStatsCalculator::m_ulTxFirstWrite
private

When writing UL TX 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 136 of file phy-tx-stats-calculator.h.

Referenced by UlPhyTransmission().

◆ m_ulTxOutFile

std::ofstream ns3::PhyTxStatsCalculator::m_ulTxOutFile
private

UL TX PHY statistics output trace file.

Definition at line 146 of file phy-tx-stats-calculator.h.

Referenced by ~PhyTxStatsCalculator(), and UlPhyTransmission().


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