51#include <phymac-clmsg.h>
61typedef ::std::map<double, double>
PdrLut;
90 virtual int command(
int,
const char *
const *);
173 virtual void recv(Packet *);
181 virtual void endRx(Packet *p);
189 virtual void startRx(Packet *p);
198 virtual void endTx(Packet *p);
212 virtual double getOFDMPER(
double _snr,
int _nbits, Packet *);
293 return std::to_string(i);
303 return std::to_string(d);
int getModErrPktLost() const
int getTxPenPktLost() const
virtual void startRx(Packet *p)
Handles the start of a packet reception.
virtual double getDistance(Packet *)
Return the distance between source and destination.
virtual double getOFDMPER(double _snr, int _nbits, Packet *)
Returns the packet error rate by using the length of a packet and the information contained in the pa...
int getCollErrPktLost() const
std::vector< double > timesqueue_
UwOFDMPhy()
Constructor of UwOFDMPhy class.
int tx_busy_
transmission power might be carried out just by re-setting this value.
double getTxDuration(Packet *p)
Computes the transmission time duration depending on the used carriers.
virtual int getTotalDelay()
returns total delay
int getCtrlFCollPktLost() const
virtual int command(int, const char *const *)
TCL command interpreter.
virtual ~UwOFDMPhy()
Destructor of UwOFDMPhy class.
void init_ofdm_node(int nn, int cf, int scn, int ID)
std::vector< Packet > pktqueue_
void setBrokenCar(int, int)
void interruptReceptions()
Interrupts reception if MAC has other priorities Theoretically should never be called.
void plotPktQueue()
Plots pktqueue elements.
virtual double getOFDMNoisePower(Packet *p)
Handles the end of a transmission, redefined to scale the power into the carriers.
int getFreqCollPktLost() const
bool freqOverlap(Packet *, bool)
virtual double getPropagationDelay(Packet *)
Return the propagation delay for the packet.
virtual void endTx(Packet *p)
Handles the end of a transmission, redefined to scale the power into the carriers.
int getTxPenCtrlLost() const
double getTransmissionTime() const
void createOFDMhdr(Packet *p)
Creates an OFDM header for non-OFDM packets.
virtual void recv(Packet *)
recv method.
std::vector< double > brokenCarriers_
virtual void endRx(Packet *p)
Handles the end of a packet reception.
std::vector< Packet * > txqueue_
int getLowSnrPktLost() const
int getPhyPktSent() const
int getCtrlCErrPktLost() const
int getNoiseErrPktLost() const
int recvSyncClMsg(ClMessage *m)
Handles receiving messages from the MAC layer.
Class that provide the implementation of an object to display messages.
PdrLut::iterator PdrLutIt
::std::map< double, double > PdrLut
Common structures and variables in the protocol.
Definition of UwPhysical class.