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

#include <uwhermesphy.h>

Inheritance diagram for UwHermesPhy:
Collaboration diagram for UwHermesPhy:

Public Member Functions

 UwHermesPhy ()
 
virtual ~UwHermesPhy ()
 
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, int nbits, 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)
 
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 matchPS (double distance, int size)
 
virtual double linearInterpolator (double x, double x1, double y1, double x2, double y2)
 
virtual double chunckInterpolator (double p, int size)
 

Private Attributes

string pdr_file_name_
 
char pdr_token_separator_
 
PdrLut range2pdr_
 
bool initLUT_
 
int BCH_N
 
int BCH_K
 
int BCH_T
 
int FRAME_BIT
 

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 uwhermesphy.h.

Constructor & Destructor Documentation

◆ UwHermesPhy()

UwHermesPhy::UwHermesPhy ( )

Constructor of UwHermesPhy class.

Definition at line 63 of file uwhermesphy.cpp.

◆ ~UwHermesPhy()

UwHermesPhy::~UwHermesPhy ( )
virtual

Destructor of UwHermesPhy class.

Definition at line 76 of file uwhermesphy.cpp.

Member Function Documentation

◆ chunckInterpolator()

double UwHermesPhy::chunckInterpolator ( double  p,
int  size 
)
privatevirtual

Definition at line 324 of file uwhermesphy.cpp.

◆ command()

int UwHermesPhy::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 81 of file uwhermesphy.cpp.

◆ endRx()

void UwHermesPhy::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 140 of file uwhermesphy.cpp.

◆ getDistance()

double UwHermesPhy::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 257 of file uwhermesphy.cpp.

◆ getPER()

double UwHermesPhy::getPER ( 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 destiantion.

Parameters
snrCalculated by nsmiracle with the Urick model (unused).
nbitslength in bit of the packet.
pPacket by witch the module gets information about source and destination.
Returns
PER of the packet passed as parameter.

Reimplemented from UnderwaterPhysical.

Definition at line 250 of file uwhermesphy.cpp.

◆ initializeLUT()

void UwHermesPhy::initializeLUT ( )
protectedvirtual

Definition at line 111 of file uwhermesphy.cpp.

◆ linearInterpolator()

double UwHermesPhy::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 307 of file uwhermesphy.cpp.

◆ matchPS()

double UwHermesPhy::matchPS ( double  distance,
int  size 
)
privatevirtual

Return the PER via linear interpolation.

Parameters
distancedistance between source and destination.
sizePacket size in bit.

Definition at line 271 of file uwhermesphy.cpp.

Member Data Documentation

◆ BCH_K

int UwHermesPhy::BCH_K
private

Definition at line 144 of file uwhermesphy.h.

◆ BCH_N

int UwHermesPhy::BCH_N
private

BCH(n,k,t) : correction of t errors via BCH code new frame length= FRAME_BIT/k*n, example: 9152/11*15 by default BCH(15,11,1)

Definition at line 143 of file uwhermesphy.h.

◆ BCH_T

int UwHermesPhy::BCH_T
private

Definition at line 145 of file uwhermesphy.h.

◆ FRAME_BIT

int UwHermesPhy::FRAME_BIT
private

Definition at line 147 of file uwhermesphy.h.

◆ initLUT_

bool UwHermesPhy::initLUT_
private

Definition at line 134 of file uwhermesphy.h.

◆ pdr_file_name_

string UwHermesPhy::pdr_file_name_
private

Definition at line 131 of file uwhermesphy.h.

◆ pdr_token_separator_

char UwHermesPhy::pdr_token_separator_
private

Definition at line 132 of file uwhermesphy.h.

◆ range2pdr_

PdrLut UwHermesPhy::range2pdr_
private

Definition at line 133 of file uwhermesphy.h.


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