Probe to translate from a TraceSource to two more easily parsed TraceSources. More...
#include "satellite-phy-rx-carrier-packet-probe.h"
Inheritance diagram for ns3::SatPhyRxCarrierPacketProbe:
Collaboration diagram for ns3::SatPhyRxCarrierPacketProbe:Public Types | |
| typedef void(* | RxStatusCallback) (uint32_t nPackets, const Address &from, bool status) |
| Common callback signature for trace sources related to packets reception by PHY and its status. More... | |
Public Member Functions | |
| SatPhyRxCarrierPacketProbe () | |
| Default constructor. More... | |
| virtual | ~SatPhyRxCarrierPacketProbe () |
| Destructor for SatPhyRxCarrierPacketProbe. 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 nPackets, const Address &address, bool statusFlag) |
| 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 nPackets, const Address &address, bool statusFlag) |
| Set a probe value by its name in the Config system. More... | |
Private Member Functions | |
| void | TraceSink (uint32_t nPackets, const Address &address, bool statusFlag) |
| Method to connect to an underlying ns3::TraceSource with arguments of type double and const Address&. More... | |
Private Attributes | |
| Address | m_address |
| The socket address for the traced packet burst. More... | |
| uint32_t | m_nPackets |
| The traced number of packets in the packet burst. More... | |
| TracedCallback< uint32_t, const Address &, bool > | m_output |
| Output trace, the number of packets, source address, and status flag. More... | |
| TracedCallback< bool, bool > | m_outputBool |
| Output trace, previous and current status flag. More... | |
| TracedCallback< uint32_t, uint32_t > | m_outputUinteger |
| Output trace, previous and current number of packets. More... | |
| bool | m_statusFlag |
| The traced packet burst status flag. More... | |
Probe to translate from a TraceSource to two more easily parsed TraceSources.
This class is designed to probe an underlying ns3 TraceSource exporting a packet burst information from SatPhyRxCarrier. This probe exports a trace source "Output" with arguments of type uint32_t, const Address&, and bool. This probe exports other trace sources "OutputUinteger" and "OutputBool" with arguments of type uint32_t and bool, respectively. The trace sources emit values when either the probed trace source emits a new value, or when SetValue () is called.
Definition at line 53 of file satellite-phy-rx-carrier-packet-probe.h.
| typedef void(* ns3::SatPhyRxCarrierPacketProbe::RxStatusCallback) (uint32_t nPackets, const Address &from, bool status) |
Common callback signature for trace sources related to packets reception by PHY and its status.
| nPackets | number of upper layer packets in the received packet burst. |
| from | the MAC48 address of the sender of the packets. |
| status | whether a PHY error or collision has occurred. |
Definition at line 120 of file satellite-phy-rx-carrier-packet-probe.h.
| ns3::SatPhyRxCarrierPacketProbe::SatPhyRxCarrierPacketProbe | ( | ) |
Default constructor.
Definition at line 71 of file satellite-phy-rx-carrier-packet-probe.cc.
|
virtual |
Destructor for SatPhyRxCarrierPacketProbe.
Definition at line 76 of file satellite-phy-rx-carrier-packet-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 106 of file satellite-phy-rx-carrier-packet-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 117 of file satellite-phy-rx-carrier-packet-probe.cc.
References TraceSink().
Here is the call graph for this function:
|
static |
Get the type ID.
Definition at line 48 of file satellite-phy-rx-carrier-packet-probe.cc.
References m_output, m_outputBool, and m_outputUinteger.
| void ns3::SatPhyRxCarrierPacketProbe::SetValue | ( | uint32_t | nPackets, |
| const Address & | address, | ||
| bool | statusFlag | ||
| ) |
Set a probe value.
| nPackets | set the traced number of packets in the packet burst equal to this |
| address | set the socket address for the traced packet burst equal to this |
| statusFlag | set the traced packet burst status flag equal to this |
Definition at line 82 of file satellite-phy-rx-carrier-packet-probe.cc.
References m_address, m_nPackets, m_output, m_outputBool, m_outputUinteger, and m_statusFlag.
|
static |
Set a probe value by its name in the Config system.
| path | config path to access the probe |
| nPackets | set the traced number of packets in the packet burst equal to this |
| address | set the socket address for the traced packet burst equal to this |
| statusFlag | set the traced packet burst status flag equal to this |
Definition at line 94 of file satellite-phy-rx-carrier-packet-probe.cc.
|
private |
Method to connect to an underlying ns3::TraceSource with arguments of type double and const Address&.
| nPackets | the traced number of packets in the packet burst |
| address | the socket address for the traced packet burst |
| statusFlag | the traced packet burst status flag |
Definition at line 126 of file satellite-phy-rx-carrier-packet-probe.cc.
References m_address, m_nPackets, m_output, m_outputBool, m_outputUinteger, and m_statusFlag.
Referenced by ConnectByObject(), and ConnectByPath().
Here is the caller graph for this function:
|
private |
The socket address for the traced packet burst.
Definition at line 144 of file satellite-phy-rx-carrier-packet-probe.h.
Referenced by SetValue(), and TraceSink().
|
private |
The traced number of packets in the packet burst.
Definition at line 142 of file satellite-phy-rx-carrier-packet-probe.h.
Referenced by SetValue(), and TraceSink().
|
private |
Output trace, the number of packets, source address, and status flag.
Definition at line 135 of file satellite-phy-rx-carrier-packet-probe.h.
Referenced by GetTypeId(), SetValue(), and TraceSink().
|
private |
Output trace, previous and current status flag.
Definition at line 139 of file satellite-phy-rx-carrier-packet-probe.h.
Referenced by GetTypeId(), SetValue(), and TraceSink().
|
private |
Output trace, previous and current number of packets.
Definition at line 137 of file satellite-phy-rx-carrier-packet-probe.h.
Referenced by GetTypeId(), SetValue(), and TraceSink().
|
private |
The traced packet burst status flag.
Definition at line 146 of file satellite-phy-rx-carrier-packet-probe.h.
Referenced by SetValue(), and TraceSink().