Loading...
Searching...
No Matches
satellite-rayleigh-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_RAYLEIGH_MODEL_H
21#define SATELLITE_RAYLEIGH_MODEL_H
22
26
27#include "ns3/random-variable-stream.h"
28#include "ns3/vector.h"
29
30#include <complex>
31#include <stdint.h>
32#include <vector>
33
34namespace ns3
35{
36
45{
46 public:
51 static TypeId GetTypeId(void);
52
57
64 SatRayleighModel(Ptr<SatRayleighConf> rayleighConf, uint32_t initialSet, uint32_t initialState);
65
70
74 void DoDispose();
75
80 std::complex<double> GetComplexGain();
81
86 double GetChannelGainDb();
87
92 double GetChannelGain();
93
99 void UpdateParameters(uint32_t set, uint32_t state);
100
101 private:
106
110 void Reset();
111
115 std::vector<Ptr<SatFadingOscillator>> m_oscillators;
116
120 uint32_t m_currentSet;
121
126
130 Ptr<UniformRandomVariable> m_uniformVariable;
131
135 Ptr<SatRayleighConf> m_rayleighConf;
136
140 std::vector<std::vector<double>> m_rayleighParameters;
141};
142
143} // namespace ns3
144
145#endif /* SATELLITE_RAYLEIGH_MODEL_H */
Ptr< SatRayleighConf > m_rayleighConf
Rayleigh configuration object.
uint32_t m_currentSet
Current parameter set.
uint32_t m_currentState
Current state.
std::vector< Ptr< SatFadingOscillator > > m_oscillators
Vector of oscillators.
void DoDispose()
Do needed dispose actions.
void UpdateParameters(uint32_t set, uint32_t state)
Function for updating the parameter set and state.
std::vector< std::vector< double > > m_rayleighParameters
Rayleigh model parameters.
double GetChannelGainDb()
Function for returning the channel gain in dB.
void Reset()
Clear used variables.
Ptr< UniformRandomVariable > m_uniformVariable
Uniform distribution random variable.
void ConstructOscillators()
Function for constructing the oscillators.
static TypeId GetTypeId(void)
NS-3 function for type id.
double GetChannelGain()
Function for returning the channel gain.
std::complex< double > GetComplexGain()
Function for calculating the oscillator complex gain.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.