Loading...
Searching...
No Matches
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
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
34namespace ns3
35{
36
48class SatBstpController : public Object
49{
50 public:
51 typedef enum
52 {
57
62
71 virtual void NotifyConstructionCompleted() override;
72
76 virtual ~SatBstpController();
77
81 void Initialize();
82
86 static TypeId GetTypeId(void);
87
91 virtual void DoDispose();
92
96 typedef Callback<void, bool> ToggleCallback;
97
107 void AddNetDeviceCallback(uint32_t beamId,
108 uint32_t userFreqId,
109 uint32_t feederFreqId,
110 uint32_t gwId,
112
113 protected:
118 void DoBstpConfiguration();
119
120 private:
121 typedef std::map<uint32_t, ToggleCallback> CallbackContainer_t;
122
125 std::string m_configFileName;
126
133
137 Ptr<SatStaticBstp> m_staticBstp;
138};
139
140} // namespace ns3
141
142#endif /* SATELLITE_BSTP_CONTROLLER_H_ */
virtual void NotifyConstructionCompleted() override
Notifier called once the ObjectBase is fully constructed.
virtual ~SatBstpController()
Destructor for SatRequestManager.
static TypeId GetTypeId(void)
inherited from Object
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.