|
DESERT 3.6.1
|
#include <mclink.h>


Public Types | |
| enum | ChState { NOT_DEFINED = 0 , GOOD = 1 , MEDIUM = 2 , BAD = 3 } |
Public Member Functions | |
| MCLink () | |
| MCLink (double ber_good, double ber_bad, double p_gb, double p_bg, double step_period, ChState ch_state=MCLink::GOOD) | |
| virtual | ~MCLink () |
| virtual int | command (int, const char *const *) |
| virtual ChState | updateChState () |
| ChState | getChState () |
| virtual double | getBER () |
Protected Attributes | |
| double | ber_good |
| double | ber_bad |
| double | p_gb |
| double | p_bg |
| double | last_update |
| double | step_period |
| ChState | ch_state |
MCLink class models the BER of a directed link between two nodes.
The base class allows for GOOD/BAD channel states only, while the extended McLinkExtended class allows for MEDIUM state as well. Every state is associated with a different channel BER and every step_period the state is updated according to the transition probabilities.
| enum MCLink::ChState |
| MCLink::MCLink | ( | ) |
Default constructor of MCLink class.
Definition at line 45 of file mclink.cpp.
| MCLink::MCLink | ( | double | ber_good, |
| double | ber_bad, | ||
| double | p_gb, | ||
| double | p_bg, | ||
| double | step_period, | ||
| ChState | ch_state = MCLink::GOOD |
||
| ) |
Constructor of MCLink class.
| ber_good | BER with channel in GOOD state |
| ber_bad | BER with channel in BAD state |
| p_gb | Probability of transition from GOOD to BAD in one step |
| p_bg | Probability of transition from BAD to GOOD in one step |
| step_period | period (s) for channel transition between states |
| ch_state | Optional (default = GOOD) initial channel state |
Definition at line 57 of file mclink.cpp.
|
inlinevirtual |
|
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 in MCLinkExtended.
Definition at line 110 of file mclink.cpp.
|
virtual |
Reimplemented in MCLinkExtended.
Definition at line 99 of file mclink.cpp.
|
inline |
|
virtual |
Called upon packet reception, decides and returns the new channel state updates the members state and last_step.
| curr_step | current step number at packet arrival |
Reimplemented in MCLinkExtended.
Definition at line 73 of file mclink.cpp.
|
protected |
|
protected |
|
protected |
|
protected |