39#ifndef UW_INTERFERENCE
40#define UW_INTERFERENCE
42#include <interference_miv.h>
82 ListNode(
double t,
double sum_pw,
int ctrl,
int data)
143 virtual void handle(Event *e);
191 double power,
double starttime,
double duration);
virtual ~EndInterfEvent()
Destructor of the class EndInterfEvent.
std::vector< double > carrier_power
EndInterfEvent(double pw, PKT_TYPE tp, const std::vector< double > &carPwr)
Constructor of the class EndInterfEvent for OFDM.
EndInterfEvent(double pw, PKT_TYPE tp)
Constructor of the class EndInterfEvent.
virtual void handle(Event *e)
EndInterfTimer(uwinterference *ptr)
uwinterference * interference
ListNode(double t, double sum_pw, int ctrl, int data)
Constructor of the class ListNode.
virtual ~ListNode()
Destructor of the class ListNode.
int ctrl_cnt
sum of the rx power in the node at the given time
int data_cnt
control packet counter
ListNode()
data packet counter
double end_rx_time
timetamp of the end of reception phase
virtual counter getCounters(Packet *p)
Returns the counters of collisions.
virtual void addToInterference(Packet *p)
Add a packet to the interference calculation.
EndInterfTimer end_timer
Timer for schedules end of interference for a transmission.
double getStartRxTime()
Get the timestamp of the start of reception phase.
double getEndRxTime()
Get the timestamp 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
virtual double getTimeOverlap(Packet *p)
Returns the percentage of overlap between current packet and interference packets.
virtual double getCurrentTotalPower()
double use_maxinterval_
set to 1 to use maxinterval_.
virtual double getInterferencePower(Packet *p)
Compute the average interference power for the given packet.
virtual void removeFromInterference(double pw, PKT_TYPE tp)
Remove a packet to the interference calculation.
std::list< ListNode > power_list
List with power and counters.
virtual ~uwinterference()
Destructor of the class uwinterference.
double getInitialInterferenceTime()
Get the timestamp of the begin of reception of the first interferer packet.
uwinterference()
Constructor of the class uwinterference.
std::pair< int, int > counter
counter of collisions