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 NS_LOG_COMPONENT_DEFINE("SatNcc");
34 
35 namespace ns3
36 {
37 
38 NS_OBJECT_ENSURE_REGISTERED(SatNcc);
39 
40 TypeId
42 {
43  static TypeId tid =
44  TypeId("ns3::SatNcc")
45  .SetParent<Object>()
46  .AddConstructor<SatNcc>()
47  //
48  // Trace sources
49  //
50  .AddTraceSource("NccRx",
51  "Trace source indicating a CR has received by NCC",
52  MakeTraceSourceAccessor(&SatNcc::m_nccRxTrace),
53  "ns3::Packet::TracedCallback")
54  .AddTraceSource("NccTx",
55  "Trace source indicating a TBTP has sent by NCC",
56  MakeTraceSourceAccessor(&SatNcc::m_nccTxTrace),
57  "ns3::Packet::TracedCallback")
58  .AddAttribute("HandoverDelay",
59  "Delay between handover acceptance and effective information transfer",
60  TimeValue(Seconds(0.0)),
61  MakeTimeAccessor(&SatNcc::m_utHandoverDelay),
62  MakeTimeChecker())
63  .AddAttribute("UtTimeout",
64  "Timeout to logoff a UT, if logon procedure is used",
65  TimeValue(Seconds(10)),
66  MakeTimeAccessor(&SatNcc::m_utTimeout),
67  MakeTimeChecker());
68  return tid;
69 }
70 
71 TypeId
73 {
74  NS_LOG_FUNCTION(this);
75 
76  return GetTypeId();
77 }
78 
80  : m_utHandoverDelay(Seconds(0.0)),
81  m_utTimeout(Seconds(10)),
82  m_useLogon(false),
83  m_useLora(false)
84 {
85  NS_LOG_FUNCTION(this);
86 }
87 
89 {
90  NS_LOG_FUNCTION(this);
91 }
92 
93 void
95 {
96  NS_LOG_FUNCTION(this);
97 
98  m_updateRoutingCallback.Nullify();
100 
101  Object::DoDispose();
102 }
103 
104 void
105 SatNcc::UtCnoUpdated(uint32_t satId,
106  uint32_t beamId,
107  Address sourceMac,
108  Address /*gwId*/,
109  double cno,
110  bool isSatelliteMac)
111 {
112  NS_LOG_FUNCTION(this << satId << beamId << sourceMac << cno);
113 
114  if (isSatelliteMac)
115  {
116  m_beamSchedulers[std::make_pair(satId, beamId)]->UpdateSatelliteCno(sourceMac, cno);
117  }
118  else
119  {
120  m_beamSchedulers[std::make_pair(satId, beamId)]->UpdateUtCno(sourceMac, cno);
121  }
122 }
123 
124 void
126  uint32_t beamId,
127  uint32_t carrierId,
128  uint8_t allocationChannelId,
129  double averageNormalizedOfferedLoad)
130 {
131  NS_LOG_FUNCTION(this << satId << beamId << carrierId << (uint32_t)allocationChannelId
132  << averageNormalizedOfferedLoad);
133 
134  bool isLowRandomAccessLoad = true;
135  std::map<std::tuple<uint32_t, uint32_t, uint8_t>, bool>::iterator findResult;
136  std::pair<std::map<std::tuple<uint32_t, uint32_t, uint8_t>, bool>::iterator, bool> insertResult;
137 
139  findResult = m_isLowRandomAccessLoad.find(std::make_tuple(satId, beamId, allocationChannelId));
140 
141  if (findResult == m_isLowRandomAccessLoad.end())
142  {
143  insertResult = m_isLowRandomAccessLoad.insert(
144  std::make_pair(std::make_tuple(satId, beamId, allocationChannelId),
145  isLowRandomAccessLoad));
146 
147  if (!insertResult.second)
148  {
149  NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - Insert failed");
150  }
151  else
152  {
153  isLowRandomAccessLoad = insertResult.second;
154  }
155  }
156  else
157  {
158  isLowRandomAccessLoad = findResult->second;
159  }
160 
161  NS_LOG_INFO("Beam: " << beamId << ", carrier ID: " << carrierId
162  << ", AC: " << (uint32_t)allocationChannelId
163  << " - Measuring the average normalized offered random access load: "
164  << averageNormalizedOfferedLoad);
165 
166  std::map<uint8_t, double>::iterator itThreshold =
167  m_randomAccessAverageNormalizedOfferedLoadThreshold.find(allocationChannelId);
168 
170  {
171  NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - Average normalized offered load "
172  "threshold not set for beam: "
173  << beamId << ", carrier: " << carrierId
174  << ", allocation channel: " << (uint32_t)allocationChannelId);
175  }
176 
178  if (isLowRandomAccessLoad)
179  {
180  NS_LOG_INFO("Beam: " << beamId << ", carrier ID: " << carrierId
181  << " - Currently low load in effect for allocation channel: "
182  << (uint32_t)allocationChannelId);
184  if (averageNormalizedOfferedLoad >= itThreshold->second)
185  {
186  std::map<uint8_t, uint16_t>::iterator it;
187 
188  it = m_highLoadBackOffProbability.find(allocationChannelId);
189 
190  if (it == m_highLoadBackOffProbability.end())
191  {
192  NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - High load backoff "
193  "probability not set for allocation channel: "
194  << (uint32_t)allocationChannelId);
195  }
196 
197  uint16_t probability = it->second;
198 
199  it = m_highLoadBackOffTime.find(allocationChannelId);
200 
201  if (it == m_highLoadBackOffTime.end())
202  {
203  NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - High load backoff time "
204  "not set for allocation channel: "
205  << (uint32_t)allocationChannelId);
206  }
207 
208  uint16_t time = it->second;
209 
212  time,
213  satId,
214  beamId,
215  allocationChannelId);
216 
217  NS_LOG_INFO("Beam: " << beamId << ", carrier ID: " << carrierId
218  << ", AC: " << (uint32_t)allocationChannelId
219  << " - Switching to HIGH LOAD back off parameterization");
220 
222  m_isLowRandomAccessLoad.at(std::make_tuple(satId, beamId, allocationChannelId)) = false;
223  }
224  }
226  else
227  {
228  NS_LOG_INFO("Beam: " << beamId << ", carrier ID: " << carrierId
229  << " - Currently high load in effect for allocation channel: "
230  << (uint32_t)allocationChannelId);
231 
233  if (averageNormalizedOfferedLoad < itThreshold->second)
234  {
235  std::map<uint8_t, uint16_t>::iterator it;
236 
237  it = m_lowLoadBackOffProbability.find(allocationChannelId);
238 
239  if (it == m_lowLoadBackOffProbability.end())
240  {
241  NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - Low load backoff "
242  "probability not set for allocation channel: "
243  << (uint32_t)allocationChannelId);
244  }
245 
246  uint16_t probability = it->second;
247 
248  it = m_lowLoadBackOffTime.find(allocationChannelId);
249 
250  if (it == m_lowLoadBackOffTime.end())
251  {
252  NS_FATAL_ERROR("SatNcc::DoRandomAccessDynamicLoadControl - Low load backoff time "
253  "not set for allocation channel: "
254  << (uint32_t)allocationChannelId);
255  }
256 
257  uint16_t time = it->second;
258 
261  time,
262  satId,
263  beamId,
264  allocationChannelId);
265 
266  NS_LOG_INFO("Beam: " << beamId << ", carrier ID: " << carrierId
267  << ", AC: " << (uint32_t)allocationChannelId
268  << " - Switching to LOW LOAD back off parameterization");
269 
271  m_isLowRandomAccessLoad.at(std::make_tuple(satId, beamId, allocationChannelId)) = true;
272  }
273  }
274 }
275 
276 void
278  uint16_t backoffTime,
279  uint32_t satId,
280  uint32_t beamId,
281  uint8_t allocationChannelId)
282 {
283  NS_LOG_FUNCTION(this);
284 
285  Ptr<SatRaMessage> raMsg = CreateObject<SatRaMessage>();
286  std::map<std::pair<uint32_t, uint32_t>, Ptr<SatBeamScheduler>>::iterator iterator =
287  m_beamSchedulers.find(std::make_pair(satId, beamId));
288 
289  if (iterator == m_beamSchedulers.end())
290  {
291  NS_FATAL_ERROR("SatNcc::SendRaControlMessage - Beam scheduler not found");
292  }
293 
295  raMsg->SetAllocationChannelId(allocationChannelId);
296 
298  raMsg->SetBackoffProbability(backoffProbability);
299  raMsg->SetBackoffTime(backoffTime);
300 
301  NS_LOG_INFO("Sending random access control message for AC: "
302  << (uint32_t)allocationChannelId << ", backoff probability: " << backoffProbability
303  << ", backoff time: " << backoffTime);
304 
305  iterator->second->Send(raMsg);
306 }
307 
308 void
309 SatNcc::UtCrReceived(uint32_t satId, uint32_t beamId, Address utId, Ptr<SatCrMessage> crMsg)
310 {
311  NS_LOG_FUNCTION(this << satId << beamId << utId << crMsg);
312 
313  m_beamSchedulers[std::make_pair(satId, beamId)]->UtCrReceived(utId, crMsg);
314 }
315 
316 void
317 SatNcc::AddBeam(uint32_t satId,
318  uint32_t beamId,
321  Ptr<SatSuperframeSeq> seq,
322  uint32_t maxFrameSize,
323  Address gwAddress)
324 {
325  NS_LOG_FUNCTION(this << satId << beamId << &cb);
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(beamId, cb, seq, maxFrameSize, gwAddress);
338 
339  scheduler->SetSendTbtpCallback(tbtpCb);
340 
341  m_beamSchedulers.insert(std::make_pair(std::make_pair(satId, beamId), scheduler));
342 }
343 
344 void
345 SatNcc::AddUt(Ptr<SatLowerLayerServiceConf> llsConf,
346  Address utId,
347  uint32_t satId,
348  uint32_t beamId,
349  Callback<void, uint32_t> setRaChannelCallback,
350  bool verifyExisting)
351 {
352  NS_LOG_FUNCTION(this << utId << beamId);
353 
354  std::map<std::pair<uint32_t, uint32_t>, Ptr<SatBeamScheduler>>::iterator iterator =
355  m_beamSchedulers.find(std::make_pair(satId, beamId));
356 
357  if (iterator == m_beamSchedulers.end())
358  {
359  NS_FATAL_ERROR("Beam where tried to add, not found.");
360  }
361 
362  if (!verifyExisting || !(m_beamSchedulers[std::make_pair(satId, beamId)]->HasUt(utId)))
363  {
364  setRaChannelCallback(m_beamSchedulers[std::make_pair(satId, beamId)]->AddUt(utId, llsConf));
365  }
366 }
367 
368 void
369 SatNcc::RemoveUt(Address utId, uint32_t satId, uint32_t beamId)
370 {
371  NS_LOG_FUNCTION(this << utId << beamId);
372 
373  if (m_beamSchedulers[std::make_pair(satId, beamId)]->HasUt(utId))
374  {
375  m_beamSchedulers[std::make_pair(satId, beamId)]->RemoveUt(utId);
376  }
377 }
378 
379 void
381  uint16_t lowLoadBackOffProbability)
382 {
383  NS_LOG_FUNCTION(this << (uint32_t)allocationChannelId << lowLoadBackOffProbability);
384 
385  NS_LOG_INFO("AC: " << (uint32_t)allocationChannelId
386  << ", low load backoff probability: " << lowLoadBackOffProbability);
387  m_lowLoadBackOffProbability[allocationChannelId] = lowLoadBackOffProbability;
388 }
389 
390 void
392  uint16_t highLoadBackOffProbability)
393 {
394  NS_LOG_FUNCTION(this << (uint32_t)allocationChannelId << highLoadBackOffProbability);
395 
396  NS_LOG_INFO("AC: " << (uint32_t)allocationChannelId
397  << ", high load backoff probability: " << highLoadBackOffProbability);
398  m_highLoadBackOffProbability[allocationChannelId] = highLoadBackOffProbability;
399 }
400 
401 void
402 SatNcc::SetRandomAccessLowLoadBackoffTime(uint8_t allocationChannelId, uint16_t lowLoadBackOffTime)
403 {
404  NS_LOG_FUNCTION(this << (uint32_t)allocationChannelId << lowLoadBackOffTime);
405 
406  NS_LOG_INFO("AC: " << (uint32_t)allocationChannelId
407  << ", low load backoff time: " << lowLoadBackOffTime);
408  m_lowLoadBackOffTime[allocationChannelId] = lowLoadBackOffTime;
409 }
410 
411 void
412 SatNcc::SetRandomAccessHighLoadBackoffTime(uint8_t allocationChannelId,
413  uint16_t highLoadBackOffTime)
414 {
415  NS_LOG_FUNCTION(this << (uint32_t)allocationChannelId << highLoadBackOffTime);
416 
417  NS_LOG_INFO("AC: " << (uint32_t)allocationChannelId
418  << ", high load backoff time: " << highLoadBackOffTime);
419  m_highLoadBackOffTime[allocationChannelId] = highLoadBackOffTime;
420 }
421 
422 void
424  double threshold)
425 {
426  NS_LOG_FUNCTION(this << (uint32_t)allocationChannelId << threshold);
427 
428  NS_LOG_INFO("AC: " << (uint32_t)allocationChannelId
429  << ", average normalized offered load threshold: " << threshold);
430  m_randomAccessAverageNormalizedOfferedLoadThreshold[allocationChannelId] = threshold;
431 }
432 
433 Ptr<SatBeamScheduler>
434 SatNcc::GetBeamScheduler(uint32_t satId, uint32_t beamId) const
435 {
436  NS_LOG_FUNCTION(this << satId << beamId);
437 
438  std::map<std::pair<uint32_t, uint32_t>, Ptr<SatBeamScheduler>>::const_iterator it =
439  m_beamSchedulers.find(std::make_pair(satId, beamId));
440 
441  if (it == m_beamSchedulers.end())
442  {
443  return 0;
444  }
445  else
446  {
447  return it->second;
448  }
449 }
450 
451 void
452 SatNcc::DoMoveUtBetweenBeams(Address utId, uint32_t satId, uint32_t srcBeamId, uint32_t destBeamId)
453 {
454  NS_LOG_FUNCTION(this << utId << satId << srcBeamId << destBeamId);
455 
456  Ptr<SatBeamScheduler> srcScheduler = GetBeamScheduler(satId, srcBeamId);
457  Ptr<SatBeamScheduler> destScheduler = GetBeamScheduler(satId, destBeamId);
458 
459  if (!srcScheduler || !destScheduler)
460  {
461  NS_FATAL_ERROR("Source or destination beam not configured");
462  }
463 
464  srcScheduler->TransferUtToBeam(utId, destScheduler);
465  m_updateRoutingCallback(utId, srcScheduler->GetGwAddress(), destScheduler->GetGwAddress());
466 }
467 
468 void
469 SatNcc::MoveUtBetweenBeams(Address utId, uint32_t satId, uint32_t srcBeamId, uint32_t destBeamId)
470 {
471  NS_LOG_FUNCTION(this << utId << satId << srcBeamId << destBeamId);
472 
473  Ptr<SatBeamScheduler> scheduler = GetBeamScheduler(satId, srcBeamId);
474  Ptr<SatBeamScheduler> destination = GetBeamScheduler(satId, destBeamId);
475 
476  if (!scheduler)
477  {
478  NS_FATAL_ERROR("Source beam does not exist!");
479  }
480 
481  if (!destination)
482  {
483  NS_LOG_WARN("Destination beam does not exist, cancel handover");
484 
485  Ptr<SatTimuMessage> timuMsg = scheduler->CreateTimu();
486  scheduler->SendTo(timuMsg, utId);
487  }
488  else if (scheduler->HasUt(utId) && !destination->HasUt(utId))
489  {
490  NS_LOG_INFO("Performing handover!");
491 
492  Ptr<SatTimuMessage> timuMsg = destination->CreateTimu();
493  scheduler->SendTo(timuMsg, utId);
494 
495  Simulator::Schedule(m_utHandoverDelay,
497  this,
498  utId,
499  satId,
500  srcBeamId,
501  destBeamId);
502  }
503  else if (!scheduler->HasUt(utId) && destination->HasUt(utId))
504  {
505  NS_LOG_INFO("Handover already performed, sending back TIM-U just in case!");
506 
507  Ptr<SatTimuMessage> timuMsg = destination->CreateTimu();
508  scheduler->SendTo(timuMsg, utId);
509  }
510  else
511  {
512  NS_FATAL_ERROR("Inconsistent handover state: UT is neither in source nor destination beam; "
513  "or in both");
514  }
515 }
516 
517 void
519 {
520  NS_LOG_FUNCTION(this << &cb);
521 
523 }
524 
525 void
526 SatNcc::ReserveLogonChannel(uint32_t logonChannelId)
527 {
528  NS_LOG_FUNCTION(this << logonChannelId);
529 
530  for (auto& beamScheduler : m_beamSchedulers)
531  {
532  beamScheduler.second->ReserveLogonChannel(logonChannelId);
533  }
534 }
535 
536 void
537 SatNcc::ReceiveControlBurst(Address utId, uint32_t satId, uint32_t beamId)
538 {
539  NS_LOG_FUNCTION(this << utId << beamId);
540 
541  std::tuple<Address, uint32_t, uint32_t> id = std::make_tuple(utId, satId, beamId);
542 
544  {
545  Simulator::Schedule(m_utTimeout, &SatNcc::CheckTimeout, this, utId, satId, beamId);
546  }
547  m_lastControlBurstReception[id] = Simulator::Now();
548 }
549 
550 void
551 SatNcc::SetUseLogon(bool useLogon)
552 {
553  NS_LOG_FUNCTION(this << useLogon);
554 
555  m_useLogon = useLogon;
556 }
557 
558 void
559 SatNcc::SetUseLora(bool useLora)
560 {
561  NS_LOG_FUNCTION(this << useLora);
562 
563  m_useLora = useLora;
564 }
565 
566 void
567 SatNcc::CheckTimeout(Address utId, uint32_t satId, uint32_t beamId)
568 {
569  NS_LOG_FUNCTION(this << utId);
570 
571  std::tuple<Address, uint32_t, uint32_t> id = std::make_tuple(utId, satId, beamId);
572  NS_ASSERT_MSG(m_lastControlBurstReception.find(id) != m_lastControlBurstReception.end(),
573  "UT address should be in map");
574 
575  Time lastReceptionDate = m_lastControlBurstReception[id];
576  if (Simulator::Now() >= lastReceptionDate + m_utTimeout)
577  {
578  m_lastControlBurstReception.erase(id);
579  RemoveUt(utId, satId, beamId);
580  }
581  else
582  {
583  Simulator::Schedule(lastReceptionDate + m_utTimeout - Simulator::Now(),
585  this,
586  utId,
587  satId,
588  beamId);
589  }
590 }
591 
592 } // namespace ns3
void SetUseLora(bool useLora)
Set if SNS-3 is used with Lora standard.
void DoMoveUtBetweenBeams(Address utId, uint32_t satId, uint32_t srcBeamId, uint32_t destBeamId)
Perform terminal handover on the terestrial network.
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).
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
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.
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.
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 MoveUtBetweenBeams(Address utId, uint32_t satId, uint32_t srcBeamId, uint32_t destBeamId)
Check if a terminal can be moved between two beams.
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.
void AddBeam(uint32_t satId, uint32_t beamId, SatNcc::SendCallback cb, SatNcc::SendTbtpCallback tbtpCb, Ptr< SatSuperframeSeq > seq, uint32_t maxFrameSizeInBytes, Address gwAddress)
Function for adding the beam.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.