Abstract class defining interface for interference calculations objects. More...
#include "satellite-interference.h"
Classes | |
class | InterferenceChangeEvent |
Event for identifying interference change events (receiving) More... | |
Public Member Functions | |
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) |
Derived from Object. More... | |
Private Member Functions | |
SatInterference (const SatInterference &o) | |
virtual Ptr< SatInterference::InterferenceChangeEvent > | DoAdd (Time rxDuration, double rxPower, Address rxAddress)=0 |
Adds interference power to interference object. More... | |
virtual std::vector< std::pair< double, double > > | DoCalculate (Ptr< SatInterference::InterferenceChangeEvent > event)=0 |
Calculates interference power for the given reference Sets final power at end time to finalPower. More... | |
virtual void | DoNotifyRxEnd (Ptr< SatInterference::InterferenceChangeEvent > event)=0 |
Notifies that RX is ended by a receiver. More... | |
virtual void | DoNotifyRxStart (Ptr< SatInterference::InterferenceChangeEvent > event)=0 |
Notifies that RX is started by a receiver. More... | |
virtual void | DoReset (void)=0 |
Resets current interference. More... | |
SatInterference & | operator= (const SatInterference &o) |
Private Attributes | |
uint32_t | m_currentlyReceiving |
std::map< Ptr< SatInterference::InterferenceChangeEvent >, bool > | m_packetCollisions |
Abstract class defining interface for interference calculations objects.
Definition at line 41 of file satellite-interference.h.
ns3::SatInterference::SatInterference | ( | ) |
Constructor for Satellite interference base class.
Definition at line 119 of file satellite-interference.cc.
ns3::SatInterference::~SatInterference | ( | ) |
Destructor for Satellite interference base class.
Definition at line 124 of file satellite-interference.cc.
|
private |
Ptr< SatInterference::InterferenceChangeEvent > ns3::SatInterference::Add | ( | Time | rxDuration, |
double | rxPower, | ||
Address | rxAddress | ||
) |
Adds interference power to interference object.
Behavior depends on class actually implementing interference.
rxDuration | Duration of the receiving. |
rxPower | Receiving power. |
rxAddress | MAC address. |
Definition at line 129 of file satellite-interference.cc.
References DoAdd().
std::vector< std::pair< double, double > > ns3::SatInterference::Calculate | ( | Ptr< SatInterference::InterferenceChangeEvent > | event | ) |
Calculates interference power for the given reference.
event | Reference event which for interference is calculated. |
Definition at line 137 of file satellite-interference.cc.
References DoCalculate(), m_currentlyReceiving, and m_packetCollisions.
|
privatepure virtual |
Adds interference power to interference object.
rxDuration | Duration of the receiving. |
rxPower | Receiving power. |
rxAddress | MAC address. |
Concrete subclasses of this base class must implement this method.
Implemented in ns3::SatTracedInterference, ns3::SatPerPacketInterference, and ns3::SatConstantInterference.
Referenced by Add().
|
privatepure virtual |
Calculates interference power for the given reference Sets final power at end time to finalPower.
event | Reference event which for interference is calculated. |
Concrete subclasses of this base class must implement this method.
Implemented in ns3::SatTracedInterference, ns3::SatPerPacketInterference, ns3::SatPerFragmentInterference, and ns3::SatConstantInterference.
Referenced by Calculate().
|
privatepure virtual |
Notifies that RX is ended by a receiver.
Concrete subclasses of this base class must implement this method.
event | Interference reference event of receiver |
Implemented in ns3::SatTracedInterference, ns3::SatPerPacketInterference, and ns3::SatConstantInterference.
Referenced by NotifyRxEnd().
|
privatepure virtual |
Notifies that RX is started by a receiver.
Concrete subclasses of this base class must implement this method.
event | Interference reference event of receiver |
Implemented in ns3::SatTracedInterference, ns3::SatPerPacketInterference, and ns3::SatConstantInterference.
Referenced by NotifyRxStart().
|
privatepure virtual |
Resets current interference.
Concrete subclasses of this base class must implement this method.
Implemented in ns3::SatTracedInterference, ns3::SatPerPacketInterference, and ns3::SatConstantInterference.
Referenced by Reset().
TypeId ns3::SatInterference::GetInstanceTypeId | ( | void | ) | const |
Derived from Object.
Definition at line 114 of file satellite-interference.cc.
References GetTypeId().
|
static |
Derived from Object.
Definition at line 106 of file satellite-interference.cc.
Referenced by GetInstanceTypeId().
|
virtual |
Checks whether the packet has collided.
Used by random access
event | Interference reference event of receiver |
Definition at line 208 of file satellite-interference.cc.
References m_packetCollisions.
|
virtual |
Notifies that RX is ended by a receiver.
event | Interference reference event of receiver |
Definition at line 193 of file satellite-interference.cc.
References DoNotifyRxEnd(), m_currentlyReceiving, and m_packetCollisions.
|
virtual |
Notifies that RX is started by a receiver.
event | Interference reference event of receiver |
Definition at line 175 of file satellite-interference.cc.
References DoNotifyRxStart(), m_currentlyReceiving, and m_packetCollisions.
|
private |
void ns3::SatInterference::Reset | ( | void | ) |
Resets current interference.
Definition at line 164 of file satellite-interference.cc.
References DoReset(), m_currentlyReceiving, and m_packetCollisions.
Referenced by ns3::SatConstantInterference::~SatConstantInterference(), ns3::SatPerPacketInterference::~SatPerPacketInterference(), and ns3::SatTracedInterference::~SatTracedInterference().
|
private |
Definition at line 236 of file satellite-interference.h.
Referenced by Calculate(), NotifyRxEnd(), NotifyRxStart(), and Reset().
|
private |
Definition at line 231 of file satellite-interference.h.
Referenced by Calculate(), HasCollision(), NotifyRxEnd(), NotifyRxStart(), and Reset().