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

#include <uwphysicalfromdb.h>

Inheritance diagram for UnderwaterPhysicalfromdb:
Collaboration diagram for UnderwaterPhysicalfromdb:

Public Member Functions

 UnderwaterPhysicalfromdb ()
 
virtual ~UnderwaterPhysicalfromdb ()
 
virtual int command (int, const char *const *)
 
- Public Member Functions inherited from UnderwaterGainFromDb
 UnderwaterGainFromDb ()
 
virtual ~UnderwaterGainFromDb ()
 
- Public Member Functions inherited from UnderwaterPhysical
 UnderwaterPhysical ()
 
virtual ~UnderwaterPhysical ()
 
virtual void recv (Packet *)
 
int recvSyncClMsg (ClMessage *m)
 

Protected Member Functions

virtual double getPER (double _snr, int _nbits, Packet *p)
 
virtual double getGain (const double &_time, const double &_source_depth, const double &_destination_depth, const double &_destination_distance)
 
virtual double getSelfInterference (const double &_time, const double &_source_depth, const double &_destination_depth, const double &_destination_distance)
 
virtual string createNameFile (const char *_path, const int &_time, const int &_source_depth, const int &_tau_index)
 
virtual double retrieveFromFile (const string &_file_name, const int &_row_index, const int &_column_index) const
 
void setTauIndex (const int &_tau_index)
 
const intgetTauIndex () const
 
- Protected Member Functions inherited from UnderwaterGainFromDb
virtual void setTimeRoughness (const int &)
 
virtual void setDepthRoughness (const int &)
 
virtual void setDistanceRoughness (const int &)
 
virtual void setTotalTime (const int &)
 
virtual void setFrequencyCorrectionFactor (const double &)
 
const intgetTimeRoughness () const
 
const intgetDepthRoughness () const
 
const intgetDistanceRoughness () const
 
const intgetTotalTime () const
 
const doublegetFrequencyCorrectionFactor () const
 
virtual double retriveGainFromFile (const string &, const int &, const int &) const
 
virtual string createNameFile (const int &, const int &)
 
const bool isZero (const double &value) const
 
- Protected Member Functions inherited from UnderwaterPhysical
virtual void updateInstantaneousStats ()
 
virtual void endTx (Packet *p)
 
virtual void endRx (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 Attributes

charpath_gainmaps
 
charpath_selfinterference
 
int tau_index
 

Additional Inherited Members

- Protected Attributes inherited from UnderwaterGainFromDb
charpath_
 
char token_separator_
 
ostringstream osstream_
 
- 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 44 of file uwphysicalfromdb.h.

Constructor & Destructor Documentation

◆ UnderwaterPhysicalfromdb()

UnderwaterPhysicalfromdb::UnderwaterPhysicalfromdb ( )

Constructor of UnderwaterMPhyBpskDb class.

Definition at line 55 of file uwphysicalfromdb.cpp.

◆ ~UnderwaterPhysicalfromdb()

virtual UnderwaterPhysicalfromdb::~UnderwaterPhysicalfromdb ( )
inlinevirtual

Destructor of UnderwaterMPhyBpskDb class.

Definition at line 56 of file uwphysicalfromdb.h.

Member Function Documentation

◆ command()

int UnderwaterPhysicalfromdb::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 UnderwaterGainFromDb.

Definition at line 64 of file uwphysicalfromdb.cpp.

◆ createNameFile()

string UnderwaterPhysicalfromdb::createNameFile ( const char _path,
const int _time,
const int _source_depth,
const int _tau_index 
)
protectedvirtual

Create the name of the file to read.

Parameters
_timeTimestamp (in s)
_source_depthSource depth (in m)
_destination_depthDestination depth (in m)
_destination_distanceDestination distance (in m)

Definition at line 270 of file uwphysicalfromdb.cpp.

◆ getGain()

double UnderwaterPhysicalfromdb::getGain ( const double _time,
const double _source_depth,
const double _destination_depth,
const double _destination_distance 
)
protectedvirtual

Read from the gain.

Parameters
_timeTimestamp (in s)
_source_depthSource depth (in m)
_destination_depthDestination depth (in m)
_destination_distanceDestination distance (in m)
Returns
Gain in dB.

Reimplemented from UnderwaterGainFromDb.

Definition at line 127 of file uwphysicalfromdb.cpp.

◆ getPER()

double UnderwaterPhysicalfromdb::getPER ( double  _snr,
int  _nbits,
Packet p 
)
protectedvirtual

Return the Packet Error Rate of the packet p passed as input.

Parameters
_snrNot used
_nbitsLength of the packet
pPacket
Returns
Packet Error Rate of the packet p

Reimplemented from UnderwaterGainFromDb.

Definition at line 94 of file uwphysicalfromdb.cpp.

◆ getSelfInterference()

double UnderwaterPhysicalfromdb::getSelfInterference ( const double _time,
const double _source_depth,
const double _destination_depth,
const double _destination_distance 
)
protectedvirtual

Read from the self interference.

Parameters
_timeTimestamp (in s)
_source_depthSource depth (in m)
_destination_depthDestination depth (in m)
_destination_distanceDestination distance (in m)
Returns
Self Interference in dB.

Definition at line 177 of file uwphysicalfromdb.cpp.

◆ getTauIndex()

const int & UnderwaterPhysicalfromdb::getTauIndex ( ) const
inlineprotected

Return the value of the tau_index parameter.

Returns
tau_index

Definition at line 152 of file uwphysicalfromdb.h.

◆ retrieveFromFile()

double UnderwaterPhysicalfromdb::retrieveFromFile ( const string _file_name,
const int _row_index,
const int _column_index 
) const
protectedvirtual

Read from a file the value in a specific row - column.

Parameters
_file_namename of the file
_row_indexindex of the row
_column_indexindex of the column
Returns
the value read

Definition at line 217 of file uwphysicalfromdb.cpp.

◆ setTauIndex()

void UnderwaterPhysicalfromdb::setTauIndex ( const int _tau_index)
inlineprotected

Set the line_index parameter.

Parameters
Lineindex to load in the file

Definition at line 141 of file uwphysicalfromdb.h.

Member Data Documentation

◆ path_gainmaps

char* UnderwaterPhysicalfromdb::path_gainmaps
private

Name of the trace file writter for the current node.

Definition at line 158 of file uwphysicalfromdb.h.

◆ path_selfinterference

char* UnderwaterPhysicalfromdb::path_selfinterference
private

Name of the trace file writter for the current node.

Definition at line 160 of file uwphysicalfromdb.h.

◆ tau_index

int UnderwaterPhysicalfromdb::tau_index
private

Tau index to load in the file.

Definition at line 162 of file uwphysicalfromdb.h.


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