Class for Markov state machine. More...
#include "satellite-markov-model.h"
Public Member Functions | |
SatMarkovModel () | |
Constructor. More... | |
SatMarkovModel (uint32_t numOfStates, uint32_t initialState) | |
Constructor. More... | |
~SatMarkovModel () | |
Destructor. More... | |
void | DoDispose () |
Do needed dispose actions. More... | |
uint32_t | DoTransition () |
Function for evaluating the state change. More... | |
uint32_t | GetState () const |
Function for returning the current state. More... | |
void | SetProbability (uint32_t from, uint32_t to, double probability) |
Function for setting the probability values. More... | |
void | SetState (uint32_t newState) |
Function for setting the state. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
NS-3 function for type id. More... | |
Private Member Functions | |
void | Reset () |
Clear used variables. More... | |
Private Attributes | |
uint32_t | m_currentState |
Current state. More... | |
uint32_t | m_numOfStates |
Number of states. More... | |
double * | m_probabilities |
Markov state change probabilities. More... | |
Class for Markov state machine.
This class implements the state machine for Markov-model and is responsible for evaluating the state changes within the state machine.
Definition at line 37 of file satellite-markov-model.h.
ns3::SatMarkovModel::SatMarkovModel | ( | ) |
Constructor.
Definition at line 43 of file satellite-markov-model.cc.
ns3::SatMarkovModel::SatMarkovModel | ( | uint32_t | numOfStates, |
uint32_t | initialState | ||
) |
Constructor.
numOfStates | Number of states. |
initialState | Initial state of the model. |
Definition at line 53 of file satellite-markov-model.cc.
References m_currentState, m_numOfStates, and m_probabilities.
ns3::SatMarkovModel::~SatMarkovModel | ( | ) |
Destructor.
Definition at line 72 of file satellite-markov-model.cc.
References Reset().
void ns3::SatMarkovModel::DoDispose | ( | void | ) |
Do needed dispose actions.
Definition at line 80 of file satellite-markov-model.cc.
References Reset().
uint32_t ns3::SatMarkovModel::DoTransition | ( | ) |
Function for evaluating the state change.
Definition at line 122 of file satellite-markov-model.cc.
References m_currentState, m_numOfStates, and m_probabilities.
uint32_t ns3::SatMarkovModel::GetState | ( | ) | const |
Function for returning the current state.
Definition at line 101 of file satellite-markov-model.cc.
References m_currentState.
|
static |
|
private |
Clear used variables.
Definition at line 89 of file satellite-markov-model.cc.
References m_probabilities.
Referenced by ~SatMarkovModel(), and DoDispose().
void ns3::SatMarkovModel::SetProbability | ( | uint32_t | from, |
uint32_t | to, | ||
double | probability | ||
) |
Function for setting the probability values.
from | start state |
to | end state |
probability | change probability |
Definition at line 163 of file satellite-markov-model.cc.
References m_numOfStates, and m_probabilities.
void ns3::SatMarkovModel::SetState | ( | uint32_t | newState | ) |
Function for setting the state.
newState | new state |
Definition at line 109 of file satellite-markov-model.cc.
References m_currentState, and m_numOfStates.
|
private |
Current state.
Definition at line 108 of file satellite-markov-model.h.
Referenced by SatMarkovModel(), DoTransition(), GetState(), and SetState().
|
private |
Number of states.
Definition at line 103 of file satellite-markov-model.h.
Referenced by SatMarkovModel(), DoTransition(), SetProbability(), and SetState().
|
private |
Markov state change probabilities.
Definition at line 98 of file satellite-markov-model.h.
Referenced by SatMarkovModel(), DoTransition(), Reset(), and SetProbability().