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 namespace ns3
35 {
36 
45 class SatMarkovConf : public Object
46 {
47  public:
51  typedef enum
52  {
56 
60  static const uint32_t DEFAULT_ELEVATION_COUNT = 1;
61 
65  static const uint32_t DEFAULT_STATE_COUNT = 3;
66 
71  static TypeId GetTypeId(void);
72 
76  SatMarkovConf();
77 
82 
88  uint32_t GetProbabilitySetID(double elevation);
89 
95  std::vector<std::vector<double>> GetElevationProbabilities(uint32_t set);
96 
101  uint32_t GetStateCount();
102 
107  Time GetCooldownPeriod();
108 
113  double GetMinimumPositionChange();
114 
119  uint32_t GetNumOfSets();
120 
125  uint32_t GetInitialState();
126 
131  Ptr<SatLooConf> GetLooConf();
132 
137  Ptr<SatRayleighConf> GetRayleighConf();
138 
144 
149  bool AreDecibelsUsed();
150 
154  void DoDispose();
155 
156  private:
161 
165  uint32_t m_stateCount;
166 
170  std::vector<std::vector<std::vector<double>>> m_markovProbabilities;
171 
175  std::vector<double> m_initialProbabilities;
176 
180  std::map<double, uint32_t> m_markovElevations;
181 
186 
191 
196 
200  Ptr<SatLooConf> m_looConf;
201 
205  Ptr<SatRayleighConf> m_rayleighConf;
206 
211 
215  void Reset();
216 };
217 
218 } // namespace ns3
219 
220 #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.