A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::LteStatsCalculator Class Reference

Base class for ***StatsCalculator classes. More...

#include "lte-stats-calculator.h"

+ Inheritance diagram for ns3::LteStatsCalculator:
+ Collaboration diagram for ns3::LteStatsCalculator:

Public Member Functions

 LteStatsCalculator ()
 Constructor.
 
 ~LteStatsCalculator () override
 Destructor.
 
bool ExistsCellIdPath (std::string path)
 Checks if there is an already stored cell id for the given path.
 
bool ExistsImsiPath (std::string path)
 Checks if there is an already stored IMSI for the given path.
 
uint16_t GetCellIdPath (std::string path)
 Retrieves the cell id information for the given path.
 
std::string GetDlOutputFilename ()
 Get the name of the file where the downlink statistics will be stored.
 
uint64_t GetImsiPath (std::string path)
 Retrieves the imsi information for the given path.
 
std::string GetUlOutputFilename ()
 Get the name of the file where the uplink statistics will be stored.
 
void SetCellIdPath (std::string path, uint16_t cellId)
 Stores the (path, cellId) pairs in a map.
 
void SetDlOutputFilename (std::string outputFilename)
 Set the name of the file where the downlink statistics will be stored.
 
void SetImsiPath (std::string path, uint64_t imsi)
 Stores the (path, imsi) pairs in a map.
 
void SetUlOutputFilename (std::string outputFilename)
 Set the name of the file where the uplink statistics will be stored.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Static Protected Member Functions

static uint16_t FindCellIdFromEnbMac (std::string path, uint16_t rnti)
 Retrieves CellId from Enb MAC path in the attribute system.
 
static uint16_t FindCellIdFromEnbRlcPath (std::string path)
 Retrieves CellId from Enb RLC path in the attribute system.
 
static uint64_t FindImsiForEnb (std::string path, uint16_t rnti)
 Retrieves IMSI from path for Enb in the attribute system.
 
static uint64_t FindImsiForUe (std::string path, uint16_t rnti)
 Retrieves IMSI from path for Ue in the attribute system.
 
static uint64_t FindImsiFromEnbMac (std::string path, uint16_t rnti)
 Retrieves IMSI from Enb MAC path in the attribute system.
 
static uint64_t FindImsiFromEnbRlcPath (std::string path)
 Retrieves IMSI from Enb RLC path in the attribute system.
 
static uint64_t FindImsiFromLteNetDevice (std::string path)
 Retrieves IMSI from LteNetDevice path in the attribute system.
 
static uint64_t FindImsiFromUePhy (std::string path)
 Retrieves IMSI from Ue PHY path in the attribute system.
 

Private Attributes

std::string m_dlOutputFilename
 Name of the file where the downlink results will be saved.
 
std::map< std::string, uint16_t > m_pathCellIdMap
 List of CellId by path in the attribute system.
 
std::map< std::string, uint64_t > m_pathImsiMap
 List of IMSI by path in the attribute system.
 
std::string m_ulOutputFilename
 Name of the file where the uplink results will be saved.
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Detailed Description

Base class for ***StatsCalculator classes.

Provides basic functionality to parse and store IMSI and CellId. Also stores names of output files.

Definition at line 28 of file lte-stats-calculator.h.

Constructor & Destructor Documentation

◆ LteStatsCalculator()

ns3::LteStatsCalculator::LteStatsCalculator ( )

Constructor.

Definition at line 25 of file lte-stats-calculator.cc.

◆ ~LteStatsCalculator()

ns3::LteStatsCalculator::~LteStatsCalculator ( )
override

Destructor.

Definition at line 32 of file lte-stats-calculator.cc.

Member Function Documentation

◆ ExistsCellIdPath()

bool ns3::LteStatsCalculator::ExistsCellIdPath ( std::string path)

Checks if there is an already stored cell id for the given path.

Parameters
pathPath in the attribute system to check
Returns
true if the path exists, false otherwise

Definition at line 91 of file lte-stats-calculator.cc.

References m_pathCellIdMap.

◆ ExistsImsiPath()

bool ns3::LteStatsCalculator::ExistsImsiPath ( std::string path)

Checks if there is an already stored IMSI for the given path.

Parameters
pathPath in the attribute system to check
Returns
true if the path exists, false otherwise

Definition at line 72 of file lte-stats-calculator.cc.

References m_pathImsiMap.

◆ FindCellIdFromEnbMac()

uint16_t ns3::LteStatsCalculator::FindCellIdFromEnbMac ( std::string path,
uint16_t rnti )
staticprotected

Retrieves CellId from Enb MAC path in the attribute system.

Parameters
pathPath in the attribute system to get
rntiRNTI of UE for which CellId is needed
Returns
the CellId associated with the given path and RNTI

Definition at line 222 of file lte-stats-calculator.cc.

References FindCellIdFromEnbRlcPath(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

+ Here is the call graph for this function:

◆ FindCellIdFromEnbRlcPath()

uint16_t ns3::LteStatsCalculator::FindCellIdFromEnbRlcPath ( std::string path)
staticprotected

Retrieves CellId from Enb RLC path in the attribute system.

Parameters
pathPath in the attribute system to get
Returns
the CellId associated with the given path

Definition at line 183 of file lte-stats-calculator.cc.

References ns3::Config::MatchContainer::Get(), ns3::LteEnbNetDevice::GetCellId(), ns3::Config::MatchContainer::GetN(), ns3::Config::LookupMatches(), NS_FATAL_ERROR, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::MacStatsCalculator::DlSchedulingCallback(), FindCellIdFromEnbMac(), and ns3::MacStatsCalculator::UlSchedulingCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindImsiForEnb()

uint64_t ns3::LteStatsCalculator::FindImsiForEnb ( std::string path,
uint16_t rnti )
staticprotected

Retrieves IMSI from path for Enb in the attribute system.

Parameters
pathPath in the attribute system to get
rntiRNTI of UE for which IMSI is needed
Returns
the IMSI associated with the given path and RNTI

Definition at line 236 of file lte-stats-calculator.cc.

References FindImsiFromEnbRlcPath(), FindImsiFromLteNetDevice(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

+ Here is the call graph for this function:

◆ FindImsiForUe()

uint64_t ns3::LteStatsCalculator::FindImsiForUe ( std::string path,
uint16_t rnti )
staticprotected

Retrieves IMSI from path for Ue in the attribute system.

Parameters
pathPath in the attribute system to get
rntiRNTI of UE for which IMSI is needed
Returns
the IMSI associated with the given path and RNTI

Definition at line 260 of file lte-stats-calculator.cc.

References FindImsiFromEnbRlcPath(), FindImsiFromLteNetDevice(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

+ Here is the call graph for this function:

◆ FindImsiFromEnbMac()

uint64_t ns3::LteStatsCalculator::FindImsiFromEnbMac ( std::string path,
uint16_t rnti )
staticprotected

Retrieves IMSI from Enb MAC path in the attribute system.

Parameters
pathPath in the attribute system to get
rntiRNTI of UE for which IMSI is needed
Returns
the IMSI associated with the given path and RNTI

Definition at line 207 of file lte-stats-calculator.cc.

References FindImsiFromEnbRlcPath(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::PhyStatsCalculator::ReportUeSinr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindImsiFromEnbRlcPath()

uint64_t ns3::LteStatsCalculator::FindImsiFromEnbRlcPath ( std::string path)
staticprotected

Retrieves IMSI from Enb RLC path in the attribute system.

Parameters
pathPath in the attribute system to get
Returns
the IMSI associated with the given path

Definition at line 110 of file lte-stats-calculator.cc.

References ns3::Config::MatchContainer::Get(), ns3::UeManager::GetImsi(), ns3::Config::MatchContainer::GetN(), ns3::Config::LookupMatches(), NS_FATAL_ERROR, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::PhyTxStatsCalculator::DlPhyTransmissionCallback(), ns3::MacStatsCalculator::DlSchedulingCallback(), FindImsiForEnb(), FindImsiForUe(), FindImsiFromEnbMac(), ns3::PhyRxStatsCalculator::UlPhyReceptionCallback(), and ns3::MacStatsCalculator::UlSchedulingCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindImsiFromLteNetDevice()

uint64_t ns3::LteStatsCalculator::FindImsiFromLteNetDevice ( std::string path)
staticprotected

Retrieves IMSI from LteNetDevice path in the attribute system.

Parameters
pathPath in the attribute system to get
Returns
the IMSI associated with the given path

Definition at line 159 of file lte-stats-calculator.cc.

References ns3::Config::MatchContainer::Get(), ns3::LteUeNetDevice::GetImsi(), ns3::Config::MatchContainer::GetN(), ns3::Config::LookupMatches(), NS_FATAL_ERROR, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::PhyRxStatsCalculator::DlPhyReceptionCallback(), FindImsiForEnb(), FindImsiForUe(), ns3::PhyStatsCalculator::ReportCurrentCellRsrpSinrCallback(), and ns3::PhyTxStatsCalculator::UlPhyTransmissionCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindImsiFromUePhy()

uint64_t ns3::LteStatsCalculator::FindImsiFromUePhy ( std::string path)
staticprotected

Retrieves IMSI from Ue PHY path in the attribute system.

Parameters
pathPath in the attribute system to get
Returns
the IMSI associated with the given path

Definition at line 135 of file lte-stats-calculator.cc.

References ns3::Config::MatchContainer::Get(), ns3::Config::MatchContainer::GetN(), ns3::Config::LookupMatches(), NS_FATAL_ERROR, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetCellIdPath()

uint16_t ns3::LteStatsCalculator::GetCellIdPath ( std::string path)

Retrieves the cell id information for the given path.

Parameters
pathPath in the attribute system to get
Returns
the cell ID associated with the given path

Definition at line 104 of file lte-stats-calculator.cc.

References m_pathCellIdMap.

◆ GetDlOutputFilename()

std::string ns3::LteStatsCalculator::GetDlOutputFilename ( )

Get the name of the file where the downlink statistics will be stored.

Returns
the name of the file where the downlink statistics will be stored

Definition at line 66 of file lte-stats-calculator.cc.

References m_dlOutputFilename.

Referenced by ns3::PhyTxStatsCalculator::DlPhyTransmission(), ns3::MacStatsCalculator::GetDlOutputFilename(), ns3::RadioBearerStatsCalculator::GetDlOutputFilename(), ns3::PhyRxStatsCalculator::GetDlRxOutputFilename(), and ns3::PhyTxStatsCalculator::GetDlTxOutputFilename().

+ Here is the caller graph for this function:

◆ GetImsiPath()

uint64_t ns3::LteStatsCalculator::GetImsiPath ( std::string path)

Retrieves the imsi information for the given path.

Parameters
pathPath in the attribute system to get
Returns
the IMSI associated with the given path

Definition at line 85 of file lte-stats-calculator.cc.

References m_pathImsiMap.

◆ GetTypeId()

TypeId ns3::LteStatsCalculator::GetTypeId ( )
static

Register this type.

Returns
The object TypeId.

Definition at line 38 of file lte-stats-calculator.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ GetUlOutputFilename()

std::string ns3::LteStatsCalculator::GetUlOutputFilename ( )

Get the name of the file where the uplink statistics will be stored.

Returns
the name of the file where the uplink statistics will be stored

Definition at line 54 of file lte-stats-calculator.cc.

References m_ulOutputFilename.

Referenced by ns3::MacStatsCalculator::GetUlOutputFilename(), ns3::RadioBearerStatsCalculator::GetUlOutputFilename(), ns3::PhyRxStatsCalculator::GetUlRxOutputFilename(), and ns3::PhyTxStatsCalculator::GetUlTxOutputFilename().

+ Here is the caller graph for this function:

◆ SetCellIdPath()

void ns3::LteStatsCalculator::SetCellIdPath ( std::string path,
uint16_t cellId )

Stores the (path, cellId) pairs in a map.

Parameters
pathPath in the attribute system to store
cellIdcell id value to store

Definition at line 97 of file lte-stats-calculator.cc.

References m_pathCellIdMap, and NS_LOG_FUNCTION.

◆ SetDlOutputFilename()

void ns3::LteStatsCalculator::SetDlOutputFilename ( std::string outputFilename)

Set the name of the file where the downlink statistics will be stored.

Parameters
outputFilenamestring with the name of the file

Definition at line 60 of file lte-stats-calculator.cc.

References m_dlOutputFilename.

Referenced by ns3::RadioBearerStatsCalculator::GetTypeId(), ns3::MacStatsCalculator::SetDlOutputFilename(), ns3::PhyRxStatsCalculator::SetDlRxOutputFilename(), and ns3::PhyTxStatsCalculator::SetDlTxOutputFilename().

+ Here is the caller graph for this function:

◆ SetImsiPath()

void ns3::LteStatsCalculator::SetImsiPath ( std::string path,
uint64_t imsi )

Stores the (path, imsi) pairs in a map.

Parameters
pathPath in the attribute system to store
imsiIMSI value to store

Definition at line 78 of file lte-stats-calculator.cc.

References m_pathImsiMap, and NS_LOG_FUNCTION.

◆ SetUlOutputFilename()

void ns3::LteStatsCalculator::SetUlOutputFilename ( std::string outputFilename)

Set the name of the file where the uplink statistics will be stored.

Parameters
outputFilenamestring with the name of the file

Definition at line 48 of file lte-stats-calculator.cc.

References m_ulOutputFilename.

Referenced by ns3::RadioBearerStatsCalculator::GetTypeId(), ns3::MacStatsCalculator::SetUlOutputFilename(), ns3::PhyRxStatsCalculator::SetUlRxOutputFilename(), and ns3::PhyTxStatsCalculator::SetUlTxOutputFilename().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_dlOutputFilename

std::string ns3::LteStatsCalculator::m_dlOutputFilename
private

Name of the file where the downlink results will be saved.

Definition at line 190 of file lte-stats-calculator.h.

Referenced by GetDlOutputFilename(), and SetDlOutputFilename().

◆ m_pathCellIdMap

std::map<std::string, uint16_t> ns3::LteStatsCalculator::m_pathCellIdMap
private

List of CellId by path in the attribute system.

Definition at line 185 of file lte-stats-calculator.h.

Referenced by ExistsCellIdPath(), GetCellIdPath(), and SetCellIdPath().

◆ m_pathImsiMap

std::map<std::string, uint64_t> ns3::LteStatsCalculator::m_pathImsiMap
private

List of IMSI by path in the attribute system.

Definition at line 180 of file lte-stats-calculator.h.

Referenced by ExistsImsiPath(), GetImsiPath(), and SetImsiPath().

◆ m_ulOutputFilename

std::string ns3::LteStatsCalculator::m_ulOutputFilename
private

Name of the file where the uplink results will be saved.

Definition at line 195 of file lte-stats-calculator.h.

Referenced by GetUlOutputFilename(), and SetUlOutputFilename().


The documentation for this class was generated from the following files: