satellite-fading-oscillator.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_FADING_OSCILLATOR_H
21 #define SATELLITE_FADING_OSCILLATOR_H
22 
23 #include <ns3/double.h>
24 #include <ns3/object.h>
25 #include <ns3/simulator.h>
26 
27 #include <complex>
28 
29 namespace ns3
30 {
31 
40 class SatFadingOscillator : public Object
41 {
42  public:
47  static TypeId GetTypeId(void);
48 
53 
60  SatFadingOscillator(std::complex<double> amplitude, double initialPhase, double omega);
61 
68  SatFadingOscillator(double amplitude, double initialPhase, double omega);
69 
74 
80  std::complex<double> GetComplexValueAt(double timeInSeconds) const;
81 
87  std::complex<double> GetCosineWaveValueAt(double timeInSeconds) const;
88 
92  void DoDispose();
93 
94  private:
98  std::complex<double> m_complexAmplitude;
99 
103  double m_amplitude;
104 
108  double m_phase;
109 
113  double m_omega;
114 };
115 
116 } // namespace ns3
117 
118 #endif /* SATELLITE_FADING_OSCILLATOR_H */
Oscillator class for faders.
std::complex< double > m_complexAmplitude
Complex amplitude.
void DoDispose()
Do needed dispose actions.
std::complex< double > GetCosineWaveValueAt(double timeInSeconds) const
Returns cosine wave complex value at time t.
static TypeId GetTypeId(void)
NS-3 function for type id.
std::complex< double > GetComplexValueAt(double timeInSeconds) const
Returns complex value at time t.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.