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 <tuple>
35 #include <vector>
36 
37 namespace ns3
38 {
39 
45 class SatBtuConf : public SimpleRefCount<SatBtuConf>
46 {
47  public:
51  SatBtuConf();
52 
61  SatBtuConf(double bandwidthInHz, double rollOff, double spacing, uint32_t spreadingFactor);
62 
66  ~SatBtuConf();
67 
73  inline double GetAllocatedBandwidthInHz() const
74  {
76  }
77 
83  inline double GetOccupiedBandwidthInHz() const
84  {
86  }
87 
93  inline double GetEffectiveBandwidthInHz() const
94  {
96  }
97 
103  inline double GetSpreadingFactor() const
104  {
105  return m_spreadingFactor;
106  }
107 
113  inline double GetSymbolRateInBauds() const
114  {
116  }
117 
118  private:
121  double m_effectiveBandwidthInHz; // i.e. symbol rate
123  Time m_duration; // duration field reserved, but not used currently
124 };
125 
131 class SatTimeSlotConf : public SimpleRefCount<SatTimeSlotConf>
132 {
133  public:
137  typedef enum
138  {
142 
144 
148  SatTimeSlotConf();
149 
158  SatTimeSlotConf(Time startTime,
159  uint32_t waveFormId,
160  uint16_t carrierId,
162 
167 
173  inline Time GetStartTime() const
174  {
175  return m_startTime;
176  }
177 
183  inline uint32_t GetWaveFormId() const
184  {
185  return m_waveFormId;
186  }
187 
193  inline uint16_t GetCarrierId() const
194  {
195  return m_frameCarrierId;
196  }
197 
203  inline void SetRcIndex(uint8_t rcIndex)
204  {
205  m_rcIndex = rcIndex;
206  }
207 
213  inline uint8_t GetRcIndex()
214  {
215  return m_rcIndex;
216  }
217 
224  {
225  return m_slotType;
226  }
227 
234  {
235  m_slotType = slotType;
236  }
237 
238  private:
240  uint32_t m_waveFormId;
242  uint8_t m_rcIndex;
243 
245 };
246 
252 class SatFrameConf : public SimpleRefCount<SatFrameConf>
253 {
254  public:
258  typedef std::vector<Ptr<SatTimeSlotConf>> SatTimeSlotConfContainer_t;
259 
261 
278  typedef struct
279  {
282  Ptr<SatFrameConf> m_parent;
283  Ptr<SatBtuConf> m_btuConf;
284  Ptr<SatWaveformConf> m_waveformConf;
288  bool m_isLogon;
292 
296  SatFrameConf();
297 
304 
308  ~SatFrameConf();
309 
316  Ptr<SatTimeSlotConf> GetTimeSlotConf(uint16_t index) const;
317 
325  Ptr<SatTimeSlotConf> GetTimeSlotConf(uint16_t carrierId, uint16_t index) const;
326 
332  inline double GetBandwidthHz() const
333  {
334  return m_bandwidthHz;
335  }
336 
342  inline Time GetDuration() const
343  {
344  return m_duration;
345  }
346 
352  inline uint32_t GetCarrierMaxSymbols() const
353  {
354  return m_maxSymbolsPerCarrier;
355  }
356 
362  inline uint32_t GetCarrierMinPayloadInBytes() const
363  {
365  }
366 
372  double GetCarrierFrequencyHz(uint16_t carrierId) const;
373 
380  double GetCarrierBandwidthHz(SatEnums::CarrierBandwidthType_t bandwidthType) const;
381 
387  inline bool IsSubdivided() const
388  {
389  return m_parent != nullptr;
390  ;
391  }
392 
398  uint8_t GetSubdivisionLevel() const;
399 
400  inline Ptr<SatFrameConf> GetParent() const
401  {
402  return m_parent;
403  }
404 
410  inline Ptr<SatBtuConf> GetBtuConf() const
411  {
412  return m_btuConf;
413  }
414 
420  inline uint16_t GetCarrierCount() const
421  {
422  return m_carrierCount;
423  }
424 
430  uint16_t GetTimeSlotCount() const;
431 
438  SatTimeSlotConfContainer_t GetTimeSlotConfs(uint16_t carrierId) const;
439 
445  inline bool IsRandomAccess() const
446  {
447  return m_isRandomAccess;
448  }
449 
455  inline bool IsLogon() const
456  {
457  return m_isLogon;
458  }
459 
463  inline uint8_t GetAllocationChannelId() const
464  {
465  return m_allocationChannel;
466  }
467 
471  inline Ptr<SatWaveformConf> GetWaveformConf() const
472  {
473  return m_waveformConf;
474  }
475 
479  inline uint8_t GetGuardTimeSymbols() const
480  {
481  return m_guardTimeSymbols;
482  }
483 
484  private:
485  typedef std::map<uint16_t, SatTimeSlotConfContainer_t> SatTimeSlotConfMap_t; // key = carrier ID
486 
490  bool m_isLogon;
491 
492  Ptr<SatFrameConf> m_parent;
493  Ptr<SatBtuConf> m_btuConf;
494  Ptr<SatWaveformConf> m_waveformConf;
496  uint16_t m_carrierCount;
501 
508  uint16_t AddTimeSlotConf(Ptr<SatTimeSlotConf> conf);
509 };
510 
515 class SatSuperframeConf : public Object
516 {
517  public:
521  typedef enum
522  {
529 
533  typedef std::vector<Ptr<SatFrameConf>> SatFrameConfList_t;
534 
538  typedef enum
539  {
546 
547  static const uint8_t m_maxFrameCount = 10;
548 
555  static Ptr<SatSuperframeConf> CreateSuperframeConf(SuperFrameConfiguration_t conf);
556 
562  template <class T>
563  static std::string GetNumberAsString(T number)
564  {
565  std::stringstream ss; // create a string stream
566  ss << number; // add number to the stream
567 
568  return ss.str();
569  }
570 
577  static std::string GetIndexAsFrameName(uint32_t index);
578 
583  static TypeId GetTypeId(void);
584 
589  virtual TypeId GetInstanceTypeId(void) const;
590 
595 
600 
606  inline double GetBandwidthHz() const
607  {
608  return m_usedBandwidthHz;
609  }
610 
616  inline Time GetDuration() const
617  {
618  return m_duration;
619  }
620 
627  Ptr<SatFrameConf> GetFrameConf(uint8_t id) const;
628 
637  uint32_t GetCarrierId(uint8_t frameId, uint16_t frameCarrierId) const;
638 
644  uint32_t GetCarrierCount() const;
645 
653  double GetCarrierFrequencyHz(uint32_t carrierId) const;
654 
663  double GetCarrierBandwidthHz(uint32_t carrierId,
664  SatEnums::CarrierBandwidthType_t bandwidthType) const;
665 
674  Ptr<SatFrameConf> GetCarrierFrameConf(uint32_t carrierId) const;
675 
682  bool IsRandomAccessCarrier(uint32_t carrierId) const;
683 
691  void Configure(double allocatedBandwidthHz,
692  Time targetDuration,
693  Ptr<SatWaveformConf> waveformConf);
694 
699  virtual void DoConfigure() = 0;
700 
708 
715  uint16_t GetRaSlotCount(uint8_t raChannel);
716 
722  uint8_t GetRaChannelCount() const;
723 
731  uint8_t GetRaChannel(uint32_t carrierId) const;
732 
739  uint8_t GetRaChannelFrameId(uint8_t raChannel) const;
740 
747  uint8_t GetRaChannelAllocationChannelId(uint8_t raChannel) const;
748 
754  uint32_t GetRaChannelTimeSlotPayloadInBytes(uint8_t raChannel) const;
755 
761  inline void SetFrameCount(uint8_t frameCount)
762  {
763  m_frameCount = frameCount;
764  }
765 
771  inline uint8_t GetFrameCount() const
772  {
773  return m_frameCount;
774  }
775 
782  {
783  m_configType = type;
784  }
785 
791  {
792  return m_configType;
793  }
794 
795  inline void SetMaxSubdivision(uint8_t maximumCarrierSubdivision)
796  {
797  m_maxCarrierSubdivision = maximumCarrierSubdivision;
798  }
799 
800  inline uint8_t GetMaxSubdivision() const
801  {
803  }
804 
805  // Frame specific getter and setter method for attributes (called by methods of objects derived
806  // from this object)
807  void SetFrameAllocatedBandwidthHz(uint8_t frameIndex, double bandwidthHz);
808  void SetFrameCarrierAllocatedBandwidthHz(uint8_t frameIndex, double bandwidthHz);
809  void SetFrameCarrierSpacing(uint8_t frameIndex, double spacing);
810  void SetFrameCarrierRollOff(uint8_t frameIndex, double rollOff);
811  void SetFrameCarrierSpreadingFactor(uint8_t frameIndex, uint32_t spreadingFactor);
812  void SetFrameRandomAccess(uint8_t frameIndex, bool randomAccess);
813  void SetFrameLogon(uint8_t frameIndex, bool logon);
814  void SetFrameAllocationChannelId(uint8_t frameIndex, uint8_t allocationChannel);
815  void SetFrameGuardTimeSymbols(uint8_t frameIndex, uint8_t guardTimeSymbols);
816 
817  double GetFrameAllocatedBandwidthHz(uint8_t frameIndex) const;
818  double GetFrameCarrierAllocatedBandwidthHz(uint8_t frameIndex) const;
819  double GetFrameCarrierSpacing(uint8_t frameIndex) const;
820  double GetFrameCarrierRollOff(uint8_t frameIndex) const;
821  uint32_t GetFrameCarrierSpreadingFactor(uint8_t frameIndex) const;
822  bool IsFrameRandomAccess(uint8_t frameIndex) const;
823  bool IsFrameLogon(uint8_t frameIndex) const;
824  uint8_t GetFrameAllocationChannelId(uint8_t frameIndex) const;
825  uint8_t GetFrameGuardTimeSymbols(uint8_t frameIndex) const;
826  bool IsLogonEnabled() const;
827  uint32_t GetLogonChannelIndex() const;
828 
829  private:
830  // first = frame ID, second = RA channel id (index), third = allocation channel id
831  typedef std::tuple<uint8_t, uint8_t, uint8_t> RaChannelInfo_t;
832 
835 
836  uint8_t m_frameCount;
839 
849 
851  std::vector<RaChannelInfo_t> m_raChannels;
852  uint32_t m_carrierCount;
855 
862  uint8_t GetCarrierFrame(uint32_t carrierId) const;
863 
869  void AddFrameConf(SatFrameConf::SatFrameConfParams_t frameConfParameters,
870  double bandwidthInHz,
871  double rollOff,
872  double spacing,
873  uint32_t spreadingFactor,
874  uint8_t subdivisionLevel);
875 
876  public:
877 // macro to ease definition of access methods for frame specific attributes
878 #define FRAME_ATTRIBUTE_ACCESSOR_DEFINE(index) \
879  inline void SetFrame##index##AllocatedBandwidthHz(double value) \
880  { \
881  return SetFrameAllocatedBandwidthHz(index, value); \
882  } \
883  inline double GetFrame##index##AllocatedBandwidthHz() const \
884  { \
885  return GetFrameAllocatedBandwidthHz(index); \
886  } \
887  inline void SetFrame##index##CarrierAllocatedBandwidthHz(double value) \
888  { \
889  return SetFrameCarrierAllocatedBandwidthHz(index, value); \
890  } \
891  inline double GetFrame##index##CarrierAllocatedBandwidthHz() const \
892  { \
893  return GetFrameCarrierAllocatedBandwidthHz(index); \
894  } \
895  inline void SetFrame##index##CarrierSpacing(double value) \
896  { \
897  return SetFrameCarrierSpacing(index, value); \
898  } \
899  inline double GetFrame##index##CarrierSpacing() const \
900  { \
901  return GetFrameCarrierSpacing(index); \
902  } \
903  inline void SetFrame##index##CarrierRollOff(double value) \
904  { \
905  return SetFrameCarrierRollOff(index, value); \
906  } \
907  inline double GetFrame##index##CarrierRollOff() const \
908  { \
909  return GetFrameCarrierRollOff(index); \
910  } \
911  inline void SetFrame##index##SpreadingFactor(uint32_t value) \
912  { \
913  return SetFrameCarrierSpreadingFactor(index, value); \
914  } \
915  inline double GetFrame##index##SpreadingFactor() const \
916  { \
917  return GetFrameCarrierSpreadingFactor(index); \
918  } \
919  inline void SetFrame##index##RandomAccess(bool value) \
920  { \
921  return SetFrameRandomAccess(index, value); \
922  } \
923  inline double IsFrame##index##RandomAccess() const \
924  { \
925  return IsFrameRandomAccess(index); \
926  } \
927  inline void SetFrame##index##AllocationChannelId(uint8_t value) \
928  { \
929  return SetFrameAllocationChannelId(index, value); \
930  } \
931  inline uint8_t GetFrame##index##AllocationChannelId() const \
932  { \
933  return GetFrameAllocationChannelId(index); \
934  } \
935  inline void SetFrame##index##Logon(bool value) \
936  { \
937  return SetFrameLogon(index, value); \
938  } \
939  inline double IsFrame##index##Logon() const \
940  { \
941  return IsFrameLogon(index); \
942  } \
943  inline void SetFrame##index##GuardTimeSymbols(uint8_t value) \
944  { \
945  return SetFrameGuardTimeSymbols(index, value); \
946  } \
947  inline uint8_t GetFrame##index##GuardTimeSymbols() const \
948  { \
949  return GetFrameGuardTimeSymbols(index); \
950  }
951 
952  // Access method definition for frame specific attributes
953  // there should be as many macro calls as m_maxFrameCount defines
964 };
965 
971 {
972  public:
977  static TypeId GetTypeId(void);
978 
983  virtual TypeId GetInstanceTypeId(void) const;
984 
989 
994 
995  virtual void DoConfigure();
996 
997  private:
998 };
999 
1005 {
1006  public:
1011  static TypeId GetTypeId(void);
1012 
1017  virtual TypeId GetInstanceTypeId(void) const;
1018 
1023 
1028 
1029  virtual void DoConfigure();
1030 
1031  private:
1032 };
1033 
1040 {
1041  public:
1046  static TypeId GetTypeId(void);
1047 
1052  virtual TypeId GetInstanceTypeId(void) const;
1053 
1058 
1063 
1064  virtual void DoConfigure();
1065 
1066  private:
1067 };
1068 
1074 {
1075  public:
1080  static TypeId GetTypeId(void);
1081 
1086  virtual TypeId GetInstanceTypeId(void) const;
1087 
1092 
1097 
1098  virtual void DoConfigure();
1099 
1100  private:
1101 };
1102 
1108 {
1109  public:
1114  static TypeId GetTypeId(void);
1115 
1120  virtual TypeId GetInstanceTypeId(void) const;
1121 
1126 
1131 
1132  virtual void DoConfigure();
1133 
1134  private:
1135 };
1136 
1137 } // namespace ns3
1138 
1139 #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.