A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
 RadioBearerStatsCalculator (std::string protocolType)
 Class constructor.
 
 ~RadioBearerStatsCalculator () override
 Class destructor.
 
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.
 
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.
 
void DoDispose () override
 Destructor implementation.
 
uint32_t GetDlCellId (uint64_t imsi, uint8_t lcid)
 Gets the attached Enb cellId.
 
double GetDlDelay (uint64_t imsi, uint8_t lcid)
 Gets the downlink RLC to RLC delay.
 
std::vector< doubleGetDlDelayStats (uint64_t imsi, uint8_t lcid)
 Gets the downlink RLC to RLC statistics: average, min, max and standard deviation.
 
std::string GetDlOutputFilename ()
 Get the name of the file where the downlink statistics will be stored.
 
std::string GetDlPdcpOutputFilename ()
 Get the name of the file where the downlink PDCP statistics will be stored.
 
std::vector< doubleGetDlPduSizeStats (uint64_t imsi, uint8_t lcid)
 Gets the downlink PDU size statistics: average, min, max and standard deviation.
 
uint64_t GetDlRxData (uint64_t imsi, uint8_t lcid)
 Gets the number of received downlink data bytes.
 
uint32_t GetDlRxPackets (uint64_t imsi, uint8_t lcid)
 Gets the number of received downlink data bytes.
 
uint64_t GetDlTxData (uint64_t imsi, uint8_t lcid)
 Gets the number of transmitted downlink data bytes.
 
uint32_t GetDlTxPackets (uint64_t imsi, uint8_t lcid)
 Gets the number of transmitted downlink data bytes.
 
Time GetEpoch () const
 
Time GetStartTime () const
 
uint32_t GetUlCellId (uint64_t imsi, uint8_t lcid)
 Gets the attached Enb cellId.
 
double GetUlDelay (uint64_t imsi, uint8_t lcid)
 Gets the uplink RLC to RLC delay.
 
std::vector< doubleGetUlDelayStats (uint64_t imsi, uint8_t lcid)
 Gets the uplink RLC to RLC statistics: average, min, max and standard deviation.
 
std::string GetUlOutputFilename ()
 Get the name of the file where the uplink statistics will be stored.
 
std::string GetUlPdcpOutputFilename ()
 Get the name of the file where the uplink PDCP statistics will be stored.
 
std::vector< doubleGetUlPduSizeStats (uint64_t imsi, uint8_t lcid)
 Gets the uplink PDU size statistics: average, min, max and standard deviation.
 
uint64_t GetUlRxData (uint64_t imsi, uint8_t lcid)
 Gets the number of received uplink data bytes.
 
uint32_t GetUlRxPackets (uint64_t imsi, uint8_t lcid)
 Gets the number of received uplink packets.
 
uint64_t GetUlTxData (uint64_t imsi, uint8_t lcid)
 Gets the number of transmitted uplink data bytes.
 
uint32_t GetUlTxPackets (uint64_t imsi, uint8_t lcid)
 Gets the number of transmitted uplink packets.
 
void SetDlPdcpOutputFilename (std::string outputFilename)
 Set the name of the file where the downlink PDCP statistics will be stored.
 
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.
 
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.
 
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.
 
- 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 TypeId GetTypeId ()
 Register this type.
 
- 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 Member Functions

void EndEpoch ()
 Function called in every endEpochEvent.
 
void RescheduleEndEpoch ()
 Reschedules EndEpoch event.
 
void ResetResults ()
 Erases collected statistics.
 
void ShowResults ()
 Called after each epoch to write collected statistics to output files.
 
void WriteDlResults (std::ofstream &outFile)
 Writes collected statistics to DL output file and closes DL output file.
 
void WriteUlResults (std::ofstream &outFile)
 Writes collected statistics to UL output file and closes UL output file.
 

Private Attributes

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

Additional Inherited Members

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

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

  • DlPdcpOutputFilename: Name of the file where the downlink results will be saved.
    • Set with class: ns3::StringValue
    • Underlying type: std::string
    • Initial value: DlPdcpStats.txt
    • Flags: constructwrite
    • Support level: SUPPORTED
  • DlRlcOutputFilename: Name of the file where the downlink results will be saved.
    • Set with class: ns3::StringValue
    • Underlying type: std::string
    • Initial value: DlRlcStats.txt
    • Flags: constructwrite
    • Support level: SUPPORTED
  • EpochDuration: Epoch duration.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +2.5e+08ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • 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: constructwriteread
    • Support level: SUPPORTED
  • UlPdcpOutputFilename: Name of the file where the uplink results will be saved.
    • Set with class: ns3::StringValue
    • Underlying type: std::string
    • Initial value: UlPdcpStats.txt
    • Flags: constructwrite
    • Support level: SUPPORTED
  • UlRlcOutputFilename: Name of the file where the uplink results will be saved.
    • Set with class: ns3::StringValue
    • Underlying type: std::string
    • Initial value: UlRlcStats.txt
    • Flags: constructwrite
    • Support level: SUPPORTED

No TraceSources are defined for this type.
Group: Lte

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

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

Constructor & Destructor Documentation

◆ RadioBearerStatsCalculator() [1/2]

ns3::RadioBearerStatsCalculator::RadioBearerStatsCalculator ( )

Class constructor.

Definition at line 26 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 34 of file radio-bearer-stats-calculator.cc.

References m_protocolType, and NS_LOG_FUNCTION.

◆ ~RadioBearerStatsCalculator()

ns3::RadioBearerStatsCalculator::~RadioBearerStatsCalculator ( )
override

Class destructor.

Definition at line 42 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 196 of file radio-bearer-stats-calculator.cc.

References ns3::CreateObject(), 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 146 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 ( )
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 91 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 ( )
private

Function called in every endEpochEvent.

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

Definition at line 435 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 576 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 584 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 598 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 ( )

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 655 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 ( )

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 686 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 620 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 560 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 544 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 552 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 536 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 121 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 108 of file radio-bearer-stats-calculator.cc.

References m_startTime.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::RadioBearerStatsCalculator::GetTypeId ( )
static

Register this type.

Returns
The object TypeId.

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

References GetEpoch(), GetStartTime(), ns3::MakeStringAccessor(), ns3::MakeStringChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::Seconds(), ns3::LteStatsCalculator::SetDlOutputFilename(), SetDlPdcpOutputFilename(), SetEpoch(), ns3::TypeId::SetParent(), SetStartTime(), ns3::LteStatsCalculator::SetUlOutputFilename(), and SetUlPdcpOutputFilename().

+ Here is the call graph for this function:

◆ 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 568 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 478 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 492 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 ( )

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 642 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 ( )

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 674 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 514 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 470 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 454 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 462 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 446 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 ( )
private

Reschedules EndEpoch event.

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

Definition at line 424 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 ( )
private

Erases collected statistics.

Definition at line 404 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 680 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 114 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 101 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 668 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 ( )
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 227 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 165 of file radio-bearer-stats-calculator.cc.

References ns3::CreateObject(), 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 127 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 344 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::ImsiLcidPair_t::m_lcId, ns3::LteFlowId_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 284 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::ImsiLcidPair_t::m_lcId, ns3::LteFlowId_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 374 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 379 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 418 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 380 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 378 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 376 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 377 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 375 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 370 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 403 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 372 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 408 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 413 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 382 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 387 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 423 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 388 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 386 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 384 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 385 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 383 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: