ns3::SatPerPacketInterference Class Reference

Packet by packet interference. More...

#include "satellite-per-packet-interference.h"

+ Inheritance diagram for ns3::SatPerPacketInterference:
+ Collaboration diagram for ns3::SatPerPacketInterference:

Public Member Functions

 SatPerPacketInterference ()
 
 SatPerPacketInterference (SatEnums::ChannelType_t channelType, double rxBandwidthHz)
 
 ~SatPerPacketInterference ()
 
void DoDispose ()
 
TypeId GetInstanceTypeId (void) const
 
void SetRxBandwidth (double rxBandwidth)
 
- Public Member Functions inherited from ns3::SatInterference
 SatInterference ()
 Constructor for Satellite interference base class. More...
 
 ~SatInterference ()
 Destructor for Satellite interference base class. More...
 
Ptr< SatInterference::InterferenceChangeEventAdd (Time rxDuration, double rxPower, Address rxAddress)
 Adds interference power to interference object. More...
 
std::vector< std::pair< double, double > > Calculate (Ptr< SatInterference::InterferenceChangeEvent > event)
 Calculates interference power for the given reference. More...
 
TypeId GetInstanceTypeId (void) const
 Derived from Object. More...
 
virtual bool HasCollision (Ptr< SatInterference::InterferenceChangeEvent > event)
 Checks whether the packet has collided. More...
 
virtual void NotifyRxEnd (Ptr< SatInterference::InterferenceChangeEvent > event)
 Notifies that RX is ended by a receiver. More...
 
virtual void NotifyRxStart (Ptr< SatInterference::InterferenceChangeEvent > event)
 Notifies that RX is started by a receiver. More...
 
void Reset (void)
 Resets current interference. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::SatInterference
static TypeId GetTypeId (void)
 Derived from Object. More...
 

Protected Member Functions

virtual std::vector< std::pair< double, double > > DoCalculate (Ptr< SatInterference::InterferenceChangeEvent > event)
 Calculates interference power for the given reference Sets final power at end time to finalPower. More...
 
virtual void onInterferentEvent (long double timeRatio, double interferenceValue, double &ifPowerW)
 Helper function meant for subclasses to override. More...
 
virtual void onOwnStartReached (double ifPowerW)
 Helper function meant for subclasses to override. More...
 

Private Types

typedef std::tuple< uint32_t, long double, bool > InterferenceChange
 
typedef std::multimap< Time, InterferenceChangeInterferenceChanges
 

Private Member Functions

 SatPerPacketInterference (const SatPerPacketInterference &o)
 
virtual Ptr< SatInterference::InterferenceChangeEventDoAdd (Time rxDuration, double rxPower, Address rxAddress)
 Adds interference power to interference object. More...
 
virtual void DoNotifyRxEnd (Ptr< SatInterference::InterferenceChangeEvent > event)
 Notifies that RX is ended by a receiver. More...
 
virtual void DoNotifyRxStart (Ptr< SatInterference::InterferenceChangeEvent > event)
 Notifies that RX is started by a receiver. More...
 
virtual void DoReset (void)
 Resets current interference. More...
 
SatPerPacketInterferenceoperator= (const SatPerPacketInterference &o)
 

Private Attributes

SatEnums::ChannelType_t m_channelType
 
bool m_enableTraceOutput
 
InterferenceChanges m_interferenceChanges
 interference change list More...
 
uint32_t m_nextEventId
 event id for Events More...
 
long double m_residualPowerW
 Residual power value for interference. More...
 
double m_rxBandwidth_Hz
 RX Bandwidth in Hz. More...
 
std::set< uint32_t > m_rxEventIds
 notified interference event IDs More...
 
bool m_rxing
 flag to indicate that at least one receiving is on More...
 

Detailed Description

Packet by packet interference.

Interference is calculated separately for each packet by listening to all transmissions within the same SatChannel.

Definition at line 42 of file satellite-per-packet-interference.h.

Member Typedef Documentation

◆ InterferenceChange

typedef std::tuple<uint32_t, long double, bool> ns3::SatPerPacketInterference::InterferenceChange
private

Definition at line 160 of file satellite-per-packet-interference.h.

◆ InterferenceChanges

Constructor & Destructor Documentation

◆ SatPerPacketInterference() [1/3]

ns3::SatPerPacketInterference::SatPerPacketInterference ( )

Definition at line 56 of file satellite-per-packet-interference.cc.

◆ SatPerPacketInterference() [2/3]

ns3::SatPerPacketInterference::SatPerPacketInterference ( SatEnums::ChannelType_t  channelType,
double  rxBandwidthHz 
)
Parameters
channelType
rxBandwidthHzReceiver bandwidth in Hertz

Definition at line 67 of file satellite-per-packet-interference.cc.

References m_rxBandwidth_Hz.

◆ ~SatPerPacketInterference()

ns3::SatPerPacketInterference::~SatPerPacketInterference ( )

Definition at line 84 of file satellite-per-packet-interference.cc.

References ns3::SatInterference::Reset().

+ Here is the call graph for this function:

◆ SatPerPacketInterference() [3/3]

ns3::SatPerPacketInterference::SatPerPacketInterference ( const SatPerPacketInterference o)
private
Parameters
o

Member Function Documentation

◆ DoAdd()

Ptr< SatInterference::InterferenceChangeEvent > ns3::SatPerPacketInterference::DoAdd ( Time  rxDuration,
double  rxPower,
Address  rxAddress 
)
privatevirtual

Adds interference power to interference object.

Parameters
rxDurationDuration of the receiving.
rxPowerReceiving power.
Returns
the pointer to interference event as a reference of the addition

Implements ns3::SatInterference.

Definition at line 92 of file satellite-per-packet-interference.cc.

References m_interferenceChanges, m_nextEventId, m_residualPowerW, and m_rxing.

◆ DoCalculate()

std::vector< std::pair< double, double > > ns3::SatPerPacketInterference::DoCalculate ( Ptr< SatInterference::InterferenceChangeEvent event)
protectedvirtual

Calculates interference power for the given reference Sets final power at end time to finalPower.

Parameters
eventReference event which for interference is calculated.
Returns
Final calculated power value at end of receiving

Implements ns3::SatInterference.

Reimplemented in ns3::SatPerFragmentInterference.

Definition at line 157 of file satellite-per-packet-interference.cc.

References m_channelType, m_enableTraceOutput, m_interferenceChanges, m_residualPowerW, m_rxBandwidth_Hz, m_rxing, onInterferentEvent(), and onOwnStartReached().

Referenced by ns3::SatPerFragmentInterference::DoCalculate().

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

◆ DoDispose()

void ns3::SatPerPacketInterference::DoDispose ( void  )

Definition at line 289 of file satellite-per-packet-interference.cc.

◆ DoNotifyRxEnd()

void ns3::SatPerPacketInterference::DoNotifyRxEnd ( Ptr< SatInterference::InterferenceChangeEvent event)
privatevirtual

Notifies that RX is ended by a receiver.

Parameters
eventInterference reference event of receiver

Implements ns3::SatInterference.

Definition at line 276 of file satellite-per-packet-interference.cc.

References m_rxEventIds, and m_rxing.

◆ DoNotifyRxStart()

void ns3::SatPerPacketInterference::DoNotifyRxStart ( Ptr< SatInterference::InterferenceChangeEvent event)
privatevirtual

Notifies that RX is started by a receiver.

Parameters
eventInterference reference event of receiver

Implements ns3::SatInterference.

Definition at line 265 of file satellite-per-packet-interference.cc.

References m_rxEventIds, and m_rxing.

◆ DoReset()

void ns3::SatPerPacketInterference::DoReset ( void  )
privatevirtual

Resets current interference.

Implements ns3::SatInterference.

Definition at line 255 of file satellite-per-packet-interference.cc.

References m_interferenceChanges, m_residualPowerW, and m_rxing.

◆ GetInstanceTypeId()

TypeId ns3::SatPerPacketInterference::GetInstanceTypeId ( void  ) const
Returns

Definition at line 49 of file satellite-per-packet-interference.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::SatPerPacketInterference::GetTypeId ( void  )
static
Returns

