ns3::SatMarkovModel Class Reference

Class for Markov state machine. More...

#include "satellite-markov-model.h"

+ Inheritance diagram for ns3::SatMarkovModel:
+ Collaboration diagram for ns3::SatMarkovModel:

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...
 

Detailed Description

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 35 of file satellite-markov-model.h.

Constructor & Destructor Documentation

◆ SatMarkovModel() [1/2]

ns3::SatMarkovModel::SatMarkovModel ( )

Constructor.

Definition at line 42 of file satellite-markov-model.cc.

◆ SatMarkovModel() [2/2]

ns3::SatMarkovModel::SatMarkovModel ( uint32_t  numOfStates,
uint32_t  initialState 
)

Constructor.

Parameters
numOfStatesNumber of states.
initialStateInitial state of the model.

Definition at line 52 of file satellite-markov-model.cc.

References m_currentState, m_numOfStates, and m_probabilities.

◆ ~SatMarkovModel()

ns3::SatMarkovModel::~SatMarkovModel ( )

Destructor.

Definition at line 71 of file satellite-markov-model.cc.

References Reset().

+ Here is the call graph for this function:

Member Function Documentation

◆ DoDispose()

void ns3::SatMarkovModel::DoDispose ( void  )

Do needed dispose actions.

Definition at line 79 of file satellite-markov-model.cc.

References Reset().

+ Here is the call graph for this function:

◆ DoTransition()

uint32_t ns3::SatMarkovModel::DoTransition ( )

Function for evaluating the state change.

Returns
new state

Definition at line 121 of file satellite-markov-model.cc.

References m_currentState, m_numOfStates, and m_probabilities.

◆ GetState()

uint32_t ns3::SatMarkovModel::GetState ( ) const

Function for returning the current state.

Returns
current state

Definition at line 100 of file satellite-markov-model.cc.

References m_currentState.

◆ GetTypeId()

TypeId ns3::SatMarkovModel::GetTypeId ( void  )
static

NS-3 function for type id.

Returns
type id

Definition at line 35 of file satellite-markov-model.cc.

◆ Reset()

void ns3::SatMarkovModel::Reset ( void  )
private

Clear used variables.

Definition at line 88 of file satellite-markov-model.cc.

References m_probabilities.

Referenced by ~SatMarkovModel(), and DoDispose().

+ Here is the caller graph for this function:

◆ SetProbability()

void ns3::SatMarkovModel::SetProbability ( uint32_t  from,
uint32_t  to,
double  probability 
)

Function for setting the probability values.

Parameters
fromstart state
toend state
probabilitychange probability

Definition at line 162 of file satellite-markov-model.cc.

References m_numOfStates, and m_probabilities.

◆ SetState()

void ns3::SatMarkovModel::SetState ( uint32_t  newState)

Function for setting the state.

Parameters
newStatenew state

Definition at line 108 of file satellite-markov-model.cc.

References m_currentState, and m_numOfStates.

Member Data Documentation

◆ m_currentState

uint32_t ns3::SatMarkovModel::m_currentState
private

Current state.

Definition at line 106 of file satellite-markov-model.h.

Referenced by SatMarkovModel(), DoTransition(), GetState(), and SetState().

◆ m_numOfStates

uint32_t ns3::SatMarkovModel::m_numOfStates
private

Number of states.

Definition at line 101 of file satellite-markov-model.h.

Referenced by SatMarkovModel(), DoTransition(), SetProbability(), and SetState().

◆ m_probabilities

double* ns3::SatMarkovModel::m_probabilities
private

Markov state change probabilities.

Definition at line 96 of file satellite-markov-model.h.

Referenced by SatMarkovModel(), DoTransition(), Reset(), and SetProbability().


The documentation for this class was generated from the following files: