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 <string>
29 #include <vector>
30 
31 namespace ns3
32 {
33 
39 class SatMutualInformationTable : public Object
40 {
41  public:
46  SatMutualInformationTable(std::string mutualInformationPath);
47 
52 
57  static TypeId GetTypeId();
58 
64  double GetNormalizedSymbolInformation(double snirDb) const;
65 
71  double GetSnirDb(double symbolInformationTarget) const;
72 
76  inline double GetBeta() const
77  {
78  return m_beta;
79  }
80 
81  private:
82  virtual void DoDispose();
83 
88  void Load(std::string mutualInformationPath);
89 
90  std::vector<double> m_snirDb;
91  std::vector<double> m_symbolInformation;
92  std::ifstream* m_ifs;
93 
97  double m_beta;
98 };
99 
100 } // end of namespace ns3
101 
102 #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.