Loading...
Searching...
No Matches
satellite-markov-model.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2013 Magister Solutions Ltd.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Frans Laakso <frans.laakso@magister.fi>
19 */
20#ifndef SATELLITE_MARKOV_MODEL_H
21#define SATELLITE_MARKOV_MODEL_H
22
23#include "ns3/object.h"
24
25#include <stdint.h>
26
27namespace ns3
28{
29
37class SatMarkovModel : public Object
38{
39 public:
44 static TypeId GetTypeId(void);
45
50
56 SatMarkovModel(uint32_t numOfStates, uint32_t initialState);
57
62
69 void SetProbability(uint32_t from, uint32_t to, double probability);
70
75 uint32_t DoTransition();
76
81 uint32_t GetState() const;
82
87 void SetState(uint32_t newState);
88
92 void DoDispose();
93
94 private:
99
104
109
113 void Reset();
114};
115
116} // namespace ns3
117
118#endif /* SATELLITE_MARKOV_MODEL_H */
uint32_t m_numOfStates
Number of states.
static TypeId GetTypeId(void)
NS-3 function for type id.
void Reset()
Clear used variables.
void SetProbability(uint32_t from, uint32_t to, double probability)
Function for setting the probability values.
uint32_t GetState() const
Function for returning the current state.
void DoDispose()
Do needed dispose actions.
double * m_probabilities
Markov state change probabilities.
uint32_t m_currentState
Current state.
uint32_t DoTransition()
Function for evaluating the state change.
void SetState(uint32_t newState)
Function for setting the state.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.