#include <uwphysical.h>
◆ UnderwaterPhysical()
| UnderwaterPhysical::UnderwaterPhysical |
( |
| ) |
|
◆ ~UnderwaterPhysical()
| UnderwaterPhysical::~UnderwaterPhysical |
( |
| ) |
|
|
virtual |
◆ command()
| int UnderwaterPhysical::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
overridevirtual |
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 in UnderwaterPhysicalNoise, UwAhoiPhy, UnderwaterGainFromDb, UwHermesPhy, UnderwaterHMMPhysical, UwOFDMPhy, UnderwaterPhysicaldb, and UnderwaterPhysicalfromdb.
References Get_Energy_Rx(), Get_Energy_Tx(), Get_Rx_Time(), Get_Transmitted_bytes(), Get_Tx_Time(), getCollisionsCTRL(), getCollisionsDATA(), getCollisionsDATAvsCTRL(), getError_CtrlPktsInterf(), getTot_CtrlPkts_lost(), getTot_pkts_lost(), interference_, Interference_Model, and modulation_name_.
Referenced by UnderwaterPhysicalNoise::command(), UwAhoiPhy::command(), UnderwaterGainFromDb::command(), UwHermesPhy::command(), UnderwaterHMMPhysical::command(), UwOFDMPhy::command(), and UnderwaterPhysicaldb::command().
◆ consumedEnergyRx()
| virtual double UnderwaterPhysical::consumedEnergyRx |
( |
const double & |
_duration | ) |
const |
|
inlineprotectedvirtual |
◆ consumedEnergyTx()
| virtual double UnderwaterPhysical::consumedEnergyTx |
( |
const double & |
_duration | ) |
const |
|
inlineprotectedvirtual |
Compute the energy (in Joule) spent by the modem in transmission
- Parameters
-
| const | double& time spent by the modem in transmission phase |
- Returns
- double& the value of energy in Joule
References tx_power_.
Referenced by UwOFDMPhy::endTx(), and endTx().
◆ endRx()
| void UnderwaterPhysical::endRx |
( |
Packet * |
p | ) |
|
|
overrideprotectedvirtual |
Handles the end of a packet reception
- Parameters
-
| Packet* | p Pointer to the packet received |
Reimplemented in UwAhoiPhy, UwHermesPhy, UwOFDMPhy, UnderwaterPhysicaldb, and UnderwaterHMMPhysical.
References consumedEnergyRx(), Energy_Rx_, uwinterference::getCounters(), uwinterference::getInterferencePower(), getPER(), incrCollisionCTRL(), incrCollisionDATA(), incrCollisionDATAvsCTRL(), incrErrorCtrlPktsInterf(), incrTot_pkts_lost(), incrTotCrtl_pkts_lost(), interference_, Interference_Model, Rx_Time_, time_ready_to_end_rx_, and UwPhysicalStats::updateStats().
Referenced by UnderwaterHMMPhysical::endRx().
◆ endTx()
| void UnderwaterPhysical::endTx |
( |
Packet * |
p | ) |
|
|
overrideprotectedvirtual |
◆ Get_Energy_Rx()
| double UnderwaterPhysical::Get_Energy_Rx |
( |
| ) |
const |
|
inlineprotected |
Returns the energy (in Joule) spent by the node in reception.
- Returns
- energy (in Joule) spent by the node in reception.
References Energy_Rx_.
Referenced by command().
◆ Get_Energy_Tx()
| double UnderwaterPhysical::Get_Energy_Tx |
( |
| ) |
const |
|
inlineprotected |
Returns the energy (in Joule) spent by the node in transmission.
- Returns
- energy (in Joule) spent by the node in transmission.
References Energy_Tx_.
Referenced by command().
◆ get_prob_error_symbol_mpsk()
| double UnderwaterPhysical::get_prob_error_symbol_mpsk |
( |
const double & |
_snr, |
|
|
const uint32_t |
_M |
|
) |
| const |
|
inlineprotected |
◆ Get_Rx_Time()
| double UnderwaterPhysical::Get_Rx_Time |
( |
| ) |
const |
|
inlineprotected |
Returns the time (in seconds) spent by the node in reception.
- Returns
- time (in seconds) spent by the node in reception.
References Rx_Time_.
Referenced by command().
◆ Get_Transmitted_bytes()
| double UnderwaterPhysical::Get_Transmitted_bytes |
( |
| ) |
const |
|
inlineprotected |
Returns the number of bytes transmitted.
- Returns
- the number of bytes transmitted.
References Transmitted_bytes_.
Referenced by command().
◆ Get_Tx_Time()
| double UnderwaterPhysical::Get_Tx_Time |
( |
| ) |
const |
|
inlineprotected |
Returns the time (in seconds) spent by the node in transmission.
- Returns
- time (in seconds) spent by the node in transmission.
References Tx_Time_.
Referenced by command().
◆ getCollisionsCTRL()
| int UnderwaterPhysical::getCollisionsCTRL |
( |
| ) |
const |
|
inlineprotected |
◆ getCollisionsDATA()
| int UnderwaterPhysical::getCollisionsDATA |
( |
| ) |
const |
|
inlineprotected |
◆ getCollisionsDATAvsCTRL()
| int UnderwaterPhysical::getCollisionsDATAvsCTRL |
( |
| ) |
const |
|
inlineprotected |
◆ getError_CtrlPktsInterf()
| int UnderwaterPhysical::getError_CtrlPktsInterf |
( |
| ) |
const |
|
inlineprotected |
◆ getPER()
| double UnderwaterPhysical::getPER |
( |
double |
snr, |
|
|
int |
nbits, |
|
|
Packet * |
_p |
|
) |
| |
|
protectedvirtual |
◆ getTot_CtrlPkts_lost()
| int UnderwaterPhysical::getTot_CtrlPkts_lost |
( |
| ) |
const |
|
inlineprotected |
◆ getTot_pkts_lost()
| int UnderwaterPhysical::getTot_pkts_lost |
( |
| ) |
const |
|
inlineprotected |
◆ incrCollisionCTRL()
| void UnderwaterPhysical::incrCollisionCTRL |
( |
| ) |
|
|
inlineprotected |
◆ incrCollisionDATA()
| void UnderwaterPhysical::incrCollisionDATA |
( |
| ) |
|
|
inlineprotected |
◆ incrCollisionDATAvsCTRL()
| void UnderwaterPhysical::incrCollisionDATAvsCTRL |
( |
| ) |
|
|
inlineprotected |
◆ incrErrorCtrlPktsInterf()
| void UnderwaterPhysical::incrErrorCtrlPktsInterf |
( |
| ) |
|
|
inlineprotected |
◆ incrTot_pkts_lost()
| void UnderwaterPhysical::incrTot_pkts_lost |
( |
| ) |
|
|
inlineprotected |
◆ incrTotCrtl_pkts_lost()
| void UnderwaterPhysical::incrTotCrtl_pkts_lost |
( |
| ) |
|
|
inlineprotected |
◆ isZero()
| bool UnderwaterPhysical::isZero |
( |
const double & |
value | ) |
const |
|
inlineprotected |
Evaluates is the number passed as input is equal to zero. When C++ works with double and float number you can't compare them with 0. If the absolute value of the number is smaller than eplison that means that the number is equal to zero.
- Parameters
-
| double& | Number to evaluate. |
- Returns
- true if the number passed in input is equal to zero, false otherwise.
- See also
- std::numeric_limits<double>::epsilon()
◆ log2()
| double UnderwaterPhysical::log2 |
( |
const double & |
_input | ) |
const |
|
inlineprotected |
◆ recv()
| void UnderwaterPhysical::recv |
( |
Packet * |
p | ) |
|
|
overridevirtual |
◆ recvSyncClMsg()
| int UnderwaterPhysical::recvSyncClMsg |
( |
ClMessage * |
m | ) |
|
|
override |
◆ startRx()
| void UnderwaterPhysical::startRx |
( |
Packet * |
p | ) |
|
|
overrideprotectedvirtual |
◆ updateInstantaneousStats()
| void UnderwaterPhysical::updateInstantaneousStats |
( |
| ) |
|
|
protectedvirtual |
Update the stats before sending them through crosslayer message
Referenced by recvSyncClMsg().
◆ collisionCTRL
| int UnderwaterPhysical::collisionCTRL |
|
protected |
◆ collisionDATA
| int UnderwaterPhysical::collisionDATA |
|
protected |
◆ collisionDataCTRL
| int UnderwaterPhysical::collisionDataCTRL |
|
protected |
◆ Energy_Rx_
| double UnderwaterPhysical::Energy_Rx_ |
|
protected |
◆ Energy_Tx_
| double UnderwaterPhysical::Energy_Tx_ |
|
protected |
◆ errorCtrlPktsInterf
| int UnderwaterPhysical::errorCtrlPktsInterf |
|
protected |
◆ interference_
◆ Interference_Model
| std::string UnderwaterPhysical::Interference_Model |
|
protected |
◆ modulation_name_
| std::string UnderwaterPhysical::modulation_name_ |
|
protected |
◆ rx_power_
| double UnderwaterPhysical::rx_power_ |
|
protected |
◆ Rx_Time_
| double UnderwaterPhysical::Rx_Time_ |
|
protected |
◆ time_ready_to_end_rx_
| double UnderwaterPhysical::time_ready_to_end_rx_ |
|
protected |
◆ tot_ctrl_pkts_lost
| int UnderwaterPhysical::tot_ctrl_pkts_lost |
|
protected |
◆ tot_pkts_lost
| int UnderwaterPhysical::tot_pkts_lost |
|
protected |
◆ Transmitted_bytes_
| double UnderwaterPhysical::Transmitted_bytes_ |
|
protected |
◆ tx_power_
| double UnderwaterPhysical::tx_power_ |
|
protected |
◆ Tx_Time_
| double UnderwaterPhysical::Tx_Time_ |
|
protected |
The documentation for this class was generated from the following files: