satellite-static-bstp.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2016 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 SAT_STATIC_BSTP_H
22 #define SAT_STATIC_BSTP_H
23 
24 #include <ns3/simple-ref-count.h>
25 
26 #include <map>
27 #include <stdint.h>
28 #include <string>
29 #include <vector>
30 
31 namespace ns3
32 {
33 
58 class SatStaticBstp : public SimpleRefCount<SatStaticBstp>
59 {
60  public:
64  SatStaticBstp();
65  SatStaticBstp(std::string fileName);
66 
67  virtual ~SatStaticBstp()
68  {
69  }
70 
75  void LoadBstp(std::string filePathName);
76 
81  std::vector<uint32_t> GetNextConf() const;
82 
92  void AddEnabledBeamInfo(uint32_t beamId,
93  uint32_t userFreqId,
94  uint32_t feederFreqId,
95  uint32_t gwId);
96 
102  void CheckValidity();
103 
104  private:
105  std::vector<std::vector<uint32_t>> m_bstp;
106  mutable uint32_t m_currentIterator;
107 
108  // Helpful containers for checking the validity of the BSTP
109  std::map<uint32_t, uint32_t> m_beamGwMap;
110  std::map<uint32_t, uint32_t> m_beamFeederFreqIdMap;
111 
112  // All enabled spot-beams
113  std::vector<uint32_t> m_enabledBeams;
114 };
115 
116 } // namespace ns3
117 
118 #endif /* SAT_STATIC_BSTP_H */
SatStaticBstp class models the static beam switching time plan (BSTP) configuration,...
std::map< uint32_t, uint32_t > m_beamGwMap
void LoadBstp(std::string filePathName)
Load BSTP configuration from a file.
void CheckValidity()
Check validity of the individual BSTP configuration line.
std::vector< uint32_t > GetNextConf() const
Get the next configuration file.
std::vector< std::vector< uint32_t > > m_bstp
std::map< uint32_t, uint32_t > m_beamFeederFreqIdMap
std::vector< uint32_t > m_enabledBeams
SatStaticBstp()
Default constructor.
void AddEnabledBeamInfo(uint32_t beamId, uint32_t userFreqId, uint32_t feederFreqId, uint32_t gwId)
Add the information about which spot-beams are enabled in this simulation.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.