Definition at line 39 of file satellite-per-packet-interference.cc.

Referenced by GetInstanceTypeId().

+ Here is the caller graph for this function:

◆ onInterferentEvent()

void ns3::SatPerPacketInterference::onInterferentEvent ( long double  timeRatio,
double  interferenceValue,
double &  ifPowerW 
)
protectedvirtual

Helper function meant for subclasses to override.

Called during DoCalculate after the start of the event whose interferences are being calculated has been reached.

Update the current interference power by adding the power of the event being processed proportional to the remaining time until the end of the event whose interferences are being calculated.

Parameters
timeRatioratio of time compared to an event duration of the distance between the event being processed and the end of the event whose interferences are being calculated.
interferenceValuethe interference value of the event being processed.
ifPowerWthe current value of the interference for the event whose interferences are being calculated; which will be updated.

Reimplemented in ns3::SatPerFragmentInterference.

Definition at line 247 of file satellite-per-packet-interference.cc.

Referenced by DoCalculate().

+ Here is the caller graph for this function:

◆ onOwnStartReached()

void ns3::SatPerPacketInterference::onOwnStartReached ( double  ifPowerW)
protectedvirtual

Helper function meant for subclasses to override.

Called during DoCalculate when the start of the event whose interferences are being calculated has been reached.

Reimplemented in ns3::SatPerFragmentInterference.

Definition at line 241 of file satellite-per-packet-interference.cc.

Referenced by DoCalculate().

+ Here is the caller graph for this function:

◆ operator=()

SatPerPacketInterference& ns3::SatPerPacketInterference::operator= ( const SatPerPacketInterference o)
private
Parameters
o
Returns

◆ SetRxBandwidth()

void ns3::SatPerPacketInterference::SetRxBandwidth ( double  rxBandwidth)
Parameters
rxBandwidth

Definition at line 297 of file satellite-per-packet-interference.cc.

References m_rxBandwidth_Hz.

Member Data Documentation

◆ m_channelType

SatEnums::ChannelType_t ns3::SatPerPacketInterference::m_channelType
private

Definition at line 214 of file satellite-per-packet-interference.h.

Referenced by DoCalculate().

◆ m_enableTraceOutput

bool ns3::SatPerPacketInterference::m_enableTraceOutput
private

Definition at line 209 of file satellite-per-packet-interference.h.

Referenced by DoCalculate().

◆ m_interferenceChanges

InterferenceChanges ns3::SatPerPacketInterference::m_interferenceChanges
private

interference change list

Definition at line 183 of file satellite-per-packet-interference.h.

Referenced by DoAdd(), DoCalculate(), and DoReset().

◆ m_nextEventId

uint32_t ns3::SatPerPacketInterference::m_nextEventId
private

event id for Events

Definition at line 204 of file satellite-per-packet-interference.h.

Referenced by DoAdd().

◆ m_residualPowerW

long double ns3::SatPerPacketInterference::m_residualPowerW
private

Residual power value for interference.

Sum of negative values in list m_changes, which positive value is not in list.

Definition at line 194 of file satellite-per-packet-interference.h.

Referenced by DoAdd(), DoCalculate(), and DoReset().

◆ m_rxBandwidth_Hz

double ns3::SatPerPacketInterference::m_rxBandwidth_Hz
private

RX Bandwidth in Hz.

Definition at line 219 of file satellite-per-packet-interference.h.

Referenced by SatPerPacketInterference(), DoCalculate(), and SetRxBandwidth().

◆ m_rxEventIds

std::set<uint32_t> ns3::SatPerPacketInterference::m_rxEventIds
private

notified interference event IDs

Definition at line 188 of file satellite-per-packet-interference.h.

Referenced by DoNotifyRxEnd(), and DoNotifyRxStart().

◆ m_rxing

bool ns3::SatPerPacketInterference::m_rxing
private

flag to indicate that at least one receiving is on

Definition at line 199 of file satellite-per-packet-interference.h.

Referenced by DoAdd(), DoCalculate(), DoNotifyRxEnd(), DoNotifyRxStart(), and DoReset().


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