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... | |
virtual | ~RadioBearerStatsCalculator () |
Class destructor. More... | |
void | DlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay) |
Notifies the stats calculator that an downlink reception has occurred. More... | |
void | DlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize) |
Notifies the stats calculator that an downlink transmission has occurred. More... | |
void | DoDispose () |
Destructor implementation. More... | |
uint32_t | GetDlCellId (uint64_t imsi, uint8_t lcid) |
Gets the attached Enb cellId. More... | |
double | GetDlDelay (uint64_t imsi, uint8_t lcid) |
Gets the downlink RLC to RLC delay. More... | |
std::vector< 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 (void) |
Get the name of the file where the downlink statistics will be stored. More... | |
std::string | GetDlPdcpOutputFilename (void) |
Get the name of the file where the downlink PDCP statistics will be stored. More... | |
std::vector< 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 (void) |
Get the name of the file where the uplink statistics will be stored. More... | |
std::string | GetUlPdcpOutputFilename (void) |
Get the name of the file where the uplink PDCP statistics will be stored. More... | |
std::vector< 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... | |
virtual | ~LteStatsCalculator () |
Destructor. More... | |
bool | ExistsCellIdPath (std::string path) |
Checks if there is an already stored cell id for the given path. More... | |
bool | ExistsImsiPath (std::string path) |
Checks if there is an already stored IMSI for the given path. More... | |
uint16_t | GetCellIdPath (std::string path) |
Retrieves the cell id information for the given path. More... | |
std::string | GetDlOutputFilename (void) |
Get the name of the file where the downlink statistics will be stored. More... | |
uint64_t | GetImsiPath (std::string path) |
Retrieves the imsi information for the given path. More... | |
std::string | GetUlOutputFilename (void) |
Get the name of the file where the uplink statistics will be stored. More... | |
void | SetCellIdPath (std::string path, uint16_t cellId) |
Stores the (path, cellId) pairs in a map. More... | |
void | SetDlOutputFilename (std::string outputFilename) |
Set the name of the file where the downlink statistics will be stored. More... | |
void | SetImsiPath (std::string path, uint64_t imsi) |
Stores the (path, imsi) pairs in a map. More... | |
void | SetUlOutputFilename (std::string outputFilename) |
Set the name of the file where the uplink statistics will be stored. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the most derived TypeId for this Object. More... | |
template<> | |
Ptr< 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... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized (void) const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= ([[maybe_unused]] const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::LteStatsCalculator | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
void | EndEpoch (void) |
Function called in every endEpochEvent. More... | |
void | RescheduleEndEpoch () |
Reschedules EndEpoch event. More... | |
void | ResetResults (void) |
Erases collected statistics. More... | |
void | ShowResults (void) |
Called after each epoch to write collected statistics to output files. More... | |
void | WriteDlResults (std::ofstream &outFile) |
Writes collected statistics to DL output file and closes DL output file. More... | |
void | WriteUlResults (std::ofstream &outFile) |
Writes collected statistics to UL output file and closes UL output file. More... | |
Private Attributes | |
Uint32Map | m_dlCellId |
List of DL CellIds by (IMSI, LCID) pair. More... | |
Uint64StatsMap | m_dlDelay |
DL delay by (IMSI, LCID) pair. More... | |
std::string | m_dlPdcpOutputFilename |
Name of the file where the downlink PDCP statistics will be saved. More... | |
Uint32StatsMap | m_dlPduSize |
DL PDU Size by (IMSI, LCID) pair. More... | |
Uint64Map | m_dlRxData |
Amount of DL RX Data by (IMSI, LCID) pair. More... | |
Uint32Map | m_dlRxPackets |
Number of DL RX Packets by (IMSI, LCID) pair. More... | |
Uint64Map | m_dlTxData |
Amount of DL TX Data by (IMSI, LCID) pair. More... | |
Uint32Map | m_dlTxPackets |
Number of DL TX Packets by (IMSI, LCID) pair. More... | |
EventId | m_endEpochEvent |
Event id for next end epoch event. More... | |
Time | m_epochDuration |
Epoch duration. More... | |
bool | m_firstWrite |
true if output files have not been opened yet More... | |
FlowIdMap | m_flowId |
List of FlowIds, ie. More... | |
bool | m_pendingOutput |
true if any output is pending More... | |
std::string | m_protocolType |
Protocol type, by default RLC. More... | |
Time | m_startTime |
Start time of the on going epoch. More... | |
Uint32Map | m_ulCellId |
List of UL CellIds by (IMSI, LCID) pair. More... | |
Uint64StatsMap | m_ulDelay |
UL delay by (IMSI, LCID) pair. More... | |
std::string | m_ulPdcpOutputFilename |
Name of the file where the uplink PDCP statistics will be saved. More... | |
Uint32StatsMap | m_ulPduSize |
UL PDU Size by (IMSI, LCID) pair. More... | |
Uint64Map | m_ulRxData |
Amount of UL RX Data by (IMSI, LCID) pair. More... | |
Uint32Map | m_ulRxPackets |
Number of UL RX Packets by (IMSI, LCID) pair. More... | |
Uint64Map | m_ulTxData |
Amount of UL TX Data by (IMSI, LCID) pair. More... | |
Uint32Map | m_ulTxPackets |
Number of UL TX Packets by (IMSI, LCID) pair. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
Static Protected Member Functions inherited from ns3::LteStatsCalculator | |
static uint16_t | FindCellIdFromEnbMac (std::string path, uint16_t rnti) |
Retrieves CellId from Enb MAC path in the attribute system. More... | |
static uint16_t | FindCellIdFromEnbRlcPath (std::string path) |
Retrieves CellId from Enb RLC path in the attribute system. More... | |
static uint64_t | FindImsiForEnb (std::string path, uint16_t rnti) |
Retrieves IMSI from path for Enb in the attribute system. More... | |
static uint64_t | FindImsiForUe (std::string path, uint16_t rnti) |
Retrieves IMSI from path for Ue in the attribute system. More... | |
static uint64_t | FindImsiFromEnbMac (std::string path, uint16_t rnti) |
Retrieves IMSI from Enb MAC path in the attribute system. More... | |
static uint64_t | FindImsiFromEnbRlcPath (std::string path) |
Retrieves IMSI from Enb RLC path in the attribute system. More... | |
static uint64_t | FindImsiFromLteNetDevice (std::string path) |
Retrieves IMSI from LteNetDevice path in the attribute system. More... | |
static uint64_t | FindImsiFromUePhy (std::string path) |
Retrieves IMSI from Ue PHY path in the attribute system. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
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.
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:
No TraceSources are defined for this type.
Size of this type is 1056 bytes (on a 64-bit architecture).
Definition at line 70 of file radio-bearer-stats-calculator.h.
ns3::RadioBearerStatsCalculator::RadioBearerStatsCalculator | ( | ) |
Class constructor.
Definition at line 35 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 43 of file radio-bearer-stats-calculator.cc.
References m_protocolType, and NS_LOG_FUNCTION.
|
virtual |
Class destructor.
Definition at line 51 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_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 149 of file radio-bearer-stats-calculator.cc.
References m_dlCellId, m_dlTxData, m_dlTxPackets, m_flowId, m_pendingOutput, m_startTime, ns3::Simulator::Now(), NS_LOG_FUNCTION, and packetSize.
|
virtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 98 of file radio-bearer-stats-calculator.cc.
References m_pendingOutput, NS_LOG_FUNCTION, and ShowResults().
|
private |
Function called in every endEpochEvent.
It calls ShowResults() to write statistics to output files and ResetResults() to clear collected statistics.
Definition at line 418 of file radio-bearer-stats-calculator.cc.
References 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 561 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 569 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 583 of file radio-bearer-stats-calculator.cc.
References m_dlDelay, and NS_LOG_FUNCTION.
Referenced by WriteDlResults().
std::string ns3::RadioBearerStatsCalculator::GetDlOutputFilename | ( | void | ) |
Get the name of the file where the downlink statistics will be stored.
Definition at line 642 of file radio-bearer-stats-calculator.cc.
References ns3::LteStatsCalculator::GetDlOutputFilename(), GetDlPdcpOutputFilename(), and m_protocolType.
Referenced by ShowResults().
std::string ns3::RadioBearerStatsCalculator::GetDlPdcpOutputFilename | ( | void | ) |
Get the name of the file where the downlink PDCP statistics will be stored.
Definition at line 672 of file radio-bearer-stats-calculator.cc.
References m_dlPdcpOutputFilename.
Referenced by GetDlOutputFilename().
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 606 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 545 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 529 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 537 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 521 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 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 |
Register this type.
Definition at line 57 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 553 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 460 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 475 of file radio-bearer-stats-calculator.cc.
References m_ulDelay, and NS_LOG_FUNCTION.
Referenced by WriteUlResults().
std::string ns3::RadioBearerStatsCalculator::GetUlOutputFilename | ( | void | ) |
Get the name of the file where the uplink statistics will be stored.
Definition at line 629 of file radio-bearer-stats-calculator.cc.
References ns3::LteStatsCalculator::GetUlOutputFilename(), GetUlPdcpOutputFilename(), and m_protocolType.
Referenced by ShowResults().
std::string ns3::RadioBearerStatsCalculator::GetUlPdcpOutputFilename | ( | void | ) |
Get the name of the file where the uplink PDCP statistics will be stored.
Definition at line 661 of file radio-bearer-stats-calculator.cc.
References m_ulPdcpOutputFilename.
Referenced by GetUlOutputFilename().
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 498 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 452 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 436 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 444 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 428 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 409 of file radio-bearer-stats-calculator.cc.
References ns3::EventId::Cancel(), EndEpoch(), m_endEpochEvent, m_epochDuration, m_startTime, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, and ns3::Simulator::Schedule().
Referenced by SetEpoch(), and SetStartTime().
|
private |
Erases collected statistics.
Definition at line 389 of file radio-bearer-stats-calculator.cc.
References m_dlDelay, m_dlPduSize, m_dlRxData, m_dlRxPackets, m_dlTxData, m_dlTxPackets, m_ulDelay, m_ulPduSize, m_ulRxData, m_ulRxPackets, m_ulTxData, m_ulTxPackets, and NS_LOG_FUNCTION.
Referenced by EndEpoch().
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 666 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 121 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 108 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 655 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 213 of file radio-bearer-stats-calculator.cc.
References GetDlOutputFilename(), GetUlOutputFilename(), m_firstWrite, m_pendingOutput, NS_LOG_ERROR, NS_LOG_FUNCTION, NS_LOG_INFO, WriteDlResults(), and WriteUlResults().
Referenced by DoDispose(), and EndEpoch().
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 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 134 of file radio-bearer-stats-calculator.cc.
References m_flowId, m_pendingOutput, m_startTime, m_ulCellId, m_ulTxData, m_ulTxPackets, ns3::Simulator::Now(), NS_LOG_FUNCTION, and packetSize.
|
private |
Writes collected statistics to DL output file and closes DL output file.
outFile | ofstream for DL statistics |
Definition at line 330 of file radio-bearer-stats-calculator.cc.
References GetDlCellId(), GetDlDelayStats(), GetDlPduSizeStats(), GetDlRxData(), GetDlRxPackets(), GetDlTxData(), GetDlTxPackets(), ns3::Time::GetSeconds(), m_dlRxPackets, m_dlTxPackets, m_epochDuration, m_flowId, ns3::ImsiLcidPair_t::m_imsi, ns3::LteFlowId_t::m_lcId, ns3::ImsiLcidPair_t::m_lcId, ns3::LteFlowId_t::m_rnti, m_startTime, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by ShowResults().
|
private |
Writes collected statistics to UL output file and closes UL output file.
outFile | ofstream for UL statistics |
Definition at line 271 of file radio-bearer-stats-calculator.cc.
References ns3::Time::GetSeconds(), GetUlCellId(), GetUlDelayStats(), GetUlPduSizeStats(), GetUlRxData(), GetUlRxPackets(), GetUlTxData(), GetUlTxPackets(), m_epochDuration, m_flowId, ns3::ImsiLcidPair_t::m_imsi, ns3::LteFlowId_t::m_lcId, ns3::ImsiLcidPair_t::m_lcId, ns3::LteFlowId_t::m_rnti, m_startTime, m_ulRxPackets, m_ulTxPackets, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by ShowResults().
|
private |
List of DL CellIds by (IMSI, LCID) pair.
Definition at line 400 of file radio-bearer-stats-calculator.h.
Referenced by DlRxPdu(), DlTxPdu(), and GetDlCellId().
|
private |
DL delay by (IMSI, LCID) pair.
Definition at line 405 of file radio-bearer-stats-calculator.h.
Referenced by DlRxPdu(), GetDlDelay(), GetDlDelayStats(), and ResetResults().
|
private |
Name of the file where the downlink PDCP statistics will be saved.
Definition at line 444 of file radio-bearer-stats-calculator.h.
Referenced by GetDlPdcpOutputFilename(), and SetDlPdcpOutputFilename().
|
private |
DL PDU Size by (IMSI, LCID) pair.
Definition at line 406 of file radio-bearer-stats-calculator.h.
Referenced by DlRxPdu(), GetDlPduSizeStats(), and ResetResults().
|
private |
Amount of DL RX Data by (IMSI, LCID) pair.
Definition at line 404 of file radio-bearer-stats-calculator.h.
Referenced by DlRxPdu(), GetDlRxData(), and ResetResults().
|
private |
Number of DL RX Packets by (IMSI, LCID) pair.
Definition at line 402 of file radio-bearer-stats-calculator.h.
Referenced by DlRxPdu(), GetDlRxPackets(), ResetResults(), and WriteDlResults().
|
private |
Amount of DL TX Data by (IMSI, LCID) pair.
Definition at line 403 of file radio-bearer-stats-calculator.h.
Referenced by DlTxPdu(), GetDlTxData(), and ResetResults().
|
private |
Number of DL TX Packets by (IMSI, LCID) pair.
Definition at line 401 of file radio-bearer-stats-calculator.h.
Referenced by DlTxPdu(), GetDlTxPackets(), ResetResults(), and WriteDlResults().
|
private |
Event id for next end epoch event.
Definition at line 396 of file radio-bearer-stats-calculator.h.
Referenced by EndEpoch(), and RescheduleEndEpoch().
|
private |
Epoch duration.
Definition at line 424 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 429 of file radio-bearer-stats-calculator.h.
Referenced by ShowResults().
|
private |
List of FlowIds, ie.
(RNTI, LCID) by (IMSI, LCID) pair
Definition at line 398 of file radio-bearer-stats-calculator.h.
Referenced by DlTxPdu(), UlTxPdu(), WriteDlResults(), and WriteUlResults().
|
private |
true if any output is pending
Definition at line 434 of file radio-bearer-stats-calculator.h.
Referenced by DlRxPdu(), DlTxPdu(), DoDispose(), ShowResults(), UlRxPdu(), and UlTxPdu().
|
private |
Protocol type, by default RLC.
Definition at line 439 of file radio-bearer-stats-calculator.h.
Referenced by RadioBearerStatsCalculator(), GetDlOutputFilename(), and GetUlOutputFilename().
|
private |
Start time of the on going epoch.
Definition at line 419 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 408 of file radio-bearer-stats-calculator.h.
Referenced by GetUlCellId(), UlRxPdu(), and UlTxPdu().
|
private |
UL delay by (IMSI, LCID) pair.
Definition at line 413 of file radio-bearer-stats-calculator.h.
Referenced by GetUlDelay(), GetUlDelayStats(), ResetResults(), and UlRxPdu().
|
private |
Name of the file where the uplink PDCP statistics will be saved.
Definition at line 449 of file radio-bearer-stats-calculator.h.
Referenced by GetUlPdcpOutputFilename(), and SetUlPdcpOutputFilename().
|
private |
UL PDU Size by (IMSI, LCID) pair.
Definition at line 414 of file radio-bearer-stats-calculator.h.
Referenced by GetUlPduSizeStats(), ResetResults(), and UlRxPdu().
|
private |
Amount of UL RX Data by (IMSI, LCID) pair.
Definition at line 412 of file radio-bearer-stats-calculator.h.
Referenced by GetUlRxData(), ResetResults(), and UlRxPdu().
|
private |
Number of UL RX Packets by (IMSI, LCID) pair.
Definition at line 410 of file radio-bearer-stats-calculator.h.
Referenced by GetUlRxPackets(), ResetResults(), UlRxPdu(), and WriteUlResults().
|
private |
Amount of UL TX Data by (IMSI, LCID) pair.
Definition at line 411 of file radio-bearer-stats-calculator.h.
Referenced by GetUlTxData(), ResetResults(), and UlTxPdu().
|
private |
Number of UL TX Packets by (IMSI, LCID) pair.
Definition at line 409 of file radio-bearer-stats-calculator.h.
Referenced by GetUlTxPackets(), ResetResults(), UlTxPdu(), and WriteUlResults().