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

This class is an ns-3 trace sink that performs the calculation of PDU statistics for uplink and downlink. More...

#include "radio-bearer-stats-calculator.h"

+ Inheritance diagram for ns3::RadioBearerStatsCalculator:
+ Collaboration diagram for ns3::RadioBearerStatsCalculator:

Public Member Functions

 RadioBearerStatsCalculator ()
 Class constructor. More...
 
 RadioBearerStatsCalculator (std::string protocolType)
 Class constructor. More...
 
virtual ~RadioBearerStatsCalculator ()
 Class destructor. More...
 
void DlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
 Notifies the stats calculator that an downlink reception has occurred. More...
 
void DlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
 Notifies the stats calculator that an downlink transmission has occurred. More...
 
void DoDispose ()
 Destructor implementation. More...
 
uint32_t GetDlCellId (uint64_t imsi, uint8_t lcid)
 Gets the attached Enb cellId. More...
 
double GetDlDelay (uint64_t imsi, uint8_t lcid)
 Gets the downlink RLC to RLC delay. More...
 
std::vector< doubleGetDlDelayStats (uint64_t imsi, uint8_t lcid)
 Gets the downlink RLC to RLC statistics: average, min, max and standard deviation. More...
 
std::string GetDlOutputFilename (void)
 Get the name of the file where the downlink statistics will be stored. More...
 
std::string GetDlPdcpOutputFilename (void)
 Get the name of the file where the downlink PDCP statistics will be stored. More...
 
std::vector< doubleGetDlPduSizeStats (uint64_t imsi, uint8_t lcid)
 Gets the downlink PDU size statistics: average, min, max and standard deviation. More...
 
uint64_t GetDlRxData (uint64_t imsi, uint8_t lcid)
 Gets the number of received downlink data bytes. More...
 
uint32_t GetDlRxPackets (uint64_t imsi, uint8_t lcid)
 Gets the number of received downlink data bytes. More...
 
uint64_t GetDlTxData (uint64_t imsi, uint8_t lcid)
 Gets the number of transmitted downlink data bytes. More...
 
uint32_t GetDlTxPackets (uint64_t imsi, uint8_t lcid)
 Gets the number of transmitted downlink data bytes. More...
 
Time GetEpoch () const
 
Time GetStartTime () const
 
uint32_t GetUlCellId (uint64_t imsi, uint8_t lcid)
 Gets the attached Enb cellId. More...
 
double GetUlDelay (uint64_t imsi, uint8_t lcid)
 Gets the uplink RLC to RLC delay. More...
 
std::vector< doubleGetUlDelayStats (uint64_t imsi, uint8_t lcid)
 Gets the uplink RLC to RLC statistics: average, min, max and standard deviation. More...
 
std::string GetUlOutputFilename (void)
 Get the name of the file where the uplink statistics will be stored. More...
 
std::string GetUlPdcpOutputFilename (void)
 Get the name of the file where the uplink PDCP statistics will be stored. More...
 
std::vector< doubleGetUlPduSizeStats (uint64_t imsi, uint8_t lcid)
 Gets the uplink PDU size statistics: average, min, max and standard deviation. More...
 
uint64_t GetUlRxData (uint64_t imsi, uint8_t lcid)
 Gets the number of received uplink data bytes. More...
 
uint32_t GetUlRxPackets (uint64_t imsi, uint8_t lcid)
 Gets the number of received uplink packets. More...
 
uint64_t GetUlTxData (uint64_t imsi, uint8_t lcid)
 Gets the number of transmitted uplink data bytes. More...
 
uint32_t GetUlTxPackets (uint64_t imsi, uint8_t lcid)
 Gets the number of transmitted uplink packets. More...
 
void SetDlPdcpOutputFilename (std::string outputFilename)
 Set the name of the file where the downlink PDCP statistics will be stored. More...
 
void SetEpoch (Time e)
 
void SetStartTime (Time t)
 
void SetUlPdcpOutputFilename (std::string outputFilename)
 Set the name of the file where the uplink PDCP statistics will be stored. More...
 
void UlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
 Notifies the stats calculator that an uplink reception has occurred. More...
 
void UlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
 Notifies the stats calculator that an uplink transmission has occurred. More...
 
- Public Member Functions inherited from ns3::LteStatsCalculator
 LteStatsCalculator ()
 Constructor. More...
 
virtual ~LteStatsCalculator ()
 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 (void)
 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 (void)
 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...
 
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<>
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...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. 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...
 
virtual TypeId GetInstanceTypeId (void) const =0
 Get the most derived TypeId for this Object. 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::LteStatsCalculator
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 EndEpoch (void)
 Function called in every endEpochEvent. More...
 
void RescheduleEndEpoch ()
 Reschedules EndEpoch event. More...
 
void ResetResults (void)
 Erases collected statistics. More...
 
void ShowResults (void)
 Called after each epoch to write collected statistics to output files. More...
 
void WriteDlResults (std::ofstream &outFile)
 Writes collected statistics to DL output file and closes DL output file. More...
 
void WriteUlResults (std::ofstream &outFile)
 Writes collected statistics to UL output file and closes UL output file. More...
 

Private Attributes

Uint32Map m_dlCellId
 List of DL CellIds by (IMSI, LCID) pair. More...
 
Uint64StatsMap m_dlDelay
 DL delay by (IMSI, LCID) pair. More...
 
std::string m_dlPdcpOutputFilename
 Name of the file where the downlink PDCP statistics will be saved. More...
 
Uint32StatsMap m_dlPduSize
 DL PDU Size by (IMSI, LCID) pair. More...
 
Uint64Map m_dlRxData
 Amount of DL RX Data by (IMSI, LCID) pair. More...
 
Uint32Map m_dlRxPackets
 Number of DL RX Packets by (IMSI, LCID) pair. More...
 
Uint64Map m_dlTxData
 Amount of DL TX Data by (IMSI, LCID) pair. More...
 
Uint32Map m_dlTxPackets
 Number of DL TX Packets by (IMSI, LCID) pair. More...
 
EventId m_endEpochEvent
 Event id for next end epoch event. More...
 
Time m_epochDuration
 Epoch duration. More...
 
bool m_firstWrite
 true if output files have not been opened yet More...
 
FlowIdMap m_flowId
 List of FlowIds, ie. More...
 
bool m_pendingOutput
 true if any output is pending More...
 
std::string m_protocolType
 Protocol type, by default RLC. More...
 
Time m_startTime
 Start time of the on going epoch. More...
 
Uint32Map m_ulCellId
 List of UL CellIds by (IMSI, LCID) pair. More...
 
Uint64StatsMap m_ulDelay
 UL delay by (IMSI, LCID) pair. More...
 
std::string m_ulPdcpOutputFilename
 Name of the file where the uplink PDCP statistics will be saved. More...
 
Uint32StatsMap m_ulPduSize
 UL PDU Size by (IMSI, LCID) pair. More...
 
Uint64Map m_ulRxData
 Amount of UL RX Data by (IMSI, LCID) pair. More...
 
Uint32Map m_ulRxPackets
 Number of UL RX Packets by (IMSI, LCID) pair. More...
 
Uint64Map m_ulTxData
 Amount of UL TX Data by (IMSI, LCID) pair. More...
 
Uint32Map m_ulTxPackets
 Number of UL TX Packets by (IMSI, LCID) pair. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoDispose (void)
 Destructor implementation. 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...
 
- 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

This class is an ns-3 trace sink that performs the calculation of PDU statistics for uplink and downlink.

Introspection did not find any typical Config paths.

Statistics are generated on a per radio bearer basis. This class can be used for RLC PDU stats or PDCP PDU stats by connecting to the appropriate trace sources at the RLC or PDCP layer.

The statistics are calculated at consecutive time windows and periodically written to a file. The calculated statistics are:

  • Number of transmitted PDUs
  • Number of received PDUs
  • Number of transmitted bytes
  • Number of received bytes
  • Average, min, max and standard deviation of PDU delay (delay is calculated from the generation of the PDU to its reception)
  • Average, min, max and standard deviation of PDU size


Attributes

  • StartTime: Start time of the on going epoch.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: construct write read
  • EpochDuration: Epoch duration.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +2.5e+08ns
    • Flags: construct write read
  • DlRlcOutputFilename: Name of the file where the downlink results will be saved.
    • Set with class: StringValue
    • Underlying type:
    • Initial value: DlRlcStats.txt
    • Flags: construct write
  • UlRlcOutputFilename: Name of the file where the uplink results will be saved.
    • Set with class: StringValue
    • Underlying type:
    • Initial value: UlRlcStats.txt
    • Flags: construct write
  • DlPdcpOutputFilename: Name of the file where the downlink results will be saved.
    • Set with class: StringValue
    • Underlying type:
    • Initial value: DlPdcpStats.txt
    • Flags: construct write
  • UlPdcpOutputFilename: Name of the file where the uplink results will be saved.
    • Set with class: StringValue
    • Underlying type:
    • Initial value: UlPdcpStats.txt
    • Flags: construct write

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

