satellite-bstp-controller.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 SATELLITE_BSTP_CONTROLLER_H_
22 #define SATELLITE_BSTP_CONTROLLER_H_
23 
24 #include "satellite-static-bstp.h"
25 
26 #include <ns3/callback.h>
27 #include <ns3/nstime.h>
28 #include <ns3/object.h>
29 
30 #include <map>
31 #include <stdint.h>
32 #include <string>
33 
34 namespace ns3
35 {
36 
48 class SatBstpController : public Object
49 {
50  public:
51  typedef enum
52  {
54  BH_STATIC = 1,
57 
62 
66  virtual ~SatBstpController();
67 
71  void Initialize();
72 
76  static TypeId GetTypeId(void);
77 
82  virtual TypeId GetInstanceTypeId(void) const;
83 
87  virtual void DoDispose();
88 
92  typedef Callback<void, bool> ToggleCallback;
93 
103  void AddNetDeviceCallback(uint32_t beamId,
104  uint32_t userFreqId,
105  uint32_t feederFreqId,
106  uint32_t gwId,
108 
109  protected:
114  void DoBstpConfiguration();
115 
116  private:
117  typedef std::map<uint32_t, ToggleCallback> CallbackContainer_t;
118 
121  std::string m_configFileName;
122 
129 
133  Ptr<SatStaticBstp> m_staticBstp;
134 };
135 
136 } // namespace ns3
137 
138 #endif /* SATELLITE_BSTP_CONTROLLER_H_ */
SatBstpController class is responsible of enabling and disabling configurable spot-beams defined by a...
virtual ~SatBstpController()
Destructor for SatRequestManager.
static TypeId GetTypeId(void)
inherited from Object
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
CallbackContainer_t m_gwNdCallbacks
SatBstpController()
Default constructor.
void Initialize()
Initialize the beam hopping configurations.
Ptr< SatStaticBstp > m_staticBstp
Beam switching time plan.
void AddNetDeviceCallback(uint32_t beamId, uint32_t userFreqId, uint32_t feederFreqId, uint32_t gwId, SatBstpController::ToggleCallback cb)
Add a callback to the SatNetDevice of GW matching to a certain beam id.
virtual void DoDispose()
Dispose of this class instance.
std::map< uint32_t, ToggleCallback > CallbackContainer_t
Callback< void, bool > ToggleCallback
Callback to fetch queue statistics.
void DoBstpConfiguration()
Periodical method to enable/disable certain beam ids related to the scheduling and transmission of BB...
Time m_superFrameDuration
Superframe duration in Time.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.