satellite-markov-conf.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 
21 #ifndef SAT_MARKOV_CONF_H
22 #define SAT_MARKOV_CONF_H
23 
24 #include "satellite-loo-conf.h"
26 
27 #include <ns3/boolean.h>
28 #include <ns3/double.h>
29 #include <ns3/nstime.h>
30 #include <ns3/object.h>
31 #include <ns3/simulator.h>
32 #include <ns3/uinteger.h>
33 
34 #include <map>
35 #include <stdint.h>
36 #include <vector>
37 
38 namespace ns3
39 {
40 
49 class SatMarkovConf : public Object
50 {
51  public:
55  typedef enum
56  {
60 
64  static const uint32_t DEFAULT_ELEVATION_COUNT = 1;
65 
69  static const uint32_t DEFAULT_STATE_COUNT = 3;
70 
75  static TypeId GetTypeId(void);
76 
80  SatMarkovConf();
81 
86 
92  uint32_t GetProbabilitySetID(double elevation);
93 
99  std::vector<std::vector<double>> GetElevationProbabilities(uint32_t set);
100 
105  uint32_t GetStateCount();
106 
111  Time GetCooldownPeriod();
112 
117  double GetMinimumPositionChange();
118 
123  uint32_t GetNumOfSets();
124 
129  uint32_t GetInitialState();
130 
135  Ptr<SatLooConf> GetLooConf();
136 
141  Ptr<SatRayleighConf> GetRayleighConf();
142 
148 
153  bool AreDecibelsUsed();
154 
158  void DoDispose();
159 
160  private:
165 
169  uint32_t m_stateCount;
170 
174  std::vector<std::vector<std::vector<double>>> m_markovProbabilities;
175 
179  std::vector<double> m_initialProbabilities;
180 
184  std::map<double, uint32_t> m_markovElevations;
185 
190 
195 
200 
204  Ptr<SatLooConf> m_looConf;
205 
209  Ptr<SatRayleighConf> m_rayleighConf;
210 
215 
219  void Reset();
220 };
221 
222 } // namespace ns3
223 
224 #endif /* SAT_MARKOV_CONF_H */
A configuration class for three state Markov model.
void DoDispose()
Do needed dispose actions.
std::vector< double > m_initialProbabilities
Initial Markov state probabilities.
std::vector< std::vector< double > > GetElevationProbabilities(uint32_t set)
Function for returning the probabilities.
bool m_useDecibels
Defines whether the calculations should return the fading value in decibels or not.
static const uint32_t DEFAULT_ELEVATION_COUNT
Default elevation count.
Ptr< SatRayleighConf > m_rayleighConf
Rayleigh configuration.
uint32_t GetProbabilitySetID(double elevation)
Function for returning the parameter set.
Time m_cooldownPeriodLength
Cooldown period lengthin seconds.
std::vector< std::vector< std::vector< double > > > m_markovProbabilities
Markov state change probabilities.
MarkovFaderType_t
Possible types of Markov state faders.
SatMarkovConf::MarkovFaderType_t GetFaderType()
Function for returning the selected fader type.
double m_minimumPositionChangeInMeters
Minimum position change in meters.
std::map< double, uint32_t > m_markovElevations
Markov elevations.
SatMarkovConf::MarkovFaderType_t m_faderType
Selected fader type.
Ptr< SatLooConf > m_looConf
Loo configuration.
Ptr< SatLooConf > GetLooConf()
Function for returning the Loo's model configuration.
void Reset()
Clear used variables.
uint32_t GetInitialState()
Function for returning the initial state.
Time GetCooldownPeriod()
Function for returning the cooldown period.
double GetMinimumPositionChange()
Function for returning the minimum position change distance.
static const uint32_t DEFAULT_STATE_COUNT
Default state count.
Ptr< SatRayleighConf > GetRayleighConf()
Function for returning the Loo's model configuration.
uint32_t GetStateCount()
Function for returning the number of states.
uint32_t m_elevationCount
Number of parameter sets.
static TypeId GetTypeId(void)
NS-3 function for type id.
uint32_t m_stateCount
Number of states.
bool AreDecibelsUsed()
Function for getting whether the calculations should return the fading value in decibels or not.
uint32_t GetNumOfSets()
Function for returning the number of parameter sets.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.