Loading...
Searching...
No Matches
satellite-ncc.cc
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2013 Magister Solutions Ltd
4 * Copyright (c) 2018 CNES
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation;
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * Author: Sami Rantanen <sami.rantanen@magister.fi>
20 * Author: Mathias Ettinger <mettinger@toulouse.viveris.fr>
21 */
22
23#include "satellite-ncc.h"
24
28
29#include "ns3/address.h"
30#include "ns3/log.h"
31#include "ns3/packet.h"
32
33#include <map>
34#include <tuple>
35#include <utility>
36
37NS_LOG_COMPONENT_DEFINE("SatNcc");
38
39namespace ns3
40{
41
42NS_OBJECT_ENSURE_REGISTERED(SatNcc);
43
44TypeId
46{
47 static TypeId tid =
48 TypeId("ns3::SatNcc")
49 .SetParent<Object>()
50 .AddConstructor<SatNcc>()
51 //
52 // Trace sources
53 //
54 .AddTraceSource("NccRx",
55 "Trace source indicating a CR has received by NCC",
56 MakeTraceSourceAccessor(&SatNcc::m_nccRxTrace),
57 "ns3::Packet::TracedCallback")
58 .AddTraceSource("NccTx",
59 "Trace source indicating a TBTP has sent by NCC",
60 MakeTraceSourceAccessor(&SatNcc::m_nccTxTrace),
61 "ns3::Packet::TracedCallback")
62 .AddAttribute("HandoverDelay",
63 "Delay between handover acceptance and effective information transfer",
64 TimeValue(Seconds(0.0)),
65 MakeTimeAccessor(&SatNcc::m_utHandoverDelay),
66 MakeTimeChecker())
67 .AddAttribute("UtTimeout",
68 "Timeout to logoff a UT, if logon procedure is used",
69 TimeValue(Seconds(10)),
70 MakeTimeAccessor(&SatNcc::m_utTimeout),
71 MakeTimeChecker());
72 return tid;
73}
74
76 : m_utHandoverDelay(Seconds(0.0)),
77 m_utTimeout(Seconds(10)),
78 m_useLogon(false),
79 m_useLora(false)
80{
81 NS_LOG_FUNCTION(this);
82}
83
85{
86 NS_LOG_FUNCTION(this);
87}
88
89void
91{
92 NS_LOG_FUNCTION(this);
93
96
97 Object::DoDispose();
98}
99
100void
101SatNcc::UtCnoUpdated(uint32_t satId,
102 uint32_t beamId,
103 Address sourceMac,
104 Address /*gwId*/,
105 double cno,
106 bool isSatelliteMac)
107{
108 NS_LOG_FUNCTION(this << satId << beamId << sourceMac << cno);
109
110 if (isSatelliteMac)
111 {
112 m_beamSchedulers[std::make_pair(satId, beamId)]->UpdateSatelliteCno(sourceMac, cno);
113 }
114 else
115 {
116 m_beamSchedulers[std::make_pair(satId, beamId)]->UpdateUtCno(sourceMac, cno);
117 }
118}
119
120void
122 uint32_t beamId,
123 uint32_t carrierId,
124 uint8_t allocationChannelId,
125 double averageNormalizedOfferedLoad)
126{
127 NS_LOG_FUNCTION(this << satId << beamId << carrierId << (uint32_t)allocationChannelId
128 << averageNormalizedOfferedLoad);
129
130 bool isLowRandomAccessLoad = true;
131 std::map<std::tuple<uint32_t, uint32_t, uint8_t>, bool>::iterator findResult;
132 std::pair<std::map<std::tuple<uint32_t, uint32_t, uint8_t>, bool>::iterator, bool> insertResult;
133
135 findResult = m_isLowRandomAccessLoad.find(std::make_tuple(satId, beamId, allocationChannelId));
136
137 if (findResult == m_isLowRandomAccessLoad.end())
138 {
139 insertResult = m_isLowRandomAccessLoad.insert(
140 std::make_pair(std::make_tuple(satId, beamId, allocationChannelId),
141 isLowRandomAccessLoad));
142
143 if (!insertResult.second)
144 {
145 NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - Insert failed");
146 }
147 else
148 {
149 isLowRandomAccessLoad = insertResult.second;
150 }
151 }
152 else
153 {
154 isLowRandomAccessLoad = findResult->second;
155 }
156
157 NS_LOG_INFO("Beam: " << beamId << ", carrier ID: " << carrierId
158 << ", AC: " << (uint32_t)allocationChannelId
159 << " - Measuring the average normalized offered random access load: "
160 << averageNormalizedOfferedLoad);
161
162 std::map<uint8_t, double>::iterator itThreshold =
164
166 {
167 NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - Average normalized offered load "
168 "threshold not set for beam: "
169 << beamId << ", carrier: " << carrierId
170 << ", allocation channel: " << (uint32_t)allocationChannelId);
171 }
172
174 if (isLowRandomAccessLoad)
175 {
176 NS_LOG_INFO("Beam: " << beamId << ", carrier ID: " << carrierId
177 << " - Currently low load in effect for allocation channel: "
178 << (uint32_t)allocationChannelId);
180 if (averageNormalizedOfferedLoad >= itThreshold->second)
181 {
182 std::map<uint8_t, uint16_t>::iterator it;
183
184 it = m_highLoadBackOffProbability.find(allocationChannelId);
185
186 if (it == m_highLoadBackOffProbability.end())
187 {
188 NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - High load backoff "
189 "probability not set for allocation channel: "
190 << (uint32_t)allocationChannelId);
191 }
192
193 uint16_t probability = it->second;
194
195 it = m_highLoadBackOffTime.find(allocationChannelId);
196
197 if (it == m_highLoadBackOffTime.end())
198 {
199 NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - High load backoff time "
200 "not set for allocation channel: "
201 << (uint32_t)allocationChannelId);
202 }
203
204 uint16_t time = it->second;
205
208 time,
209 satId,
210 beamId,
211 allocationChannelId);
212
213 NS_LOG_INFO("Beam: " << beamId << ", carrier ID: " << carrierId
214 << ", AC: " << (uint32_t)allocationChannelId
215 << " - Switching to HIGH LOAD back off parameterization");
216
218 m_isLowRandomAccessLoad.at(std::make_tuple(satId, beamId, allocationChannelId)) = false;
219 }
220 }
222 else
223 {
224 NS_LOG_INFO("Beam: " << beamId << ", carrier ID: " << carrierId
225 << " - Currently high load in effect for allocation channel: "
226 << (uint32_t)allocationChannelId);
227
229 if (averageNormalizedOfferedLoad < itThreshold->second)
230 {
231 std::map<uint8_t, uint16_t>::iterator it;
232
233 it = m_lowLoadBackOffProbability.find(allocationChannelId);
234
235 if (it == m_lowLoadBackOffProbability.end())
236 {
237 NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - Low load backoff "
238 "probability not set for allocation channel: "
239 << (uint32_t)allocationChannelId);
240 }
241
242 uint16_t probability = it->second;
243
244 it = m_lowLoadBackOffTime.find(allocationChannelId);
245
246 if (it == m_lowLoadBackOffTime.end())
247 {
248 NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - Low load backoff time "
249 "not set for allocation channel: "
250 << (uint32_t)allocationChannelId);
251 }
252
253 uint16_t time = it->second;
254
257 time,
258 satId,
259 beamId,
260 allocationChannelId);
261
262 NS_LOG_INFO("Beam: " << beamId << ", carrier ID: " << carrierId
263 << ", AC: " << (uint32_t)allocationChannelId
264 << " - Switching to LOW LOAD back off parameterization");
265
267 m_isLowRandomAccessLoad.at(std::make_tuple(satId, beamId, allocationChannelId)) = true;
268 }
269 }
270}
271
272void
274 uint16_t backoffTime,
275 uint32_t satId,
276 uint32_t beamId,
277 uint8_t allocationChannelId)
278{
279 NS_LOG_FUNCTION(this);
280
281 Ptr<SatRaMessage> raMsg = CreateObject<SatRaMessage>();
282 std::map<std::pair<uint32_t, uint32_t>, Ptr<SatBeamScheduler>>::iterator iterator =
283 m_beamSchedulers.find(std::make_pair(satId, beamId));
284
285 if (iterator == m_beamSchedulers.end())
286 {
287 NS_FATAL_ERROR("SatNcc::SendRaControlMessage - Beam scheduler not found");
288 }
289
291 raMsg->SetAllocationChannelId(allocationChannelId);
292
294 raMsg->SetBackoffProbability(backoffProbability);
295 raMsg->SetBackoffTime(backoffTime);
296
297 NS_LOG_INFO("Sending random access control message for AC: "
298 << (uint32_t)allocationChannelId << ", backoff probability: " << backoffProbability
299 << ", backoff time: " << backoffTime);
300
301 iterator->second->Send(raMsg);
302}
303
304void
305SatNcc::UtCrReceived(uint32_t satId, uint32_t beamId, Address utId, Ptr<SatCrMessage> crMsg)
306{
307 NS_LOG_FUNCTION(this << satId << beamId << utId << crMsg);
308
309 m_beamSchedulers[std::make_pair(satId, beamId)]->UtCrReceived(utId, crMsg);
310}
311
312void
313SatNcc::AddBeam(uint32_t satId,
314 uint32_t beamId,
315 Ptr<SatNetDevice> gwNetDevice,
316 Ptr<SatOrbiterNetDevice> orbiterNetDevice,
319 Ptr<SatSuperframeSeq> seq,
320 uint32_t maxFrameSize,
321 Address satAddress,
322 Address gwAddress)
323{
324 NS_LOG_FUNCTION(this << satId << beamId << gwNetDevice << orbiterNetDevice << &cb << &tbtpCb
325 << seq << maxFrameSize << satAddress << gwAddress);
326
327 Ptr<SatBeamScheduler> scheduler;
328 std::map<std::pair<uint32_t, uint32_t>, Ptr<SatBeamScheduler>>::iterator iterator =
329 m_beamSchedulers.find(std::make_pair(satId, beamId));
330
331 if (iterator != m_beamSchedulers.end())
332 {
333 NS_FATAL_ERROR("Beam tried to add, already added.");
334 }
335
336 scheduler = CreateObject<SatBeamScheduler>();
337 scheduler->Initialize(satId,
338 beamId,
339 gwNetDevice,
340 orbiterNetDevice,
341 cb,
342 seq,
343 maxFrameSize,
344 satAddress,
345 gwAddress);
346
347 scheduler->SetSendTbtpCallback(tbtpCb);
348
349 scheduler->SetUseLora(m_useLora);
350
351 m_beamSchedulers.insert(std::make_pair(std::make_pair(satId, beamId), scheduler));
352}
353
354void
355SatNcc::AddUt(Ptr<SatLowerLayerServiceConf> llsConf,
356 Address utId,
357 uint32_t satId,
358 uint32_t beamId,
359 Callback<void, uint32_t> setRaChannelCallback,
360 bool verifyExisting)
361{
362 NS_LOG_FUNCTION(this << utId << beamId);
363
364 std::map<std::pair<uint32_t, uint32_t>, Ptr<SatBeamScheduler>>::iterator iterator =
365 m_beamSchedulers.find(std::make_pair(satId, beamId));
366
367 if (iterator == m_beamSchedulers.end())
368 {
369 NS_FATAL_ERROR("Beam where tried to add, not found.");
370 }
371
372 if (!verifyExisting || !(m_beamSchedulers[std::make_pair(satId, beamId)]->HasUt(utId)))
373 {
374 setRaChannelCallback(m_beamSchedulers[std::make_pair(satId, beamId)]->AddUt(utId, llsConf));
375 }
376}
377
378void
379SatNcc::RemoveUt(Address utId, uint32_t satId, uint32_t beamId)
380{
381 NS_LOG_FUNCTION(this << utId << beamId);
382
383 if (m_beamSchedulers[std::make_pair(satId, beamId)]->HasUt(utId))
384 {
385 m_beamSchedulers[std::make_pair(satId, beamId)]->RemoveUt(utId);
386 }
387}
388
389void
391 uint16_t lowLoadBackOffProbability)
392{
393 NS_LOG_FUNCTION(this << (uint32_t)allocationChannelId << lowLoadBackOffProbability);
394
395 NS_LOG_INFO("AC: " << (uint32_t)allocationChannelId
396 << ", low load backoff probability: " << lowLoadBackOffProbability);
397 m_lowLoadBackOffProbability[allocationChannelId] = lowLoadBackOffProbability;
398}
399
400void
402 uint16_t highLoadBackOffProbability)
403{
404 NS_LOG_FUNCTION(this << (uint32_t)allocationChannelId << highLoadBackOffProbability);
405
406 NS_LOG_INFO("AC: " << (uint32_t)allocationChannelId
407 << ", high load backoff probability: " << highLoadBackOffProbability);
408 m_highLoadBackOffProbability[allocationChannelId] = highLoadBackOffProbability;
409}
410
411void
412SatNcc::SetRandomAccessLowLoadBackoffTime(uint8_t allocationChannelId, uint16_t lowLoadBackOffTime)
413{
414 NS_LOG_FUNCTION(this << (uint32_t)allocationChannelId << lowLoadBackOffTime);
415
416 NS_LOG_INFO("AC: " << (uint32_t)allocationChannelId
417 << ", low load backoff time: " << lowLoadBackOffTime);
418 m_lowLoadBackOffTime[allocationChannelId] = lowLoadBackOffTime;
419}
420
421void
423 uint16_t highLoadBackOffTime)
424{
425 NS_LOG_FUNCTION(this << (uint32_t)allocationChannelId << highLoadBackOffTime);
426
427 NS_LOG_INFO("AC: " << (uint32_t)allocationChannelId
428 << ", high load backoff time: " << highLoadBackOffTime);
429 m_highLoadBackOffTime[allocationChannelId] = highLoadBackOffTime;
430}
431
432void
434 double threshold)
435{
436 NS_LOG_FUNCTION(this << (uint32_t)allocationChannelId << threshold);
437
438 NS_LOG_INFO("AC: " << (uint32_t)allocationChannelId
439 << ", average normalized offered load threshold: " << threshold);
440 m_randomAccessAverageNormalizedOfferedLoadThreshold[allocationChannelId] = threshold;
441}
442
443Ptr<SatBeamScheduler>
444SatNcc::GetBeamScheduler(uint32_t satId, uint32_t beamId) const
445{
446 NS_LOG_FUNCTION(this << satId << beamId);
447
448 std::map<std::pair<uint32_t, uint32_t>, Ptr<SatBeamScheduler>>::const_iterator it =
449 m_beamSchedulers.find(std::make_pair(satId, beamId));
450
451 if (it == m_beamSchedulers.end())
452 {
453 return 0;
454 }
455 else
456 {
457 return it->second;
458 }
459}
460
461void
463 uint32_t srcSatId,
464 uint32_t srcBeamId,
465 uint32_t destSatId,
466 uint32_t destBeamId)
467{
468 NS_LOG_FUNCTION(this << utId << srcSatId << srcBeamId << destSatId << destBeamId);
469
470 Ptr<SatBeamScheduler> srcScheduler = GetBeamScheduler(srcSatId, srcBeamId);
471 Ptr<SatBeamScheduler> destScheduler = GetBeamScheduler(destSatId, destBeamId);
472
473 if (!srcScheduler)
474 {
475 NS_FATAL_ERROR("Source beam not configured");
476 }
477
478 if (!destScheduler)
479 {
480 NS_FATAL_ERROR("Destination beam not configured");
481 }
482
483 srcScheduler->TransferUtToBeam(utId, destScheduler);
484 m_updateRoutingCallback(utId, srcScheduler->GetGwAddress(), destScheduler->GetGwAddress());
485}
486
487void
489 uint32_t srcSatId,
490 uint32_t srcBeamId,
491 uint32_t destSatId,
492 uint32_t destBeamId)
493{
494 NS_LOG_FUNCTION(this << utId << srcSatId << srcBeamId << destSatId << destBeamId);
495
496 Ptr<SatBeamScheduler> scheduler = GetBeamScheduler(srcSatId, srcBeamId);
497 Ptr<SatBeamScheduler> destination = GetBeamScheduler(destSatId, destBeamId);
498
499 if (!scheduler)
500 {
501 NS_FATAL_ERROR("Source beam does not exist!");
502 }
503
504 if (!destination)
505 {
506 NS_LOG_WARN("Destination beam does not exist, cancel handover");
507
508 Ptr<SatTimuMessage> timuMsg = scheduler->CreateTimu();
509 scheduler->SendTo(timuMsg, utId);
510 }
511 else if (scheduler->HasUt(utId) && !destination->HasUt(utId))
512 {
513 NS_LOG_INFO("Performing handover!");
514
515 Ptr<SatTimuMessage> timuMsg = destination->CreateTimu();
516 scheduler->SendTo(timuMsg, utId);
517
518 Simulator::Schedule(m_utHandoverDelay,
520 this,
521 utId,
522 srcSatId,
523 srcBeamId,
524 destSatId,
525 destBeamId);
526 }
527 else if (!scheduler->HasUt(utId) && destination->HasUt(utId))
528 {
529 NS_LOG_INFO("Handover already performed, sending back TIM-U just in case!");
530
531 Ptr<SatTimuMessage> timuMsg = destination->CreateTimu();
532 scheduler->SendTo(timuMsg, utId);
533 }
534 else
535 {
536 NS_FATAL_ERROR("Inconsistent handover state: UT is neither in source nor destination beam; "
537 "or in both");
538 }
539}
540
541void
543{
544 NS_LOG_FUNCTION(this << &cb);
545
547}
548
549void
550SatNcc::ReserveLogonChannel(uint32_t logonChannelId)
551{
552 NS_LOG_FUNCTION(this << logonChannelId);
553
554 for (auto& beamScheduler : m_beamSchedulers)
555 {
556 beamScheduler.second->ReserveLogonChannel(logonChannelId);
557 }
558}
559
560void
561SatNcc::ReceiveControlBurst(Address utId, uint32_t satId, uint32_t beamId)
562{
563 NS_LOG_FUNCTION(this << utId << beamId);
564
565 std::tuple<Address, uint32_t, uint32_t> id = std::make_tuple(utId, satId, beamId);
566
568 {
569 Simulator::Schedule(m_utTimeout, &SatNcc::CheckTimeout, this, utId, satId, beamId);
570 }
571 m_lastControlBurstReception[id] = Simulator::Now();
572}
573
574void
576{
577 NS_LOG_FUNCTION(this << useLogon);
578
579 m_useLogon = useLogon;
580}
581
582void
584{
585 NS_LOG_FUNCTION(this << useLora);
586
587 m_useLora = useLora;
588
589 for (std::pair<std::pair<uint32_t, uint32_t>, Ptr<SatBeamScheduler>> beamScheduler :
591 {
592 beamScheduler.second->SetUseLora(m_useLora);
593 }
594}
595
596void
597SatNcc::CheckTimeout(Address utId, uint32_t satId, uint32_t beamId)
598{
599 NS_LOG_FUNCTION(this << utId);
600
601 std::tuple<Address, uint32_t, uint32_t> id = std::make_tuple(utId, satId, beamId);
602 NS_ASSERT_MSG(m_lastControlBurstReception.find(id) != m_lastControlBurstReception.end(),
603 "UT address should be in map");
604
605 Time lastReceptionDate = m_lastControlBurstReception[id];
606 if (Simulator::Now() >= lastReceptionDate + m_utTimeout)
607 {
609 RemoveUt(utId, satId, beamId);
610 }
611 else
612 {
613 Simulator::Schedule(lastReceptionDate + m_utTimeout - Simulator::Now(),
615 this,
616 utId,
617 satId,
618 beamId);
619 }
620}
621
622} // namespace ns3
class for module NCC used as shared module among Gateways (GWs).
void SetUseLora(bool useLora)
Set if SNS-3 is used with Lora standard.
Callback< void, Address, Address, Address > UpdateRoutingCallback
Update routes and ARP tables on gateways after a terminal handover.
std::map< uint8_t, uint16_t > m_lowLoadBackOffProbability
Map for random access allocation channel specific low load backoff probabilities.
SatBeamScheduler::SendCtrlMsgCallback SendCallback
Define type SendCallback.
static TypeId GetTypeId(void)
Get the type ID.
void ReceiveControlBurst(Address utId, uint32_t satId, uint32_t beamId)
Function to call when a control burst has been received.
void ReserveLogonChannel(uint32_t logonChannelId)
void DoDispose(void)
Callback< void, Ptr< SatTbtpMessage > > SendTbtpCallback
void SetUseLogon(bool useLogon)
Set if logon is used in this simulation.
void AddUt(Ptr< SatLowerLayerServiceConf > llsConf, Address utId, uint32_t satId, uint32_t beamId, Callback< void, uint32_t > setRaChannelCallback, bool verifyExisting=false)
Function for adding the UT.
void RemoveUt(Address utId, uint32_t satId, uint32_t beamId)
Remove a UT.
void SetRandomAccessAverageNormalizedOfferedLoadThreshold(uint8_t allocationChannelId, double threshold)
Function for setting the random access allocation channel specific high load backoff probabilities.
void SetUpdateRoutingCallback(SatNcc::UpdateRoutingCallback cb)
Set the callback used to update routes and APR tables after a terminal handover.
std::map< std::pair< uint32_t, uint32_t >, Ptr< SatBeamScheduler > > m_beamSchedulers
The map containing beams in use (set).
std::map< std::tuple< uint32_t, uint32_t, uint8_t >, bool > m_isLowRandomAccessLoad
Map for keeping track of the load status of each random access allocation channel Tuple is (satId,...
SatNcc()
Construct a SatNcc.
void MoveUtBetweenBeams(Address utId, uint32_t srcSatId, uint32_t srcBeamId, uint32_t destSatId, uint32_t destBeamId)
Check if a terminal can be moved between two beams.
void AddBeam(uint32_t satId, uint32_t beamId, Ptr< SatNetDevice > gwNetDevice, Ptr< SatOrbiterNetDevice > orbiterNetDevice, SatNcc::SendCallback cb, SatNcc::SendTbtpCallback tbtpCb, Ptr< SatSuperframeSeq > seq, uint32_t maxFrameSizeInBytes, Address satAddress, Address gwAddress)
Function for adding the beam.
Time m_utTimeout
Timeout to logoff a UT, if logon procedure is used.
void SetRandomAccessLowLoadBackoffProbability(uint8_t allocationChannelId, uint16_t lowLoadBackOffProbability)
Function for setting the random access allocation channel specific high load backoff probabilities.
std::map< uint8_t, uint16_t > m_lowLoadBackOffTime
Map for random access allocation channel specific low load backoff time.
std::map< uint8_t, uint16_t > m_highLoadBackOffProbability
Map for random access allocation channel specific high load backoff probabilities.
void DoMoveUtBetweenBeams(Address utId, uint32_t srcSatId, uint32_t srcBeamId, uint32_t destSatId, uint32_t destBeamId)
Perform terminal handover on the terestrial network.
UpdateRoutingCallback m_updateRoutingCallback
Callback to update routing tables and ARP tables on gateways once a handover request has been accepte...
void UtCrReceived(uint32_t satId, uint32_t beamId, Address utId, Ptr< SatCrMessage > crMsg)
Capacity request receiver.
Ptr< SatBeamScheduler > GetBeamScheduler(uint32_t satId, uint32_t beamId) const
std::map< uint8_t, double > m_randomAccessAverageNormalizedOfferedLoadThreshold
Map for random access allocation channel specific load thresholds.
void DoRandomAccessDynamicLoadControl(uint32_t satId, uint32_t beamId, uint32_t carrierId, uint8_t allocationChannelId, double averageNormalizedOfferedLoad)
Function for adjusting the random access allocation channel specific load.
bool m_useLora
Flag indicating if lora standard is used.
bool m_useLogon
Flag indicating if logon procedure is used.
std::map< std::tuple< Address, uint32_t, uint32_t >, Time > m_lastControlBurstReception
List of reception time for all UTs.
void SetRandomAccessLowLoadBackoffTime(uint8_t allocationChannelId, uint16_t lowLoadBackOffTime)
Function for setting the random access allocation channel specific high load backoff time.
void UtCnoUpdated(uint32_t satId, uint32_t beamId, Address sourceMac, Address gwId, double cno, bool isSatelliteMac)
Update UT specific C/N0 information.
TracedCallback< Ptr< const Packet > > m_nccTxTrace
The trace source fired for TBTPs sent by the NCC.
~SatNcc()
Destroy a SatNcc.
void CreateRandomAccessLoadControlMessage(uint16_t backoffProbability, uint16_t backoffTime, uint32_t satId, uint32_t beamId, uint8_t allocationChannelId)
Function for creating the random access control message.
void CheckTimeout(Address utId, uint32_t satId, uint32_t beamId)
Check if a UT has not been receiving control bursts, and then need to logoff.
Time m_utHandoverDelay
Delay between handover acceptance and effective information transfer.
TracedCallback< Ptr< const Packet > > m_nccRxTrace
The trace source fired for Capacity Requests (CRs) received by the NCC.
std::map< uint8_t, uint16_t > m_highLoadBackOffTime
Map for random access allocation channel specific high load backoff time.
void SetRandomAccessHighLoadBackoffProbability(uint8_t allocationChannelId, uint16_t highLoadBackOffProbability)
Function for setting the random access allocation channel specific high load backoff probabilities.
void SetRandomAccessHighLoadBackoffTime(uint8_t allocationChannelId, uint16_t highLoadBackOffTime)
Function for setting the random access allocation channel specific high load backoff time.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.