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... | |
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 50 of file satellite-frame-symbol-load-probe.h.
| typedef void(* ns3::SatFrameSymbolLoadProbe::FrameSymbolLoadCallback) (uint32_t frameId, double loadRatio) |
Callback signature for frame load in unit of symbols.
| frameId | The current frame number. |
| loadRatio | the ratio of allocated symbols over the total number of symbols in the frame. |
Definition at line 112 of file satellite-frame-symbol-load-probe.h.
| ns3::SatFrameSymbolLoadProbe::SatFrameSymbolLoadProbe | ( | ) |
Default constructor.
Definition at line 61 of file satellite-frame-symbol-load-probe.cc.
|
virtual |
Destructor for SatFrameSymbolLoadProbe.
Definition at line 66 of file satellite-frame-symbol-load-probe.cc.
|
virtual |
connect to a trace source attribute provided by a given object
| traceSource | the name of the attribute TraceSource to connect to |
| obj | ns3::Object to connect to |
Definition at line 88 of file satellite-frame-symbol-load-probe.cc.
References TraceSink().
Here is the call graph for this function:
|
virtual |
connect to a trace source provided by a config path
| path | Config path to bind to |
Note, if an invalid path is provided, the probe will not be connected to anything.
Definition at line 99 of file satellite-frame-symbol-load-probe.cc.
References TraceSink().
Here is the call graph for this function:
|
static |
Get the type ID.
Definition at line 47 of file satellite-frame-symbol-load-probe.cc.
References m_output.
| void ns3::SatFrameSymbolLoadProbe::SetValue | ( | uint32_t | frameId, |
| double | loadRatio | ||
| ) |
Set a probe value.
| frameId | set the frame number equal to this |
| loadRatio | set the traced ratio of allocated symbols equal to this |
Definition at line 72 of file satellite-frame-symbol-load-probe.cc.
References m_output.
|
static |
Set a probe value by its name in the Config system.
| path | config path to access the probe |
| frameId | set the frame number equal to this |
| loadRatio | set the traced ratio of allocated symbols equal to this |
Definition at line 79 of file satellite-frame-symbol-load-probe.cc.
|
private |
Method to connect to an underlying ns3::TraceSource with arguments of type double and const Address&.
| frameId | frame number |
| loadRatio | the traced ratio of allocated symbols |
Definition at line 108 of file satellite-frame-symbol-load-probe.cc.
References m_output.
Referenced by ConnectByObject(), and ConnectByPath().
Here is the caller graph for this function:
|
private |
Output trace, the frame ID and ratio of allocated symbols.
Definition at line 125 of file satellite-frame-symbol-load-probe.h.
Referenced by GetTypeId(), SetValue(), and TraceSink().