41#ifndef UW_INTERFERENCEOFDM
42#define UW_INTERFERENCEOFDM
66 ListNodeOFDM(
double t,
double sum_pw,
int ctrl,
int data,
const std::vector<double>& carPwr):
90 virtual void handle(Event *e);
112 virtual int command(
int,
const char *
const *);
155 double power,
double starttime,
double duration,
int* carriers,
int ncar);
EndInterfTimerOFDM(uwinterferenceofdm *ptr)
uwinterferenceofdm * interference
virtual void handle(Event *e)
virtual ~ListNodeOFDM()
Destructor of the class ListNode.
std::vector< double > carrier_power
ListNodeOFDM(double t, double sum_pw, int ctrl, int data, const std::vector< double > &carPwr)
Constructor of the class ListNode when used with multicarrier.
int ctrl_cnt
sum of the rx power in the node at the given time
int data_cnt
control packet counter
double end_rx_time
timetamp of the end of reception phase
double initial_interference_time
timestamp of the begin of reception of the first interferer packet
double start_rx_time
timestamp of the start of reception phase
double getStartRxTime()
Get the timestamp of the start of reception phase.
virtual int command(int, const char *const *)
TCL command interpreter.
std::list< ListNodeOFDM > power_list
List with power and counters.
void setInterfCarriers(int sc)
Sets number of carriers used by the node.
virtual void removeFromInterference(double pw, PKT_TYPE tp, const std::vector< double > &carPwr)
Remove a packet to the interference calculation.
double getInitialInterferenceTime()
Get the timestamp of the begin of reception of the first interferer packet.
uwinterferenceofdm()
Constructor of the class uwinterference.
virtual ~uwinterferenceofdm()
Destructor of the class uwinterference.
virtual double getCurrentTotalPowerOnCarrier(int carrier)
Compute the total power on a carrier.
virtual counter getCounters(Packet *p)
Returns the counters of collisions.
EndInterfTimerOFDM end_timerOFDM
Timer for schedules end of interference for a transmission.
virtual void addToInterference(Packet *p)
Add a packet to the interference calculation.
virtual double getInterferencePower(Packet *p)
Compute the average interference power for the given packet.
double getEndRxTime()
Get the timestamp of the end of reception phase.
virtual double getTimeOverlap(Packet *p)
Returns the percentage of overlap between current packet and interference packets.
virtual double getCurrentTotalPower()
Implementation of uwinterference class.
std::pair< int, int > counter
counter of collisions
Common structures and variables in the protocol.