Loading...
Searching...
No Matches
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.
 SatMarkovModel (uint32_t numOfStates, uint32_t initialState)
 Constructor.
 ~SatMarkovModel ()
 Destructor.
void DoDispose ()
 Do needed dispose actions.
uint32_t DoTransition ()
 Function for evaluating the state change.
uint32_t GetState () const
 Function for returning the current state.
void SetProbability (uint32_t from, uint32_t to, double probability)
 Function for setting the probability values.
void SetState (uint32_t newState)
 Function for setting the state.

Static Public Member Functions

static TypeId GetTypeId (void)
 NS-3 function for type id.

Private Member Functions

void Reset ()
 Clear used variables.

Private Attributes

uint32_t m_currentState
 Current state.
uint32_t m_numOfStates
 Number of states.
double * m_probabilities
 Markov state change probabilities.

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

Constructor & Destructor Documentation

◆ SatMarkovModel() [1/2]

ns3::SatMarkovModel::SatMarkovModel ( )

Constructor.

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

References m_currentState, m_numOfStates, and m_probabilities.

◆ 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 53 of file satellite-markov-model.cc.

References m_currentState, m_numOfStates, and m_probabilities.

◆ ~SatMarkovModel()

ns3::SatMarkovModel::~SatMarkovModel ( )

Destructor.

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

References Reset().

Here is the call graph for this function:

Member Function Documentation

◆ DoDispose()

void ns3::SatMarkovModel::DoDispose ( )

Do needed dispose actions.

Definition at line 80 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 122 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 101 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 36 of file satellite-markov-model.cc.

◆ Reset()

void ns3::SatMarkovModel::Reset ( )
private

Clear used variables.

Definition at line 89 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 163 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 109 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 108 of file satellite-markov-model.h.

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

◆ m_numOfStates

uint32_t ns3::SatMarkovModel::m_numOfStates
private

Number of states.

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

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

◆ m_probabilities

double* ns3::SatMarkovModel::m_probabilities
private

Markov state change probabilities.

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

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


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