Definition at line 70 of file radio-bearer-stats-calculator.h.

Constructor & Destructor Documentation

◆ RadioBearerStatsCalculator() [1/2]

ns3::RadioBearerStatsCalculator::RadioBearerStatsCalculator ( )

Class constructor.

Definition at line 35 of file radio-bearer-stats-calculator.cc.

References NS_LOG_FUNCTION.

◆ RadioBearerStatsCalculator() [2/2]

ns3::RadioBearerStatsCalculator::RadioBearerStatsCalculator ( std::string  protocolType)

Class constructor.

Parameters
protocolTypethe name of the protocol type

Definition at line 43 of file radio-bearer-stats-calculator.cc.

References m_protocolType, and NS_LOG_FUNCTION.

◆ ~RadioBearerStatsCalculator()

ns3::RadioBearerStatsCalculator::~RadioBearerStatsCalculator ( )
virtual

Class destructor.

Definition at line 51 of file radio-bearer-stats-calculator.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ DlRxPdu()

void ns3::RadioBearerStatsCalculator::DlRxPdu ( uint16_t  cellId,
uint64_t  imsi,
uint16_t  rnti,
uint8_t  lcid,
uint32_t  packetSize,
uint64_t  delay 
)

Notifies the stats calculator that an downlink reception has occurred.

Parameters
cellIdCellId of the attached Enb
imsiIMSI of the UE who received the PDU
rntiC-RNTI of the UE who received the PDU
lcidLCID through which the PDU has been transmitted
packetSizesize of the PDU in bytes
delayRLC to RLC delay in nanoseconds

Definition at line 189 of file radio-bearer-stats-calculator.cc.

References m_dlCellId, m_dlDelay, m_dlPduSize, m_dlRxData, m_dlRxPackets, ns3::ImsiLcidPair_t::m_imsi, ns3::ImsiLcidPair_t::m_lcId, m_pendingOutput, m_startTime, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and packetSize.

+ Here is the call graph for this function:

◆ DlTxPdu()

void ns3::RadioBearerStatsCalculator::DlTxPdu ( uint16_t  cellId,
uint64_t  imsi,
uint16_t  rnti,
uint8_t  lcid,
uint32_t  packetSize 
)

Notifies the stats calculator that an downlink transmission has occurred.

Parameters
cellIdCellId of the attached Enb
imsiIMSI of the UE who is receiving the PDU
rntiC-RNTI of the UE who is receiving the PDU
lcidLCID through which the PDU has been transmitted
packetSizesize of the PDU in bytes

Definition at line 149 of file radio-bearer-stats-calculator.cc.

References m_dlCellId, m_dlTxData, m_dlTxPackets, m_flowId, m_pendingOutput, m_startTime, ns3::Simulator::Now(), NS_LOG_FUNCTION, and packetSize.

+ Here is the call graph for this function:

◆ DoDispose()

void ns3::RadioBearerStatsCalculator::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 98 of file radio-bearer-stats-calculator.cc.

References m_pendingOutput, NS_LOG_FUNCTION, and ShowResults().

+ Here is the call graph for this function:

◆ EndEpoch()

void ns3::RadioBearerStatsCalculator::EndEpoch ( void  )
private

Function called in every endEpochEvent.

It calls ShowResults() to write statistics to output files and ResetResults() to clear collected statistics.

Definition at line 418 of file radio-bearer-stats-calculator.cc.

References EndEpoch(), m_endEpochEvent, m_epochDuration, m_startTime, NS_LOG_FUNCTION, ResetResults(), ns3::Simulator::Schedule(), and ShowResults().

Referenced by EndEpoch(), and RescheduleEndEpoch().

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

◆ GetDlCellId()

uint32_t ns3::RadioBearerStatsCalculator::GetDlCellId ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the attached Enb cellId.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
Enb cellId

Definition at line 561 of file radio-bearer-stats-calculator.cc.

References m_dlCellId, and NS_LOG_FUNCTION.

Referenced by WriteDlResults().

+ Here is the caller graph for this function:

◆ GetDlDelay()

double ns3::RadioBearerStatsCalculator::GetDlDelay ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the downlink RLC to RLC delay.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
RLC to RLC delay in seconds

Definition at line 569 of file radio-bearer-stats-calculator.cc.

References m_dlDelay, NS_LOG_ERROR, and NS_LOG_FUNCTION.

◆ GetDlDelayStats()

std::vector< double > ns3::RadioBearerStatsCalculator::GetDlDelayStats ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the downlink RLC to RLC statistics: average, min, max and standard deviation.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
RLC to RLC delay statistics average, min, max and standard deviation in seconds

Definition at line 583 of file radio-bearer-stats-calculator.cc.

References m_dlDelay, and NS_LOG_FUNCTION.

Referenced by WriteDlResults().

+ Here is the caller graph for this function:

◆ GetDlOutputFilename()

std::string ns3::RadioBearerStatsCalculator::GetDlOutputFilename ( void  )

Get the name of the file where the downlink statistics will be stored.

Returns
the name of the file where the downlink statistics will be stored

Definition at line 642 of file radio-bearer-stats-calculator.cc.

References ns3::LteStatsCalculator::GetDlOutputFilename(), GetDlPdcpOutputFilename(), and m_protocolType.

Referenced by ShowResults().

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

◆ GetDlPdcpOutputFilename()

std::string ns3::RadioBearerStatsCalculator::GetDlPdcpOutputFilename ( void  )

Get the name of the file where the downlink PDCP statistics will be stored.

Returns
the name of the file where the downlink PDCP statistics will be stored

Definition at line 672 of file radio-bearer-stats-calculator.cc.

References m_dlPdcpOutputFilename.

Referenced by GetDlOutputFilename().

+ Here is the caller graph for this function:

◆ GetDlPduSizeStats()

std::vector< double > ns3::RadioBearerStatsCalculator::GetDlPduSizeStats ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the downlink PDU size statistics: average, min, max and standard deviation.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
PDU size statistics average, min, max and standard deviation in seconds

Definition at line 606 of file radio-bearer-stats-calculator.cc.

References m_dlPduSize, and NS_LOG_FUNCTION.

Referenced by WriteDlResults().

+ Here is the caller graph for this function:

◆ GetDlRxData()

uint64_t ns3::RadioBearerStatsCalculator::GetDlRxData ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of received downlink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of received data bytes

Definition at line 545 of file radio-bearer-stats-calculator.cc.

References m_dlRxData, and NS_LOG_FUNCTION.

Referenced by WriteDlResults().

+ Here is the caller graph for this function:

◆ GetDlRxPackets()

uint32_t ns3::RadioBearerStatsCalculator::GetDlRxPackets ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of received downlink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of received data bytes

Definition at line 529 of file radio-bearer-stats-calculator.cc.

References m_dlRxPackets, and NS_LOG_FUNCTION.

Referenced by WriteDlResults().

+ Here is the caller graph for this function:

◆ GetDlTxData()

uint64_t ns3::RadioBearerStatsCalculator::GetDlTxData ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of transmitted downlink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of transmitted data bytes

Definition at line 537 of file radio-bearer-stats-calculator.cc.

References m_dlTxData, and NS_LOG_FUNCTION.

Referenced by WriteDlResults().

+ Here is the caller graph for this function:

◆ GetDlTxPackets()

uint32_t ns3::RadioBearerStatsCalculator::GetDlTxPackets ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of transmitted downlink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of transmitted data bytes

Definition at line 521 of file radio-bearer-stats-calculator.cc.

References m_dlTxPackets, and NS_LOG_FUNCTION.

Referenced by WriteDlResults().

+ Here is the caller graph for this function:

◆ GetEpoch()

Time ns3::RadioBearerStatsCalculator::GetEpoch ( ) const
Returns
the epoch duration

Definition at line 128 of file radio-bearer-stats-calculator.cc.

References m_epochDuration.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetStartTime()

Time ns3::RadioBearerStatsCalculator::GetStartTime ( ) const
Returns
the value of the StartTime attribute

Definition at line 115 of file radio-bearer-stats-calculator.cc.

References m_startTime.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

◆ GetUlCellId()

uint32_t ns3::RadioBearerStatsCalculator::GetUlCellId ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the attached Enb cellId.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
Enb cellId

Definition at line 553 of file radio-bearer-stats-calculator.cc.

References m_ulCellId, and NS_LOG_FUNCTION.

Referenced by WriteUlResults().

+ Here is the caller graph for this function:

◆ GetUlDelay()

double ns3::RadioBearerStatsCalculator::GetUlDelay ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the uplink RLC to RLC delay.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
RLC to RLC delay in seconds

Definition at line 460 of file radio-bearer-stats-calculator.cc.

References m_ulDelay, NS_LOG_ERROR, and NS_LOG_FUNCTION.

◆ GetUlDelayStats()

std::vector< double > ns3::RadioBearerStatsCalculator::GetUlDelayStats ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the uplink RLC to RLC statistics: average, min, max and standard deviation.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
RLC to RLC delay statistics average, min, max and standard deviation in seconds

Definition at line 475 of file radio-bearer-stats-calculator.cc.

References m_ulDelay, and NS_LOG_FUNCTION.

Referenced by WriteUlResults().

+ Here is the caller graph for this function:

◆ GetUlOutputFilename()

std::string ns3::RadioBearerStatsCalculator::GetUlOutputFilename ( void  )

Get the name of the file where the uplink statistics will be stored.

Returns
the name of the file where the uplink statistics will be stored

Definition at line 629 of file radio-bearer-stats-calculator.cc.

References ns3::LteStatsCalculator::GetUlOutputFilename(), GetUlPdcpOutputFilename(), and m_protocolType.

Referenced by ShowResults().

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

◆ GetUlPdcpOutputFilename()

std::string ns3::RadioBearerStatsCalculator::GetUlPdcpOutputFilename ( void  )

Get the name of the file where the uplink PDCP statistics will be stored.

Returns
the name of the file where the uplink PDCP statistics will be stored

Definition at line 661 of file radio-bearer-stats-calculator.cc.

References m_ulPdcpOutputFilename.

Referenced by GetUlOutputFilename().

+ Here is the caller graph for this function:

◆ GetUlPduSizeStats()

std::vector< double > ns3::RadioBearerStatsCalculator::GetUlPduSizeStats ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the uplink PDU size statistics: average, min, max and standard deviation.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
PDU size statistics average, min, max and standard deviation in seconds

Definition at line 498 of file radio-bearer-stats-calculator.cc.

References m_ulPduSize, and NS_LOG_FUNCTION.

Referenced by WriteUlResults().

+ Here is the caller graph for this function:

◆ GetUlRxData()

uint64_t ns3::RadioBearerStatsCalculator::GetUlRxData ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of received uplink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of received data bytes

Definition at line 452 of file radio-bearer-stats-calculator.cc.

References m_ulRxData, and NS_LOG_FUNCTION.

Referenced by WriteUlResults().

+ Here is the caller graph for this function:

◆ GetUlRxPackets()

uint32_t ns3::RadioBearerStatsCalculator::GetUlRxPackets ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of received uplink packets.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of received uplink packets

Definition at line 436 of file radio-bearer-stats-calculator.cc.

References m_ulRxPackets, and NS_LOG_FUNCTION.

Referenced by WriteUlResults().

+ Here is the caller graph for this function:

◆ GetUlTxData()

uint64_t ns3::RadioBearerStatsCalculator::GetUlTxData ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of transmitted uplink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of transmitted data bytes

Definition at line 444 of file radio-bearer-stats-calculator.cc.

References m_ulTxData, and NS_LOG_FUNCTION.

Referenced by WriteUlResults().

+ Here is the caller graph for this function:

◆ GetUlTxPackets()

uint32_t ns3::RadioBearerStatsCalculator::GetUlTxPackets ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of transmitted uplink packets.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of transmitted uplink packets

Definition at line 428 of file radio-bearer-stats-calculator.cc.

References m_ulTxPackets, and NS_LOG_FUNCTION.

Referenced by WriteUlResults().

+ Here is the caller graph for this function:

◆ RescheduleEndEpoch()

void ns3::RadioBearerStatsCalculator::RescheduleEndEpoch ( void  )
private

Reschedules EndEpoch event.

Usually used after execution of SetStartTime() or SetEpoch()

Definition at line 409 of file radio-bearer-stats-calculator.cc.

References ns3::EventId::Cancel(), EndEpoch(), m_endEpochEvent, m_epochDuration, m_startTime, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, and ns3::Simulator::Schedule().

Referenced by SetEpoch(), and SetStartTime().

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

◆ ResetResults()

void ns3::RadioBearerStatsCalculator::ResetResults ( void  )
private

Erases collected statistics.

Definition at line 389 of file radio-bearer-stats-calculator.cc.

References m_dlDelay, m_dlPduSize, m_dlRxData, m_dlRxPackets, m_dlTxData, m_dlTxPackets, m_ulDelay, m_ulPduSize, m_ulRxData, m_ulRxPackets, m_ulTxData, m_ulTxPackets, and NS_LOG_FUNCTION.

Referenced by EndEpoch().

+ Here is the caller graph for this function:

◆ SetDlPdcpOutputFilename()

void ns3::RadioBearerStatsCalculator::SetDlPdcpOutputFilename ( std::string  outputFilename)

Set the name of the file where the downlink PDCP statistics will be stored.

Parameters
outputFilenamestring with the name of the file

Definition at line 666 of file radio-bearer-stats-calculator.cc.

References m_dlPdcpOutputFilename.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetEpoch()

void ns3::RadioBearerStatsCalculator::SetEpoch ( Time  e)
Parameters
ethe epoch duration

Definition at line 121 of file radio-bearer-stats-calculator.cc.

References m_epochDuration, and RescheduleEndEpoch().

Referenced by GetTypeId().

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

◆ SetStartTime()

void ns3::RadioBearerStatsCalculator::SetStartTime ( Time  t)
Parameters
tthe value of the StartTime attribute

Definition at line 108 of file radio-bearer-stats-calculator.cc.

References m_startTime, and RescheduleEndEpoch().

Referenced by GetTypeId().

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

◆ SetUlPdcpOutputFilename()

void ns3::RadioBearerStatsCalculator::SetUlPdcpOutputFilename ( std::string  outputFilename)

Set the name of the file where the uplink PDCP statistics will be stored.

Parameters
outputFilenamestring with the name of the file

Definition at line 655 of file radio-bearer-stats-calculator.cc.

References m_ulPdcpOutputFilename.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ ShowResults()

void ns3::RadioBearerStatsCalculator::ShowResults ( void  )
private

Called after each epoch to write collected statistics to output files.

During first call it opens output files and write columns descriptions. During next calls it opens output files in append mode.

Definition at line 213 of file radio-bearer-stats-calculator.cc.

References GetDlOutputFilename(), GetUlOutputFilename(), m_firstWrite, m_pendingOutput, NS_LOG_ERROR, NS_LOG_FUNCTION, NS_LOG_INFO, WriteDlResults(), and WriteUlResults().

Referenced by DoDispose(), and EndEpoch().

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

◆ UlRxPdu()

void ns3::RadioBearerStatsCalculator::UlRxPdu ( uint16_t  cellId,
uint64_t  imsi,
uint16_t  rnti,
uint8_t  lcid,
uint32_t  packetSize,
uint64_t  delay 
)

Notifies the stats calculator that an uplink reception has occurred.

Parameters
cellIdCellId of the attached Enb
imsiIMSI of the UE who received the PDU
rntiC-RNTI of the UE who received the PDU
lcidLCID through which the PDU has been received
packetSizesize of the PDU in bytes
delayRLC to RLC delay in nanoseconds

Definition at line 164 of file radio-bearer-stats-calculator.cc.

References ns3::ImsiLcidPair_t::m_imsi, ns3::ImsiLcidPair_t::m_lcId, m_pendingOutput, m_startTime, m_ulCellId, m_ulDelay, m_ulPduSize, m_ulRxData, m_ulRxPackets, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and packetSize.

+ Here is the call graph for this function:

◆ UlTxPdu()

void ns3::RadioBearerStatsCalculator::UlTxPdu ( uint16_t  cellId,
uint64_t  imsi,
uint16_t  rnti,
uint8_t  lcid,
uint32_t  packetSize 
)

Notifies the stats calculator that an uplink transmission has occurred.

Parameters
cellIdCellId of the attached Enb
imsiIMSI of the UE who transmitted the PDU
rntiC-RNTI of the UE who transmitted the PDU
lcidLCID through which the PDU has been transmitted
packetSizesize of the PDU in bytes

Definition at line 134 of file radio-bearer-stats-calculator.cc.

References m_flowId, m_pendingOutput, m_startTime, m_ulCellId, m_ulTxData, m_ulTxPackets, ns3::Simulator::Now(), NS_LOG_FUNCTION, and packetSize.

+ Here is the call graph for this function:

◆ WriteDlResults()

void ns3::RadioBearerStatsCalculator::WriteDlResults ( std::ofstream &  outFile)
private

