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 <vector>
27 
28 namespace ns3
29 {
30 
55 class SatStaticBstp : public SimpleRefCount<SatStaticBstp>
56 {
57  public:
61  SatStaticBstp();
62  SatStaticBstp(std::string fileName);
63 
64  virtual ~SatStaticBstp()
65  {
66  }
67 
72  void LoadBstp(std::string filePathName);
73 
78  std::vector<uint32_t> GetNextConf() const;
79 
89  void AddEnabledBeamInfo(uint32_t beamId,
90  uint32_t userFreqId,
91  uint32_t feederFreqId,
92  uint32_t gwId);
93 
99  void CheckValidity();
100 
101  private:
102  std::vector<std::vector<uint32_t>> m_bstp;
103  mutable uint32_t m_currentIterator;
104 
105  // Helpful containers for checking the validity of the BSTP
106  std::map<uint32_t, uint32_t> m_beamGwMap;
107  std::map<uint32_t, uint32_t> m_beamFeederFreqIdMap;
108 
109  // All enabled spot-beams
110  std::vector<uint32_t> m_enabledBeams;
111 };
112 
113 } // namespace ns3
114 
115 #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.