Packet by packet interference. More...
#include "satellite-per-packet-interference.h"
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::InterferenceChangeEvent > | Add (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, InterferenceChange > | InterferenceChanges |
Private Member Functions | |
SatPerPacketInterference (const SatPerPacketInterference &o) | |
virtual Ptr< SatInterference::InterferenceChangeEvent > | DoAdd (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... | |
SatPerPacketInterference & | operator= (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... | |
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.
|
private |
Definition at line 160 of file satellite-per-packet-interference.h.
|
private |
Definition at line 165 of file satellite-per-packet-interference.h.
ns3::SatPerPacketInterference::SatPerPacketInterference | ( | ) |
Definition at line 56 of file satellite-per-packet-interference.cc.
ns3::SatPerPacketInterference::SatPerPacketInterference | ( | SatEnums::ChannelType_t | channelType, |
double | rxBandwidthHz | ||
) |
channelType | |
rxBandwidthHz | Receiver bandwidth in Hertz |
Definition at line 67 of file satellite-per-packet-interference.cc.
References m_rxBandwidth_Hz.
ns3::SatPerPacketInterference::~SatPerPacketInterference | ( | ) |
Definition at line 84 of file satellite-per-packet-interference.cc.
References ns3::SatInterference::Reset().
|
private |
o |
|
privatevirtual |
Adds interference power to interference object.
rxDuration | Duration of the receiving. |
rxPower | Receiving power. |
Implements ns3::SatInterference.
Definition at line 92 of file satellite-per-packet-interference.cc.
References m_interferenceChanges, m_nextEventId, m_residualPowerW, and m_rxing.
|
protectedvirtual |
Calculates interference power for the given reference Sets final power at end time to finalPower.
event | Reference event which for interference is calculated. |
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().
void ns3::SatPerPacketInterference::DoDispose | ( | void | ) |
Definition at line 289 of file satellite-per-packet-interference.cc.
|
privatevirtual |
Notifies that RX is ended by a receiver.
event | Interference reference event of receiver |
Implements ns3::SatInterference.
Definition at line 276 of file satellite-per-packet-interference.cc.
References m_rxEventIds, and m_rxing.
|
privatevirtual |
Notifies that RX is started by a receiver.
event | Interference reference event of receiver |
Implements ns3::SatInterference.
Definition at line 265 of file satellite-per-packet-interference.cc.
References m_rxEventIds, and m_rxing.
|
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.
TypeId ns3::SatPerPacketInterference::GetInstanceTypeId | ( | void | ) | const |
Definition at line 49 of file satellite-per-packet-interference.cc.
References GetTypeId().
|
static |
Definition at line 39 of file satellite-per-packet-interference.cc.
Referenced by GetInstanceTypeId().
|
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.
timeRatio | ratio 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. |
interferenceValue | the interference value of the event being processed. |
ifPowerW | the 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().
|
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().
|
private |
o |
void ns3::SatPerPacketInterference::SetRxBandwidth | ( | double | rxBandwidth | ) |
rxBandwidth |
Definition at line 297 of file satellite-per-packet-interference.cc.
References m_rxBandwidth_Hz.
|
private |
Definition at line 214 of file satellite-per-packet-interference.h.
Referenced by DoCalculate().
|
private |
Definition at line 209 of file satellite-per-packet-interference.h.
Referenced by DoCalculate().
|
private |
interference change list
Definition at line 183 of file satellite-per-packet-interference.h.
Referenced by DoAdd(), DoCalculate(), and DoReset().
|
private |
event id for Events
Definition at line 204 of file satellite-per-packet-interference.h.
Referenced by DoAdd().
|
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().
|
private |
RX Bandwidth in Hz.
Definition at line 219 of file satellite-per-packet-interference.h.
Referenced by SatPerPacketInterference(), DoCalculate(), and SetRxBandwidth().
|
private |
notified interference event IDs
Definition at line 188 of file satellite-per-packet-interference.h.
Referenced by DoNotifyRxEnd(), and DoNotifyRxStart().
|
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().