ns3::SatPhyRxCarrierPacketProbe Class Reference

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...
 

Detailed Description

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 51 of file satellite-phy-rx-carrier-packet-probe.h.

Member Typedef Documentation

◆ RxStatusCallback

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.

Parameters
nPacketsnumber of upper layer packets in the received packet burst.
fromthe MAC48 address of the sender of the packets.
statuswhether a PHY error or collision has occurred.

Definition at line 118 of file satellite-phy-rx-carrier-packet-probe.h.

Constructor & Destructor Documentation

◆ SatPhyRxCarrierPacketProbe()

ns3::SatPhyRxCarrierPacketProbe::SatPhyRxCarrierPacketProbe ( )

Default constructor.

Definition at line 68 of file satellite-phy-rx-carrier-packet-probe.cc.

◆ ~SatPhyRxCarrierPacketProbe()

ns3::SatPhyRxCarrierPacketProbe::~SatPhyRxCarrierPacketProbe ( )
virtual

Destructor for SatPhyRxCarrierPacketProbe.

Definition at line 73 of file satellite-phy-rx-carrier-packet-probe.cc.

Member Function Documentation

◆ ConnectByObject()

bool ns3::SatPhyRxCarrierPacketProbe::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 103 of file satellite-phy-rx-carrier-packet-probe.cc.

References TraceSink().

+ Here is the call graph for this function:

◆ ConnectByPath()

void ns3::SatPhyRxCarrierPacketProbe::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 114 of file satellite-phy-rx-carrier-packet-probe.cc.

References TraceSink().

+ Here is the call graph for this function:

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

Definition at line 45 of file satellite-phy-rx-carrier-packet-probe.cc.

References m_output, m_outputBool, and m_outputUinteger.

◆ SetValue()

void ns3::SatPhyRxCarrierPacketProbe::SetValue ( uint32_t  nPackets,
const Address &  address,
bool  statusFlag 
)

Set a probe value.

Parameters
nPacketsset the traced number of packets in the packet burst equal to this
addressset the socket address for the traced packet burst equal to this
statusFlagset the traced packet burst status flag equal to this

Definition at line 79 of file satellite-phy-rx-carrier-packet-probe.cc.

References m_address, m_nPackets, m_output, m_outputBool, m_outputUinteger, and m_statusFlag.

◆ SetValueByPath()

void ns3::SatPhyRxCarrierPacketProbe::SetValueByPath ( std::string  path,
uint32_t  nPackets,
const Address &  address,
bool  statusFlag 
)
static

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

Parameters
pathconfig path to access the probe
nPacketsset the traced number of packets in the packet burst equal to this
addressset the socket address for the traced packet burst equal to this
statusFlagset the traced packet burst status flag equal to this

Definition at line 91 of file satellite-phy-rx-carrier-packet-probe.cc.

◆ TraceSink()

void ns3::SatPhyRxCarrierPacketProbe::TraceSink ( uint32_t  nPackets,
const Address &  address,
bool  statusFlag 
)
private

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

Parameters
nPacketsthe traced number of packets in the packet burst
addressthe socket address for the traced packet burst
statusFlagthe traced packet burst status flag

Definition at line 123 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:

Member Data Documentation

◆ m_address

Address ns3::SatPhyRxCarrierPacketProbe::m_address
private

The socket address for the traced packet burst.

Definition at line 142 of file satellite-phy-rx-carrier-packet-probe.h.

Referenced by SetValue(), and TraceSink().

◆ m_nPackets

uint32_t ns3::SatPhyRxCarrierPacketProbe::m_nPackets
private

The traced number of packets in the packet burst.

Definition at line 140 of file satellite-phy-rx-carrier-packet-probe.h.

Referenced by SetValue(), and TraceSink().

◆ m_output

TracedCallback<uint32_t, const Address&, bool> ns3::SatPhyRxCarrierPacketProbe::m_output
private

Output trace, the number of packets, source address, and status flag.

Definition at line 133 of file satellite-phy-rx-carrier-packet-probe.h.

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

◆ m_outputBool

TracedCallback<bool, bool> ns3::SatPhyRxCarrierPacketProbe::m_outputBool
private

Output trace, previous and current status flag.

Definition at line 137 of file satellite-phy-rx-carrier-packet-probe.h.

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

◆ m_outputUinteger

TracedCallback<uint32_t, uint32_t> ns3::SatPhyRxCarrierPacketProbe::m_outputUinteger
private

Output trace, previous and current number of packets.

Definition at line 135 of file satellite-phy-rx-carrier-packet-probe.h.

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

◆ m_statusFlag

bool ns3::SatPhyRxCarrierPacketProbe::m_statusFlag
private

The traced packet burst status flag.

Definition at line 144 of file satellite-phy-rx-carrier-packet-probe.h.

Referenced by SetValue(), and TraceSink().


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