|
DESERT 4.0.0
|
#include <uwahoi-phy.h>


Public Member Functions | |
| UwAhoiPhy () | |
| virtual | ~UwAhoiPhy () |
| virtual int | command (int, const char *const *) |
Public Member Functions inherited from UnderwaterPhysical | |
| UnderwaterPhysical () | |
| virtual | ~UnderwaterPhysical () |
| virtual void | recv (Packet *) override |
| int | recvSyncClMsg (ClMessage *m) override |
Protected Member Functions | |
| virtual void | endRx (Packet *p) |
| virtual double | getPER (double snr, Packet *) |
| virtual void | initializeLUT () |
Protected Member Functions inherited from UnderwaterPhysical | |
| virtual void | updateInstantaneousStats () |
| virtual void | endTx (Packet *p) override |
| virtual void | startRx (Packet *p) override |
| virtual double | consumedEnergyTx (const double &_duration) const |
| virtual double | consumedEnergyRx (const double &_duration) const |
| virtual double | getPER (double snr, int nbits, Packet *_p) |
| bool | isZero (const double &value) const |
| double | Get_Tx_Time () const |
| double | Get_Rx_Time () const |
| double | Get_Energy_Tx () const |
| double | Get_Energy_Rx () const |
| double | Get_Transmitted_bytes () const |
| void | incrTot_pkts_lost () |
| void | incrTotCrtl_pkts_lost () |
| void | incrErrorCtrlPktsInterf () |
| void | incrCollisionDATAvsCTRL () |
| void | incrCollisionCTRL () |
| void | incrCollisionDATA () |
| int | getTot_pkts_lost () const |
| int | getTot_CtrlPkts_lost () const |
| int | getError_CtrlPktsInterf () const |
| int | getCollisionsDATAvsCTRL () const |
| int | getCollisionsCTRL () const |
| int | getCollisionsDATA () const |
| double | log2 (const double &_input) const |
| double | get_prob_error_symbol_mpsk (const double &_snr, const uint32_t _M) const |
Private Member Functions | |
| virtual double | getDistance (Packet *) |
| virtual double | matchDistancePDR (double distance) |
| virtual double | matchSIR_PDR (double sir) |
| virtual double | linearInterpolator (double x, double x1, double y1, double x2, double y2) |
Private Attributes | |
| string | pdr_file_name_ |
| string | sir_file_name_ |
| char | pdr_token_separator_ |
| PdrLut | range2pdr_ |
| PdrLut | sir2pdr_ |
| bool | initLUT_ |
Additional Inherited Members | |
Protected Attributes inherited from UnderwaterPhysical | |
| std::string | modulation_name_ |
| double | time_ready_to_end_rx_ |
| double | Tx_Time_ |
| double | Rx_Time_ |
| double | Energy_Tx_ |
| double | Energy_Rx_ |
| double | Transmitted_bytes_ |
| double | tx_power_ |
| double | rx_power_ |
| int | tot_pkts_lost |
| int | tot_ctrl_pkts_lost |
| int | errorCtrlPktsInterf |
| int | collisionDataCTRL |
| int | collisionCTRL |
| int | collisionDATA |
| std::string | Interference_Model |
| uwinterference * | interference_ |
| UwAhoiPhy::UwAhoiPhy | ( | ) |
Constructor of UwAhoiPhy class.
References UnderwaterPhysical::Interference_Model.
|
virtual |
Destructor of UwAhoiPhy class.
|
virtual |
TCL command interpreter. It implements the following OTcl methods:
| 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). |
Reimplemented from UnderwaterPhysical.
References UnderwaterPhysical::command(), initializeLUT(), pdr_file_name_, pdr_token_separator_, and sir_file_name_.

|
protectedvirtual |
Handles the end of a packet reception
| Packet* | p Pointer to the packet received |
Reimplemented from UnderwaterPhysical.
References UnderwaterPhysical::consumedEnergyRx(), UnderwaterPhysical::Energy_Rx_, uwinterference::getInterferencePower(), getPER(), UnderwaterPhysical::incrCollisionCTRL(), UnderwaterPhysical::incrCollisionDATA(), UnderwaterPhysical::incrCollisionDATAvsCTRL(), UnderwaterPhysical::incrErrorCtrlPktsInterf(), UnderwaterPhysical::incrTot_pkts_lost(), UnderwaterPhysical::incrTotCrtl_pkts_lost(), initLUT_, UnderwaterPhysical::interference_, UnderwaterPhysical::Rx_Time_, and UnderwaterPhysical::time_ready_to_end_rx_.

|
privatevirtual |
Return the distance between source and destination.
| p | Packet by witch the module gets information about source and destination. |
Referenced by getPER().
|
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 destiantion.
| snr | Calculated by nsmiracle with the Urick model (unused). |
| p | Packet by witch the module gets information about source and destination. |
References getDistance(), matchDistancePDR(), and matchSIR_PDR().
Referenced by endRx().

|
protectedvirtual |
References initLUT_, pdr_file_name_, pdr_token_separator_, range2pdr_, sir2pdr_, and sir_file_name_.
Referenced by command().
|
privatevirtual |
Return y via linear interpolation given two points.
| x | input. |
| x1,y1 | coordinates of the first point. |
| x2,y2 | coordinates of the second point. |
References q.
Referenced by matchDistancePDR(), and matchSIR_PDR().
|
privatevirtual |
Return the PER via linear interpolation.
| distance | distance between source and destination. |
References linearInterpolator(), and range2pdr_.
Referenced by getPER().

|
privatevirtual |
Return the PER via linear interpolation.
| distance | distance between source and destination. |
References linearInterpolator(), and sir2pdr_.
Referenced by getPER().

|
private |
Referenced by endRx(), and initializeLUT().
|
private |
Referenced by command(), and initializeLUT().
|
private |
Referenced by command(), and initializeLUT().
|
private |
Referenced by initializeLUT(), and matchDistancePDR().
|
private |
Referenced by initializeLUT(), and matchSIR_PDR().
|
private |
Referenced by command(), and initializeLUT().