#include <uwphysicaldb.h>
Definition at line 61 of file uwphysicaldb.h.
◆ UnderwaterPhysicaldb()
UnderwaterPhysicaldb::UnderwaterPhysicaldb |
( |
| ) |
|
Constructor of UnderwaterMPhyBpskDb class.
Definition at line 55 of file uwphysicaldb.cpp.
◆ ~UnderwaterPhysicaldb()
virtual UnderwaterPhysicaldb::~UnderwaterPhysicaldb |
( |
| ) |
|
|
inlinevirtual |
Destructor of UnderwaterMPhyBpskDb class.
Definition at line 73 of file uwphysicaldb.h.
◆ 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.
Definition at line 77 of file uwphysicaldb.cpp.
◆ 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.
Definition at line 150 of file uwphysicaldb.h.
◆ 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.
Definition at line 448 of file uwphysicaldb.cpp.
◆ getPERfromSIR()
double UnderwaterPhysicaldb::getPERfromSIR |
( |
const double & |
_sir, |
|
|
const double & |
_overlap |
|
) |
| |
|
protectedvirtual |
Packet error rate based on Overlap and SIR.
- Parameters
-
- Returns
- PER of the packet retrieved from file.
Definition at line 424 of file uwphysicaldb.cpp.
◆ 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.
Definition at line 318 of file uwphysicaldb.cpp.
◆ 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()
Definition at line 138 of file uwphysicaldb.h.
◆ recv()
void UnderwaterPhysicaldb::recv |
( |
Packet * |
p | ) |
|
|
virtual |
recv method.
It is called when a packet is received from the channel
- Parameters
-
Packet* | Pointer to the packet that are going to be received |
Reimplemented from UnderwaterPhysical.
Definition at line 165 of file uwphysicaldb.cpp.
◆ 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 |
◆ 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 |
Name of the trace file writter for the current node.
Definition at line 156 of file uwphysicaldb.h.
◆ range
std::map<uint8_t, std::set<double> > UnderwaterPhysicaldb::range |
|
protected |
◆ range_nums
std::map<string, uint8_t> UnderwaterPhysicaldb::range_nums |
|
protected |
Set of the number of ranges for a given pathtype, e.g "AA".
Definition at line 166 of file uwphysicaldb.h.
◆ sir
std::set<double> UnderwaterPhysicaldb::sir |
|
protected |
◆ snr
std::set<double> UnderwaterPhysicaldb::snr |
|
protected |
◆ token_separator
char UnderwaterPhysicaldb::token_separator |
|
protected |
Token used to parse the elements in a line of the database.
Definition at line 175 of file uwphysicaldb.h.
◆ type_of_node
std::map<uint8_t, string> UnderwaterPhysicaldb::type_of_node |
|
protected |
The documentation for this class was generated from the following files: