25#include "ns3/boolean.h"
26#include "ns3/double.h"
29#include "ns3/nstime.h"
30#include "ns3/simulator.h"
31#include "ns3/string.h"
37NS_LOG_COMPONENT_DEFINE(
"SatBstpController");
51 NS_LOG_FUNCTION(
this);
57 NS_LOG_FUNCTION(
this);
59 Object::NotifyConstructionCompleted();
67 NS_FATAL_ERROR(
"Beam hopping supports currently only STATIC mode!");
79 NS_LOG_FUNCTION(
this);
93 TypeId(
"ns3::SatBstpController")
95 .AddConstructor<SatBstpController>()
96 .AddAttribute(
"BeamHoppingMode",
99 MakeEnumAccessor<SatBstpController::BeamHoppingType_t>(
105 .AddAttribute(
"StaticBeamHoppingConfigFileName",
106 "Configuration file name for static beam hopping.",
107 StringValue(
"SatBstpConf_GW1.txt"),
110 .AddAttribute(
"SuperframeDuration",
111 "Superframe duration in Time.",
112 TimeValue(MilliSeconds(10)),
121 NS_LOG_FUNCTION(
this);
126 it->second.Nullify();
135 uint32_t feederFreqId,
139 NS_LOG_FUNCTION(
this << beamId << userFreqId << feederFreqId << gwId);
146 NS_LOG_INFO(
"Add beam: " << beamId <<
", userFreqId: " << userFreqId
147 <<
", feederFreqId: " << feederFreqId <<
", gwId: " << gwId);
151 m_staticBstp->AddEnabledBeamInfo(beamId, userFreqId, feederFreqId, gwId);
160 NS_LOG_FUNCTION(
this);
162 uint32_t validityInSuperframes(1);
167 std::vector<uint32_t> nextConf =
m_staticBstp->GetNextConf();
170 validityInSuperframes = nextConf.front();
177 uint32_t beamId = (*it).first;
184 if (std::find(nextConf.begin() + 1, nextConf.end(), beamId) != nextConf.end())
196 NS_FATAL_ERROR(
"Dynamic beam switching time plan not yet supported!");
SatBstpController class is responsible of enabling and disabling configurable spot-beams defined by a...
virtual void NotifyConstructionCompleted() override
Notifier called once the ObjectBase is fully constructed.
BeamHoppingType_t m_bhMode
virtual ~SatBstpController()
Destructor for SatRequestManager.
static TypeId GetTypeId(void)
inherited from Object
CallbackContainer_t m_gwNdCallbacks
SatBstpController()
Default constructor.
void Initialize()
Initialize the beam hopping configurations.
std::string m_configFileName
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.
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.