DESERT 4.0.0
uwinterference Class Reference

#include <uwinterference.h>

Inheritance diagram for uwinterference:
Inheritance graph
Collaboration diagram for uwinterference:
Collaboration graph

Public Member Functions

 uwinterference ()
 
virtual ~uwinterference ()
 
virtual void addToInterference (Packet *p)
 
virtual void addToInterference (double pw, PKT_TYPE tp)
 
virtual void removeFromInterference (double pw, PKT_TYPE tp)
 
virtual double getInterferencePower (Packet *p)
 
virtual double getInterferencePower (double power, double starttime, double duration)
 
virtual double getCurrentTotalPower ()
 
virtual double getTimeOverlap (Packet *p)
 
virtual double getTimeOverlap (double starttime, double duration)
 
virtual counter getCounters (Packet *p)
 
virtual counter getCounters (double starttime, double duration, PKT_TYPE tp)
 
double getStartRxTime ()
 
double getEndRxTime ()
 
double getInitialInterferenceTime ()
 

Protected Attributes

std::list< ListNodepower_list
 
EndInterfTimer end_timer
 
double use_maxinterval_
 
double initial_interference_time
 
double start_rx_time
 
double end_rx_time
 

Constructor & Destructor Documentation

◆ uwinterference()

uwinterference::uwinterference ( )

Constructor of the class uwinterference

References use_maxinterval_.

◆ ~uwinterference()

uwinterference::~uwinterference ( )
virtual

Destructor of the class uwinterference

Member Function Documentation

◆ addToInterference() [1/2]

void uwinterference::addToInterference ( double  pw,
PKT_TYPE  tp 
)
virtual

Add a packet to the interference calculation

Parameters
pwReceived power of the current packet
typetype of the packet (DATA or CTRL)

References CTRL, power_list, and use_maxinterval_.

◆ addToInterference() [2/2]

void uwinterference::addToInterference ( Packet *  p)
virtual

Add a packet to the interference calculation

Parameters
pPointer to the interferer packet

Reimplemented in uwinterferenceofdm.

References addToInterference(), CTRL, DATA, and end_timer.

Referenced by addToInterference(), UwOFDMPhy::recv(), UnderwaterPhysicaldb::recv(), and UnderwaterPhysical::recv().

Here is the call graph for this function:

◆ getCounters() [1/2]

counter uwinterference::getCounters ( double  starttime,
double  duration,
PKT_TYPE  tp 
)
virtual

Returns the counters of collisions

Parameters
starttimetimestamp of the start of reception phase
durationduration of the reception phase
typetype of the packet (DATA or CTRL)
Returns
counter variable that represent the counters of the interference

Reimplemented in uwinterferenceofdm.

References CTRL, and power_list.

◆ getCounters() [2/2]

counter uwinterference::getCounters ( Packet *  p)
virtual

Returns the counters of collisions

Parameters
pPointer of the packet for which the counters are needed
Returns
counter variable that represent the counters of the interference

Reimplemented in uwinterferenceofdm.

References CTRL, DATA, and getCounters().

Referenced by UwHermesPhy::endRx(), UwOFDMPhy::endRx(), UnderwaterHMMPhysical::endRx(), UnderwaterPhysical::endRx(), and getCounters().

Here is the call graph for this function:

◆ getCurrentTotalPower()

double uwinterference::getCurrentTotalPower ( )
virtual

Reimplemented in uwinterferenceofdm.

References power_list.

◆ getEndRxTime()

double uwinterference::getEndRxTime ( )
inline

Get the timestamp of the end of reception phase

Returns
timestamp of the start of reception phase

References end_rx_time.

◆ getInitialInterferenceTime()

double uwinterference::getInitialInterferenceTime ( )
inline

Get the timestamp of the begin of reception of the first interferer packet

Returns
timestamp of the begin of reception of the first interferer packet

References initial_interference_time.

Referenced by UnderwaterPhysicaldb::endRx().

◆ getInterferencePower() [1/2]

double uwinterference::getInterferencePower ( double  power,
double  starttime,
double  duration 
)
virtual

Compute the average interference power for the given packet

Parameters
pwReceived power of the current packet
starttimetimestamp of the start of reception phase
durationduration of the reception phase
Returns
average interference power

References power_list.

◆ getInterferencePower() [2/2]

double uwinterference::getInterferencePower ( Packet *  p)
virtual

Compute the average interference power for the given packet

Parameters
pPointer to the interferer packet
Returns
average interference power

Reimplemented in uwinterferenceofdm.

References getInterferencePower(), and getTimeOverlap().

Referenced by UwAhoiPhy::endRx(), UwHermesPhy::endRx(), UwOFDMPhy::endRx(), UnderwaterPhysicaldb::endRx(), UnderwaterHMMPhysical::endRx(), UnderwaterPhysical::endRx(), and getInterferencePower().

Here is the call graph for this function:

◆ getStartRxTime()

double uwinterference::getStartRxTime ( )
inline

Get the timestamp of the start of reception phase

Returns
timestamp of the start of reception phase

References start_rx_time.

◆ getTimeOverlap() [1/2]

double uwinterference::getTimeOverlap ( double  starttime,
double  duration 
)
virtual

Returns the percentage of overlap between current packet and interference packets

Parameters
starttimetimestamp of the start of reception phase
durationduration of the reception phase
Returns
percantage of overlap

Reimplemented in uwinterferenceofdm.

References power_list.

◆ getTimeOverlap() [2/2]

double uwinterference::getTimeOverlap ( Packet *  p)
virtual

Returns the percentage of overlap between current packet and interference packets

Parameters
pPointer of the packet for which the overlap is needed
Returns
percantage of overlap

Reimplemented in uwinterferenceofdm.

References getTimeOverlap().

Referenced by getInterferencePower(), and getTimeOverlap().

Here is the call graph for this function:

◆ removeFromInterference()

void uwinterference::removeFromInterference ( double  pw,
PKT_TYPE  tp 
)
virtual

Remove a packet to the interference calculation

Parameters
pwReceived power of the current packet
typetype of the packet (DATA or CTRL)

References CTRL, power_list, and use_maxinterval_.

Referenced by EndInterfTimer::handle().

Member Data Documentation

◆ end_rx_time

double uwinterference::end_rx_time
protected

timetamp of the end of reception phase

Referenced by getEndRxTime(), and uwinterferenceofdm::getEndRxTime().

◆ end_timer

EndInterfTimer uwinterference::end_timer
protected

Timer for schedules end of interference for a transmission

Referenced by addToInterference().

◆ initial_interference_time

double uwinterference::initial_interference_time
protected

timestamp of the begin of reception of the first interferer packet

Referenced by getInitialInterferenceTime(), and uwinterferenceofdm::getInitialInterferenceTime().

◆ power_list

std::list<ListNode> uwinterference::power_list
protected

◆ start_rx_time

double uwinterference::start_rx_time
protected

timestamp of the start of reception phase

Referenced by getStartRxTime(), and uwinterferenceofdm::getStartRxTime().

◆ use_maxinterval_


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