A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::MacStatsCalculator Class Reference

#include <mac-stats-calculator.h>

+ Inheritance diagram for ns3::MacStatsCalculator:
+ Collaboration diagram for ns3::MacStatsCalculator:

Public Member Functions

 MacStatsCalculator ()
virtual ~MacStatsCalculator ()
void DlScheduling (uint16_t cellId, uint64_t imsi, uint32_t frameNo, uint32_t subframeNo, uint16_t rnti, uint8_t mcsTb1, uint16_t sizeTb1, uint8_t mcsTb2, uint16_t sizeTb2)
std::string GetDlOutputFilename (void)
std::string GetUlOutputFilename (void)
void SetDlOutputFilename (std::string outputFilename)
void SetUlOutputFilename (std::string outputFilename)
void UlScheduling (uint16_t cellId, uint64_t imsi, uint32_t frameNo, uint32_t subframeNo, uint16_t rnti, uint8_t mcs, uint16_t sizeTb)
- Public Member Functions inherited from ns3::LteStatsCalculator
 LteStatsCalculator ()
virtual ~LteStatsCalculator ()
bool ExistsCellIdPath (std::string path)
bool ExistsImsiPath (std::string path)
uint16_t GetCellIdPath (std::string path)
uint64_t GetImsiPath (std::string path)
void SetCellIdPath (std::string path, uint16_t cellId)
void SetImsiPath (std::string path, uint64_t imsi)
- Public Member Functions inherited from ns3::Object
 Object ()
virtual ~Object ()
void AggregateObject (Ptr< Object > other)
void Dispose (void)
AggregateIterator GetAggregateIterator (void) const
virtual TypeId GetInstanceTypeId (void) const
template<typename T >
Ptr< T > GetObject (void) const
template<typename T >
Ptr< T > GetObject (TypeId tid) const
void Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
void GetAttribute (std::string name, AttributeValue &value) const
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
void SetAttribute (std::string name, const AttributeValue &value)
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::MacStatsCalculator.

Private Attributes

bool m_dlFirstWrite
bool m_ulFirstWrite

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
virtual void DoDispose (void)
virtual void DoStart (void)
virtual void NotifyNewAggregate (void)

Detailed Description

Takes care of storing the information generated at MAC layer. Metrics saved are: *time

  • Timestamp (in seconds)
  • Frame index
  • Subframe index
  • C-RNTI
  • MCS for transport block 1
  • Size of transport block 1
  • MCS for transport block 2 (0 if not used)
  • Size of transport block 2 (0 if not used)

Definition at line 44 of file mac-stats-calculator.h.

Constructor & Destructor Documentation

ns3::MacStatsCalculator::MacStatsCalculator ( )

Constructor

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

References NS_LOG_FUNCTION.

ns3::MacStatsCalculator::~MacStatsCalculator ( )
virtual

Destructor

Definition at line 40 of file mac-stats-calculator.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::MacStatsCalculator::DlScheduling ( uint16_t  cellId,
uint64_t  imsi,
uint32_t  frameNo,
uint32_t  subframeNo,
uint16_t  rnti,
uint8_t  mcsTb1,
uint16_t  sizeTb1,
uint8_t  mcsTb2,
uint16_t  sizeTb2 
)

Notifies the stats calculator that an downlink scheduling has occurred.

Parameters
cellIdCell ID of the attached Enb
imsiIMSI of the scheduled UE
frameNoFrame number
subframeNoSubframe number
rntiC-RNTI scheduled
mcsTb1MCS for transport block 1
sizeTb1Size of transport block 1
mcsTb2MCS for transport block 2 (0 if not used)
sizeTb2Size of transport block 2 (0 if not used)

Definition at line 90 of file mac-stats-calculator.cc.

References GetDlOutputFilename(), ns3::Time::GetNanoSeconds(), m_dlFirstWrite, ns3::Now(), NS_LOG_ERROR, NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by ns3::DlSchedulingCallback().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string ns3::MacStatsCalculator::GetDlOutputFilename ( void  )

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

Reimplemented from ns3::LteStatsCalculator.

Definition at line 84 of file mac-stats-calculator.cc.

Referenced by DlScheduling().

+ Here is the caller graph for this function:

TypeId ns3::MacStatsCalculator::GetTypeId ( void  )
static

This method returns the TypeId associated to ns3::MacStatsCalculator.

Inherited from ns3::Object

Attributes defined for this type:

  • DlOutputFilename: Name of the file where the downlink results will be saved.
    • Set with class: StringValue
    • Underlying type: std::string
    • Initial value: DlMacStats.txt
    • Flags: construct write
  • UlOutputFilename: Name of the file where the uplink results will be saved.
    • Set with class: StringValue
    • Underlying type: std::string
    • Initial value: UlMacStats.txt
    • Flags: construct write

No TraceSources defined for this type.

Reimplemented from ns3::LteStatsCalculator.

Definition at line 46 of file mac-stats-calculator.cc.

References SetDlOutputFilename(), ns3::TypeId::SetParent(), and SetUlOutputFilename().

+ Here is the call graph for this function:

std::string ns3::MacStatsCalculator::GetUlOutputFilename ( void  )

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

Reimplemented from ns3::LteStatsCalculator.

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

Referenced by UlScheduling().

+ Here is the caller graph for this function:

void ns3::MacStatsCalculator::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

Reimplemented from ns3::LteStatsCalculator.

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

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::MacStatsCalculator::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

Reimplemented from ns3::LteStatsCalculator.

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

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::MacStatsCalculator::UlScheduling ( uint16_t  cellId,
uint64_t  imsi,
uint32_t  frameNo,
uint32_t  subframeNo,
uint16_t  rnti,
uint8_t  mcs,
uint16_t  sizeTb 
)

Notifies the stats calculator that an uplink scheduling has occurred.

Parameters
cellIdCell ID of the attached Enb
imsiIMSI of the scheduled UE
frameNoFrame number
subframeNoSubframe number
rntiC-RNTI scheduled
mcsTbMCS for transport block
sizeTbSize of transport block

Definition at line 133 of file mac-stats-calculator.cc.

References ns3::Time::GetNanoSeconds(), GetUlOutputFilename(), m_ulFirstWrite, ns3::Now(), NS_LOG_ERROR, NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by ns3::UlSchedulingCallback().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

bool ns3::MacStatsCalculator::m_dlFirstWrite
private

Definition at line 116 of file mac-stats-calculator.h.

Referenced by DlScheduling().

bool ns3::MacStatsCalculator::m_ulFirstWrite
private

Definition at line 117 of file mac-stats-calculator.h.

Referenced by UlScheduling().


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