ns3::SatFrameSymbolLoadProbe Class Reference

Probe to translate from a FrameLoadTrace trace source. More...

#include "satellite-frame-symbol-load-probe.h"

+ Inheritance diagram for ns3::SatFrameSymbolLoadProbe:
+ Collaboration diagram for ns3::SatFrameSymbolLoadProbe:

Public Types

typedef void(* FrameSymbolLoadCallback) (uint32_t frameId, double loadRatio)
 Callback signature for frame load in unit of symbols. More...
 

Public Member Functions

 SatFrameSymbolLoadProbe ()
 Default constructor. More...
 
virtual ~SatFrameSymbolLoadProbe ()
 Destructor for SatFrameSymbolLoadProbe. More...
 
virtual bool ConnectByObject (std::string traceSource, Ptr< Object > obj)
 connect to a trace source attribute provided by a given object More...
 
virtual void ConnectByPath (std::string path)
 connect to a trace source provided by a config path More...
 
void SetValue (uint32_t frameId, double loadRatio)
 Set a probe value. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID. More...
 
static void SetValueByPath (std::string path, uint32_t frameId, double loadRatio)
 Set a probe value by its name in the Config system. More...
 

Private Member Functions

void TraceSink (uint32_t frameId, double loadRatio)
 Method to connect to an underlying ns3::TraceSource with arguments of type double and const Address&. More...
 

Private Attributes

TracedCallback< uint32_t, double > m_output
 Output trace, the frame ID and ratio of allocated symbols. More...
 

Detailed Description

Probe to translate from a FrameLoadTrace trace source.

This class is designed to probe an underlying ns3 TraceSource exporting a frame load information. This probe exports a trace source "Output" with two arguments: frame ID (uint32_t) and ratio of allocated symbols (double). The trace sources emit values when either the probed trace source emits a new value, or when SetValue () is called.

Definition at line 48 of file satellite-frame-symbol-load-probe.h.

Member Typedef Documentation

◆ FrameSymbolLoadCallback

typedef void(* ns3::SatFrameSymbolLoadProbe::FrameSymbolLoadCallback) (uint32_t frameId, double loadRatio)

Callback signature for frame load in unit of symbols.

Parameters
frameIdThe current frame number.
loadRatiothe ratio of allocated symbols over the total number of symbols in the frame.

Definition at line 110 of file satellite-frame-symbol-load-probe.h.

Constructor & Destructor Documentation

◆ SatFrameSymbolLoadProbe()

ns3::SatFrameSymbolLoadProbe::SatFrameSymbolLoadProbe ( )

Default constructor.

Definition at line 59 of file satellite-frame-symbol-load-probe.cc.

◆ ~SatFrameSymbolLoadProbe()

ns3::SatFrameSymbolLoadProbe::~SatFrameSymbolLoadProbe ( )
virtual

Destructor for SatFrameSymbolLoadProbe.

Definition at line 64 of file satellite-frame-symbol-load-probe.cc.

Member Function Documentation

◆ ConnectByObject()

bool ns3::SatFrameSymbolLoadProbe::ConnectByObject ( std::string  traceSource,
Ptr< Object >  obj 
)
virtual

connect to a trace source attribute provided by a given object

Parameters
traceSourcethe name of the attribute TraceSource to connect to
objns3::Object to connect to
Returns
true if the trace source was successfully connected

Definition at line 86 of file satellite-frame-symbol-load-probe.cc.

References TraceSink().

+ Here is the call graph for this function:

◆ ConnectByPath()

void ns3::SatFrameSymbolLoadProbe::ConnectByPath ( std::string  path)
virtual

connect to a trace source provided by a config path

Parameters
pathConfig path to bind to

Note, if an invalid path is provided, the probe will not be connected to anything.

Definition at line 97 of file satellite-frame-symbol-load-probe.cc.

References TraceSink().

+ Here is the call graph for this function:

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

Definition at line 45 of file satellite-frame-symbol-load-probe.cc.

References m_output.

◆ SetValue()

void ns3::SatFrameSymbolLoadProbe::SetValue ( uint32_t  frameId,
double  loadRatio 
)

Set a probe value.

Parameters
frameIdset the frame number equal to this
loadRatioset the traced ratio of allocated symbols equal to this

Definition at line 70 of file satellite-frame-symbol-load-probe.cc.

References m_output.

◆ SetValueByPath()

void ns3::SatFrameSymbolLoadProbe::SetValueByPath ( std::string  path,
uint32_t  frameId,
double  loadRatio 
)
static

Set a probe value by its name in the Config system.

Parameters
pathconfig path to access the probe
frameIdset the frame number equal to this
loadRatioset the traced ratio of allocated symbols equal to this

Definition at line 77 of file satellite-frame-symbol-load-probe.cc.

◆ TraceSink()

void ns3::SatFrameSymbolLoadProbe::TraceSink ( uint32_t  frameId,
double  loadRatio 
)
private

Method to connect to an underlying ns3::TraceSource with arguments of type double and const Address&.

Parameters
frameIdframe number
loadRatiothe traced ratio of allocated symbols

Definition at line 106 of file satellite-frame-symbol-load-probe.cc.

References m_output.

Referenced by ConnectByObject(), and ConnectByPath().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_output

TracedCallback<uint32_t, double> ns3::SatFrameSymbolLoadProbe::m_output
private

Output trace, the frame ID and ratio of allocated symbols.

Definition at line 123 of file satellite-frame-symbol-load-probe.h.

Referenced by GetTypeId(), SetValue(), and TraceSink().


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