Writes collected statistics to DL output file and closes DL output file.

Parameters
outFileofstream for DL statistics

Definition at line 330 of file radio-bearer-stats-calculator.cc.

References GetDlCellId(), GetDlDelayStats(), GetDlPduSizeStats(), GetDlRxData(), GetDlRxPackets(), GetDlTxData(), GetDlTxPackets(), ns3::Time::GetSeconds(), m_dlRxPackets, m_dlTxPackets, m_epochDuration, m_flowId, ns3::ImsiLcidPair_t::m_imsi, ns3::LteFlowId_t::m_lcId, ns3::ImsiLcidPair_t::m_lcId, ns3::LteFlowId_t::m_rnti, m_startTime, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by ShowResults().

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

◆ WriteUlResults()

void ns3::RadioBearerStatsCalculator::WriteUlResults ( std::ofstream &  outFile)
private

Writes collected statistics to UL output file and closes UL output file.

Parameters
outFileofstream for UL statistics

Definition at line 271 of file radio-bearer-stats-calculator.cc.

References ns3::Time::GetSeconds(), GetUlCellId(), GetUlDelayStats(), GetUlPduSizeStats(), GetUlRxData(), GetUlRxPackets(), GetUlTxData(), GetUlTxPackets(), m_epochDuration, m_flowId, ns3::ImsiLcidPair_t::m_imsi, ns3::LteFlowId_t::m_lcId, ns3::ImsiLcidPair_t::m_lcId, ns3::LteFlowId_t::m_rnti, m_startTime, m_ulRxPackets, m_ulTxPackets, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by ShowResults().

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

Member Data Documentation

◆ m_dlCellId

Uint32Map ns3::RadioBearerStatsCalculator::m_dlCellId
private

List of DL CellIds by (IMSI, LCID) pair.

Definition at line 400 of file radio-bearer-stats-calculator.h.

Referenced by DlRxPdu(), DlTxPdu(), and GetDlCellId().

◆ m_dlDelay

Uint64StatsMap ns3::RadioBearerStatsCalculator::m_dlDelay
private

DL delay by (IMSI, LCID) pair.

Definition at line 405 of file radio-bearer-stats-calculator.h.

Referenced by DlRxPdu(), GetDlDelay(), GetDlDelayStats(), and ResetResults().

◆ m_dlPdcpOutputFilename

std::string ns3::RadioBearerStatsCalculator::m_dlPdcpOutputFilename
private

Name of the file where the downlink PDCP statistics will be saved.

Definition at line 444 of file radio-bearer-stats-calculator.h.

Referenced by GetDlPdcpOutputFilename(), and SetDlPdcpOutputFilename().

◆ m_dlPduSize

Uint32StatsMap ns3::RadioBearerStatsCalculator::m_dlPduSize
private

DL PDU Size by (IMSI, LCID) pair.

Definition at line 406 of file radio-bearer-stats-calculator.h.

Referenced by DlRxPdu(), GetDlPduSizeStats(), and ResetResults().

◆ m_dlRxData

Uint64Map ns3::RadioBearerStatsCalculator::m_dlRxData
private

Amount of DL RX Data by (IMSI, LCID) pair.

Definition at line 404 of file radio-bearer-stats-calculator.h.

Referenced by DlRxPdu(), GetDlRxData(), and ResetResults().

◆ m_dlRxPackets

Uint32Map ns3::RadioBearerStatsCalculator::m_dlRxPackets
private

Number of DL RX Packets by (IMSI, LCID) pair.

Definition at line 402 of file radio-bearer-stats-calculator.h.

Referenced by DlRxPdu(), GetDlRxPackets(), ResetResults(), and WriteDlResults().

◆ m_dlTxData

Uint64Map ns3::RadioBearerStatsCalculator::m_dlTxData
private

Amount of DL TX Data by (IMSI, LCID) pair.

Definition at line 403 of file radio-bearer-stats-calculator.h.

Referenced by DlTxPdu(), GetDlTxData(), and ResetResults().

◆ m_dlTxPackets

Uint32Map ns3::RadioBearerStatsCalculator::m_dlTxPackets
private

Number of DL TX Packets by (IMSI, LCID) pair.

Definition at line 401 of file radio-bearer-stats-calculator.h.

Referenced by DlTxPdu(), GetDlTxPackets(), ResetResults(), and WriteDlResults().

◆ m_endEpochEvent

