|
DESERT 4.0.0
|
#include <uwgainfromdb.h>


Public Member Functions | |
| UnderwaterGainFromDb () | |
| virtual | ~UnderwaterGainFromDb () |
| 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 double | getPER (double snr, int nbits, Packet *p) |
| 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 int & | getTimeRoughness () const |
| const int & | getDepthRoughness () const |
| const int & | getDistanceRoughness () const |
| const int & | getTotalTime () const |
| const double & | getFrequencyCorrectionFactor () const |
| virtual double | getGain (const double &, const double &, const double &, const double &) |
| 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) override |
| virtual void | endRx (Packet *p) override |
| virtual void | startRx (Packet *p) override |
| virtual double | consumedEnergyTx (const double &_duration) const |
| virtual double | consumedEnergyRx (const double &_duration) const |
| 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 |
Protected Attributes | |
| char * | path_ |
| 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 |
| uwinterference * | interference_ |
Private Attributes | |
| int | time_roughness_ |
| int | depth_roughness_ |
| int | distance_roughness_ |
| int | total_time_ |
| double | frequency_correction_factor_ |
| UnderwaterGainFromDb::UnderwaterGainFromDb | ( | ) |
Constructor of UnderwaterMPhyBpskDb class.
References depth_roughness_, distance_roughness_, frequency_correction_factor_, path_, time_roughness_, token_separator_, and total_time_.
|
inlinevirtual |
Destructor of UnderwaterMPhyBpskDb 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.
Reimplemented in UnderwaterPhysicalfromdb.
References UnderwaterPhysical::command(), and path_.
Referenced by UnderwaterPhysicalfromdb::command().

|
protectedvirtual |
|
inlineprotected |
Returns the depth_roughness_ parameter.
References depth_roughness_.
Referenced by UnderwaterPhysicalfromdb::getGain(), and UnderwaterPhysicalfromdb::getSelfInterference().
|
inlineprotected |
Returns the distance_roughness_ parameter.
References distance_roughness_.
Referenced by UnderwaterPhysicalfromdb::getGain(), and UnderwaterPhysicalfromdb::getSelfInterference().
|
inlineprotected |
Returns the frequency_correction_factor_ parameter.
References frequency_correction_factor_.
|
protectedvirtual |
param
param
Reimplemented in UnderwaterPhysicalfromdb.
References createNameFile(), depth_roughness_, distance_roughness_, retriveGainFromFile(), time_roughness_, and total_time_.
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). |
| nbits | length in bit of the packet. |
| p | Packet by witch the module gets information about source and destination. |
Reimplemented from UnderwaterPhysical.
Reimplemented in UnderwaterPhysicalfromdb.
References frequency_correction_factor_, getGain(), and UnderwaterPhysical::getPER().

|
inlineprotected |
Returns the time_roughness_ parameter.
References time_roughness_.
Referenced by UnderwaterPhysicalfromdb::getGain(), and UnderwaterPhysicalfromdb::getSelfInterference().
|
inlineprotected |
Returns the total_time_ parameter.
References total_time_.
Referenced by UnderwaterPhysicalfromdb::getGain(), and UnderwaterPhysicalfromdb::getSelfInterference().
|
inlineprotected |
Evaluates is the number passed as input is equal to zero. When C++ works with double and float number you can't compare them with 0. If the absolute value of the number is smaller than eplison that means that the number is equal to zero.
| double& | Number to evaluate. |
Referenced by UnderwaterPhysicalfromdb::retrieveFromFile(), and retriveGainFromFile().
|
protectedvirtual |
param
return
References isZero(), and token_separator_.
Referenced by getGain().

|
protectedvirtual |
Sets the depth_roughness_ parameter.
| Roughness | of the depth samples. |
References depth_roughness_.
|
protectedvirtual |
Sets the distance_roughness_ parameter.
| Roughness | of the distance samples. |
References distance_roughness_.
|
protectedvirtual |
Sets the frequency_correction_factor_ parameter.
| Frequency | correction factor. |
References frequency_correction_factor_.
|
protectedvirtual |
Sets the time_roughness_ parameter.
| Roughness | of the temporal samples. |
References time_roughness_.
|
protectedvirtual |
Sets the total_time_ parameter.
| Maximum | value of the temporal samples. |
References total_time_.
|
private |
Roughness of the depth samples.
Referenced by getDepthRoughness(), getGain(), setDepthRoughness(), and UnderwaterGainFromDb().
|
private |
Roughness of the distance samples.
Referenced by getDistanceRoughness(), getGain(), setDistanceRoughness(), and UnderwaterGainFromDb().
|
private |
used to shift from a frequency value to another one.
Referenced by getFrequencyCorrectionFactor(), getPER(), setFrequencyCorrectionFactor(), and UnderwaterGainFromDb().
|
protected |
Used to create strings.
Referenced by UnderwaterPhysicalfromdb::createNameFile(), and createNameFile().
|
protected |
Name of the trace file writter for the current node.
Referenced by command(), UnderwaterPhysicalfromdb::command(), createNameFile(), and UnderwaterGainFromDb().
|
private |
Roughness of the temporal samples.
Referenced by getGain(), getTimeRoughness(), setTimeRoughness(), and UnderwaterGainFromDb().
|
protected |
Token used to parse the elements in a line of the database.
Referenced by UnderwaterPhysicalfromdb::retrieveFromFile(), retriveGainFromFile(), and UnderwaterGainFromDb().
|
private |
Maximum value of the temporal samples, after this limit the smilulation time will be reset to zero.
Referenced by getGain(), getTotalTime(), setTotalTime(), and UnderwaterGainFromDb().