#include <uwofdmphy.h>
Definition at line 66 of file 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.
Definition at line 74 of file uwofdmphy.cpp.
◆ createOFDMhdr()
void UwOFDMPhy::createOFDMhdr |
( |
Packet * |
p | ) |
|
|
protected |
Creates an OFDM header for non-OFDM packets.
- Parameters
-
Packet* | p Pointer to the packet transmitted |
Definition at line 986 of file uwofdmphy.cpp.
◆ dtos()
string UwOFDMPhy::dtos |
( |
double |
d | ) |
|
|
inlineprivate |
- Parameters
-
- Returns
- d converted to string
Definition at line 301 of file uwofdmphy.h.
◆ 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.
Definition at line 523 of file uwofdmphy.cpp.
◆ endTx()
void UwOFDMPhy::endTx |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
Handles the end of a transmission, redefined to scale the power into the carriers.
- Parameters
-
Packet* | p Pointer to the packet transmitted |
Reimplemented from UnderwaterPhysical.
Definition at line 377 of file uwofdmphy.cpp.
◆ 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. |
Definition at line 935 of file uwofdmphy.cpp.
◆ 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 |
Handles the end of a transmission, redefined to scale the power into the carriers.
- Parameters
-
Packet* | p Pointer to the packet transmitted |
- Returns
- Noise power on used carriers
Definition at line 912 of file uwofdmphy.cpp.
◆ getOFDMPER()
double UwOFDMPhy::getOFDMPER |
( |
double |
_snr, |
|
|
int |
_nbits, |
|
|
Packet * |
p |
|
) |
| |
|
protectedvirtual |
Returns the packet error rate by using the length of a packet and the information contained in the packet (position of the source and the destination).
The error rate is computed only on the carriers used by the packet.
- Parameters
-
snr | Calculated by nsmiracle with the Urick model (unused). |
nbits | length in bit of the packet. |
p | Packet by witch the module gets information about source and destination. |
- Returns
- PER of the packet passed as parameter.
Definition at line 845 of file uwofdmphy.cpp.
◆ 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. |
Definition at line 950 of file uwofdmphy.cpp.
◆ 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 |
Computes the transmission time duration depending on the used carriers.
- Parameters
-
Packet* | p Pointer to the packet transmitted |
- Returns
- Transmission duration
Definition at line 787 of file uwofdmphy.cpp.
◆ 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 |
Interrupts reception if MAC has other priorities Theoretically should never be called.
Definition at line 771 of file uwofdmphy.cpp.
◆ itos()
string UwOFDMPhy::itos |
( |
int |
i | ) |
|
|
inlineprivate |
- Parameters
-
- Returns
- i converted to string
Definition at line 291 of file uwofdmphy.h.
◆ 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.
Definition at line 237 of file uwofdmphy.cpp.
◆ recvSyncClMsg()
int UwOFDMPhy::recvSyncClMsg |
( |
ClMessage * |
m | ) |
|
|
protected |
Handles receiving messages from the MAC layer.
Definition at line 1156 of file uwofdmphy.cpp.
◆ 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.
Definition at line 401 of file uwofdmphy.cpp.
◆ 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] ={0,0,0,0,0,0,0,0} |
|
private |
◆ msgDisp
◆ nodeID_
◆ 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.
Definition at line 338 of file uwofdmphy.h.
◆ txongoing_
bool UwOFDMPhy::txongoing_ |
◆ txqueue_
std::vector<Packet *> UwOFDMPhy::txqueue_ |
|
private |
The documentation for this class was generated from the following files: