satellite-look-up-table.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
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: Budiarto Herman <budiarto.herman@magister.fi>
19  *
20  */
21 
22 #ifndef SATELLITE_LOOK_UP_TABLE_H
23 #define SATELLITE_LOOK_UP_TABLE_H
24 
25 #include <ns3/object.h>
26 
27 #include <fstream>
28 #include <vector>
29 
30 namespace ns3
31 {
32 
38 class SatLookUpTable : public Object
39 {
40  public:
45  SatLookUpTable(std::string linkResultPath);
46 
50  virtual ~SatLookUpTable();
51 
56  static TypeId GetTypeId();
57 
63  double GetBler(double sinrDb) const;
64 
70  double GetEsNoDb(double blerTarget) const;
71 
72  private:
73  virtual void DoDispose();
74 
79  void Load(std::string linkResultPath);
80 
81  std::vector<double> m_esNoDb;
82  std::vector<double> m_bler;
83  std::ifstream* m_ifs;
84 };
85 
86 } // end of namespace ns3
87 
88 #endif /* SATELLITE_LOOK_UP_TABLE_H */
Loads a link result file and provide query service for BLER.
virtual ~SatLookUpTable()
Destructor for SatLookUpTable.
double GetBler(double sinrDb) const
Get the BLER corresponding to a given SINR.
std::vector< double > m_bler
static TypeId GetTypeId()
Get the type ID.
double GetEsNoDb(double blerTarget) const
Get Es/No in dB for a given BLER target.
std::vector< double > m_esNoDb
void Load(std::string linkResultPath)
Load the link results.
SatLookUpTable(std::string linkResultPath)
Constructor with initialization parameters.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.