22 #ifndef RADIO_BEARER_STATS_CALCULATOR_H_    23 #define RADIO_BEARER_STATS_CALCULATOR_H_    25 #include "ns3/lte-stats-calculator.h"    26 #include "ns3/lte-common.h"    27 #include "ns3/uinteger.h"    28 #include "ns3/object.h"    29 #include "ns3/basic-data-calculators.h"    30 #include "ns3/lte-common.h"    38 typedef std::map<ImsiLcidPair_t, uint32_t> 
Uint32Map;
    40 typedef std::map<ImsiLcidPair_t, uint64_t> 
Uint64Map;
    42 typedef std::map<ImsiLcidPair_t, Ptr<MinMaxAvgTotalCalculator<uint32_t> > > 
Uint32StatsMap;
    44 typedef std::map<ImsiLcidPair_t, Ptr<MinMaxAvgTotalCalculator<uint64_t> > > 
Uint64StatsMap;
    48 typedef std::map<ImsiLcidPair_t, LteFlowId_t> 
FlowIdMap;
   170   UlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t 
packetSize);
   182   UlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t 
packetSize, uint64_t delay);
   193   DlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t 
packetSize);
   205   DlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t 
packetSize, uint64_t delay);
 Base class for ***StatsCalculator classes. 
