satellite-mutual-information-table.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2018 CNES
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: Joaquin Muguerza <joaquin.muguerza@viveris.fr>
19  *
20  */
21 
22 #ifndef SATELLITE_MUTUAL_INFORMATION_TABLE_H
23 #define SATELLITE_MUTUAL_INFORMATION_TABLE_H
24 
25 #include <ns3/object.h>
26 
27 #include <fstream>
28 #include <vector>
29 
30 namespace ns3
31 {
32 
38 class SatMutualInformationTable : public Object
39 {
40  public:
45  SatMutualInformationTable(std::string mutualInformationPath);
46 
51 
56  static TypeId GetTypeId();
57 
63  double GetNormalizedSymbolInformation(double snirDb) const;
64 
70  double GetSnirDb(double symbolInformationTarget) const;
71 
75  inline double GetBeta() const
76  {
77  return m_beta;
78  }
79 
80  private:
81  virtual void DoDispose();
82 
87  void Load(std::string mutualInformationPath);
88 
89  std::vector<double> m_snirDb;
90  std::vector<double> m_symbolInformation;
91  std::ifstream* m_ifs;
92 
96  double m_beta;
97 };
98 
99 } // end of namespace ns3
100 
101 #endif /* SATELLITE_MUTUAL_INFORMATION_TABLE_H */
Loads a mutual information file and provide query service.
double GetNormalizedSymbolInformation(double snirDb) const
Get the Normalized Symbol Information corresponding to a given SNIR.
virtual ~SatMutualInformationTable()
Destructor for SatMutualInformationTable.
void Load(std::string mutualInformationPath)
Load the mutual information.
double GetSnirDb(double symbolInformationTarget) const
Get the SNIR in dB for a given Normalized Symbol Information target.
double GetBeta() const
Get the value of beta.
SatMutualInformationTable(std::string mutualInformationPath)
Constructor with initialization parameters.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.