DESERT 3.5.1
Loading...
Searching...
No Matches
uwinterferenceofdm Class Reference

#include <uwinterferenceofdm.h>

Inheritance diagram for uwinterferenceofdm:
Collaboration diagram for uwinterferenceofdm:

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
 

Detailed Description

Definition at line 97 of file uwinterferenceofdm.h.

Constructor & Destructor Documentation

◆ uwinterferenceofdm()

uwinterferenceofdm::uwinterferenceofdm ( )

Constructor of the class uwinterference.

Definition at line 71 of file uwinterferenceofdm.cpp.

◆ ~uwinterferenceofdm()

uwinterferenceofdm::~uwinterferenceofdm ( )
virtual

Destructor of the class uwinterference.

Definition at line 78 of file uwinterferenceofdm.cpp.

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

Definition at line 147 of file uwinterferenceofdm.cpp.

◆ 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.

Definition at line 104 of file uwinterferenceofdm.cpp.

◆ 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.

Definition at line 82 of file uwinterferenceofdm.cpp.

◆ 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.

Definition at line 466 of file uwinterferenceofdm.cpp.

◆ 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.

Definition at line 452 of file uwinterferenceofdm.cpp.

◆ getCurrentTotalPower()

double uwinterferenceofdm::getCurrentTotalPower ( )
virtual

Reimplemented from uwinterference.

Definition at line 398 of file uwinterferenceofdm.cpp.

◆ getCurrentTotalPowerOnCarrier()

double uwinterferenceofdm::getCurrentTotalPowerOnCarrier ( int  carrier)
virtual

Compute the total power on a carrier.

Parameters
carrierCarrier targeted
Returns
the total power on a carrier

Definition at line 407 of file uwinterferenceofdm.cpp.

◆ getEndRxTime()

double uwinterferenceofdm::getEndRxTime ( )
inline

Get the timestamp of the end of reception phase.

Returns
timestamp of the start of reception phase

Definition at line 223 of file uwinterferenceofdm.h.

◆ 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

Definition at line 234 of file uwinterferenceofdm.h.

◆ getInterfCarriers()

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

Definition at line 197 of file uwinterferenceofdm.h.

◆ 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

Definition at line 316 of file uwinterferenceofdm.cpp.

◆ 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.

Definition at line 306 of file uwinterferenceofdm.cpp.

◆ getStartRxTime()

double uwinterferenceofdm::getStartRxTime ( )
inline

Get the timestamp of the start of reception phase.

Returns
timestamp of the start of reception phase

Definition at line 214 of file uwinterferenceofdm.h.

◆ 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.

Definition at line 424 of file uwinterferenceofdm.cpp.

◆ 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.

Definition at line 416 of file uwinterferenceofdm.cpp.

◆ 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)

Definition at line 224 of file uwinterferenceofdm.cpp.

◆ setInterfCarriers()

void uwinterferenceofdm::setInterfCarriers ( int  sc)
inline

Sets number of carriers used by the node.

Parameters
scnumber of carriers

Definition at line 204 of file uwinterferenceofdm.h.

Member Data Documentation

◆ end_timerOFDM

EndInterfTimerOFDM uwinterferenceofdm::end_timerOFDM
protected

Timer for schedules end of interference for a transmission.

Definition at line 242 of file uwinterferenceofdm.h.

◆ inodeID

int uwinterferenceofdm::inodeID
protected

Definition at line 243 of file uwinterferenceofdm.h.

◆ interfSubCarriers_

int uwinterferenceofdm::interfSubCarriers_

Definition at line 100 of file uwinterferenceofdm.h.

◆ power_list

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

List with power and counters.

Definition at line 241 of file uwinterferenceofdm.h.


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