Simulation virtual time values and global simulation resolution. 
std::map< ImsiLcidPair_t, uint32_t > Uint32Map
Container: (IMSI, LCID) pair, uint32_t. 
std::map< ImsiLcidPair_t, uint64_t > Uint64Map
Container: (IMSI, LCID) pair, uint64_t. 
virtual ~RadioBearerStatsCalculator()
Class destructor. 
std::string GetDlOutputFilename(void)
Get the name of the file where the downlink statistics will be stored. 
static TypeId GetTypeId(void)
Register this type. 
double GetUlDelay(uint64_t imsi, uint8_t lcid)
Gets the uplink RLC to RLC delay. 
static const uint32_t packetSize
std::string GetUlPdcpOutputFilename(void)
Get the name of the file where the uplink PDCP statistics will be stored. 
bool m_pendingOutput
true if any output is pending 
Uint64Map m_dlRxData
Amount of DL RX Data by (IMSI, LCID) pair. 
Uint32Map m_ulRxPackets
Number of UL RX Packets by (IMSI, LCID) pair. 
Uint64Map m_ulRxData
Amount of UL RX Data by (IMSI, LCID) pair. 
uint32_t GetDlRxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of received downlink data bytes. 
FlowIdMap m_flowId
List of FlowIds, ie. 
Uint64Map m_ulTxData
Amount of UL TX Data by (IMSI, LCID) pair. 
uint32_t GetUlCellId(uint64_t imsi, uint8_t lcid)
Gets the attached Enb cellId. 
void WriteDlResults(std::ofstream &outFile)
Writes collected statistics to DL output file and closes DL output file. 
Uint32Map m_dlRxPackets
Number of DL RX Packets by (IMSI, LCID) pair. 
void DoDispose()
Destructor implementation. 
RadioBearerStatsCalculator()
Class constructor. 
uint32_t GetUlTxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of transmitted uplink packets. 
std::vector< double > GetUlPduSizeStats(uint64_t imsi, uint8_t lcid)
Gets the uplink PDU size statistics: average, min, max and standard deviation. 
void WriteUlResults(std::ofstream &outFile)
Writes collected statistics to UL output file and closes UL output file. 
uint64_t GetDlRxData(uint64_t imsi, uint8_t lcid)
Gets the number of received downlink data bytes. 
void SetUlPdcpOutputFilename(std::string outputFilename)
Set the name of the file where the uplink PDCP statistics will be stored. 
double GetDlDelay(uint64_t imsi, uint8_t lcid)
Gets the downlink RLC to RLC delay. 
Uint32Map m_dlTxPackets
Number of DL TX Packets by (IMSI, LCID) pair. 
std::map< ImsiLcidPair_t, Ptr< MinMaxAvgTotalCalculator< uint32_t > > > Uint32StatsMap
Container: (IMSI, LCID) pair, uint32_t calculator. 
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. 
Uint64Map m_dlTxData
Amount of DL TX Data by (IMSI, LCID) pair. 
Uint32Map m_ulTxPackets
Number of UL TX Packets by (IMSI, LCID) pair. 
std::string GetDlPdcpOutputFilename(void)
Get the name of the file where the downlink PDCP statistics will be stored. 
Uint64StatsMap m_ulDelay
UL delay by (IMSI, LCID) pair. 
Time GetStartTime() const
EventId m_endEpochEvent
Event id for next end epoch event. 
uint32_t GetUlRxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of received uplink packets. 
std::map< ImsiLcidPair_t, Ptr< MinMaxAvgTotalCalculator< uint64_t > > > Uint64StatsMap
Container: (IMSI, LCID) pair, uint64_t calculator. 
Time m_startTime
Start time of the on going epoch. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
Uint64StatsMap m_dlDelay
DL delay by (IMSI, LCID) pair. 
std::string GetUlOutputFilename(void)
Get the name of the file where the uplink statistics will be stored. 
void SetStartTime(Time t)
bool m_firstWrite
true if output files have not been opened yet 
Time m_epochDuration
Epoch duration. 
uint64_t GetDlTxData(uint64_t imsi, uint8_t lcid)
Gets the number of transmitted downlink data bytes. 
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. 
uint32_t GetDlCellId(uint64_t imsi, uint8_t lcid)
Gets the attached Enb cellId. 
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 ResetResults(void)
Erases collected statistics. 
Uint32StatsMap m_ulPduSize
UL PDU Size by (IMSI, LCID) pair. 
std::string m_protocolType
Protocol type, by default RLC. 
uint64_t GetUlTxData(uint64_t imsi, uint8_t lcid)
Gets the number of transmitted uplink data bytes. 
uint64_t GetUlRxData(uint64_t imsi, uint8_t lcid)
Gets the number of received uplink data bytes. 
std::vector< double > GetDlDelayStats(uint64_t imsi, uint8_t lcid)
Gets the downlink RLC to RLC statistics: average, min, max and standard deviation. 
An identifier for simulation events. 
uint32_t GetDlTxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of transmitted downlink data bytes. 
void ShowResults(void)
Called after each epoch to write collected statistics to output files. 
void RescheduleEndEpoch()
Reschedules EndEpoch event. 
void SetDlPdcpOutputFilename(std::string outputFilename)
Set the name of the file where the downlink PDCP statistics will be stored. 
Uint32Map m_dlCellId
List of DL CellIds by (IMSI, LCID) pair. 
std::map< ImsiLcidPair_t, LteFlowId_t > FlowIdMap
Container: (IMSI, LCID) pair, LteFlowId_t. 
void EndEpoch(void)
Function called in every endEpochEvent. 
std::vector< double > GetUlDelayStats(uint64_t imsi, uint8_t lcid)
Gets the uplink RLC to RLC statistics: average, min, max and standard deviation. 
This class is an ns-3 trace sink that performs the calculation of PDU statistics for uplink and downl...
std::vector< double > GetDlPduSizeStats(uint64_t imsi, uint8_t lcid)
Gets the downlink PDU size statistics: average, min, max and standard deviation. 
std::string m_ulPdcpOutputFilename
Name of the file where the uplink PDCP statistics will be saved. 
a unique identifier for an interface. 
Uint32StatsMap m_dlPduSize
DL PDU Size by (IMSI, LCID) pair. 
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. 
Uint32Map m_ulCellId
List of UL CellIds by (IMSI, LCID) pair. 
std::map< ImsiLcidPair_t, double > DoubleMap
Container: (IMSI, LCID) pair, double. 
std::string m_dlPdcpOutputFilename
Name of the file where the downlink PDCP statistics will be saved.