#include <uwahoi-phy.h>
Definition at line 52 of file uwahoi-phy.h.
◆ UwAhoiPhy()
◆ ~UwAhoiPhy()
UwAhoiPhy::~UwAhoiPhy |
( |
| ) |
|
|
virtual |
◆ command()
int UwAhoiPhy::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 80 of file uwahoi-phy.cpp.
◆ endRx()
void UwAhoiPhy::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 173 of file uwahoi-phy.cpp.
◆ getDistance()
double UwAhoiPhy::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 272 of file uwahoi-phy.cpp.
◆ getPER()
double UwAhoiPhy::getPER |
( |
double |
snr, |
|
|
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 destiantion.
- Parameters
-
snr | Calculated by nsmiracle with the Urick model (unused). |
p | Packet by witch the module gets information about source and destination. |
- Returns
- PER of the packet passed as parameter.
Definition at line 261 of file uwahoi-phy.cpp.
◆ initializeLUT()
void UwAhoiPhy::initializeLUT |
( |
| ) |
|
|
protectedvirtual |
◆ linearInterpolator()
double UwAhoiPhy::linearInterpolator |
( |
double |
x, |
|
|
double |
x1, |
|
|
double |
y1, |
|
|
double |
x2, |
|
|
double |
y2 |
|
) |
| |
|
privatevirtual |
Return y via linear interpolation given two points.
- Parameters
-
x | input. |
x1,y1 | coordinates of the first point. |
x2,y2 | coordinates of the second point. |
Definition at line 337 of file uwahoi-phy.cpp.
◆ matchDistancePDR()
double UwAhoiPhy::matchDistancePDR |
( |
double |
distance | ) |
|
|
privatevirtual |
Return the PER via linear interpolation.
- Parameters
-
distance | distance between source and destination. |
Definition at line 286 of file uwahoi-phy.cpp.
◆ matchSIR_PDR()
double UwAhoiPhy::matchSIR_PDR |
( |
double |
sir | ) |
|
|
privatevirtual |
Return the PER via linear interpolation.
- Parameters
-
distance | distance between source and destination. |
Definition at line 311 of file uwahoi-phy.cpp.
◆ initLUT_
◆ pdr_file_name_
string UwAhoiPhy::pdr_file_name_ |
|
private |
◆ pdr_token_separator_
char UwAhoiPhy::pdr_token_separator_ |
|
private |
◆ range2pdr_
◆ sir2pdr_
◆ sir_file_name_
string UwAhoiPhy::sir_file_name_ |
|
private |
The documentation for this class was generated from the following files: