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"
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< double > | GetDlDelayStats (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< double > | GetDlPduSizeStats (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< double > | GetUlDelayStats (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< double > | GetUlPduSizeStats (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< Object > | GetObject () 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< Object > | GetObject (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. | |
SimpleRefCount & | operator= (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. | |
Related Symbols inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
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:
std::string
std::string
Time
-9.22337e+18ns:+9.22337e+18ns Time
-9.22337e+18ns:+9.22337e+18ns std::string
std::string
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.
ns3::RadioBearerStatsCalculator::RadioBearerStatsCalculator | ( | ) |
Class constructor.
Definition at line 26 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
ns3::RadioBearerStatsCalculator::RadioBearerStatsCalculator | ( | std::string | protocolType | ) |
Class constructor.
protocolType | the name of the protocol type |
Definition at line 34 of file radio-bearer-stats-calculator.cc.
References m_protocolType, and NS_LOG_FUNCTION.
|
override |
Class destructor.
Definition at line 42 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
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.
cellId | CellId of the attached Enb |
imsi | IMSI of the UE who received the PDU |
rnti | C-RNTI of the UE who received the PDU |
lcid | LCID through which the PDU has been transmitted |
packetSize | size of the PDU in bytes |
delay | RLC 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.
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.
cellId | CellId of the attached Enb |
imsi | IMSI of the UE who is receiving the PDU |
rnti | C-RNTI of the UE who is receiving the PDU |
lcid | LCID through which the PDU has been transmitted |
packetSize | size 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.
|
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().
|
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().
uint32_t ns3::RadioBearerStatsCalculator::GetDlCellId | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the attached Enb cellId.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 576 of file radio-bearer-stats-calculator.cc.
References m_dlCellId, and NS_LOG_FUNCTION.
Referenced by WriteDlResults().
double ns3::RadioBearerStatsCalculator::GetDlDelay | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the downlink RLC to RLC delay.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 584 of file radio-bearer-stats-calculator.cc.
References m_dlDelay, NS_LOG_ERROR, and NS_LOG_FUNCTION.
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.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 598 of file radio-bearer-stats-calculator.cc.
References m_dlDelay, and NS_LOG_FUNCTION.
Referenced by WriteDlResults().
std::string ns3::RadioBearerStatsCalculator::GetDlOutputFilename | ( | ) |
Get 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().
std::string ns3::RadioBearerStatsCalculator::GetDlPdcpOutputFilename | ( | ) |
Get 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().
std::vector< double > ns3::RadioBearerStatsCalculator::GetDlPduSizeStats | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the downlink PDU size statistics: average, min, max and standard deviation.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 620 of file radio-bearer-stats-calculator.cc.
References m_dlPduSize, and NS_LOG_FUNCTION.
Referenced by WriteDlResults().
uint64_t ns3::RadioBearerStatsCalculator::GetDlRxData | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the number of received downlink data bytes.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 560 of file radio-bearer-stats-calculator.cc.
References m_dlRxData, and NS_LOG_FUNCTION.
Referenced by WriteDlResults().
uint32_t ns3::RadioBearerStatsCalculator::GetDlRxPackets | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the number of received downlink data bytes.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 544 of file radio-bearer-stats-calculator.cc.
References m_dlRxPackets, and NS_LOG_FUNCTION.
Referenced by WriteDlResults().
uint64_t ns3::RadioBearerStatsCalculator::GetDlTxData | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the number of transmitted downlink data bytes.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 552 of file radio-bearer-stats-calculator.cc.
References m_dlTxData, and NS_LOG_FUNCTION.
Referenced by WriteDlResults().
uint32_t ns3::RadioBearerStatsCalculator::GetDlTxPackets | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the number of transmitted downlink data bytes.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 536 of file radio-bearer-stats-calculator.cc.
References m_dlTxPackets, and NS_LOG_FUNCTION.
Referenced by WriteDlResults().
Time ns3::RadioBearerStatsCalculator::GetEpoch | ( | ) | const |
Definition at line 121 of file radio-bearer-stats-calculator.cc.
References m_epochDuration.
Referenced by GetTypeId().
Time ns3::RadioBearerStatsCalculator::GetStartTime | ( | ) | const |
Definition at line 108 of file radio-bearer-stats-calculator.cc.
References m_startTime.
Referenced by GetTypeId().
|
static |
Register this type.
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().
uint32_t ns3::RadioBearerStatsCalculator::GetUlCellId | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the attached Enb cellId.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 568 of file radio-bearer-stats-calculator.cc.
References m_ulCellId, and NS_LOG_FUNCTION.
Referenced by WriteUlResults().
double ns3::RadioBearerStatsCalculator::GetUlDelay | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the uplink RLC to RLC delay.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 478 of file radio-bearer-stats-calculator.cc.
References m_ulDelay, NS_LOG_ERROR, and NS_LOG_FUNCTION.
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.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 492 of file radio-bearer-stats-calculator.cc.
References m_ulDelay, and NS_LOG_FUNCTION.
Referenced by WriteUlResults().
std::string ns3::RadioBearerStatsCalculator::GetUlOutputFilename | ( | ) |
Get 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().
std::string ns3::RadioBearerStatsCalculator::GetUlPdcpOutputFilename | ( | ) |
Get 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().
std::vector< double > ns3::RadioBearerStatsCalculator::GetUlPduSizeStats | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the uplink PDU size statistics: average, min, max and standard deviation.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 514 of file radio-bearer-stats-calculator.cc.
References m_ulPduSize, and NS_LOG_FUNCTION.
Referenced by WriteUlResults().
uint64_t ns3::RadioBearerStatsCalculator::GetUlRxData | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the number of received uplink data bytes.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 470 of file radio-bearer-stats-calculator.cc.
References m_ulRxData, and NS_LOG_FUNCTION.
Referenced by WriteUlResults().
uint32_t ns3::RadioBearerStatsCalculator::GetUlRxPackets | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the number of received uplink packets.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 454 of file radio-bearer-stats-calculator.cc.
References m_ulRxPackets, and NS_LOG_FUNCTION.
Referenced by WriteUlResults().
uint64_t ns3::RadioBearerStatsCalculator::GetUlTxData | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the number of transmitted uplink data bytes.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 462 of file radio-bearer-stats-calculator.cc.
References m_ulTxData, and NS_LOG_FUNCTION.
Referenced by WriteUlResults().
uint32_t ns3::RadioBearerStatsCalculator::GetUlTxPackets | ( | uint64_t | imsi, |
uint8_t | lcid ) |
Gets the number of transmitted uplink packets.
imsi | IMSI of the UE |
lcid | LCID |
Definition at line 446 of file radio-bearer-stats-calculator.cc.
References m_ulTxPackets, and NS_LOG_FUNCTION.
Referenced by WriteUlResults().
|
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().
|
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().
void ns3::RadioBearerStatsCalculator::SetDlPdcpOutputFilename | ( | std::string | outputFilename | ) |
Set the name of the file where the downlink PDCP statistics will be stored.
outputFilename | string with the name of the file |
Definition at line 680 of file radio-bearer-stats-calculator.cc.
References m_dlPdcpOutputFilename.
Referenced by GetTypeId().
void ns3::RadioBearerStatsCalculator::SetEpoch | ( | Time | e | ) |
e | the epoch duration |
Definition at line 114 of file radio-bearer-stats-calculator.cc.
References m_epochDuration, and RescheduleEndEpoch().
Referenced by GetTypeId().
void ns3::RadioBearerStatsCalculator::SetStartTime | ( | Time | t | ) |
t | the value of the StartTime attribute |
Definition at line 101 of file radio-bearer-stats-calculator.cc.
References m_startTime, and RescheduleEndEpoch().
Referenced by GetTypeId().
void ns3::RadioBearerStatsCalculator::SetUlPdcpOutputFilename | ( | std::string | outputFilename | ) |
Set the name of the file where the uplink PDCP statistics will be stored.
outputFilename | string with the name of the file |
Definition at line 668 of file radio-bearer-stats-calculator.cc.
References m_ulPdcpOutputFilename.
Referenced by GetTypeId().
|
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().
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.
cellId | CellId of the attached Enb |
imsi | IMSI of the UE who received the PDU |
rnti | C-RNTI of the UE who received the PDU |
lcid | LCID through which the PDU has been received |
packetSize | size of the PDU in bytes |
delay | RLC 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.
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.
cellId | CellId of the attached Enb |
imsi | IMSI of the UE who transmitted the PDU |
rnti | C-RNTI of the UE who transmitted the PDU |
lcid | LCID through which the PDU has been transmitted |
packetSize | size 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.
|
private |
Writes collected statistics to DL output file and closes DL output file.
outFile | ofstream 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().
|
private |
Writes collected statistics to UL output file and closes UL output file.
outFile | ofstream 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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
private |
Event id for next end epoch event.
Definition at line 370 of file radio-bearer-stats-calculator.h.
Referenced by EndEpoch(), and RescheduleEndEpoch().
|
private |
Epoch duration.
Definition at line 398 of file radio-bearer-stats-calculator.h.
Referenced by EndEpoch(), GetEpoch(), RescheduleEndEpoch(), SetEpoch(), WriteDlResults(), and WriteUlResults().
|
private |
true if output files have not been opened yet
Definition at line 403 of file radio-bearer-stats-calculator.h.
Referenced by ShowResults().
|
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().
|
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().
|
private |
Protocol type, by default RLC.
Definition at line 413 of file radio-bearer-stats-calculator.h.
Referenced by RadioBearerStatsCalculator(), GetDlOutputFilename(), and GetUlOutputFilename().
|
private |
Start time of the on going epoch.
Definition at line 393 of file radio-bearer-stats-calculator.h.
Referenced by DlRxPdu(), DlTxPdu(), EndEpoch(), GetStartTime(), RescheduleEndEpoch(), SetStartTime(), UlRxPdu(), UlTxPdu(), WriteDlResults(), and WriteUlResults().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().