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 namespace ns3
31 {
32 
44 class SatBstpController : public Object
45 {
46  public:
47  typedef enum
48  {
50  BH_STATIC = 1,
53 
58 
62  virtual ~SatBstpController();
63 
67  void Initialize();
68 
72  static TypeId GetTypeId(void);
73 
78  virtual TypeId GetInstanceTypeId(void) const;
79 
83  virtual void DoDispose();
84 
88  typedef Callback<void, bool> ToggleCallback;
89 
99  void AddNetDeviceCallback(uint32_t beamId,
100  uint32_t userFreqId,
101  uint32_t feederFreqId,
102  uint32_t gwId,
104 
105  protected:
110  void DoBstpConfiguration();
111 
112  private:
113  typedef std::map<uint32_t, ToggleCallback> CallbackContainer_t;
114 
117  std::string m_configFileName;
118 
125 
129  Ptr<SatStaticBstp> m_staticBstp;
130 };
131 
132 } // namespace ns3
133 
134 #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.