#include <uwofdmphy.h>
◆ UwOFDMPhy()
◆ ~UwOFDMPhy()
| UwOFDMPhy::~UwOFDMPhy |
( |
| ) |
|
|
virtual |
◆ command()
| int UwOFDMPhy::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
virtual |
TCL command interpreter. It implements the following OTcl methods:
- Parameters
-
| argc | Number of arguments in argv. |
| argv | Array 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.
Reimplemented from UnderwaterPhysical.
References UnderwaterPhysical::command(), getCollErrPktLost(), getCtrlCErrPktLost(), getCtrlFCollPktLost(), getFreqCollPktLost(), getLowSnrPktLost(), getModErrPktLost(), getNodeID(), getNodeNum(), getNoiseErrPktLost(), getPhyPktSent(), getSentUpPkts(), getSubCarNum(), getTotalDelay(), getTransmissionTime(), getTxPenCtrlLost(), getTxPenPktLost(), init_ofdm_node(), setBrokenCar(), setBufferSize(), setNodeID(), setNodeNum(), setSubCarNum(), and showSubCar().
◆ createOFDMhdr()
| void UwOFDMPhy::createOFDMhdr |
( |
Packet * |
p | ) |
|
|
protected |
◆ dtos()
| string UwOFDMPhy::dtos |
( |
double |
d | ) |
|
|
inlineprivate |
◆ endRx()
| void UwOFDMPhy::endRx |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
Handles the end of a packet reception
- Parameters
-
| Packet* | p Pointer to the packet received |
Reimplemented from UnderwaterPhysical.
References buffered_pkt_num, COLLERR, UnderwaterPhysical::consumedEnergyRx(), CTRLCERR, current_rcvs, UnderwaterPhysical::Energy_Rx_, uwinterference::getCounters(), uwinterference::getInterferencePower(), getOFDMPER(), UnderwaterPhysical::getPER(), getPropagationDelay(), UnderwaterPhysical::incrCollisionCTRL(), UnderwaterPhysical::incrCollisionDATA(), UnderwaterPhysical::incrCollisionDATAvsCTRL(), UnderwaterPhysical::incrErrorCtrlPktsInterf(), UnderwaterPhysical::incrTot_pkts_lost(), UnderwaterPhysical::incrTotCrtl_pkts_lost(), UnderwaterPhysical::interference_, UnderwaterPhysical::Interference_Model, itos(), lostPackets, msgDisp, hdr_OFDM::nativeOFDM, nodeID_, NOISEERR, pktqueue_, plotPktQueue(), MsgDisplayer::printStatus(), UnderwaterPhysical::Rx_Time_, sentUpPkts, UnderwaterPhysical::time_ready_to_end_rx_, and total_delay_.
◆ endTx()
| void UwOFDMPhy::endTx |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
◆ freqOverlap()
| bool UwOFDMPhy::freqOverlap |
( |
Packet * |
p2, |
|
|
bool |
isOFDM |
|
) |
| |
◆ getCollErrPktLost()
| int UwOFDMPhy::getCollErrPktLost |
( |
| ) |
const |
◆ getCtrlCErrPktLost()
| int UwOFDMPhy::getCtrlCErrPktLost |
( |
| ) |
const |
◆ getCtrlFCollPktLost()
| int UwOFDMPhy::getCtrlFCollPktLost |
( |
| ) |
const |
◆ getDistance()
| double UwOFDMPhy::getDistance |
( |
Packet * |
_p | ) |
|
|
privatevirtual |
Return the distance between source and destination.
- Parameters
-
| p | Packet by witch the module gets information about source and destination. |
Referenced by getPropagationDelay().
◆ getFreqCollPktLost()
| int UwOFDMPhy::getFreqCollPktLost |
( |
| ) |
const |
◆ getLowSnrPktLost()
| int UwOFDMPhy::getLowSnrPktLost |
( |
| ) |
const |
◆ getModErrPktLost()
| int UwOFDMPhy::getModErrPktLost |
( |
| ) |
const |
◆ getNodeID()
| int UwOFDMPhy::getNodeID |
( |
| ) |
const |
◆ getNodeNum()
| int UwOFDMPhy::getNodeNum |
( |
| ) |
const |
◆ getNoiseErrPktLost()
| int UwOFDMPhy::getNoiseErrPktLost |
( |
| ) |
const |
◆ getOFDMNoisePower()
| double UwOFDMPhy::getOFDMNoisePower |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
◆ getOFDMPER()
| double UwOFDMPhy::getOFDMPER |
( |
double |
_snr, |
|
|
int |
_nbits, |
|
|
Packet * |
p |
|
) |
| |
|
protectedvirtual |
◆ getPhyPktSent()
| int UwOFDMPhy::getPhyPktSent |
( |
| ) |
const |
◆ getPropagationDelay()
| double UwOFDMPhy::getPropagationDelay |
( |
Packet * |
_p | ) |
|
|
privatevirtual |
Return the propagation delay for the packet. The delay is calculated based on the distance between the source and the sink.
- Parameters
-
| p | Packet by witch the module gets information about source and destination. |
References getDistance().
Referenced by endRx().
◆ getSentUpPkts()
| int UwOFDMPhy::getSentUpPkts |
( |
| ) |
|
◆ getSubCarNum()
| int UwOFDMPhy::getSubCarNum |
( |
| ) |
const |
◆ getTotalDelay()
| virtual int UwOFDMPhy::getTotalDelay |
( |
| ) |
|
|
inlineprivatevirtual |
◆ getTransmissionTime()
| double UwOFDMPhy::getTransmissionTime |
( |
| ) |
const |
◆ getTxDuration()
| double UwOFDMPhy::getTxDuration |
( |
Packet * |
p | ) |
|
|
protected |
◆ getTxPenCtrlLost()
| int UwOFDMPhy::getTxPenCtrlLost |
( |
| ) |
const |
◆ getTxPenPktLost()
| int UwOFDMPhy::getTxPenPktLost |
( |
| ) |
const |
◆ init_ofdm_node()
| void UwOFDMPhy::init_ofdm_node |
( |
int |
nn, |
|
|
int |
cf, |
|
|
int |
scn, |
|
|
int |
ID |
|
) |
| |
◆ interruptReceptions()
| void UwOFDMPhy::interruptReceptions |
( |
| ) |
|
|
protected |
◆ itos()
| string UwOFDMPhy::itos |
( |
int |
i | ) |
|
|
inlineprivate |
◆ plotPktQueue()
| void UwOFDMPhy::plotPktQueue |
( |
| ) |
|
|
protected |
◆ recv()
| void UwOFDMPhy::recv |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
recv method. It is called when a packet is received from the channel
- Parameters
-
| Packet* | Pointer to the packet that are going to be received |
Reimplemented from UnderwaterPhysical.
References uwinterference::addToInterference(), buffered_pkt_num, bufferSize_, hdr_OFDM::carriers, createOFDMhdr(), current_rcvs, dtos(), getOFDMNoisePower(), getTxDuration(), UnderwaterPhysical::interference_, interruptReceptions(), itos(), msgDisp, hdr_OFDM::nativeOFDM, nodeID_, phySentPkt_, powerScaling, MsgDisplayer::printStatus(), hdr_OFDM::srcID, startRx(), subCarrier_, and totTransTime.
◆ recvSyncClMsg()
| int UwOFDMPhy::recvSyncClMsg |
( |
ClMessage * |
m | ) |
|
|
protected |
◆ setBrokenCar()
| void UwOFDMPhy::setBrokenCar |
( |
int |
bottom, |
|
|
int |
top |
|
) |
| |
◆ setBufferSize()
| void UwOFDMPhy::setBufferSize |
( |
int |
s | ) |
|
◆ setNodeID()
| void UwOFDMPhy::setNodeID |
( |
int |
n | ) |
|
◆ setNodeNum()
| void UwOFDMPhy::setNodeNum |
( |
int |
n | ) |
|
◆ setSubCar()
| void UwOFDMPhy::setSubCar |
( |
int |
index, |
|
|
int |
value |
|
) |
| |
◆ setSubCarNum()
| void UwOFDMPhy::setSubCarNum |
( |
int |
n | ) |
|
◆ showSubCar()
| void UwOFDMPhy::showSubCar |
( |
| ) |
|
◆ startRx()
| void UwOFDMPhy::startRx |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
Handles the start of a packet reception
- Parameters
-
| Packet* | p Pointer to the packet received |
Reimplemented from UnderwaterPhysical.
References CTRLFERR, current_rcvs, FREQCOLL, freqOverlap(), UnderwaterPhysical::incrTot_pkts_lost(), UnderwaterPhysical::incrTotCrtl_pkts_lost(), lostPackets, LOWSNR, MODERR, msgDisp, hdr_OFDM::nativeOFDM, nodeID_, pktqueue_, plotPktQueue(), MsgDisplayer::printStatus(), tx_busy_, TXPEN, and TXPENCTRL.
Referenced by recv().
◆ brokenCarriers_
| std::vector<double> UwOFDMPhy::brokenCarriers_ |
|
private |
◆ buffered_pkt_num
| int UwOFDMPhy::buffered_pkt_num |
|
private |
◆ bufferSize_
| int UwOFDMPhy::bufferSize_ |
|
private |
◆ centerFreq_
| int UwOFDMPhy::centerFreq_ |
|
private |
◆ current_rcvs
| int UwOFDMPhy::current_rcvs |
|
private |
◆ FRAME_BIT
◆ lostPackets
| int UwOFDMPhy::lostPackets[8] |
|
private |
Initial value:=
{0, 0, 0, 0, 0, 0, 0, 0}
Referenced by endRx(), getCollErrPktLost(), getCtrlCErrPktLost(), getCtrlFCollPktLost(), getFreqCollPktLost(), getLowSnrPktLost(), getModErrPktLost(), getNoiseErrPktLost(), getTxPenCtrlLost(), getTxPenPktLost(), and startRx().
◆ msgDisp
◆ nodeID_
Referenced by endRx(), getNodeID(), getOFDMPER(), getTxDuration(), init_ofdm_node(), interruptReceptions(), plotPktQueue(), recv(), recvSyncClMsg(), setNodeID(), and startRx().
◆ nodeNum_
◆ phySentPkt_
| int UwOFDMPhy::phySentPkt_ |
|
private |
◆ pktqueue_
| std::vector<Packet> UwOFDMPhy::pktqueue_ |
|
private |
◆ powerScaling
| int UwOFDMPhy::powerScaling |
|
private |
◆ sentUpPkts
| int UwOFDMPhy::sentUpPkts |
|
private |
◆ subCarrier_
| int UwOFDMPhy::subCarrier_ |
|
private |
◆ timesqueue_
| std::vector<double> UwOFDMPhy::timesqueue_ |
|
private |
◆ total_delay_
| double UwOFDMPhy::total_delay_ |
|
private |
◆ totTransTime
| double UwOFDMPhy::totTransTime |
|
private |
◆ tx_busy_
transmission power might be carried out just by re-setting this value. More complex strategies (e.g., packet-specific transmission power) can be implemented by overriding the getTxPower() method.
Referenced by recvSyncClMsg(), and startRx().
◆ txongoing_
| bool UwOFDMPhy::txongoing_ |
◆ txqueue_
| std::vector<Packet *> UwOFDMPhy::txqueue_ |
|
private |
The documentation for this class was generated from the following files: