satellite-fading-external-input-trace.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: Jani Puttonen <jani.puttonen@magister.fi>
19  */
20 
21 #ifndef SATELLITE_FADING_EXTERNAL_INPUT_TRACE_H
22 #define SATELLITE_FADING_EXTERNAL_INPUT_TRACE_H
23 
24 #include <ns3/simple-ref-count.h>
25 
26 #include <stdint.h>
27 #include <string>
28 #include <vector>
29 
30 namespace ns3
31 {
32 
39 class SatFadingExternalInputTrace : public SimpleRefCount<SatFadingExternalInputTrace>
40 {
41  public:
43  {
46  };
47 
52 
58  SatFadingExternalInputTrace(TraceFileType_e type, std::string filePathName);
59 
64 
69  double GetFading() const;
70 
76  bool TestFadingTrace() const;
77 
78  private:
83  void ReadTrace(std::string filePathName);
84 
96 
100  static const uint32_t TIME_INDEX = 0;
101  static const uint32_t FADING_INDEX = 1;
102  static const uint32_t SCINTILLATION_INDEX = 2;
103 
110  float m_startTime;
112 
116  std::vector<std::vector<float>> m_traceVector;
117 };
118 
119 } // namespace ns3
120 
121 #endif /* SATELLITE_FADING_EXTERNAL_INPUT_TRACE_H */
The class for satellite fading external input trace.
bool TestFadingTrace() const
A method to test that the fading trace is according to assumptions.
void ReadTrace(std::string filePathName)
Read the fading trace from a binary file.
static const uint32_t TIME_INDEX
Constant indices used in the fading container.
float m_startTime
Fading start time and interval calculated from the actual trace file.
std::vector< std::vector< float > > m_traceVector
Container for the fading trace.
~SatFadingExternalInputTrace()
Destructor for SatFadingExternalInputTrace.
double GetFading() const
Get the current fading value for this specific fading file.
TraceFileType_e m_traceFileType
There may be different fading file types.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.