satellite-control-message.h
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.com>
21  */
22 
23 #ifndef SATELLITE_CONTROL_MESSAGE_H
24 #define SATELLITE_CONTROL_MESSAGE_H
25 
26 #include "satellite-enums.h"
27 #include "satellite-frame-conf.h"
28 #include "satellite-mac-tag.h"
29 
30 #include <ns3/header.h>
31 #include <ns3/mac48-address.h>
32 #include <ns3/nstime.h>
33 #include <ns3/object.h>
34 #include <ns3/simulator.h>
35 
36 #include <map>
37 #include <ostream>
38 #include <set>
39 #include <stdint.h>
40 #include <utility>
41 #include <vector>
42 
43 namespace ns3
44 {
45 
51 class SatControlMsgTag : public Tag
52 {
53  public:
57  typedef enum
58  {
74 
79 
84 
91 
96  SatControlMsgType_t GetMsgType(void) const;
97 
102  virtual void SetMsgId(uint32_t msgId);
103 
108  virtual uint32_t GetMsgId() const;
109 
113  static TypeId GetTypeId(void);
114 
119  virtual TypeId GetInstanceTypeId(void) const;
120 
125  virtual uint32_t GetSerializedSize(void) const;
126 
131  virtual void Serialize(TagBuffer i) const;
132 
137  virtual void Deserialize(TagBuffer i);
138 
143  virtual void Print(std::ostream& os) const;
144 
145  private:
147  uint32_t m_msgId;
148 };
149 
156 class SatControlMessage : public Object
157 {
158  public:
162  static TypeId GetTypeId(void);
163 
168  {
169  }
170 
175  {
176  }
177 
184  virtual uint32_t GetSizeInBytes() const = 0;
185 
192 
193  private:
194 };
195 
206 {
207  public:
211  typedef std::vector<Ptr<SatTimeSlotConf>> DaTimeSlotConfContainer_t;
212 
219  typedef std::pair<uint8_t, DaTimeSlotConfContainer_t> DaTimeSlotInfoItem_t;
220 
226  typedef std::set<uint8_t> RaChannelInfoContainer_t;
227 
240  static const uint32_t m_tbtpBodySizeInBytes = 6;
241 
251  static const uint32_t m_tbtpFrameBodySizeInBytes = 5;
252 
256  static TypeId GetTypeId(void);
257 
262  virtual TypeId GetInstanceTypeId(void) const;
263 
267  SatTbtpMessage();
268 
273  SatTbtpMessage(uint8_t seqId);
274 
278  ~SatTbtpMessage();
279 
286  {
288  }
289 
295  inline void SetSuperframeCounter(uint32_t counter)
296  {
297  m_superframeCounter = counter;
298  }
299 
305  inline uint8_t GetSuperframeSeqId()
306  {
307  return m_superframeSeqId;
308  }
309 
315  inline uint32_t GetSuperframeCounter()
316  {
317  return m_superframeCounter;
318  }
319 
325  inline uint32_t GetFrameInfoSize() const
326  {
328  }
329 
336  const DaTimeSlotInfoItem_t& GetDaTimeslots(Address utId);
337 
345  void SetDaTimeslot(Mac48Address utId, uint8_t frameId, Ptr<SatTimeSlotConf> conf);
346 
353 
361  void SetRaChannel(uint32_t raChannel, uint8_t frameId, uint16_t timeSlotCount);
362 
368  virtual uint32_t GetSizeInBytes() const;
369 
375  uint32_t GetTimeSlotInfoSizeInBytes() const;
376 
380  void Dump() const;
381 
382  private:
383  typedef std::map<uint8_t, uint16_t> RaChannelMap_t;
384  typedef std::map<Address, DaTimeSlotInfoItem_t> DaTimeSlotMap_t;
385 
391  std::set<uint8_t> m_frameIds;
392 
397 };
398 
408 {
409  public:
410  typedef enum
411  {
415 
419  SatCrMessage();
420 
424  ~SatCrMessage();
425 
429  static TypeId GetTypeId(void);
430 
435  virtual TypeId GetInstanceTypeId(void) const;
436 
440  typedef std::pair<uint8_t, SatEnums::SatCapacityAllocationCategory_t> RequestDescriptor_t;
441 
445  typedef std::map<RequestDescriptor_t, uint16_t> RequestContainer_t;
446 
452  {
454  }
455 
459  void AddControlElement(uint8_t rcIndex,
461  uint32_t value);
462 
468 
473  uint32_t GetNumCapacityRequestElements() const;
474 
479  double GetCnoEstimate() const;
480 
485  void SetCnoEstimate(double cno);
486 
491  virtual uint32_t GetSizeInBytes() const;
492 
497  bool IsNotEmpty() const;
498 
499  private:
501 
509 
514 
518  static const uint32_t CONTROL_MSG_TYPE_VALUE_SIZE_IN_BYTES = 1;
519 
525  static const uint32_t CONTROL_MSG_COMMON_HEADER_SIZE_IN_BYTES = 3;
526 };
527 
536 {
537  public:
542 
547 
551  static TypeId GetTypeId(void);
552 
557  virtual TypeId GetInstanceTypeId(void) const;
558 
564  {
566  }
567 
572  void SetSequenceNumber(uint8_t sn);
573 
578  uint8_t GetSequenceNumber() const;
579 
584  void SetFlowId(uint8_t sn);
585 
590  uint8_t GetFlowId() const;
591 
596  virtual uint32_t GetSizeInBytes() const;
597 
598  private:
600  uint8_t m_flowId;
601 };
602 
612 {
613  public:
618 
623 
627  static TypeId GetTypeId(void);
628 
633  virtual TypeId GetInstanceTypeId(void) const;
634 
641  {
643  }
644 
649  double GetCnoEstimate() const;
650 
655  void SetCnoEstimate(double cno);
656 
661  virtual uint32_t GetSizeInBytes() const;
662 
663  private:
667  double m_linkCNo;
668 };
669 
677 {
678  public:
682  SatRaMessage();
683 
687  ~SatRaMessage();
688 
692  static TypeId GetTypeId(void);
693 
698  virtual TypeId GetInstanceTypeId(void) const;
699 
706  {
708  }
709 
714  uint16_t GetBackoffProbability() const;
715 
720  void SetBackoffProbability(uint16_t backoffProbability);
721 
726  uint16_t GetBackoffTime() const;
727 
732  void SetBackoffTime(uint16_t backoffTime);
733 
738  uint8_t GetAllocationChannelId() const;
739 
744  void SetAllocationChannelId(uint8_t allocationChannel);
745 
750  virtual uint32_t GetSizeInBytes() const;
751 
752  private:
756  static const uint32_t RA_CONTROL_MSG_HEADER_SIZE_IN_BYTES = 5;
757 
762 
767 
771  uint16_t m_backoffTime;
772 };
773 
781 {
782  public:
786  SatTimuMessage();
787 
791  ~SatTimuMessage();
792 
796  static TypeId GetTypeId(void);
797 
802  virtual TypeId GetInstanceTypeId(void) const;
803 
810  {
812  }
813 
818  uint32_t GetAllocatedBeamId() const;
819 
824  void SetAllocatedBeamId(uint32_t beamId);
825 
830  uint32_t GetAllocatedSatId() const;
831 
836  void SetAllocatedSatId(uint32_t beamId);
837 
838  Address GetSatAddress() const;
839 
840  void SetSatAddress(Address address);
841 
842  Address GetGwAddress() const;
843 
844  void SetGwAddress(Address address);
845 
850  virtual uint32_t GetSizeInBytes() const;
851 
852  private:
856  uint32_t m_beamId;
857 
861  uint32_t m_satId;
862 
866  Address m_satAddress;
867 
871  Address m_gwAddress;
872 };
873 
881 {
882  public:
887 
892 
896  static TypeId GetTypeId(void);
897 
902  virtual TypeId GetInstanceTypeId(void) const;
903 
910  {
912  }
913 
918  uint32_t GetRecommendedBeamId() const;
919 
924  void SetRecommendedBeamId(uint32_t beamId);
925 
930  uint32_t GetRecommendedSatId() const;
931 
936  void SetRecommendedSatId(uint32_t beamId);
937 
942  virtual uint32_t GetSizeInBytes() const;
943 
944  private:
948  uint32_t m_beamId;
949 
953  uint32_t m_satId;
954 };
955 
962 {
963  public:
968 
973 
977  static TypeId GetTypeId(void);
978 
983  virtual TypeId GetInstanceTypeId(void) const;
984 
991  {
993  }
994 
999  uint32_t GetSliceId() const;
1000 
1005  void SetSliceId(uint8_t sliceId);
1006 
1011  Mac48Address GetAddress() const;
1012 
1017  void SetAddress(Mac48Address address);
1018 
1023  virtual uint32_t GetSizeInBytes() const;
1024 
1025  private:
1029  uint8_t m_sliceId;
1030 
1034  Mac48Address m_address;
1035 };
1036 
1043 {
1044  public:
1048  SatLogonMessage();
1049 
1053  ~SatLogonMessage();
1054 
1058  static TypeId GetTypeId(void);
1059 
1064  virtual TypeId GetInstanceTypeId(void) const;
1065 
1072  {
1074  }
1075 
1080  virtual uint32_t GetSizeInBytes() const;
1081 
1082  private:
1083 };
1084 
1091 {
1092  public:
1097 
1102 
1106  static TypeId GetTypeId(void);
1107 
1112  virtual TypeId GetInstanceTypeId(void) const;
1113 
1120  {
1122  }
1123 
1128  uint32_t GetRaChannel() const;
1129 
1134  void SetRaChannel(uint32_t raChannel);
1135 
1140  virtual uint32_t GetSizeInBytes() const;
1141 
1142  private:
1143  Time m_delay;
1144  uint32_t m_raChannel;
1145 };
1146 
1153 {
1154  public:
1158  SatLogoffMessage();
1159 
1164 
1168  static TypeId GetTypeId(void);
1169 
1174  virtual TypeId GetInstanceTypeId(void) const;
1175 
1182  {
1184  }
1185 
1190  virtual uint32_t GetSizeInBytes() const;
1191 
1192  private:
1193 };
1194 
1200 {
1201  public:
1205  SatNcrMessage();
1206 
1210  ~SatNcrMessage();
1211 
1215  static TypeId GetTypeId(void);
1216 
1221  virtual TypeId GetInstanceTypeId(void) const;
1222 
1229  {
1231  }
1232 
1237  uint64_t GetNcrDate() const;
1238 
1243  void SetNcrDate(uint64_t ncr);
1244 
1249  virtual uint32_t GetSizeInBytes() const;
1250 
1251  private:
1252  uint64_t m_ncrDateBase;
1254 };
1255 
1262 {
1263  public:
1267  SatCmtMessage();
1268 
1272  ~SatCmtMessage();
1273 
1277  static TypeId GetTypeId(void);
1278 
1283  virtual TypeId GetInstanceTypeId(void) const;
1284 
1291  {
1293  }
1294 
1299  uint8_t GetGroupId() const;
1300 
1305  void SetGroupId(uint8_t groupId);
1306 
1311  uint8_t GetLogonId() const;
1312 
1317  void SetLogonId(uint8_t logonId);
1318 
1323  int16_t GetBurstTimeCorrection() const;
1324 
1329  void SetBurstTimeCorrection(int32_t burstTimeCorrection);
1330 
1337  uint8_t GetPowerCorrection() const;
1338 
1345  void SetPowerCorrection(uint8_t powerCorrection);
1346 
1351  int16_t GetFrequencyCorrection() const;
1352 
1357  void SetFrequencyCorrection(int16_t frequencyCorrection);
1358 
1363  virtual uint32_t GetSizeInBytes() const;
1364 
1365  private:
1366  uint8_t m_groupId;
1367  uint8_t m_logonId;
1372 };
1373 
1392 class SatControlMsgContainer : public SimpleRefCount<SatControlMsgContainer>
1393 {
1394  public:
1399 
1403  SatControlMsgContainer(Time m_storeTime, bool deleteOnRead);
1404 
1409 
1416  uint32_t ReserveIdAndStore(Ptr<SatControlMessage> controlMsg);
1417 
1424  uint32_t Send(uint32_t sendId);
1425 
1432  Ptr<SatControlMessage> Read(uint32_t recvId);
1433 
1434  private:
1439  void EraseFirst();
1440 
1446  void CleanUpIdMap(uint32_t recvId);
1447 
1448  typedef std::map<uint32_t, Ptr<SatControlMessage>> ReservedCtrlMsgMap_t;
1449  typedef std::map<uint32_t, uint32_t> CtrlIdMap_t;
1450  typedef std::pair<Time, Ptr<SatControlMessage>> CtrlMsgMapValue_t;
1451  typedef std::map<uint32_t, CtrlMsgMapValue_t> CtrlMsgMap_t;
1452 
1456  uint32_t m_sendId;
1457  uint32_t m_recvId;
1459 
1467 
1472 };
1473 
1474 } // namespace ns3
1475 
1476 #endif // SATELLITE_CONTROL_MESSAGE_H
The packet for the Automatic Repeat reQuest (ARQ) acknowledgment (ACK) messages.
uint8_t GetFlowId() const
Get the sequence number to be ACK'ed.
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
virtual uint32_t GetSizeInBytes() const
Get real size of the ACK message, which can be used to e.g.
void SetSequenceNumber(uint8_t sn)
Set the sequence number to be ACK'ed.
void SetFlowId(uint8_t sn)
Set the flow id to be ACK'ed.
static TypeId GetTypeId(void)
methods derived from base classes
uint8_t GetSequenceNumber() const
Get the sequence number to be ACK'ed.
SatArqAckMessage()
Constructor for SatArqAckMessage.
~SatArqAckMessage()
Destructor for SatArqAckMessage.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
This control message is used to give time, power and frequency correction to UTs.
int16_t GetFrequencyCorrection() const
Get the frequency correction.
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
SatCmtMessage()
Constructor for SatCmtMessage.
uint8_t GetGroupId() const
Get the group ID.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
void SetPowerCorrection(uint8_t powerCorrection)
Set the power correction.
~SatCmtMessage()
Destructor for SatCmtMessage.
void SetGroupId(uint8_t groupId)
Set the group ID.
void SetLogonId(uint8_t logonId)
Set the logon ID.
static TypeId GetTypeId(void)
methods derived from base classes
uint8_t GetLogonId() const
Get the logon ID.
virtual uint32_t GetSizeInBytes() const
Get real size of the message.
void SetBurstTimeCorrection(int32_t burstTimeCorrection)
Set the burst time correction.
void SetFrequencyCorrection(int16_t frequencyCorrection)
Set the frequency correction.
uint8_t GetPowerCorrection() const
Get the powercorrection.
int16_t GetBurstTimeCorrection() const
Get the burst time correction.
C/N0 (CNI) estimation report message.
void SetCnoEstimate(double cno)
Set C/N0 estimate.
double GetCnoEstimate() const
Get C/N0 estimate.
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
virtual uint32_t GetSizeInBytes() const
Get real size of the CR message, which can be used to e.g.
SatCnoReportMessage()
Constructor for SatCnoReportMessage.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
~SatCnoReportMessage()
Destructor for SatCnoReportMessage.
static TypeId GetTypeId(void)
methods derived from base classes
Abstract satellite control message class.
virtual uint32_t GetSizeInBytes() const =0
Get real size of the control message.
static TypeId GetTypeId(void)
methods derived from base classes
SatControlMessage()
Default constructor for SatControlMessage.
virtual SatControlMsgTag::SatControlMsgType_t GetMsgType() const =0
Get message specific type.
The container to store control messages.
Ptr< SatControlMessage > Read(uint32_t recvId)
Read a control message.
std::map< uint32_t, Ptr< SatControlMessage > > ReservedCtrlMsgMap_t
std::map< uint32_t, CtrlMsgMapValue_t > CtrlMsgMap_t
bool m_deleteOnRead
Flag to tell, if message is deleted from container when read (get).
uint32_t Send(uint32_t sendId)
Add a control message.
void CleanUpIdMap(uint32_t recvId)
Do clean up for the Ctrl msg id map.
uint32_t ReserveIdAndStore(Ptr< SatControlMessage > controlMsg)
Reserve an id and store a control message.
~SatControlMsgContainer()
Destructor for SatControlMsgContainer.
std::pair< Time, Ptr< SatControlMessage > > CtrlMsgMapValue_t
std::map< uint32_t, uint32_t > CtrlIdMap_t
SatControlMsgContainer()
Default constructor for SatControlMsgContainer.
Time m_storeTime
Time to store a message in container.
void EraseFirst()
Erase first item from container.
This class implements a tag that is used to identify control messages (packages).
~SatControlMsgTag()
Destructor for SatControlMsgTag.
virtual void Serialize(TagBuffer i) const
Serializes information to buffer from this instance of methods.
virtual uint32_t GetSerializedSize(void) const
Get serialized size of methods.
virtual void Print(std::ostream &os) const
Print time stamp of this instance of methods.
static TypeId GetTypeId(void)
methods derived from base classes
SatControlMsgType_t
Definition for different types of control messages.
@ SAT_LOGON_RESPONSE_CTRL_MSG
SAT_LOGON_RESPONSE_CTRL_MSG.
@ SAT_SLICE_CTRL_MSG
SAT_SLICE_CTRL_MSG.
@ SAT_TIMU_CTRL_MSG
SAT_TIMU_CTRL_MSG.
@ SAT_LOGOFF_CTRL_MSG
SAT_LOGOFF CTRL_MSG.
@ SAT_NON_CTRL_MSG
SAT_NON_CTRL_MSG.
@ SAT_LOGON_CTRL_MSG
SAT_LOGON_CTRL_MSG.
@ SAT_CMT_CTRL_MSG
SAT_CMT_CTRL_MSG.
@ SAT_TBTP_CTRL_MSG
SAT_TBTP_CTRL_MSG.
@ SAT_NCR_CTRL_MSG
SAT_NCR_CTRL_MSG.
virtual uint32_t GetMsgId() const
Get message type specific identifier.
void SetMsgType(SatControlMsgType_t type)
Set type of the control message.
SatControlMsgType_t GetMsgType(void) const
Get type of the control message.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
virtual void SetMsgId(uint32_t msgId)
Set message type specific identifier.
virtual void Deserialize(TagBuffer i)
Deserializes information from buffer to this instance of methods.
SatControlMsgTag()
Constructor for SatControlMsgTag.
The packet for the Capacity Request (CR) messages.
static TypeId GetTypeId(void)
methods derived from base classes
virtual uint32_t GetSizeInBytes() const
Get real size of the CR message, which can be used to e.g.
RequestContainer_t m_requestData
std::map< RequestDescriptor_t, uint16_t > RequestContainer_t
Define type RequestContainer_t.
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
SatCrMessage()
Constructor for SatCrMessage.
static const uint32_t CONTROL_MSG_COMMON_HEADER_SIZE_IN_BYTES
RCST_status + power headroom = 1 Byte CNI = 1 Byte Least margin transmission mode request = 1 Byte.
uint32_t GetNumCapacityRequestElements() const
The number of capacity request elements.
static const uint32_t CONTROL_MSG_TYPE_VALUE_SIZE_IN_BYTES
Type field of the CR control element.
void SetCnoEstimate(double cno)
Set C/N0 estimate.
const RequestContainer_t GetCapacityRequestContent() const
Get the capacity request content.
std::pair< uint8_t, SatEnums::SatCapacityAllocationCategory_t > RequestDescriptor_t
Define type RequestDescriptor_t.
~SatCrMessage()
Destructor for SatCrMessage.
void AddControlElement(uint8_t rcIndex, SatEnums::SatCapacityAllocationCategory_t cac, uint32_t value)
Add a control element to capacity request.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
bool IsNotEmpty() const
Has the CR non-zero content.
SatCrBlockSize_t m_crBlockSizeType
Control element size is defined by attribute.
double GetCnoEstimate() const
Get C/N0 estimate.
double m_forwardLinkCNo
C/N0 estimate.
SatCapacityAllocationCategory_t
Definition for different types of Capacity Request (CR) messages.
Handover recommendation control message (Tagged by SatControlMsgTag with type value SAT_HR_CTRL_MSG)
~SatHandoverRecommendationMessage()
Destructor for SatRaMessage.
uint32_t GetRecommendedBeamId() const
Get the recommended beam ID.
uint32_t GetRecommendedSatId() const
Get the recommended sat ID.
void SetRecommendedBeamId(uint32_t beamId)
Set recommended beam ID.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
void SetRecommendedSatId(uint32_t beamId)
Set recommended sat ID.
virtual uint32_t GetSizeInBytes() const
Get real size of the random access message, which can be used to e.g.
SatHandoverRecommendationMessage()
Constructor for SatRaMessage.
static TypeId GetTypeId(void)
methods derived from base classes
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
This control message is used to inform the UT that it has been deconnected by GW (Tagged by SatContro...
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
SatLogoffMessage()
Constructor for SatLogoffMessage.
virtual uint32_t GetSizeInBytes() const
Get real size of the message.
~SatLogoffMessage()
Destructor for SatLogoffMessage.
static TypeId GetTypeId(void)
methods derived from base classes
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
This control message is used to inform the GW that a UT wants to connect (Tagged by SatControlMsgTag ...
~SatLogonMessage()
Destructor for SatLogonMessage.
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
static TypeId GetTypeId(void)
methods derived from base classes
SatLogonMessage()
Constructor for SatLogonMessage.
virtual uint32_t GetSizeInBytes() const
Get real size of the message.
This control message is used to inform the UT of a connection success (Tagged by SatControlMsgTag wit...
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
uint32_t GetRaChannel() const
Get the RA channel to talk into.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
void SetRaChannel(uint32_t raChannel)
Set the RA channel to talk into.
~SatLogonResponseMessage()
Destructor for SatLogonResponseMessage.
static TypeId GetTypeId(void)
methods derived from base classes
virtual uint32_t GetSizeInBytes() const
Get real size of the message.
SatLogonResponseMessage()
Constructor for SatLogonResponseMessage.
This control message is used to broadcast NCR date to UTs.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
void SetNcrDate(uint64_t ncr)
Set the NCR date (ticks 27MHz).
~SatNcrMessage()
Destructor for SatNcrMessage.
virtual uint32_t GetSizeInBytes() const
Get real size of the message.
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
SatNcrMessage()
Constructor for SatNcrMessage.
static TypeId GetTypeId(void)
methods derived from base classes
uint64_t GetNcrDate() const
Get the NCR date (ticks 27MHz).
Random access load control message (Tagged by SatControlMsgTag with type value SAT_RA_CTRL_MSG)
uint8_t GetAllocationChannelId() const
Get allocation chanel ID.
void SetBackoffProbability(uint16_t backoffProbability)
Set backoff probability.
uint16_t m_backoffProbability
Backoff probability.
static TypeId GetTypeId(void)
methods derived from base classes
SatRaMessage()
Constructor for SatRaMessage.
uint16_t GetBackoffProbability() const
Get backoff probability.
void SetAllocationChannelId(uint8_t allocationChannel)
Set allocation channel ID.
uint16_t GetBackoffTime() const
Get backoff time.
uint8_t m_allocationChannelId
Allocation channel ID.
static const uint32_t RA_CONTROL_MSG_HEADER_SIZE_IN_BYTES
Common header of the random access element.
virtual uint32_t GetSizeInBytes() const
Get real size of the random access message, which can be used to e.g.
void SetBackoffTime(uint16_t backoffTime)
Set backoff time.
uint16_t m_backoffTime
Backoff time.
~SatRaMessage()
Destructor for SatRaMessage.
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
This control message is used to inform the UT it has to subscribe to a new slice.
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
static TypeId GetTypeId(void)
methods derived from base classes
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
Mac48Address m_address
Address associated to this slice.
uint32_t GetSliceId() const
Get the new slice to subscribe.
void SetAddress(Mac48Address address)
Set the address associated to this slice.
Mac48Address GetAddress() const
Get the ddress associated to this slice.
virtual uint32_t GetSizeInBytes() const
Get real size of the message.
uint8_t m_sliceId
New slice to subscribe.
~SatSliceSubscriptionMessage()
Destructor for SatRaMessage.
SatSliceSubscriptionMessage()
Constructor for SatRaMessage.
void SetSliceId(uint8_t sliceId)
Set the new slice to subscribe.
The packet for the Terminal Burst Time Plan (TBTP) messages.
SatTbtpMessage()
Default constructor for SatTbtpHeader.
std::map< uint8_t, uint16_t > RaChannelMap_t
static const uint32_t m_tbtpFrameBodySizeInBytes
Size of the frame body.
~SatTbtpMessage()
Destructor for SatTbtpHeader.
void Dump() const
Dump all the contents of the TBTP.
void SetRaChannel(uint32_t raChannel, uint8_t frameId, uint16_t timeSlotCount)
Set a RA time slot information.
uint32_t GetFrameInfoSize() const
Get size of frame info size in this TBTP message.
uint32_t GetSuperframeCounter()
Get counter of the super frame in this TBTP message.
static TypeId GetTypeId(void)
methods derived from base classes
void SetSuperframeCounter(uint32_t counter)
Set counter of the super frame in this TBTP message.
std::vector< Ptr< SatTimeSlotConf > > DaTimeSlotConfContainer_t
Container for time slot configurations in time slot map item DaTimeSlotMapItem_t.
const DaTimeSlotInfoItem_t & GetDaTimeslots(Address utId)
Get the information of the DA time slots.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
std::pair< uint8_t, DaTimeSlotConfContainer_t > DaTimeSlotInfoItem_t
Item for DA time slot information.
std::set< uint8_t > m_frameIds
static const uint32_t m_tbtpBodySizeInBytes
Size of message body without frame info and slot assignment info.
uint8_t GetSuperframeSeqId()
Get sequence id of the super frame in this TBTP message.
uint32_t GetTimeSlotInfoSizeInBytes() const
Get size of the time slot in bytes.
std::map< Address, DaTimeSlotInfoItem_t > DaTimeSlotMap_t
const RaChannelInfoContainer_t GetRaChannels() const
Get the information of the RA channels.
virtual uint32_t GetSizeInBytes() const
Get real size of the TBTP message, which can be used to e.g.
std::set< uint8_t > RaChannelInfoContainer_t
Container for RA channel information.
const DaTimeSlotInfoItem_t m_emptyDaSlotContainer
Empty DA slot container to be returned if there are not DA time slots.
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
void SetDaTimeslot(Mac48Address utId, uint8_t frameId, Ptr< SatTimeSlotConf > conf)
Set a DA time slot information.
TIM unicast control message (Tagged by SatControlMsgTag with type value SAT_TIMU_CTRL_MSG)
void SetGwAddress(Address address)
virtual uint32_t GetSizeInBytes() const
Get real size of the random access message, which can be used to e.g.
static TypeId GetTypeId(void)
methods derived from base classes
Address m_satAddress
Satellite mac address of the new gateway.
uint32_t m_beamId
Allocated beam ID.
SatTimuMessage()
Constructor for SatRaMessage.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
void SetAllocatedSatId(uint32_t beamId)
Set allocated sat ID.
void SetAllocatedBeamId(uint32_t beamId)
Set allocated beam ID.
Address m_gwAddress
Mac address of the new gateway.
uint32_t GetAllocatedSatId() const
Get the allocated sat ID.
uint32_t GetAllocatedBeamId() const
Get the allocated beam ID.
uint32_t m_satId
Allocated sat ID.
SatControlMsgTag::SatControlMsgType_t GetMsgType() const
Get type of the message.
void SetSatAddress(Address address)
~SatTimuMessage()
Destructor for SatRaMessage.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.