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. More... | |
RadioBearerStatsCalculator (std::string protocolType) | |
Class constructor. More... | |
~RadioBearerStatsCalculator () override | |
Class destructor. More... | |
void | DlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay) |
Notifies the stats calculator that an downlink reception has occurred. More... | |
void | DlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize) |
Notifies the stats calculator that an downlink transmission has occurred. More... | |
void | DoDispose () override |
Destructor implementation. More... | |
uint32_t | GetDlCellId (uint64_t imsi, uint8_t lcid) |
Gets the attached Enb cellId. More... | |
double | GetDlDelay (uint64_t imsi, uint8_t lcid) |
Gets the downlink RLC to RLC delay. More... | |
std::vector< double > | GetDlDelayStats (uint64_t imsi, uint8_t lcid) |
Gets the downlink RLC to RLC statistics: average, min, max and standard deviation. More... | |
std::string | GetDlOutputFilename () |
Get the name of the file where the downlink statistics will be stored. More... | |
std::string | GetDlPdcpOutputFilename () |
Get the name of the file where the downlink PDCP statistics will be stored. More... | |
std::vector< double > | GetDlPduSizeStats (uint64_t imsi, uint8_t lcid) |
Gets the downlink PDU size statistics: average, min, max and standard deviation. More... | |
uint64_t | GetDlRxData (uint64_t imsi, uint8_t lcid) |
Gets the number of received downlink data bytes. More... | |
uint32_t | GetDlRxPackets (uint64_t imsi, uint8_t lcid) |
Gets the number of received downlink data bytes. More... | |
uint64_t | GetDlTxData (uint64_t imsi, uint8_t lcid) |
Gets the number of transmitted downlink data bytes. More... | |
uint32_t | GetDlTxPackets (uint64_t imsi, uint8_t lcid) |
Gets the number of transmitted downlink data bytes. More... | |
Time | GetEpoch () const |
Time | GetStartTime () const |
uint32_t | GetUlCellId (uint64_t imsi, uint8_t lcid) |
Gets the attached Enb cellId. More... | |
double | GetUlDelay (uint64_t imsi, uint8_t lcid) |
Gets the uplink RLC to RLC delay. More... | |
std::vector< double > | GetUlDelayStats (uint64_t imsi, uint8_t lcid) |
Gets the uplink RLC to RLC statistics: average, min, max and standard deviation. More... | |
std::string | GetUlOutputFilename () |
Get the name of the file where the uplink statistics will be stored. More... | |
std::string | GetUlPdcpOutputFilename () |
Get the name of the file where the uplink PDCP statistics will be stored. More... | |
std::vector< double > | GetUlPduSizeStats (uint64_t imsi, uint8_t lcid) |
Gets the uplink PDU size statistics: average, min, max and standard deviation. More... | |
uint64_t | GetUlRxData (uint64_t imsi, uint8_t lcid) |
Gets the number of received uplink data bytes. More... | |
uint32_t | GetUlRxPackets (uint64_t imsi, uint8_t lcid) |
Gets the number of received uplink packets. More... | |
uint64_t | GetUlTxData (uint64_t imsi, uint8_t lcid) |
Gets the number of transmitted uplink data bytes. More... | |
uint32_t | GetUlTxPackets (uint64_t imsi, uint8_t lcid) |
Gets the number of transmitted uplink packets. More... | |
void | SetDlPdcpOutputFilename (std::string outputFilename) |
Set the name of the file where the downlink PDCP statistics will be stored. More... | |
void | SetEpoch (Time e) |
void | SetStartTime (Time t) |
void | SetUlPdcpOutputFilename (std::string outputFilename) |
Set the name of the file where the uplink PDCP statistics will be stored. More... | |
void | UlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay) |
Notifies the stats calculator that an uplink reception has occurred. More... | |
void | UlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize) |
Notifies the stats calculator that an uplink transmission has occurred. More... | |
Public Member Functions inherited from ns3::LteStatsCalculator | |
LteStatsCalculator () | |
Constructor. More... | |
~LteStatsCalculator () override | |
Destructor. More... | |
bool | ExistsCellIdPath (std::string path) |
Checks if there is an already stored cell id for the given path. More... | |
bool | ExistsImsiPath (std::string path) |
Checks if there is an already stored IMSI for the given path. More... | |
uint16_t | GetCellIdPath (std::string path) |
Retrieves the cell id information for the given path. More... | |
std::string | GetDlOutputFilename () |
Get the name of the file where the downlink statistics will be stored. More... | |
uint64_t | GetImsiPath (std::string path) |
Retrieves the imsi information for the given path. More... | |
std::string | GetUlOutputFilename () |
Get the name of the file where the uplink statistics will be stored. More... | |
void | SetCellIdPath (std::string path, uint16_t cellId) |
Stores the (path, cellId) pairs in a map. More... | |
void | SetDlOutputFilename (std::string outputFilename) |
Set the name of the file where the downlink statistics will be stored. More... | |
void | SetImsiPath (std::string path, uint64_t imsi) |
Stores the (path, imsi) pairs in a map. More... | |
void | SetUlOutputFilename (std::string outputFilename) |
Set the name of the file where the uplink statistics will be stored. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
~Object () override | |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose () |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. More... | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized () const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::LteStatsCalculator | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Private Member Functions | |
void | EndEpoch () |
Function called in every endEpochEvent. More... | |
void | RescheduleEndEpoch () |
Reschedules EndEpoch event. More... | |
void | ResetResults () |
Erases collected statistics. More... | |
void | ShowResults () |
Called after each epoch to write collected statistics to output files. More... | |
void | WriteDlResults (std::ofstream &outFile) |
Writes collected statistics to DL output file and closes DL output file. More... | |
void | WriteUlResults (std::ofstream &outFile) |
Writes collected statistics to UL output file and closes UL output file. More... | |
Private Attributes | |
Uint32Map | m_dlCellId |
List of DL CellIds by (IMSI, LCID) pair. More... | |
Uint64StatsMap | m_dlDelay |
DL delay by (IMSI, LCID) pair. More... | |
std::string | m_dlPdcpOutputFilename |
Name of the file where the downlink PDCP statistics will be saved. More... | |
Uint32StatsMap | m_dlPduSize |
DL PDU Size by (IMSI, LCID) pair. More... | |
Uint64Map | m_dlRxData |
Amount of DL RX Data by (IMSI, LCID) pair. More... | |
Uint32Map | m_dlRxPackets |
Number of DL RX Packets by (IMSI, LCID) pair. More... | |
Uint64Map | m_dlTxData |
Amount of DL TX Data by (IMSI, LCID) pair. More... | |
Uint32Map | m_dlTxPackets |
Number of DL TX Packets by (IMSI, LCID) pair. More... | |
EventId | m_endEpochEvent |
Event id for next end epoch event. More... | |
Time | m_epochDuration |
Epoch duration. More... | |
bool | m_firstWrite |
true if output files have not been opened yet More... | |
FlowIdMap | m_flowId |
List of FlowIds, ie. More... | |
bool | m_pendingOutput |
true if any output is pending More... | |
std::string | m_protocolType |
Protocol type, by default RLC. More... | |
Time | m_startTime |
Start time of the on going epoch. More... | |
Uint32Map | m_ulCellId |
List of UL CellIds by (IMSI, LCID) pair. More... | |
Uint64StatsMap | m_ulDelay |
UL delay by (IMSI, LCID) pair. More... | |
std::string | m_ulPdcpOutputFilename |
Name of the file where the uplink PDCP statistics will be saved. More... | |
Uint32StatsMap | m_ulPduSize |
UL PDU Size by (IMSI, LCID) pair. More... | |
Uint64Map | m_ulRxData |
Amount of UL RX Data by (IMSI, LCID) pair. More... | |
Uint32Map | m_ulRxPackets |
Number of UL RX Packets by (IMSI, LCID) pair. More... | |
Uint64Map | m_ulTxData |
Amount of UL TX Data by (IMSI, LCID) pair. More... | |
Uint32Map | m_ulTxPackets |
Number of UL TX Packets by (IMSI, LCID) pair. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize () |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. More... | |
Static Protected Member Functions inherited from ns3::LteStatsCalculator | |
static uint16_t | FindCellIdFromEnbMac (std::string path, uint16_t rnti) |
Retrieves CellId from Enb MAC path in the attribute system. More... | |
static uint16_t | FindCellIdFromEnbRlcPath (std::string path) |
Retrieves CellId from Enb RLC path in the attribute system. More... | |
static uint64_t | FindImsiForEnb (std::string path, uint16_t rnti) |
Retrieves IMSI from path for Enb in the attribute system. More... | |
static uint64_t | FindImsiForUe (std::string path, uint16_t rnti) |
Retrieves IMSI from path for Ue in the attribute system. More... | |
static uint64_t | FindImsiFromEnbMac (std::string path, uint16_t rnti) |
Retrieves IMSI from Enb MAC path in the attribute system. More... | |
static uint64_t | FindImsiFromEnbRlcPath (std::string path) |
Retrieves IMSI from Enb RLC path in the attribute system. More... | |
static uint64_t | FindImsiFromLteNetDevice (std::string path) |
Retrieves IMSI from LteNetDevice path in the attribute system. More... | |
static uint64_t | FindImsiFromUePhy (std::string path) |
Retrieves IMSI from Ue PHY path in the attribute system. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
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:
Definition at line 70 of file radio-bearer-stats-calculator.h.
ns3::RadioBearerStatsCalculator::RadioBearerStatsCalculator | ( | ) |
Class constructor.
Definition at line 37 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 45 of file radio-bearer-stats-calculator.cc.
References m_protocolType, and NS_LOG_FUNCTION.
|
override |
Class destructor.
Definition at line 53 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 207 of file radio-bearer-stats-calculator.cc.
References m_dlCellId, m_dlDelay, m_dlPduSize, m_dlRxData, m_dlRxPackets, ns3::ImsiLcidPair_t::m_imsi, ns3::ImsiLcidPair_t::m_lcId, m_pendingOutput, m_startTime, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and packetSize.
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 157 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 102 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 446 of file radio-bearer-stats-calculator.cc.
References m_endEpochEvent, m_epochDuration, m_startTime, NS_LOG_FUNCTION, ResetResults(), ns3::Simulator::Schedule(), and ShowResults().
Referenced by 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 587 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 595 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 609 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 666 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 697 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 631 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 571 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 555 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 563 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 547 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 132 of file radio-bearer-stats-calculator.cc.
References m_epochDuration.
Referenced by GetTypeId().
Time ns3::RadioBearerStatsCalculator::GetStartTime | ( | ) | const |
Definition at line 119 of file radio-bearer-stats-calculator.cc.
References m_startTime.
Referenced by GetTypeId().
|
static |
Register this type.
Definition at line 59 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 579 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 489 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 503 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 653 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 685 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 525 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 481 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 465 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 473 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 457 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 435 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 415 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 691 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 125 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 112 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 679 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 238 of file radio-bearer-stats-calculator.cc.
References openflow-switch::app, 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 176 of file radio-bearer-stats-calculator.cc.
References ns3::ImsiLcidPair_t::m_imsi, ns3::ImsiLcidPair_t::m_lcId, m_pendingOutput, m_startTime, m_ulCellId, m_ulDelay, m_ulPduSize, m_ulRxData, m_ulRxPackets, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and packetSize.
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 138 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 355 of file radio-bearer-stats-calculator.cc.
References GetDlCellId(), GetDlDelayStats(), GetDlPduSizeStats(), GetDlRxData(), GetDlRxPackets(), GetDlTxData(), GetDlTxPackets(), ns3::Time::GetSeconds(), m_dlRxPackets, m_dlTxPackets, m_epochDuration, m_flowId, ns3::ImsiLcidPair_t::m_imsi, ns3::LteFlowId_t::m_lcId, ns3::ImsiLcidPair_t::m_lcId, ns3::LteFlowId_t::m_rnti, m_startTime, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by ShowResults().
|
private |
Writes collected statistics to UL output file and closes UL output file.
outFile | ofstream for UL statistics |
Definition at line 295 of file radio-bearer-stats-calculator.cc.
References ns3::Time::GetSeconds(), GetUlCellId(), GetUlDelayStats(), GetUlPduSizeStats(), GetUlRxData(), GetUlRxPackets(), GetUlTxData(), GetUlTxPackets(), m_epochDuration, m_flowId, ns3::ImsiLcidPair_t::m_imsi, ns3::LteFlowId_t::m_lcId, ns3::ImsiLcidPair_t::m_lcId, ns3::LteFlowId_t::m_rnti, m_startTime, m_ulRxPackets, m_ulTxPackets, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by ShowResults().
|
private |
List of DL CellIds by (IMSI, LCID) pair.
Definition at line 385 of file radio-bearer-stats-calculator.h.
Referenced by DlRxPdu(), DlTxPdu(), and GetDlCellId().
|
private |
DL delay by (IMSI, LCID) pair.
Definition at line 390 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 429 of file radio-bearer-stats-calculator.h.
Referenced by GetDlPdcpOutputFilename(), and SetDlPdcpOutputFilename().
|
private |
DL PDU Size by (IMSI, LCID) pair.
Definition at line 391 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 389 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 387 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 388 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 386 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 381 of file radio-bearer-stats-calculator.h.
Referenced by EndEpoch(), and RescheduleEndEpoch().
|
private |
Epoch duration.
Definition at line 409 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 414 of file radio-bearer-stats-calculator.h.
Referenced by ShowResults().
|
private |
List of FlowIds, ie.
(RNTI, LCID) by (IMSI, LCID) pair
Definition at line 383 of file radio-bearer-stats-calculator.h.
Referenced by DlTxPdu(), UlTxPdu(), WriteDlResults(), and WriteUlResults().
|
private |
true if any output is pending
Definition at line 419 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 424 of file radio-bearer-stats-calculator.h.
Referenced by RadioBearerStatsCalculator(), GetDlOutputFilename(), and GetUlOutputFilename().
|
private |
Start time of the on going epoch.
Definition at line 404 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 393 of file radio-bearer-stats-calculator.h.
Referenced by GetUlCellId(), UlRxPdu(), and UlTxPdu().
|
private |
UL delay by (IMSI, LCID) pair.
Definition at line 398 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 434 of file radio-bearer-stats-calculator.h.
Referenced by GetUlPdcpOutputFilename(), and SetUlPdcpOutputFilename().
|
private |
UL PDU Size by (IMSI, LCID) pair.
Definition at line 399 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 397 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 395 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 396 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 394 of file radio-bearer-stats-calculator.h.
Referenced by GetUlTxPackets(), ResetResults(), UlTxPdu(), and WriteUlResults().