Probe to translate from a FrameUtLoadTrace trace source. More...
#include "satellite-frame-user-load-probe.h"
Public Types | |
typedef void(* | FrameUserLoadCallback) (uint32_t frameId, uint32_t utCount) |
Callback signature for frame load in unit of users. More... | |
Public Member Functions | |
SatFrameUserLoadProbe () | |
Default constructor. More... | |
virtual | ~SatFrameUserLoadProbe () |
Destructor for SatFrameUserLoadProbe. 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, uint32_t utCount) |
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, uint32_t utCount) |
Set a probe value by its name in the Config system. More... | |
Private Member Functions | |
void | TraceSink (uint32_t frameId, uint32_t utCount) |
Method to connect to an underlying ns3::TraceSource with arguments of type uint32_t and uint32_t. More... | |
Private Attributes | |
TracedCallback< uint32_t, uint32_t > | m_output |
Output trace, the frame ID and number of scheduled users. More... | |
Probe to translate from a FrameUtLoadTrace 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 of type uint32_t: frame ID and number of scheduled users. 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-user-load-probe.h.
typedef void(* ns3::SatFrameUserLoadProbe::FrameUserLoadCallback) (uint32_t frameId, uint32_t utCount) |
Callback signature for frame load in unit of users.
frameId | The current frame number. |
utCount | The number of scheduled users. |
Definition at line 111 of file satellite-frame-user-load-probe.h.
ns3::SatFrameUserLoadProbe::SatFrameUserLoadProbe | ( | ) |
Default constructor.
Definition at line 61 of file satellite-frame-user-load-probe.cc.
|
virtual |
Destructor for SatFrameUserLoadProbe.
Definition at line 66 of file satellite-frame-user-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-user-load-probe.cc.
References TraceSink().
|
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-user-load-probe.cc.
References TraceSink().
|
static |
Get the type ID.
Definition at line 47 of file satellite-frame-user-load-probe.cc.
References m_output.
void ns3::SatFrameUserLoadProbe::SetValue | ( | uint32_t | frameId, |
uint32_t | utCount | ||
) |
Set a probe value.
frameId | set the frame number equal to this |
utCount | set the traced number of scheduled users equal to this |
Definition at line 72 of file satellite-frame-user-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 |
utCount | set the traced number of scheduled users equal to this |
Definition at line 79 of file satellite-frame-user-load-probe.cc.
|
private |
Method to connect to an underlying ns3::TraceSource with arguments of type uint32_t and uint32_t.
frameId | frame number |
utCount | the traced number of scheduled users |
Definition at line 107 of file satellite-frame-user-load-probe.cc.
References m_output.
Referenced by ConnectByObject(), and ConnectByPath().
|
private |
Output trace, the frame ID and number of scheduled users.
Definition at line 124 of file satellite-frame-user-load-probe.h.
Referenced by GetTypeId(), SetValue(), and TraceSink().