EventId ns3::RadioBearerStatsCalculator::m_endEpochEvent
private

Event id for next end epoch event.

Definition at line 396 of file radio-bearer-stats-calculator.h.

Referenced by EndEpoch(), and RescheduleEndEpoch().

◆ m_epochDuration

Time ns3::RadioBearerStatsCalculator::m_epochDuration
private

◆ m_firstWrite

bool ns3::RadioBearerStatsCalculator::m_firstWrite
private

true if output files have not been opened yet

Definition at line 429 of file radio-bearer-stats-calculator.h.

Referenced by ShowResults().

◆ m_flowId

FlowIdMap ns3::RadioBearerStatsCalculator::m_flowId
private

List of FlowIds, ie.

(RNTI, LCID) by (IMSI, LCID) pair

Definition at line 398 of file radio-bearer-stats-calculator.h.

Referenced by DlTxPdu(), UlTxPdu(), WriteDlResults(), and WriteUlResults().

◆ m_pendingOutput

bool ns3::RadioBearerStatsCalculator::m_pendingOutput
private

true if any output is pending

Definition at line 434 of file radio-bearer-stats-calculator.h.

Referenced by DlRxPdu(), DlTxPdu(), DoDispose(), ShowResults(), UlRxPdu(), and UlTxPdu().

◆ m_protocolType

std::string ns3::RadioBearerStatsCalculator::m_protocolType
private

Protocol type, by default RLC.

Definition at line 439 of file radio-bearer-stats-calculator.h.

Referenced by RadioBearerStatsCalculator(), GetDlOutputFilename(), and GetUlOutputFilename().

◆ m_startTime

Time ns3::RadioBearerStatsCalculator::m_startTime
private

◆ m_ulCellId

Uint32Map ns3::RadioBearerStatsCalculator::m_ulCellId
private

List of UL CellIds by (IMSI, LCID) pair.

Definition at line 408 of file radio-bearer-stats-calculator.h.

Referenced by GetUlCellId(), UlRxPdu(), and UlTxPdu().

◆ m_ulDelay

Uint64StatsMap ns3::RadioBearerStatsCalculator::m_ulDelay
private

UL delay by (IMSI, LCID) pair.

Definition at line 413 of file radio-bearer-stats-calculator.h.

Referenced by GetUlDelay(), GetUlDelayStats(), ResetResults(), and UlRxPdu().

◆ m_ulPdcpOutputFilename

std::string ns3::RadioBearerStatsCalculator::m_ulPdcpOutputFilename
private

Name of the file where the uplink PDCP statistics will be saved.

Definition at line 449 of file radio-bearer-stats-calculator.h.

Referenced by GetUlPdcpOutputFilename(), and SetUlPdcpOutputFilename().

◆ m_ulPduSize

Uint32StatsMap ns3::RadioBearerStatsCalculator::m_ulPduSize
private

UL PDU Size by (IMSI, LCID) pair.

Definition at line 414 of file radio-bearer-stats-calculator.h.

Referenced by GetUlPduSizeStats(), ResetResults(), and UlRxPdu().

◆ m_ulRxData

Uint64Map ns3::RadioBearerStatsCalculator::m_ulRxData
private

Amount of UL RX Data by (IMSI, LCID) pair.

Definition at line 412 of file radio-bearer-stats-calculator.h.

Referenced by GetUlRxData(), ResetResults(), and UlRxPdu().

◆ m_ulRxPackets

Uint32Map ns3::RadioBearerStatsCalculator::m_ulRxPackets
private

Number of UL RX Packets by (IMSI, LCID) pair.

Definition at line 410 of file radio-bearer-stats-calculator.h.

Referenced by GetUlRxPackets(), ResetResults(), UlRxPdu(), and WriteUlResults().

◆ m_ulTxData

Uint64Map ns3::RadioBearerStatsCalculator::m_ulTxData
private

Amount of UL TX Data by (IMSI, LCID) pair.

Definition at line 411 of file radio-bearer-stats-calculator.h.

Referenced by GetUlTxData(), ResetResults(), and UlTxPdu().

◆ m_ulTxPackets

Uint32Map ns3::RadioBearerStatsCalculator::m_ulTxPackets
private

Number of UL TX Packets by (IMSI, LCID) pair.

Definition at line 409 of file radio-bearer-stats-calculator.h.

Referenced by GetUlTxPackets(), ResetResults(), UlTxPdu(), and WriteUlResults().


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