DESERT 3.5.1
Loading...
Searching...
No Matches
UwAhoiPhy Class Reference

#include <uwahoi-phy.h>

Inheritance diagram for UwAhoiPhy:
Collaboration diagram for UwAhoiPhy:

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 *)
 
int recvSyncClMsg (ClMessage *m)
 

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)
 
virtual void startRx (Packet *p)
 
virtual double consumedEnergyTx (const double &_duration)
 
virtual double consumedEnergyRx (const double &_duration)
 
virtual double getPER (double snr, int nbits, Packet *)
 
const bool isZero (const double &value) const
 
double Get_Tx_Time ()
 
double Get_Rx_Time ()
 
double Get_Energy_Tx ()
 
double Get_Energy_Rx ()
 
double Get_Transmitted_bytes ()
 
void incrTot_pkts_lost ()
 
void incrTotCrtl_pkts_lost ()
 
void incrErrorCtrlPktsInterf ()
 
void incrCollisionDATAvsCTRL ()
 
void incrCollisionCTRL ()
 
void incrCollisionDATA ()
 
int getTot_pkts_lost ()
 
int getTot_CtrlPkts_lost ()
 
int getError_CtrlPktsInterf ()
 
int getCollisionsDATAvsCTRL ()
 
int getCollisionsCTRL ()
 
int getCollisionsDATA ()
 
const double log2 (const double &_input) const
 
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
 
uwinterferenceinterference_
 

Detailed Description

Definition at line 52 of file uwahoi-phy.h.

Constructor & Destructor Documentation

◆ UwAhoiPhy()

UwAhoiPhy::UwAhoiPhy ( )

Constructor of UwAhoiPhy class.

Definition at line 63 of file uwahoi-phy.cpp.

◆ ~UwAhoiPhy()

UwAhoiPhy::~UwAhoiPhy ( )
virtual

Destructor of UwAhoiPhy class.

Definition at line 75 of file uwahoi-phy.cpp.

Member Function Documentation

◆ command()

int UwAhoiPhy::command ( int  argc,
const char *const *  argv 
)
virtual

TCL command interpreter.

It implements the following OTcl methods:

Parameters
argcNumber of arguments in argv.
argvArray 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
pPacket 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
snrCalculated by nsmiracle with the Urick model (unused).
pPacket 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

Definition at line 118 of file uwahoi-phy.cpp.

◆ linearInterpolator()

double UwAhoiPhy::linearInterpolator ( double  x,
double  x1,
double  y1,
double  x2,
double  y2 
)
privatevirtual

Return y via linear interpolation given two points.

Parameters
xinput.
x1,y1coordinates of the first point.
x2,y2coordinates 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
distancedistance 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
distancedistance between source and destination.

Definition at line 311 of file uwahoi-phy.cpp.

Member Data Documentation

◆ initLUT_

bool UwAhoiPhy::initLUT_
private

Definition at line 139 of file uwahoi-phy.h.

◆ pdr_file_name_

string UwAhoiPhy::pdr_file_name_
private

Definition at line 134 of file uwahoi-phy.h.

◆ pdr_token_separator_

char UwAhoiPhy::pdr_token_separator_
private

Definition at line 136 of file uwahoi-phy.h.

◆ range2pdr_

PdrLut UwAhoiPhy::range2pdr_
private

Definition at line 137 of file uwahoi-phy.h.

◆ sir2pdr_

PdrLut UwAhoiPhy::sir2pdr_
private

Definition at line 138 of file uwahoi-phy.h.

◆ sir_file_name_

string UwAhoiPhy::sir_file_name_
private

Definition at line 135 of file uwahoi-phy.h.


The documentation for this class was generated from the following files: