#include <mclinkextended.h>
|
| MCLinkExtended () |
|
| MCLinkExtended (double ber_good, double ber_medium, double ber_bad, double p_gb, double p_gm, double p_mg, double p_mb, double p_bg, double p_bm, double step_period, ChState ch_state=MCLink::GOOD) |
|
virtual | ~MCLinkExtended () |
|
virtual int | command (int, const char *const *) override |
|
virtual ChState | updateChState () override |
|
virtual double | getBER () override |
|
| MCLink () |
|
| MCLink (double ber_good, double ber_bad, double p_gb, double p_bg, double step_period, ChState ch_state=MCLink::GOOD) |
|
virtual | ~MCLink () |
|
ChState | getChState () |
|
|
void | mul_matrix (double(&A)[3][3], const double(&B)[3][3]) |
|
void | pow_matrix (const double(&A)[3][3], int n, double(&R)[3][3]) |
|
MCLinkExtended class stores and updates the probabilities and the channel state for UnderwaterHMMPhysicalExt.
Definition at line 48 of file mclinkextended.h.
◆ MCLinkExtended() [1/2]
MCLinkExtended::MCLinkExtended |
( |
| ) |
|
◆ MCLinkExtended() [2/2]
MCLinkExtended::MCLinkExtended |
( |
double |
ber_good, |
|
|
double |
ber_medium, |
|
|
double |
ber_bad, |
|
|
double |
p_gb, |
|
|
double |
p_gm, |
|
|
double |
p_mg, |
|
|
double |
p_mb, |
|
|
double |
p_bg, |
|
|
double |
p_bm, |
|
|
double |
step_period, |
|
|
ChState |
ch_state = MCLink::GOOD |
|
) |
| |
Constructor of MCLinkExtended class.
- Parameters
-
ber_good | BER with channel in GOOD state |
ber_medium | BER with channel in MEDIUM state |
ber_bad | BER with channel in BAD state |
p_gb | Probability of transition from GOOD to BAD in one step |
p_gm | Probability of transition from GOOD to MEDIUM in one step |
p_mg | Probability of transition from MEDIUM to GOOD in one step |
p_mb | Probability of transition from MEDIUM to BAD in one step |
p_bg | Probability of transition from BAD to GOOD in one step |
p_bm | Probability of transition from BAD to MEDIUM in one step |
step_period | period (s) for state transitions |
ch_state | Optional initial channel state (default = GOOD) of type MCLink::{GOOD | MEDIUM | BAD} |
Definition at line 104 of file mclinkextended.cpp.
◆ ~MCLinkExtended()
virtual MCLinkExtended::~MCLinkExtended |
( |
| ) |
|
|
inlinevirtual |
◆ command()
int MCLinkExtended::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
overridevirtual |
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 MCLink.
Definition at line 224 of file mclinkextended.cpp.
◆ getBER()
double MCLinkExtended::getBER |
( |
| ) |
|
|
overridevirtual |
◆ mul_matrix()
void MCLinkExtended::mul_matrix |
( |
double(&) |
A[3][3], |
|
|
const double(&) |
B[3][3] |
|
) |
| |
|
protected |
Auxiliary function calculating the result of a 3x3 matrix multiplication; result is stored in first argument.
- Parameters
-
A | the first factor of matrix multiplication |
B | the second factor of matrix multiplication |
Definition at line 125 of file mclinkextended.cpp.
◆ pow_matrix()
void MCLinkExtended::pow_matrix |
( |
const double(&) |
A[3][3], |
|
|
int |
n, |
|
|
double(&) |
R[3][3] |
|
) |
| |
|
protected |
Auxiliary function raising a 3x3 matrix to the power of n.
- Parameters
-
A | the matrix to be elevated to the n-th power |
n | the exponent of the operation |
R | the matrix that stores the result of the operation |
Definition at line 145 of file mclinkextended.cpp.
◆ updateChState()
Called upon packet reception, decides and returns the new channel state updates the members state and last_step.
- Parameters
-
curr_step | current step number at packet arrival |
- Returns
- the channel state at curr_step as MCLink::{GOOD | MEDIUM | BAD}
Reimplemented from MCLink.
Definition at line 168 of file mclinkextended.cpp.
◆ ber_medium
double MCLinkExtended::ber_medium |
|
protected |
double MCLinkExtended::P[3][3] |
|
protected |
◆ p_bm
double MCLinkExtended::p_bm |
|
protected |
Prob of transition from bad to medium channel.
Definition at line 135 of file mclinkextended.h.
◆ p_gm
double MCLinkExtended::p_gm |
|
protected |
Prob of transition from good to medium channel.
Definition at line 132 of file mclinkextended.h.
◆ p_mb
double MCLinkExtended::p_mb |
|
protected |
Prob of transition from medium to bad channel.
Definition at line 134 of file mclinkextended.h.
◆ p_mg
double MCLinkExtended::p_mg |
|
protected |
Prob of transition from medium to good channel.
Definition at line 133 of file mclinkextended.h.
The documentation for this class was generated from the following files: