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>
37 NS_LOG_COMPONENT_DEFINE(
"SatBstpController");
42 NS_OBJECT_ENSURE_REGISTERED(SatBstpController);
47 m_configFileName(
"SatBstpConf.txt"),
48 m_superFrameDuration(MilliSeconds(100)),
51 NS_LOG_FUNCTION(
this);
53 ObjectBase::ConstructSelf(AttributeConstructionList());
61 NS_FATAL_ERROR(
"Beam hopping supports currently only STATIC mode!");
73 NS_LOG_FUNCTION(
this);
87 TypeId(
"ns3::SatBstpController")
89 .AddConstructor<SatBstpController>()
90 .AddAttribute(
"BeamHoppingMode",
93 MakeEnumAccessor<SatBstpController::BeamHoppingType_t>(
99 .AddAttribute(
"StaticBeamHoppingConfigFileName",
100 "Configuration file name for static beam hopping.",
101 StringValue(
"SatBstpConf_GW1.txt"),
104 .AddAttribute(
"SuperframeDuration",
105 "Superframe duration in Time.",
106 TimeValue(MilliSeconds(10)),
115 NS_LOG_FUNCTION(
this);
123 NS_LOG_FUNCTION(
this);
128 it->second.Nullify();
137 uint32_t feederFreqId,
141 NS_LOG_FUNCTION(
this << beamId << userFreqId << feederFreqId << gwId);
148 NS_LOG_INFO(
"Add beam: " << beamId <<
", userFreqId: " << userFreqId
149 <<
", feederFreqId: " << feederFreqId <<
", gwId: " << gwId);
153 m_staticBstp->AddEnabledBeamInfo(beamId, userFreqId, feederFreqId, gwId);
162 NS_LOG_FUNCTION(
this);
164 uint32_t validityInSuperframes(1);
169 std::vector<uint32_t> nextConf =
m_staticBstp->GetNextConf();
172 validityInSuperframes = nextConf.front();
179 uint32_t beamId = (*it).first;
186 if (std::find(nextConf.begin() + 1, nextConf.end(), beamId) != nextConf.end())
198 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...
BeamHoppingType_t m_bhMode
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.
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.