#include <radio-bearer-stats-calculator.h>
Public Member Functions | |
RadioBearerStatsCalculator () | |
RadioBearerStatsCalculator (std::string protocolType) | |
virtual | ~RadioBearerStatsCalculator () |
void | DlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay) |
void | DlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize) |
void | DoDispose () |
uint32_t | GetDlCellId (uint64_t imsi, uint8_t lcid) |
double | GetDlDelay (uint64_t imsi, uint8_t lcid) |
std::vector< double > | GetDlDelayStats (uint64_t imsi, uint8_t lcid) |
std::string | GetDlOutputFilename (void) |
std::string | GetDlPdcpOutputFilename (void) |
std::vector< double > | GetDlPduSizeStats (uint64_t imsi, uint8_t lcid) |
uint64_t | GetDlRxData (uint64_t imsi, uint8_t lcid) |
uint32_t | GetDlRxPackets (uint64_t imsi, uint8_t lcid) |
uint64_t | GetDlTxData (uint64_t imsi, uint8_t lcid) |
uint32_t | GetDlTxPackets (uint64_t imsi, uint8_t lcid) |
Time | GetEpoch () const |
Time | GetStartTime () const |
uint32_t | GetUlCellId (uint64_t imsi, uint8_t lcid) |
double | GetUlDelay (uint64_t imsi, uint8_t lcid) |
std::vector< double > | GetUlDelayStats (uint64_t imsi, uint8_t lcid) |
std::string | GetUlOutputFilename (void) |
std::string | GetUlPdcpOutputFilename (void) |
std::vector< double > | GetUlPduSizeStats (uint64_t imsi, uint8_t lcid) |
uint64_t | GetUlRxData (uint64_t imsi, uint8_t lcid) |
uint32_t | GetUlRxPackets (uint64_t imsi, uint8_t lcid) |
uint64_t | GetUlTxData (uint64_t imsi, uint8_t lcid) |
uint32_t | GetUlTxPackets (uint64_t imsi, uint8_t lcid) |
void | SetDlPdcpOutputFilename (std::string outputFilename) |
void | SetEpoch (Time e) |
void | SetStartTime (Time t) |
void | SetUlPdcpOutputFilename (std::string outputFilename) |
void | UlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay) |
void | UlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize) |
Public Member Functions inherited from ns3::LteStatsCalculator | |
LteStatsCalculator () | |
virtual | ~LteStatsCalculator () |
bool | ExistsCellIdPath (std::string path) |
bool | ExistsImsiPath (std::string path) |
uint16_t | GetCellIdPath (std::string path) |
std::string | GetDlOutputFilename (void) |
uint64_t | GetImsiPath (std::string path) |
std::string | GetUlOutputFilename (void) |
void | SetCellIdPath (std::string path, uint16_t cellId) |
void | SetDlOutputFilename (std::string outputFilename) |
void | SetImsiPath (std::string path, uint64_t imsi) |
void | SetUlOutputFilename (std::string outputFilename) |
Public Member Functions inherited from ns3::Object | |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
Public Member Functions inherited from ns3::ObjectBase | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::LteStatsCalculator | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Private Attributes | |
Uint32Map | m_dlCellId |
Uint64StatsMap | m_dlDelay |
std::string | m_dlPdcpOutputFilename |
Uint32StatsMap | m_dlPduSize |
Uint64Map | m_dlRxData |
Uint32Map | m_dlRxPackets |
Uint64Map | m_dlTxData |
Uint32Map | m_dlTxPackets |
EventId | m_endEpochEvent |
Time | m_epochDuration |
bool | m_firstWrite |
FlowIdMap | m_flowId |
bool | m_pendingOutput |
std::string | m_protocolType |
Time | m_startTime |
Uint32Map | m_ulCellId |
Uint64StatsMap | m_ulDelay |
std::string | m_ulPdcpOutputFilename |
Uint32StatsMap | m_ulPduSize |
Uint64Map | m_ulRxData |
Uint32Map | m_ulRxPackets |
Uint64Map | m_ulTxData |
Uint32Map | m_ulTxPackets |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
This class is an ns-3 trace sink that performs the calculation of PDU statistics for uplink and downlink. 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:
Doxygen introspection did not find any typical Config paths.
No TraceSources are defined for this type.
Definition at line 63 of file radio-bearer-stats-calculator.h.
ns3::RadioBearerStatsCalculator::RadioBearerStatsCalculator | ( | ) |
Class constructor
Definition at line 36 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
ns3::RadioBearerStatsCalculator::RadioBearerStatsCalculator | ( | std::string | protocolType | ) |
Class constructor
Definition at line 44 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
|
virtual |
Class destructor
Definition at line 52 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 189 of file radio-bearer-stats-calculator.cc.
References m_pendingOutput, m_startTime, ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
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 149 of file radio-bearer-stats-calculator.cc.
References m_pendingOutput, m_startTime, ns3::Simulator::Now(), and NS_LOG_FUNCTION.
|
virtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden 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, and NS_LOG_FUNCTION.
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 534 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
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 542 of file radio-bearer-stats-calculator.cc.
References 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 556 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
std::string ns3::RadioBearerStatsCalculator::GetDlOutputFilename | ( | void | ) |
Get the name of the file where the downlink statistics will be stored.
Definition at line 615 of file radio-bearer-stats-calculator.cc.
References ns3::LteStatsCalculator::GetDlOutputFilename(), and GetDlPdcpOutputFilename().
std::string ns3::RadioBearerStatsCalculator::GetDlPdcpOutputFilename | ( | void | ) |
Get the name of the file where the downlink PDCP statistics will be stored.
Definition at line 645 of file radio-bearer-stats-calculator.cc.
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 579 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
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 518 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
Referenced by LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), and LenaTdMtFfMacSchedulerTestCase::DoRun().
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 502 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
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 510 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
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 494 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
Time ns3::RadioBearerStatsCalculator::GetEpoch | ( | ) | const |
Definition at line 128 of file radio-bearer-stats-calculator.cc.
References m_epochDuration.
Referenced by GetTypeId().
Time ns3::RadioBearerStatsCalculator::GetStartTime | ( | ) | const |
Definition at line 115 of file radio-bearer-stats-calculator.cc.
References m_startTime.
Referenced by GetTypeId().
|
static |
Inherited from ns3::Object
Definition at line 58 of file radio-bearer-stats-calculator.cc.
References GetEpoch(), GetStartTime(), 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 526 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
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 433 of file radio-bearer-stats-calculator.cc.
References 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 448 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
std::string ns3::RadioBearerStatsCalculator::GetUlOutputFilename | ( | void | ) |
Get the name of the file where the uplink statistics will be stored.
Definition at line 602 of file radio-bearer-stats-calculator.cc.
References ns3::LteStatsCalculator::GetUlOutputFilename(), and GetUlPdcpOutputFilename().
std::string ns3::RadioBearerStatsCalculator::GetUlPdcpOutputFilename | ( | void | ) |
Get the name of the file where the uplink PDCP statistics will be stored.
Definition at line 634 of file radio-bearer-stats-calculator.cc.
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 471 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
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 425 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
Referenced by LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), and LenaTdMtFfMacSchedulerTestCase::DoRun().
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 409 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
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 417 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
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 401 of file radio-bearer-stats-calculator.cc.
References NS_LOG_FUNCTION.
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 639 of file radio-bearer-stats-calculator.cc.
Referenced by GetTypeId().
void ns3::RadioBearerStatsCalculator::SetEpoch | ( | Time | e | ) |
e | the epoch duration |
Definition at line 121 of file radio-bearer-stats-calculator.cc.
References m_epochDuration.
Referenced by GetTypeId().
void ns3::RadioBearerStatsCalculator::SetStartTime | ( | Time | t | ) |
t | the value of the StartTime attribute |
Definition at line 108 of file radio-bearer-stats-calculator.cc.
References m_startTime.
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 628 of file radio-bearer-stats-calculator.cc.
Referenced by GetTypeId().
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 164 of file radio-bearer-stats-calculator.cc.
References m_pendingOutput, m_startTime, ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
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 134 of file radio-bearer-stats-calculator.cc.
References m_pendingOutput, m_startTime, ns3::Simulator::Now(), and NS_LOG_FUNCTION.
|
private |
Epoch duration
Definition at line 379 of file radio-bearer-stats-calculator.h.
Referenced by GetEpoch(), and SetEpoch().
|
private |
true if output files have not been opened yet
Definition at line 384 of file radio-bearer-stats-calculator.h.
|
private |
true if any output is pending
Definition at line 389 of file radio-bearer-stats-calculator.h.
Referenced by DlRxPdu(), DlTxPdu(), DoDispose(), UlRxPdu(), and UlTxPdu().
|
private |
Start time of the on going epoch
Definition at line 374 of file radio-bearer-stats-calculator.h.
Referenced by DlRxPdu(), DlTxPdu(), GetStartTime(), SetStartTime(), UlRxPdu(), and UlTxPdu().