#include <uwphysicaldb.h>
◆ UnderwaterPhysicaldb()
| UnderwaterPhysicaldb::UnderwaterPhysicaldb |
( |
| ) |
|
Constructor of UnderwaterMPhyBpskDb class.
◆ ~UnderwaterPhysicaldb()
| virtual UnderwaterPhysicaldb::~UnderwaterPhysicaldb |
( |
| ) |
|
|
inlinevirtual |
Destructor of UnderwaterMPhyBpskDb class.
◆ command()
| int UnderwaterPhysicaldb::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.
References UnderwaterPhysical::command(), country, interference_, ipAddr_, modulation, overlap, path_, range, range_nums, sir, snr, and type_of_node.
◆ endRx()
| void UnderwaterPhysicaldb::endRx |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
◆ fromKmToMiles()
| const double UnderwaterPhysicaldb::fromKmToMiles |
( |
const double & |
_km | ) |
const |
|
inlineprotected |
Converts from kilometers to miles.
- Parameters
-
| _km | The value to be converted in miles. |
- Returns
- The value converted in miles.
Referenced by getPERfromSNR().
◆ getNearestNeighbor()
| double UnderwaterPhysicaldb::getNearestNeighbor |
( |
const std::set< double > & |
_set, |
|
|
const double & |
_value |
|
) |
| |
|
protectedvirtual |
Nearest neighbor of a value contained in a set.
- Parameters
-
| Set | that contains the values in which to search. |
| value | to search for. |
- Returns
- Nearest neighbor.
Referenced by getPERfromSIR(), and getPERfromSNR().
◆ getPERfromSIR()
| double UnderwaterPhysicaldb::getPERfromSIR |
( |
const double & |
_sir, |
|
|
const double & |
_overlap |
|
) |
| |
|
protectedvirtual |
◆ getPERfromSNR()
| double UnderwaterPhysicaldb::getPERfromSNR |
( |
const double & |
_snr, |
|
|
const int & |
_nbits, |
|
|
const Packet * |
p |
|
) |
| |
|
protectedvirtual |
Packet error rate based on SNR.
- Parameters
-
| SNR. | |
| nbits | length in bit of the packet. |
| p | Packet. |
- Returns
- PER of the packet retrieved from file.
References country, fromKmToMiles(), getNearestNeighbor(), ipAddr_, modulation, osstream, path_, range, range_nums, retrievePerFromFile(), snr, and type_of_node.
Referenced by endRx().
◆ isZero()
| const bool UnderwaterPhysicaldb::isZero |
( |
const double & |
_value | ) |
const |
|
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.
- Parameters
-
| double& | Number to evaluate. |
- Returns
- true if the number passed in input is equal to zero, false otherwise.
- See also
- std::numeric_limits<double>::epsilon()
◆ recv()
| void UnderwaterPhysicaldb::recv |
( |
Packet * |
p | ) |
|
|
virtual |
◆ retrievePerFromFile()
| const double UnderwaterPhysicaldb::retrievePerFromFile |
( |
const std::string & |
_file_name, |
|
|
const double & |
_snr |
|
) |
| const |
|
protectedvirtual |
◆ country
| string UnderwaterPhysicaldb::country |
|
protected |
◆ interf_val
| std::pair<double, double> UnderwaterPhysicaldb::interf_val |
|
protected |
(SIR, Overlap)
Referenced by endRx().
◆ interference_
◆ ipAddr_
| uint8_t UnderwaterPhysicaldb::ipAddr_ |
|
protected |
◆ modulation
| string UnderwaterPhysicaldb::modulation |
|
protected |
◆ osstream
| ostringstream UnderwaterPhysicaldb::osstream |
|
private |
◆ overlap
| std::set<double> UnderwaterPhysicaldb::overlap |
|
protected |
◆ path_
| char* UnderwaterPhysicaldb::path_ |
|
protected |
◆ range
| std::map<uint8_t, std::set<double> > UnderwaterPhysicaldb::range |
|
protected |
◆ range_nums
| std::map<string, uint8_t> UnderwaterPhysicaldb::range_nums |
|
protected |
◆ sir
| std::set<double> UnderwaterPhysicaldb::sir |
|
protected |
◆ snr
| std::set<double> UnderwaterPhysicaldb::snr |
|
protected |
◆ token_separator
| char UnderwaterPhysicaldb::token_separator |
|
protected |
◆ type_of_node
| std::map<uint8_t, string> UnderwaterPhysicaldb::type_of_node |
|
protected |
The documentation for this class was generated from the following files: