DESERT 4.0.0
uwinterferenceofdm Class Reference

#include <uwinterferenceofdm.h>

Inheritance diagram for uwinterferenceofdm:
Inheritance graph
Collaboration diagram for uwinterferenceofdm:
Collaboration graph

Public Member Functions

virtual int command (int, const char *const *)
 
 uwinterferenceofdm ()
 
virtual ~uwinterferenceofdm ()
 
virtual void addToInterference (Packet *p)
 
virtual void addToInterference (double pw, PKT_TYPE tp, int *carriers, int carNum)
 
virtual void removeFromInterference (double pw, PKT_TYPE tp, const std::vector< double > &carPwr)
 
virtual double getInterferencePower (Packet *p)
 
virtual double getInterferencePower (double power, double starttime, double duration, int *carriers, int ncar)
 
virtual double getCurrentTotalPower ()
 
virtual double getCurrentTotalPowerOnCarrier (int carrier)
 
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)
 
int getInterfCarriers ()
 
void setInterfCarriers (int sc)
 
double getStartRxTime ()
 
double getEndRxTime ()
 
double getInitialInterferenceTime ()
 
- Public Member Functions inherited from uwinterference
 uwinterference ()
 
virtual ~uwinterference ()
 
virtual void addToInterference (double pw, PKT_TYPE tp)
 
virtual void removeFromInterference (double pw, PKT_TYPE tp)
 
virtual double getInterferencePower (double power, double starttime, double duration)
 
double getStartRxTime ()
 
double getEndRxTime ()
 
double getInitialInterferenceTime ()
 

Public Attributes

int interfSubCarriers_
 

Protected Attributes

std::list< ListNodeOFDMpower_list
 
EndInterfTimerOFDM end_timerOFDM
 
int inodeID
 
- Protected Attributes inherited from uwinterference
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

◆ uwinterferenceofdm()

uwinterferenceofdm::uwinterferenceofdm ( )

Constructor of the class uwinterference

References inodeID, and uwinterference::use_maxinterval_.

◆ ~uwinterferenceofdm()

uwinterferenceofdm::~uwinterferenceofdm ( )
virtual

Destructor of the class uwinterference

Member Function Documentation

◆ addToInterference() [1/2]

void uwinterferenceofdm::addToInterference ( double  pw,
PKT_TYPE  tp,
int *  carriers,
int  carNum 
)
virtual

Add a packet to the interference calculation

Parameters
pwReceived power of the current packet
typetype of the packet (DATA or CTRL)
carriersvector of carriers used in that packet
carNumexplicit number of carriers

References CTRL, power_list, and uwinterference::use_maxinterval_.

◆ addToInterference() [2/2]

void uwinterferenceofdm::addToInterference ( Packet *  p)
virtual

Add a packet to the interference calculation

Parameters
pPointer to the interferer packet

Reimplemented from uwinterference.

References addToInterference(), hdr_OFDM::carrierNum, hdr_OFDM::carriers, CTRL, DATA, and end_timerOFDM.

Referenced by addToInterference().

Here is the call graph for this function:

◆ command()

int uwinterferenceofdm::command ( int  argc,
const char *const *  argv 
)
virtual

TCL command interpreter. It implements the following OTcl methods:

Parameters
argcNumber of arguments in argv.
argvArray of strings which are the command parameters (Note that argv[0] is the name of the object).
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched successfully or not.

References command(), getInterfCarriers(), and setInterfCarriers().

Referenced by command().

Here is the call graph for this function:

◆ getCounters() [1/2]

counter uwinterferenceofdm::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 from uwinterference.

References CTRL, and power_list.

◆ getCounters() [2/2]

counter uwinterferenceofdm::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 from uwinterference.

References CTRL, DATA, and getCounters().

Referenced by getCounters().

Here is the call graph for this function:

◆ getCurrentTotalPower()

double uwinterferenceofdm::getCurrentTotalPower ( )
virtual

Reimplemented from uwinterference.

References power_list.

◆ getCurrentTotalPowerOnCarrier()

double uwinterferenceofdm::getCurrentTotalPowerOnCarrier ( int  carrier)
virtual

Compute the total power on a carrier

Parameters
carrierCarrier targeted
Returns
the total power on a carrier

References power_list.

◆ getEndRxTime()

double uwinterferenceofdm::getEndRxTime ( )
inline

Get the timestamp of the end of reception phase

Returns
timestamp of the start of reception phase

References uwinterference::end_rx_time.

◆ getInitialInterferenceTime()

double uwinterferenceofdm::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 uwinterference::initial_interference_time.

◆ getInterfCarriers()

int uwinterferenceofdm::getInterfCarriers ( )
inline
Returns
number of carriers used by the node

References interfSubCarriers_.

Referenced by command().

◆ getInterferencePower() [1/2]

double uwinterferenceofdm::getInterferencePower ( double  power,
double  starttime,
double  duration,
int *  carriers,
int  ncar 
)
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 uwinterferenceofdm::getInterferencePower ( Packet *  p)
virtual

Compute the average interference power for the given packet

Parameters
pPointer to the interferer packet
Returns
average interference power

Reimplemented from uwinterference.

References hdr_OFDM::carrierNum, hdr_OFDM::carriers, and getInterferencePower().

Referenced by getInterferencePower().

Here is the call graph for this function:

◆ getStartRxTime()

double uwinterferenceofdm::getStartRxTime ( )
inline

Get the timestamp of the start of reception phase

Returns
timestamp of the start of reception phase

References uwinterference::start_rx_time.

◆ getTimeOverlap() [1/2]

double uwinterferenceofdm::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 from uwinterference.

References power_list.

◆ getTimeOverlap() [2/2]

double uwinterferenceofdm::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 from uwinterference.

References getTimeOverlap().

Referenced by getTimeOverlap().

Here is the call graph for this function:

◆ removeFromInterference()

void uwinterferenceofdm::removeFromInterference ( double  pw,
PKT_TYPE  tp,
const std::vector< double > &  carPwr 
)
virtual

Remove a packet to the interference calculation

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

References CTRL, inodeID, power_list, and uwinterference::use_maxinterval_.

Referenced by EndInterfTimerOFDM::handle().

◆ setInterfCarriers()

void uwinterferenceofdm::setInterfCarriers ( int  sc)
inline

Sets number of carriers used by the node

Parameters
scnumber of carriers

References interfSubCarriers_.

Referenced by command().

Member Data Documentation

◆ end_timerOFDM

EndInterfTimerOFDM uwinterferenceofdm::end_timerOFDM
protected

Timer for schedules end of interference for a transmission

Referenced by addToInterference().

◆ inodeID

int uwinterferenceofdm::inodeID
protected

◆ interfSubCarriers_

int uwinterferenceofdm::interfSubCarriers_

◆ power_list

std::list<ListNodeOFDM> uwinterferenceofdm::power_list
protected

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