satellite-frame-conf.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.fr>
21  */
22 
23 #ifndef SATELLITE_FRAME_CONF_H
24 #define SATELLITE_FRAME_CONF_H
25 
27 #include "satellite-enums.h"
29 
30 #include <ns3/ptr.h>
31 #include <ns3/random-variable-stream.h>
32 #include <ns3/simple-ref-count.h>
33 
34 #include <map>
35 #include <sstream>
36 #include <stdint.h>
37 #include <string>
38 #include <tuple>
39 #include <vector>
40 
41 namespace ns3
42 {
43 
49 class SatBtuConf : public SimpleRefCount<SatBtuConf>
50 {
51  public:
55  SatBtuConf();
56 
65  SatBtuConf(double bandwidthInHz, double rollOff, double spacing, uint32_t spreadingFactor);
66 
70  ~SatBtuConf();
71 
77  inline double GetAllocatedBandwidthInHz() const
78  {
80  }
81 
87  inline double GetOccupiedBandwidthInHz() const
88  {
90  }
91 
97  inline double GetEffectiveBandwidthInHz() const
98  {
100  }
101 
107  inline double GetSpreadingFactor() const
108  {
109  return m_spreadingFactor;
110  }
111 
117  inline double GetSymbolRateInBauds() const
118  {
120  }
121 
122  private:
125  double m_effectiveBandwidthInHz; // i.e. symbol rate
127  Time m_duration; // duration field reserved, but not used currently
128 };
129 
135 class SatTimeSlotConf : public SimpleRefCount<SatTimeSlotConf>
136 {
137  public:
141  typedef enum
142  {
146 
148 
152  SatTimeSlotConf();
153 
162  SatTimeSlotConf(Time startTime,
163  uint32_t waveFormId,
164  uint16_t carrierId,
166 
171 
177  inline Time GetStartTime() const
178  {
179  return m_startTime;
180  }
181 
187  inline uint32_t GetWaveFormId() const
188  {
189  return m_waveFormId;
190  }
191 
197  inline uint16_t GetCarrierId() const
198  {
199  return m_frameCarrierId;
200  }
201 
207  inline void SetRcIndex(uint8_t rcIndex)
208  {
209  m_rcIndex = rcIndex;
210  }
211 
217  inline uint8_t GetRcIndex()
218  {
219  return m_rcIndex;
220  }
221 
228  {
229  return m_slotType;
230  }
231 
238  {
239  m_slotType = slotType;
240  }
241 
242  private:
244  uint32_t m_waveFormId;
246  uint8_t m_rcIndex;
247 
249 };
250 
256 class SatFrameConf : public SimpleRefCount<SatFrameConf>
257 {
258  public:
262  typedef std::vector<Ptr<SatTimeSlotConf>> SatTimeSlotConfContainer_t;
263 
265 
282  typedef struct
283  {
286  Ptr<SatFrameConf> m_parent;
287  Ptr<SatBtuConf> m_btuConf;
288  Ptr<SatWaveformConf> m_waveformConf;
292  bool m_isLogon;
296 
300  SatFrameConf();
301 
308 
312  ~SatFrameConf();
313 
320  Ptr<SatTimeSlotConf> GetTimeSlotConf(uint16_t index) const;
321 
329  Ptr<SatTimeSlotConf> GetTimeSlotConf(uint16_t carrierId, uint16_t index) const;
330 
336  inline double GetBandwidthHz() const
337  {
338  return m_bandwidthHz;
339  }
340 
346  inline Time GetDuration() const
347  {
348  return m_duration;
349  }
350 
356  inline uint32_t GetCarrierMaxSymbols() const
357  {
358  return m_maxSymbolsPerCarrier;
359  }
360 
366  inline uint32_t GetCarrierMinPayloadInBytes() const
367  {
369  }
370 
376  double GetCarrierFrequencyHz(uint16_t carrierId) const;
377 
384  double GetCarrierBandwidthHz(SatEnums::CarrierBandwidthType_t bandwidthType) const;
385 
391  inline bool IsSubdivided() const
392  {
393  return m_parent != nullptr;
394  ;
395  }
396 
402  uint8_t GetSubdivisionLevel() const;
403 
404  inline Ptr<SatFrameConf> GetParent() const
405  {
406  return m_parent;
407  }
408 
414  inline Ptr<SatBtuConf> GetBtuConf() const
415  {
416  return m_btuConf;
417  }
418 
424  inline uint16_t GetCarrierCount() const
425  {
426  return m_carrierCount;
427  }
428 
434  uint16_t GetTimeSlotCount() const;
435 
442  SatTimeSlotConfContainer_t GetTimeSlotConfs(uint16_t carrierId) const;
443 
449  inline bool IsRandomAccess() const
450  {
451  return m_isRandomAccess;
452  }
453 
459  inline bool IsLogon() const
460  {
461  return m_isLogon;
462  }
463 
467  inline uint8_t GetAllocationChannelId() const
468  {
469  return m_allocationChannel;
470  }
471 
475  inline Ptr<SatWaveformConf> GetWaveformConf() const
476  {
477  return m_waveformConf;
478  }
479 
483  inline uint8_t GetGuardTimeSymbols() const
484  {
485  return m_guardTimeSymbols;
486  }
487 
488  private:
489  typedef std::map<uint16_t, SatTimeSlotConfContainer_t> SatTimeSlotConfMap_t; // key = carrier ID
490 
494  bool m_isLogon;
495 
496  Ptr<SatFrameConf> m_parent;
497  Ptr<SatBtuConf> m_btuConf;
498  Ptr<SatWaveformConf> m_waveformConf;
500  uint16_t m_carrierCount;
505 
512  uint16_t AddTimeSlotConf(Ptr<SatTimeSlotConf> conf);
513 };
514 
519 class SatSuperframeConf : public Object
520 {
521  public:
525  typedef enum
526  {
533 
537  typedef std::vector<Ptr<SatFrameConf>> SatFrameConfList_t;
538 
542  typedef enum
543  {
550 
551  static const uint8_t m_maxFrameCount = 10;
552 
559  static Ptr<SatSuperframeConf> CreateSuperframeConf(SuperFrameConfiguration_t conf);
560 
566  template <class T>
567  static std::string GetNumberAsString(T number)
568  {
569  std::stringstream ss; // create a string stream
570  ss << number; // add number to the stream
571 
572  return ss.str();
573  }
574 
581  static std::string GetIndexAsFrameName(uint32_t index);
582 
587  static TypeId GetTypeId(void);
588 
593  virtual TypeId GetInstanceTypeId(void) const;
594 
599 
604 
610  inline double GetBandwidthHz() const
611  {
612  return m_usedBandwidthHz;
613  }
614 
620  inline Time GetDuration() const
621  {
622  return m_duration;
623  }
624 
631  Ptr<SatFrameConf> GetFrameConf(uint8_t id) const;
632 
641  uint32_t GetCarrierId(uint8_t frameId, uint16_t frameCarrierId) const;
642 
648  uint32_t GetCarrierCount() const;
649 
657  double GetCarrierFrequencyHz(uint32_t carrierId) const;
658 
667  double GetCarrierBandwidthHz(uint32_t carrierId,
668  SatEnums::CarrierBandwidthType_t bandwidthType) const;
669 
678  Ptr<SatFrameConf> GetCarrierFrameConf(uint32_t carrierId) const;
679 
686  bool IsRandomAccessCarrier(uint32_t carrierId) const;
687 
695  void Configure(double allocatedBandwidthHz,
696  Time targetDuration,
697  Ptr<SatWaveformConf> waveformConf);
698 
703  virtual void DoConfigure() = 0;
704 
712 
719  uint16_t GetRaSlotCount(uint8_t raChannel);
720 
726  uint8_t GetRaChannelCount() const;
727 
735  uint8_t GetRaChannel(uint32_t carrierId) const;
736 
743  uint8_t GetRaChannelFrameId(uint8_t raChannel) const;
744 
751  uint8_t GetRaChannelAllocationChannelId(uint8_t raChannel) const;
752 
758  uint32_t GetRaChannelTimeSlotPayloadInBytes(uint8_t raChannel) const;
759 
765  inline void SetFrameCount(uint8_t frameCount)
766  {
767  m_frameCount = frameCount;
768  }
769 
775  inline uint8_t GetFrameCount() const
776  {
777  return m_frameCount;
778  }
779 
786  {
787  m_configType = type;
788  }
789 
795  {
796  return m_configType;
797  }
798 
799  inline void SetMaxSubdivision(uint8_t maximumCarrierSubdivision)
800  {
801  m_maxCarrierSubdivision = maximumCarrierSubdivision;
802  }
803 
804  inline uint8_t GetMaxSubdivision() const
805  {
807  }
808 
809  // Frame specific getter and setter method for attributes (called by methods of objects derived
810  // from this object)
811  void SetFrameAllocatedBandwidthHz(uint8_t frameIndex, double bandwidthHz);
812  void SetFrameCarrierAllocatedBandwidthHz(uint8_t frameIndex, double bandwidthHz);
813  void SetFrameCarrierSpacing(uint8_t frameIndex, double spacing);
814  void SetFrameCarrierRollOff(uint8_t frameIndex, double rollOff);
815  void SetFrameCarrierSpreadingFactor(uint8_t frameIndex, uint32_t spreadingFactor);
816  void SetFrameRandomAccess(uint8_t frameIndex, bool randomAccess);
817  void SetFrameLogon(uint8_t frameIndex, bool logon);
818  void SetFrameAllocationChannelId(uint8_t frameIndex, uint8_t allocationChannel);
819  void SetFrameGuardTimeSymbols(uint8_t frameIndex, uint8_t guardTimeSymbols);
820 
821  double GetFrameAllocatedBandwidthHz(uint8_t frameIndex) const;
822  double GetFrameCarrierAllocatedBandwidthHz(uint8_t frameIndex) const;
823  double GetFrameCarrierSpacing(uint8_t frameIndex) const;
824  double GetFrameCarrierRollOff(uint8_t frameIndex) const;
825  uint32_t GetFrameCarrierSpreadingFactor(uint8_t frameIndex) const;
826  bool IsFrameRandomAccess(uint8_t frameIndex) const;
827  bool IsFrameLogon(uint8_t frameIndex) const;
828  uint8_t GetFrameAllocationChannelId(uint8_t frameIndex) const;
829  uint8_t GetFrameGuardTimeSymbols(uint8_t frameIndex) const;
830  bool IsLogonEnabled() const;
831  uint32_t GetLogonChannelIndex() const;
832 
833  private:
834  // first = frame ID, second = RA channel id (index), third = allocation channel id
835  typedef std::tuple<uint8_t, uint8_t, uint8_t> RaChannelInfo_t;
836 
839 
840  uint8_t m_frameCount;
843 
853 
855  std::vector<RaChannelInfo_t> m_raChannels;
856  uint32_t m_carrierCount;
859 
866  uint8_t GetCarrierFrame(uint32_t carrierId) const;
867 
873  void AddFrameConf(SatFrameConf::SatFrameConfParams_t frameConfParameters,
874  double bandwidthInHz,
875  double rollOff,
876  double spacing,
877  uint32_t spreadingFactor,
878  uint8_t subdivisionLevel);
879 
880  public:
881 // macro to ease definition of access methods for frame specific attributes
882 #define FRAME_ATTRIBUTE_ACCESSOR_DEFINE(index) \
883  inline void SetFrame##index##AllocatedBandwidthHz(double value) \
884  { \
885  return SetFrameAllocatedBandwidthHz(index, value); \
886  } \
887  inline double GetFrame##index##AllocatedBandwidthHz() const \
888  { \
889  return GetFrameAllocatedBandwidthHz(index); \
890  } \
891  inline void SetFrame##index##CarrierAllocatedBandwidthHz(double value) \
892  { \
893  return SetFrameCarrierAllocatedBandwidthHz(index, value); \
894  } \
895  inline double GetFrame##index##CarrierAllocatedBandwidthHz() const \
896  { \
897  return GetFrameCarrierAllocatedBandwidthHz(index); \
898  } \
899  inline void SetFrame##index##CarrierSpacing(double value) \
900  { \
901  return SetFrameCarrierSpacing(index, value); \
902  } \
903  inline double GetFrame##index##CarrierSpacing() const \
904  { \
905  return GetFrameCarrierSpacing(index); \
906  } \
907  inline void SetFrame##index##CarrierRollOff(double value) \
908  { \
909  return SetFrameCarrierRollOff(index, value); \
910  } \
911  inline double GetFrame##index##CarrierRollOff() const \
912  { \
913  return GetFrameCarrierRollOff(index); \
914  } \
915  inline void SetFrame##index##SpreadingFactor(uint32_t value) \
916  { \
917  return SetFrameCarrierSpreadingFactor(index, value); \
918  } \
919  inline double GetFrame##index##SpreadingFactor() const \
920  { \
921  return GetFrameCarrierSpreadingFactor(index); \
922  } \
923  inline void SetFrame##index##RandomAccess(bool value) \
924  { \
925  return SetFrameRandomAccess(index, value); \
926  } \
927  inline double IsFrame##index##RandomAccess() const \
928  { \
929  return IsFrameRandomAccess(index); \
930  } \
931  inline void SetFrame##index##AllocationChannelId(uint8_t value) \
932  { \
933  return SetFrameAllocationChannelId(index, value); \
934  } \
935  inline uint8_t GetFrame##index##AllocationChannelId() const \
936  { \
937  return GetFrameAllocationChannelId(index); \
938  } \
939  inline void SetFrame##index##Logon(bool value) \
940  { \
941  return SetFrameLogon(index, value); \
942  } \
943  inline double IsFrame##index##Logon() const \
944  { \
945  return IsFrameLogon(index); \
946  } \
947  inline void SetFrame##index##GuardTimeSymbols(uint8_t value) \
948  { \
949  return SetFrameGuardTimeSymbols(index, value); \
950  } \
951  inline uint8_t GetFrame##index##GuardTimeSymbols() const \
952  { \
953  return GetFrameGuardTimeSymbols(index); \
954  }
955 
956  // Access method definition for frame specific attributes
957  // there should be as many macro calls as m_maxFrameCount defines
968 };
969 
975 {
976  public:
981  static TypeId GetTypeId(void);
982 
987  virtual TypeId GetInstanceTypeId(void) const;
988 
993 
998 
999  virtual void DoConfigure();
1000 
1001  private:
1002 };
1003 
1009 {
1010  public:
1015  static TypeId GetTypeId(void);
1016 
1021  virtual TypeId GetInstanceTypeId(void) const;
1022 
1027 
1032 
1033  virtual void DoConfigure();
1034 
1035  private:
1036 };
1037 
1044 {
1045  public:
1050  static TypeId GetTypeId(void);
1051 
1056  virtual TypeId GetInstanceTypeId(void) const;
1057 
1062 
1067 
1068  virtual void DoConfigure();
1069 
1070  private:
1071 };
1072 
1078 {
1079  public:
1084  static TypeId GetTypeId(void);
1085 
1090  virtual TypeId GetInstanceTypeId(void) const;
1091 
1096 
1101 
1102  virtual void DoConfigure();
1103 
1104  private:
1105 };
1106 
1112 {
1113  public:
1118  static TypeId GetTypeId(void);
1119 
1124  virtual TypeId GetInstanceTypeId(void) const;
1125 
1130 
1135 
1136  virtual void DoConfigure();
1137 
1138  private:
1139 };
1140 
1141 } // namespace ns3
1142 
1143 #endif // SATELLITE_FRAME_CONF_H
This class implements configuration for Bandwidth Time Unit (BTU).
~SatBtuConf()
Destructor for SatBtuConf.
double GetAllocatedBandwidthInHz() const
Get bandwidth of BTU.
double GetOccupiedBandwidthInHz() const
Get occupied bandwidth of BTU.
double GetSpreadingFactor() const
Get spreading factor of BTU.
double GetSymbolRateInBauds() const
Get symbol rate of BTU.
double GetEffectiveBandwidthInHz() const
Get occupied bandwidth of BTU.
SatBtuConf()
Default constructor for SatBtuConf.
CarrierBandwidthType_t
Types of bandwidth.
This class implements configuration for frames (for super frames)
bool IsLogon() const
Get state if frame is logon frame.
uint8_t GetSubdivisionLevel() const
Get the subdivision level of this frame.
uint8_t GetAllocationChannelId() const
Get allocation channel ID of this frame.
uint16_t AddTimeSlotConf(Ptr< SatTimeSlotConf > conf)
Add time slot.
bool IsRandomAccess() const
Get state if frame is random access frame.
uint8_t GetGuardTimeSymbols() const
Get the guard time configuration of this frame.
std::map< uint16_t, SatTimeSlotConfContainer_t > SatTimeSlotConfMap_t
uint32_t GetCarrierMinPayloadInBytes() const
Get minimum payload of a carrier in bytes.
uint32_t m_minPayloadPerCarrierInBytes
static const uint16_t m_maxTimeSlotCount
Ptr< SatFrameConf > GetParent() const
double GetCarrierBandwidthHz(SatEnums::CarrierBandwidthType_t bandwidthType) const
Get carrier bandwidth in frame.
Ptr< SatTimeSlotConf > GetTimeSlotConf(uint16_t index) const
Get time slot configuration of the frame.
Ptr< SatWaveformConf > m_waveformConf
SatTimeSlotConfMap_t m_timeSlotConfMap
std::vector< Ptr< SatTimeSlotConf > > SatTimeSlotConfContainer_t
Define type SatTimeSlotConfContainer_t.
double GetCarrierFrequencyHz(uint16_t carrierId) const
Get carrier center frequency in frame.
uint16_t GetCarrierCount() const
Get carrier count of the frame.
Ptr< SatBtuConf > m_btuConf
uint32_t GetCarrierMaxSymbols() const
Get maximum symbols in carrier.
~SatFrameConf()
Destructor for SatFrameConf.
Ptr< SatFrameConf > m_parent
double GetBandwidthHz() const
Get bandwidth of the frame.
SatTimeSlotConfContainer_t GetTimeSlotConfs(uint16_t carrierId) const
Get time slot of the specific carrier.
Time GetDuration() const
Get duration of frame.
uint16_t GetTimeSlotCount() const
Get time slot count of the frame.
SatFrameConf()
Default constructor for SatFrameConf.
Ptr< SatWaveformConf > GetWaveformConf() const
Get waveform configuration of this frame.
bool IsSubdivided() const
Get wether this frame is subdivided or not.
Ptr< SatBtuConf > GetBtuConf() const
Get BTU conf of the frame.
This class implements super frame configuration 0.
virtual void DoConfigure()
Do frame specific configuration as needed.
static TypeId GetTypeId(void)
Get the type ID.
~SatSuperframeConf0()
Destructor for SatSuperframeConf.
SatSuperframeConf0()
Default constructor for SatSuperframeConf.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
This class implements super frame configuration 1.
SatSuperframeConf1()
Default constructor for SatSuperframeConf.
static TypeId GetTypeId(void)
Get the type ID.
~SatSuperframeConf1()
Destructor for SatSuperframeConf.
virtual void DoConfigure()
Do frame specific configuration as needed.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
This class implements sup.
~SatSuperframeConf2()
Destructor for SatSuperframeConf.
static TypeId GetTypeId(void)
Get the type ID.
virtual void DoConfigure()
Do frame specific configuration as needed.
SatSuperframeConf2()
Default constructor for SatSuperframeConf.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
This class implements super frame configuration 3.
~SatSuperframeConf3()
Destructor for SatSuperframeConf.
virtual void DoConfigure()
Do frame specific configuration as needed.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
static TypeId GetTypeId(void)
Get the type ID.
SatSuperframeConf3()
Default constructor for SatSuperframeConf.
This class implements super frame configuration 4.
static TypeId GetTypeId(void)
Get the type ID.
virtual void DoConfigure()
Do frame specific configuration as needed.
SatSuperframeConf4()
Default constructor for SatSuperframeConf.
~SatSuperframeConf4()
Destructor for SatSuperframeConf.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
This abstract class defines and implements interface of configuration for super frames.
SatSuperframeConf()
Default constructor for SatSuperframeConf.
void SetFrameCarrierSpacing(uint8_t frameIndex, double spacing)
SatFrameConf::SatTimeSlotConfContainer_t GetRaSlots(uint8_t raChannel)
Get RA channel time slots.
SatFrameConfList_t m_frames
double GetBandwidthHz() const
Get bandwidth of the super frame.
void SetFrameCount(uint8_t frameCount)
Set number of frames to be used in super frame.
void SetMaxSubdivision(uint8_t maximumCarrierSubdivision)
double m_frameCarrierSpacing[m_maxFrameCount]
uint8_t m_frameGuardTimeSymbols[m_maxFrameCount]
uint32_t GetCarrierCount() const
Get carrier count in the super frame.
static std::string GetNumberAsString(T number)
Template method to convert number to string.
SatSuperframeConf::ConfigType_t GetConfigType() const
Get frame configuration type to be used in super frame.
double GetFrameCarrierSpacing(uint8_t frameIndex) const
double GetFrameAllocatedBandwidthHz(uint8_t frameIndex) const
Ptr< SatFrameConf > GetCarrierFrameConf(uint32_t carrierId) const
Get the frame configuration of the requested carrier.
void SetFrameGuardTimeSymbols(uint8_t frameIndex, uint8_t guardTimeSymbols)
uint8_t GetMaxSubdivision() const
bool m_frameIsLogon[m_maxFrameCount]
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
uint16_t GetRaSlotCount(uint8_t raChannel)
Get RA channel time slot count.
void SetFrameRandomAccess(uint8_t frameIndex, bool randomAccess)
void SetFrameAllocatedBandwidthHz(uint8_t frameIndex, double bandwidthHz)
uint8_t GetRaChannel(uint32_t carrierId) const
Get the RA channel id (index) corresponding to given (global) carrier id.
void SetFrameLogon(uint8_t frameIndex, bool logon)
void SetFrameAllocationChannelId(uint8_t frameIndex, uint8_t allocationChannel)
std::vector< RaChannelInfo_t > m_raChannels
double m_frameCarrierAllocatedBandwidth[m_maxFrameCount]
double GetCarrierFrequencyHz(uint32_t carrierId) const
Get the center frequency of the requested carrier.
uint32_t GetRaChannelTimeSlotPayloadInBytes(uint8_t raChannel) const
Get the payload of the RA channel time slot in bytes.
uint8_t GetFrameGuardTimeSymbols(uint8_t frameIndex) const
static std::string GetIndexAsFrameName(uint32_t index)
Method to convert frame index to frame name.
double GetFrameCarrierAllocatedBandwidthHz(uint8_t frameIndex) const
void SetConfigType(SatSuperframeConf::ConfigType_t type)
Set frame configuration type to be used in super frame.
void AddFrameConf(SatFrameConf::SatFrameConfParams_t frameConfParameters, double bandwidthInHz, double rollOff, double spacing, uint32_t spreadingFactor, uint8_t subdivisionLevel)
Add frame configuration to super frame configuration.
double GetFrameCarrierRollOff(uint8_t frameIndex) const
SuperFrameConfiguration_t
Configurable Super Frames.
@ SUPER_FRAME_CONFIG_0
SUPER_FRAME_CONFIG_0.
@ SUPER_FRAME_CONFIG_3
SUPER_FRAME_CONFIG_3.
@ SUPER_FRAME_CONFIG_4
SUPER_FRAME_CONFIG_4.
@ SUPER_FRAME_CONFIG_1
SUPER_FRAME_CONFIG_1.
@ SUPER_FRAME_CONFIG_2
SUPER_FRAME_CONFIG_2.
static const uint8_t m_maxFrameCount
uint8_t GetFrameCount() const
Get number of frames to be used in super frame.
static Ptr< SatSuperframeConf > CreateSuperframeConf(SuperFrameConfiguration_t conf)
Create pre-configured super frame configuration-.
uint8_t GetRaChannelFrameId(uint8_t raChannel) const
Get RA channel frame ID.
void SetFrameCarrierRollOff(uint8_t frameIndex, double rollOff)
uint8_t GetFrameAllocationChannelId(uint8_t frameIndex) const
void SetFrameCarrierAllocatedBandwidthHz(uint8_t frameIndex, double bandwidthHz)
double GetCarrierBandwidthHz(uint32_t carrierId, SatEnums::CarrierBandwidthType_t bandwidthType) const
Get the bandwidth of the requested carrier.
uint8_t m_frameAllocationChannel[m_maxFrameCount]
std::vector< Ptr< SatFrameConf > > SatFrameConfList_t
Define type SatFrameConfList_t.
bool IsFrameLogon(uint8_t frameIndex) const
double m_frameAllocatedBandwidth[m_maxFrameCount]
void Configure(double allocatedBandwidthHz, Time targetDuration, Ptr< SatWaveformConf > waveformConf)
Configures super frame configuration according to set attributes.
uint32_t m_frameCarrierSpreadingFactor[m_maxFrameCount]
Time GetDuration() const
Get duration of super frame.
virtual void DoConfigure()=0
Do frame specific configuration as needed.
double m_frameCarrierRollOff[m_maxFrameCount]
uint32_t GetCarrierId(uint8_t frameId, uint16_t frameCarrierId) const
Get carrier id of the super frame.
~SatSuperframeConf()
Destructor for SatSuperframeConf.
std::tuple< uint8_t, uint8_t, uint8_t > RaChannelInfo_t
bool m_frameIsRandomAccess[m_maxFrameCount]
void SetFrameCarrierSpreadingFactor(uint8_t frameIndex, uint32_t spreadingFactor)
static TypeId GetTypeId(void)
Get the type ID.
Ptr< SatFrameConf > GetFrameConf(uint8_t id) const
Get frame conf of the super frame.
uint8_t GetRaChannelCount() const
Get the number of the RA channels in super frame configuration.
uint32_t GetFrameCarrierSpreadingFactor(uint8_t frameIndex) const
bool IsFrameRandomAccess(uint8_t frameIndex) const
uint32_t GetLogonChannelIndex() const
uint8_t GetCarrierFrame(uint32_t carrierId) const
Get frame id where given global carrier ID belongs to.
uint8_t GetRaChannelAllocationChannelId(uint8_t raChannel) const
Get RA channel allocation channel ID.
ConfigType_t
Enum for configuration types.
@ CONFIG_TYPE_4
Configuration type 4 (ESSA)
@ CONFIG_TYPE_2
Configuration type 2.
@ CONFIG_TYPE_1
Configuration type 1.
@ CONFIG_TYPE_0
Configuration type 0.
@ CONFIG_TYPE_3
Configuration type 3.
bool IsRandomAccessCarrier(uint32_t carrierId) const
Check if given carrier is random access carrier.
This class implements configuration for time slots (for super frames / frames)
SatTimeSlotConf::SatTimeSlotType_t GetSlotType() const
Get time slot type.
SatTimeSlotConf()
Default constructor for SatTimeSlotConf.
void SetRcIndex(uint8_t rcIndex)
Set RC index of the time slot.
uint32_t GetWaveFormId() const
Get wave form id of time slot.
Time GetStartTime() const
Get start time of time slot.
uint8_t GetRcIndex()
Get RC index of the time slot.
SatTimeSlotType_t
Types for time slot.
@ SLOT_TYPE_TRC
Control or traffic slot.
~SatTimeSlotConf()
Destructor for SatTimeSlotConf.
void SetSlotType(SatTimeSlotConf::SatTimeSlotType_t slotType)
Set time slot type.
uint16_t GetCarrierId() const
Get carrier id of time slot (inside frame).
SatTimeSlotType_t m_slotType
constexpr uint16_t MAXIMUM_TIME_SLOT_ID
Maximum value for time slot ID as specified in ETSI EN 301 542-2, chapter 7.5.1.3.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
Helper struct to reduce the number of parameters fed into the SatFrameConf constructor.