ns3::SatStatsPacketErrorHelper Class Reference

Base class for packet error statistics helpers. More...

#include "satellite-stats-packet-error-helper.h"

+ Inheritance diagram for ns3::SatStatsPacketErrorHelper:
+ Collaboration diagram for ns3::SatStatsPacketErrorHelper:

Public Member Functions

 SatStatsPacketErrorHelper (Ptr< const SatHelper > satHelper)
 
virtual ~SatStatsPacketErrorHelper ()
 / Destructor. More...
 
bool ConnectProbeToCollector (Ptr< Probe > probe, uint32_t identifier)
 Connect the probe to the right collector. More...
 
bool DisconnectProbeFromCollector (Ptr< Probe > probe, uint32_t identifier)
 Disconnect the probe from the right collector. More...
 
void ErrorRxCallback (uint32_t nPackets, const Address &fromOrTo, bool isError)
 Receive inputs from trace sources and determine the right collector to forward the inputs to. More...
 
SatEnums::ChannelType_t GetChannelType () const
 
std::string GetTraceSourceName () const
 
SatPhyRxCarrier::CarrierType GetValidCarrierType () const
 Get the valid carrier type. More...
 
void SetChannelType (SatEnums::ChannelType_t channelType)
 
void SetTraceSourceName (std::string traceSourceName)
 
virtual void UpdateIdentifierOnProbes ()
 Change identifier used on probes, when handovers occur. More...
 
- Public Member Functions inherited from ns3::SatStatsHelper
 SatStatsHelper (Ptr< const SatHelper > satHelper)
 Creates a new helper instance. More...
 
virtual ~SatStatsHelper ()
 / Destructor. More...
 
IdentifierType_t GetIdentifierType () const
 
std::string GetName () const
 
OutputType_t GetOutputType () const
 
Ptr< const SatHelperGetSatHelper () const
 
void Install ()
 Install the probes, collectors, and aggregators necessary to produce the statistics output. More...
 
bool IsInstalled () const
 
void SetIdentifierType (IdentifierType_t identifierType)
 
void SetName (std::string name)
 
void SetOutputType (OutputType_t outputType)
 
virtual void UpdateAddressAndIdentifier (Ptr< Node > utNode)
 Update the address and the proper identifier from the given UT node. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 inherited from ObjectBase base class More...
 
- Static Public Member Functions inherited from ns3::SatStatsHelper
static std::string GetIdentifierTypeName (IdentifierType_t identifierType)
 
static std::string GetOutputTypeName (OutputType_t outputType)
 
static TypeId GetTypeId ()
 inherited from ObjectBase base class More...
 

Protected Member Functions

void DoInstall ()
 Install the probes, collectors, and aggregators necessary to produce the statistics output. More...
 
void SetValidCarrierType (SatPhyRxCarrier::CarrierType carrierType)
 Set valid carrier type for this statistics helper type. More...
 
- Protected Member Functions inherited from ns3::SatStatsHelper
Ptr< DataCollectionObject > CreateAggregator (std::string aggregatorTypeId, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue())
 Create the aggregator according to the output type. More...
 
uint32_t CreateCollectorPerIdentifier (CollectorMap &collectorMap) const
 Create one collector instance for each identifier in the simulation. More...
 
virtual std::string GetDistributionHeading (std::string dataLabel) const
 
uint32_t GetGwId (Ptr< Node > gwNode) const
 
uint32_t GetIdentifierForBeam (uint32_t satId, uint32_t beamId) const
 
uint32_t GetIdentifierForGroup (uint32_t groupId) const
 
uint32_t GetIdentifierForGw (Ptr< Node > gwNode) const
 
uint32_t GetIdentifierForIsl (Ptr< Node > satNodeSrc, Ptr< Node > satNodeDst) const
 
uint32_t GetIdentifierForSat (Ptr< Node > satNode) const
 
uint32_t GetIdentifierForUt (Ptr< Node > utNode) const
 
uint32_t GetIdentifierForUtUser (Ptr< Node > utUserNode) const
 
virtual std::string GetIdentifierHeading (std::string dataLabel) const
 
virtual std::string GetOutputFileName () const
 Compute the path and file name where statistics output should be written to. More...
 
virtual std::string GetOutputPath () const
 
uint32_t GetSatId (Ptr< Node > satNode) const
 
virtual std::string GetTimeHeading (std::string dataLabel) const
 
uint32_t GetUtId (Ptr< Node > utNode) const
 
uint32_t GetUtUserId (Ptr< Node > utUserNode) const
 
virtual void SaveAddressAndIdentifier (Ptr< Node > utNode)
 Save the address and the proper identifier from the given UT node. More...
 

Private Member Functions

void InstallProbeOnGw (Ptr< Node > gwNode)
 Set up several listeners on a GW node and connect them to the collectors. More...
 
void InstallProbeOnSatFeeder (Ptr< Node > satNode)
 Set up several listeners on a SAT feeder node and connect them to the collectors. More...
 
void InstallProbeOnSatUser (Ptr< Node > satNode)
 Set up several listeners on a SAT user node and connect them to the collectors. More...
 
void InstallProbeOnUt (Ptr< Node > utNode)
 Set up several probes on a UT node and connect them to the collectors. More...
 

Private Attributes

Ptr< DataCollectionObject > m_aggregator
 The aggregator created by this helper. More...
 
SatPhyRxCarrier::CarrierType m_carrierType
 Valid carrier type. More...
 
SatEnums::ChannelType_t m_channelType
 Link where statistics are gathered from. More...
 
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
 Maintains a list of probes created by this helper (for forward link). More...
 
CollectorMap m_terminalCollectors
 Maintains a list of collectors created by this helper. More...
 
std::string m_traceSourceName
 Name of trace source of PHY RX carrier to listen to. More...
 

Additional Inherited Members

- Public Types inherited from ns3::SatStatsHelper
enum  IdentifierType_t {
  IDENTIFIER_GLOBAL = 0 , IDENTIFIER_GW , IDENTIFIER_BEAM , IDENTIFIER_UT ,
  IDENTIFIER_UT_USER , IDENTIFIER_SLICE , IDENTIFIER_GROUP , IDENTIFIER_SAT ,
  IDENTIFIER_ISL
}
 Possible categorization of statistics output. More...
 
enum  OutputType_t {
  OUTPUT_NONE = 0 , OUTPUT_SCALAR_FILE , OUTPUT_SCATTER_FILE , OUTPUT_HISTOGRAM_FILE ,
  OUTPUT_PDF_FILE , OUTPUT_CDF_FILE , OUTPUT_SCALAR_PLOT , OUTPUT_SCATTER_PLOT ,
  OUTPUT_HISTOGRAM_PLOT , OUTPUT_PDF_PLOT , OUTPUT_CDF_PLOT
}
 Possible types and formats of statistics output. More...
 
- Static Protected Member Functions inherited from ns3::SatStatsHelper
static NetDeviceContainer GetGwSatNetDevice (Ptr< Node > gwNode)
 
static Ptr< NetDevice > GetSatSatOrbiterNetDevice (Ptr< Node > satNode)
 
static Ptr< NetDevice > GetUtSatNetDevice (Ptr< Node > utNode)
 
- Protected Attributes inherited from ns3::SatStatsHelper
std::map< const Address, uint32_t > m_identifierMap
 Map of address and the identifier associated with it. More...
 

Detailed Description

Base class for packet error statistics helpers.

Definition at line 51 of file satellite-stats-packet-error-helper.h.

Constructor & Destructor Documentation

◆ SatStatsPacketErrorHelper()

ns3::SatStatsPacketErrorHelper::SatStatsPacketErrorHelper ( Ptr< const SatHelper satHelper)

Definition at line 63 of file satellite-stats-packet-error-helper.cc.

◆ ~SatStatsPacketErrorHelper()

ns3::SatStatsPacketErrorHelper::~SatStatsPacketErrorHelper ( )
virtual

/ Destructor.

Definition at line 71 of file satellite-stats-packet-error-helper.cc.

Member Function Documentation

◆ ConnectProbeToCollector()

bool ns3::SatStatsPacketErrorHelper::ConnectProbeToCollector ( Ptr< Probe >  probe,
uint32_t  identifier 
)

Connect the probe to the right collector.

Parameters
probe
identifier

Definition at line 404 of file satellite-stats-packet-error-helper.cc.

References ns3::SatStatsHelper::GetOutputType(), ns3::SatStatsHelper::GetOutputTypeName(), m_terminalCollectors, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, ns3::SatStatsHelper::OUTPUT_SCALAR_PLOT, ns3::SatStatsHelper::OUTPUT_SCATTER_FILE, and ns3::SatStatsHelper::OUTPUT_SCATTER_PLOT.

Referenced by InstallProbeOnUt(), and UpdateIdentifierOnProbes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DisconnectProbeFromCollector()

bool ns3::SatStatsPacketErrorHelper::DisconnectProbeFromCollector ( Ptr< Probe >  probe,
uint32_t  identifier 
)

Disconnect the probe from the right collector.

Parameters
probe
identifier

Definition at line 450 of file satellite-stats-packet-error-helper.cc.

References ns3::SatStatsHelper::GetOutputType(), ns3::SatStatsHelper::GetOutputTypeName(), m_terminalCollectors, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, ns3::SatStatsHelper::OUTPUT_SCALAR_PLOT, ns3::SatStatsHelper::OUTPUT_SCATTER_FILE, and ns3::SatStatsHelper::OUTPUT_SCATTER_PLOT.

Referenced by UpdateIdentifierOnProbes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoInstall()

void ns3::SatStatsPacketErrorHelper::DoInstall ( )
protectedvirtual

Install the probes, collectors, and aggregators necessary to produce the statistics output.

An abstract method of SatStatsHelper which must be implemented by child classes. It will be invoked by Install().

Todo:
Add support for boxes in Gnuplot.

Implements ns3::SatStatsHelper.

Definition at line 110 of file satellite-stats-packet-error-helper.cc.

References ns3::SatStatsHelper::CreateAggregator(), ns3::SatStatsHelper::CreateCollectorPerIdentifier(), ns3::SatEnums::FORWARD_FEEDER_CH, ns3::SatEnums::FORWARD_USER_CH, ns3::SatStatsHelper::GetIdentifierHeading(), ns3::SatStatsHelper::GetName(), ns3::SatStatsHelper::GetOutputFileName(), ns3::SatStatsHelper::GetOutputPath(), ns3::SatStatsHelper::GetOutputType(), ns3::SatStatsHelper::GetOutputTypeName(), ns3::SatStatsHelper::GetTimeHeading(), InstallProbeOnGw(), InstallProbeOnSatFeeder(), InstallProbeOnSatUser(), InstallProbeOnUt(), m_aggregator, m_channelType, m_terminalCollectors, ns3::SatStatsHelper::OUTPUT_CDF_FILE, ns3::SatStatsHelper::OUTPUT_CDF_PLOT, ns3::SatStatsHelper::OUTPUT_HISTOGRAM_FILE, ns3::SatStatsHelper::OUTPUT_HISTOGRAM_PLOT, ns3::SatStatsHelper::OUTPUT_NONE, ns3::SatStatsHelper::OUTPUT_PDF_FILE, ns3::SatStatsHelper::OUTPUT_PDF_PLOT, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, ns3::SatStatsHelper::OUTPUT_SCALAR_PLOT, ns3::SatStatsHelper::OUTPUT_SCATTER_FILE, ns3::SatStatsHelper::OUTPUT_SCATTER_PLOT, ns3::SatEnums::RETURN_FEEDER_CH, ns3::SatEnums::RETURN_USER_CH, and ns3::SatStatsHelper::SaveAddressAndIdentifier().

+ Here is the call graph for this function:

◆ ErrorRxCallback()

void ns3::SatStatsPacketErrorHelper::ErrorRxCallback ( uint32_t  nPackets,
const Address &  fromOrTo,
bool  isError 
)

Receive inputs from trace sources and determine the right collector to forward the inputs to.

Parameters
nPacketsnumber of packets in the received packet burst.
fromOrTothe source or destination address of the packet.
isErrorwhether a PHY error has occurred.

Used only in return link.

Definition at line 309 of file satellite-stats-packet-error-helper.cc.

References ns3::SatStatsHelper::GetOutputType(), ns3::SatStatsHelper::GetOutputTypeName(), ns3::SatStatsHelper::m_identifierMap, m_terminalCollectors, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, ns3::SatStatsHelper::OUTPUT_SCALAR_PLOT, ns3::SatStatsHelper::OUTPUT_SCATTER_FILE, and ns3::SatStatsHelper::OUTPUT_SCATTER_PLOT.

Referenced by InstallProbeOnGw(), InstallProbeOnSatFeeder(), and InstallProbeOnSatUser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetChannelType()

SatEnums::ChannelType_t ns3::SatStatsPacketErrorHelper::GetChannelType ( ) const
Returns
link where statistics are gathered from.

Definition at line 104 of file satellite-stats-packet-error-helper.cc.

References m_channelType.

◆ GetTraceSourceName()

std::string ns3::SatStatsPacketErrorHelper::GetTraceSourceName ( ) const
Returns
name of trace source of PHY RX carrier to listen to.

Definition at line 91 of file satellite-stats-packet-error-helper.cc.

References m_traceSourceName.

Referenced by InstallProbeOnGw(), InstallProbeOnSatFeeder(), InstallProbeOnSatUser(), and InstallProbeOnUt().

+ Here is the caller graph for this function:

◆ GetTypeId()

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

inherited from ObjectBase base class

Definition at line 77 of file satellite-stats-packet-error-helper.cc.

◆ GetValidCarrierType()

SatPhyRxCarrier::CarrierType ns3::SatStatsPacketErrorHelper::GetValidCarrierType ( ) const
inline

Get the valid carrier type.

Returns
the valid carrier type

Definition at line 121 of file satellite-stats-packet-error-helper.h.

References m_carrierType.

Referenced by InstallProbeOnGw(), InstallProbeOnSatFeeder(), InstallProbeOnSatUser(), and InstallProbeOnUt().

+ Here is the caller graph for this function:

◆ InstallProbeOnGw()

void ns3::SatStatsPacketErrorHelper::InstallProbeOnGw ( Ptr< Node >  gwNode)
private

Set up several listeners on a GW node and connect them to the collectors.

Parameters
gwNode

Definition at line 525 of file satellite-stats-packet-error-helper.cc.

References ErrorRxCallback(), ns3::SatStatsHelper::GetGwSatNetDevice(), GetTraceSourceName(), and GetValidCarrierType().

Referenced by DoInstall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InstallProbeOnSatFeeder()

void ns3::SatStatsPacketErrorHelper::InstallProbeOnSatFeeder ( Ptr< Node >  satNode)
private

Set up several listeners on a SAT feeder node and connect them to the collectors.

Parameters
satNode

Definition at line 578 of file satellite-stats-packet-error-helper.cc.

References ErrorRxCallback(), ns3::SatStatsHelper::GetSatSatOrbiterNetDevice(), GetTraceSourceName(), and GetValidCarrierType().

Referenced by DoInstall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InstallProbeOnSatUser()

void ns3::SatStatsPacketErrorHelper::InstallProbeOnSatUser ( Ptr< Node >  satNode)
private

Set up several listeners on a SAT user node and connect them to the collectors.

Parameters
satNode

Definition at line 636 of file satellite-stats-packet-error-helper.cc.

References ErrorRxCallback(), ns3::SatStatsHelper::GetSatSatOrbiterNetDevice(), GetTraceSourceName(), and GetValidCarrierType().

Referenced by DoInstall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InstallProbeOnUt()

void ns3::SatStatsPacketErrorHelper::InstallProbeOnUt ( Ptr< Node >  utNode)
private

Set up several probes on a UT node and connect them to the collectors.

Parameters
utNode

Definition at line 694 of file satellite-stats-packet-error-helper.cc.

References ConnectProbeToCollector(), ns3::SatStatsHelper::GetIdentifierForUt(), GetTraceSourceName(), ns3::SatStatsHelper::GetUtId(), ns3::SatStatsHelper::GetUtSatNetDevice(), GetValidCarrierType(), and m_probes.

Referenced by DoInstall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetChannelType()

◆ SetTraceSourceName()

◆ SetValidCarrierType()

◆ UpdateIdentifierOnProbes()

void ns3::SatStatsPacketErrorHelper::UpdateIdentifierOnProbes ( )
virtual

Change identifier used on probes, when handovers occur.

Reimplemented from ns3::SatStatsHelper.

Definition at line 496 of file satellite-stats-packet-error-helper.cc.

References ConnectProbeToCollector(), DisconnectProbeFromCollector(), ns3::SatStatsHelper::GetIdentifierForUtUser(), and m_probes.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_aggregator

Ptr<DataCollectionObject> ns3::SatStatsPacketErrorHelper::m_aggregator
private

The aggregator created by this helper.

Definition at line 175 of file satellite-stats-packet-error-helper.h.

Referenced by DoInstall().

◆ m_carrierType

SatPhyRxCarrier::CarrierType ns3::SatStatsPacketErrorHelper::m_carrierType
private

Valid carrier type.

Definition at line 184 of file satellite-stats-packet-error-helper.h.

Referenced by GetValidCarrierType(), and SetValidCarrierType().

◆ m_channelType

SatEnums::ChannelType_t ns3::SatStatsPacketErrorHelper::m_channelType
private

Link where statistics are gathered from.

Definition at line 181 of file satellite-stats-packet-error-helper.h.

Referenced by DoInstall(), GetChannelType(), and SetChannelType().

◆ m_probes

std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t> > ns3::SatStatsPacketErrorHelper::m_probes
private

Maintains a list of probes created by this helper (for forward link).

Definition at line 169 of file satellite-stats-packet-error-helper.h.

Referenced by InstallProbeOnUt(), and UpdateIdentifierOnProbes().

◆ m_terminalCollectors

CollectorMap ns3::SatStatsPacketErrorHelper::m_terminalCollectors
private

Maintains a list of collectors created by this helper.

Definition at line 172 of file satellite-stats-packet-error-helper.h.

Referenced by ConnectProbeToCollector(), DisconnectProbeFromCollector(), DoInstall(), and ErrorRxCallback().

◆ m_traceSourceName

std::string ns3::SatStatsPacketErrorHelper::m_traceSourceName
private

Name of trace source of PHY RX carrier to listen to.

Definition at line 178 of file satellite-stats-packet-error-helper.h.

Referenced by GetTraceSourceName(), and SetTraceSourceName().


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