23 #ifndef SATELLITE_LOWER_LAYER_SERIVICE_H
24 #define SATELLITE_LOWER_LAYER_SERIVICE_H
26 #include <ns3/nstime.h>
27 #include <ns3/object.h>
28 #include <ns3/random-variable-stream.h>
33 #include <unordered_set>
427 double averageNormalizedOfferedLoadThreshold)
769 std::stringstream ss;
770 ss << (double)number;
823 Ptr<RandomVariableStream> constantServiceRateStream);
920 double averageNormalizedOfferedLoadThreshold);
979 #define SAT_DA_SERVICE_ATTRIBUTE_ACCESSOR_DEFINE(index) \
980 inline void SetDaServ##index##ConstantAssignmentProvided(bool value) \
982 return SetDaConstantAssignmentProvided(index, value); \
984 inline bool GetDaServ##index##ConstantAssignmentProvided() const \
986 return GetDaConstantAssignmentProvided(index); \
988 inline void SetDaServ##index##RbdcAllowed(bool value) \
990 return SetDaRbdcAllowed(index, value); \
992 inline bool GetDaServ##index##RbdcAllowed() const \
994 return GetDaRbdcAllowed(index); \
996 inline void SetDaServ##index##VolumeAllowed(bool value) \
998 return SetDaVolumeAllowed(index, value); \
1000 inline bool GetDaServ##index##VolumeAllowed() const \
1002 return GetDaVolumeAllowed(index); \
1004 inline void SetDaServ##index##ConstantServiceRateStream(Ptr<RandomVariableStream> value) \
1006 return SetDaConstantServiceRateStream(index, value); \
1008 inline Ptr<RandomVariableStream> GetDaServ##index##ConstantServiceRateStream() const \
1010 return GetDaConstantServiceRateStream(index); \
1012 inline void SetDaServ##index##MaximumServiceRateInKbps(uint16_t value) \
1014 return SetDaMaximumServiceRateInKbps(index, value); \
1016 inline uint16_t GetDaServ##index##MaximumServiceRateInKbps() const \
1018 return GetDaMaximumServiceRateInKbps(index); \
1020 inline void SetDaServ##index##MinimumServiceRateInKbps(uint16_t value) \
1022 return SetDaMinimumServiceRateInKbps(index, value); \
1024 inline uint16_t GetDaServ##index##MinimumServiceRateInKbps() const \
1026 return GetDaMinimumServiceRateInKbps(index); \
1028 inline void SetDaServ##index##MaximumBacklogInKbytes(uint16_t value) \
1030 return SetDaMaximumBacklogInKbytes(index, value); \
1032 inline uint8_t GetDaServ##index##MaximumBacklogInKbytes() const \
1034 return GetDaMaximumBacklogInKbytes(index); \
1082 #define SAT_RA_SERVICE_ATTRIBUTE_ACCESSOR_DEFINE(index) \
1083 inline void SetRaServ##index##MaximumUniquePayloadPerBlock(uint8_t value) \
1085 return SetRaMaximumUniquePayloadPerBlock(index, value); \
1087 inline uint8_t GetRaServ##index##MaximumUniquePayloadPerBlock() const \
1089 return GetRaMaximumUniquePayloadPerBlock(index); \
1091 inline void SetRaServ##index##MaximumConsecutiveBlockAccessed(uint8_t value) \
1093 return SetRaMaximumConsecutiveBlockAccessed(index, value); \
1095 inline uint8_t GetRaServ##index##MaximumConsecutiveBlockAccessed() const \
1097 return GetRaMaximumConsecutiveBlockAccessed(index); \
1099 inline void SetRaServ##index##MinimumIdleBlock(uint8_t value) \
1101 return SetRaMinimumIdleBlock(index, value); \
1103 inline uint8_t GetRaServ##index##MinimumIdleBlock() const \
1105 return GetRaMinimumIdleBlock(index); \
1107 inline void SetRaServ##index##BackOffTimeInMilliSeconds(uint16_t value) \
1109 return SetRaBackOffTimeInMilliSeconds(index, value); \
1111 inline uint16_t GetRaServ##index##BackOffTimeInMilliSeconds() const \
1113 return GetRaBackOffTimeInMilliSeconds(index); \
1115 inline void SetRaServ##index##HighLoadBackOffTimeInMilliSeconds(uint16_t value) \
1117 return SetRaHighLoadBackOffTimeInMilliSeconds(index, value); \
1119 inline uint16_t GetRaServ##index##HighLoadBackOffTimeInMilliSeconds() const \
1121 return GetRaHighLoadBackOffTimeInMilliSeconds(index); \
1123 inline void SetRaServ##index##BackOffProbability(uint16_t value) \
1125 return SetRaBackOffProbability(index, value); \
1127 inline uint16_t GetRaServ##index##BackOffProbability() const \
1129 return GetRaBackOffProbability(index); \
1131 inline void SetRaServ##index##HighLoadBackOffProbability(uint16_t value) \
1133 return SetRaHighLoadBackOffProbability(index, value); \
1135 inline uint16_t GetRaServ##index##HighLoadBackOffProbability() const \
1137 return GetRaHighLoadBackOffProbability(index); \
1139 inline void SetRaServ##index##NumberOfInstances(uint8_t value) \
1141 return SetRaNumberOfInstances(index, value); \
1143 inline uint8_t GetRaServ##index##NumberOfInstances() const \
1145 return GetRaNumberOfInstances(index); \
1147 inline void SetRaServ##index##AverageNormalizedOfferedLoadThreshold(double value) \
1149 return SetRaAverageNormalizedOfferedLoadThreshold(index, value); \
1151 inline double GetRaServ##index##AverageNormalizedOfferedLoadThreshold() const \
1153 return GetRaAverageNormalizedOfferedLoadThreshold(index); \
1155 inline void SetRaServ##index##IsSlottedAlohaAllowed(bool value) \
1157 return SetRaIsSlottedAlohaAllowed(index, value); \
1159 inline bool GetRaServ##index##IsSlottedAlohaAllowed() const \
1161 return GetRaIsSlottedAlohaAllowed(index); \
1163 inline void SetRaServ##index##IsCrdsaAllowed(bool value) \
1165 return SetRaIsCrdsaAllowed(index, value); \
1167 inline bool GetRaServ##index##IsCrdsaAllowed() const \
1169 return GetRaIsCrdsaAllowed(index); \
1171 inline void SetRaServ##index##IsEssaAllowed(bool value) \
1173 return SetRaIsEssaAllowed(index, value); \
1175 inline bool GetRaServ##index##IsEssaAllowed() const \
1177 return GetRaIsEssaAllowed(index); \
The SatLowerLayerServiceConf class holds information of all configures lower layer service entries.
void SetDaVolumeAllowed(uint8_t index, bool volumeAllowed)
Set state, if volume is allowed for a DA service.
SAT_DA_SERVICE_ATTRIBUTE_ACCESSOR_DEFINE(0)
bool GetDaVolumeAllowed(uint8_t index) const
Get state, if volume is allowed for a DA service.
uint16_t GetDaMaximumBacklogInKbytes(uint8_t index) const
Get maximum backlog size for a DA service.
uint8_t GetRaMaximumUniquePayloadPerBlock(uint8_t index) const
Get maximum unique payload per block for a RA service.
Time GetDefaultControlRandomizationInterval() const
Get configured default control randomization interval.
uint8_t m_volumeBacklogPersistence
uint8_t m_raServiceIndexDefault
void SetRaIsCrdsaAllowed(uint8_t index, bool isCrdsaAllowed)
Set CRDSA allowance.
void SetDaMinimumServiceRateInKbps(uint8_t index, uint16_t minimumServiceRateKbps)
Set minimum service rate for a DA service.
static std::string GetIndexAsDaServiceName(uint8_t index)
Method to convert DA service index to service name.
bool GetRaIsSlottedAlohaAllowed(uint8_t index) const
Get Slotted Aloha allowance.
void SetRaHighLoadBackOffProbability(uint8_t index, uint16_t highLoadBackOffProbability)
Set high load back off probability.
static std::string GetNumberAsString(T number)
Template method to convert number to string.
uint8_t GetRaServiceCount() const
Get count of configured RA services.
static const uint8_t m_minDaServiceEntries
static const uint8_t m_maxDaServiceEntries
uint8_t GetRaDefaultService() const
Get index of default RA service.
void SetRaNumberOfInstances(uint8_t index, uint8_t numberOfInstances)
Set number of instances.
void SetDaConstantAssignmentProvided(uint8_t index, bool constAssignmentProvided)
Set state, if constant assignment is provided for a DA service.
bool GetDaRbdcAllowed(uint8_t index) const
Get state, if RBDC is allowed for a DA service.
uint16_t GetRaHighLoadBackOffProbability(uint8_t index) const
Get high load back off probability.
uint16_t GetDaMaximumServiceRateInKbps(uint8_t index) const
Get maximum service rate for a DA service.
void SetRaMaximumUniquePayloadPerBlock(uint8_t index, uint8_t maxUniquePayloadPerBlock)
Set maximum unique payload per block for a RA service.
~SatLowerLayerServiceConf()
Destructor for SatLowerLayerServiceConf.
uint16_t GetRaHighLoadBackOffTimeInMilliSeconds(uint8_t index) const
Get high load back off time in milliseconds.
SAT_DA_SERVICE_ATTRIBUTE_ACCESSOR_DEFINE(1)
SAT_DA_SERVICE_ATTRIBUTE_ACCESSOR_DEFINE(2)
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
static const uint8_t m_maxRaServiceEntries
SAT_RA_SERVICE_ATTRIBUTE_ACCESSOR_DEFINE(1)
SatLowerLayerServiceConf()
Constructor for SatLowerLayerServiceConf.
uint8_t m_daServiceEntryCount
static const uint8_t m_minRaServiceEntries
void SetRaAverageNormalizedOfferedLoadThreshold(uint8_t index, double averageNormalizedOfferedLoadThreshold)
Set average normalized offeredLoad Threshold.
SatLowerLayerServiceRaEntry m_raServiceEntries[m_maxRaServiceEntries]
bool GetRaIsEssaAllowed(uint8_t index) const
Get E-SSA allowance.
void SetRaIsSlottedAlohaAllowed(uint8_t index, bool isSlottedAlohaAllowed)
Set Slotted Aloha allowance.
void SetRaIsEssaAllowed(uint8_t index, bool isEssaAllowed)
Set ESSA allowance.
static TypeId GetTypeId(void)
methods derived from base classes
uint16_t GetDaMinimumServiceRateInKbps(uint8_t index) const
Get minimum service rate for a DA service.
bool GetRaIsCrdsaAllowed(uint8_t index) const
Get CRDSA allowance.
uint16_t GetDaConstantServiceRateInKbps(uint8_t index) const
Get constant service rate for a DA service.
void SetDaRbdcAllowed(uint8_t index, bool bdcAllowed)
Set state, if RBDC is allowed for a DA service.
double GetRaAverageNormalizedOfferedLoadThreshold(uint8_t index) const
Get average normalized offeredLoad Threshold.
SAT_RA_SERVICE_ATTRIBUTE_ACCESSOR_DEFINE(0)
uint8_t GetRaNumberOfInstances(uint8_t index) const
Get number of instances.
SAT_RA_SERVICE_ATTRIBUTE_ACCESSOR_DEFINE(2)
Ptr< RandomVariableStream > GetDaConstantServiceRateStream(uint8_t index) const
Get constant service rate stream for a DA service.
uint8_t GetDynamicRatePersistence() const
Get configured dynamic rate persistence.
void SetRaMaximumConsecutiveBlockAccessed(uint8_t index, uint8_t maxConsecutiveBlockAccessed)
Set maximum consecutive block accessed for a RA service.
void SetRaBackOffProbability(uint8_t index, uint16_t backOffProbability)
Set back off probability.
void SetRaMinimumIdleBlock(uint8_t index, uint8_t minimumIdleBlock)
Set minimum idle block for a RA service.
uint16_t GetRaBackOffProbability(uint8_t index) const
Get back off probability.
static std::string GetIndexAsRaServiceName(uint8_t index)
Method to convert RA service index to service name.
uint8_t GetDaServiceCount() const
Get count of configured DA services.
uint8_t GetRaMaximumConsecutiveBlockAccessed(uint8_t index) const
Get maximum consecutive block accessed for a RA service.
void SetRaBackOffTimeInMilliSeconds(uint8_t index, uint16_t backOffTimeInMilliSeconds)
Set back off time in milliseconds.
void SetDaMaximumServiceRateInKbps(uint8_t index, uint16_t maximumServiceRateKbps)
Set maximum service rate for a DA service.
uint8_t GetVolumeBacklogPersistence() const
Get configured volume backlog persistence.
Time m_defaultControlRandomizationInterval
void SetRaHighLoadBackOffTimeInMilliSeconds(uint8_t index, uint16_t backOffTimeInMilliSeconds)
Set high load back off time in milliseconds.
void SetDaConstantServiceRateStream(uint8_t index, Ptr< RandomVariableStream > constantServiceRateStream)
Set constant service rate stream for a DA service.
bool GetDaConstantAssignmentProvided(uint8_t index) const
Get state, if constant assignment is provided for a DA service.
SAT_DA_SERVICE_ATTRIBUTE_ACCESSOR_DEFINE(3)
SatLowerLayerServiceDaEntry m_daServiceEntries[m_maxDaServiceEntries]
uint8_t GetRaMinimumIdleBlock(uint8_t index) const
Get minimum idle block for a RA service.
uint8_t m_raServiceEntryCount
uint16_t GetRaBackOffTimeInMilliSeconds(uint8_t index) const
Get back off time in milliseconds.
void SetDaMaximumBacklogInKbytes(uint8_t index, uint16_t maximumBacklogInKbytes)
Set maximum backlog size for a DA service.
uint8_t m_dynamicRatePersistence
The SatLowerLayerService class holds information of a satellite lower layer service DA entry.
uint16_t m_minimumServiceRateKbps
bool GetRbdcAllowed() const
Get state, if RBDC is allowed.
uint16_t m_maximumServiceRateKbps
void SetConstantServiceRateStream(Ptr< RandomVariableStream > constantServiceRateStream)
Set constant service rate stream.
Ptr< RandomVariableStream > m_constantServiceRateStream
void SetMaximumBacklogInKbytes(uint16_t maximumBacklogInKbytes)
Set maximum backlog size.
uint16_t GetMinimumServiceRateInKbps() const
Get minimum service rate.
Ptr< RandomVariableStream > GetConstantServiceRateStream() const
Get constant service rate stream.
SatLowerLayerServiceDaEntry()
~SatLowerLayerServiceDaEntry()
Destructor for SatLowerLayerServiceDaEntry.
void SetMinimumServiceRateInKbps(uint16_t minimumServiceRateKbps)
Set minimum service rate.
void SetConstantAssignmentProvided(bool constAssignmentProvided)
Set state, if constant assignment is provided.
uint16_t m_maximumBacklogInKbytes
void SetMaximumServiceRateInKbps(uint16_t maximumServiceRateKbps)
Set maximum service rate.
uint16_t GetMaximumServiceRateInKbps() const
Get maximum service rate.
bool GetVolumeAllowed() const
Get state, if volume is allowed.
uint16_t GetMaximumBacklogInKbytes() const
Get maximum backlog size.
uint16_t GetConstantServiceRateInKbps() const
Get constant service rate.
bool m_constantAssignmentProvided
void SetVolumeAllowed(bool volumeAllowed)
Set state, if volume is allowed.
bool GetConstantAssignmentProvided() const
Get state, if constant assignment is provided.
void SetRbdcAllowed(bool bdcAllowed)
Set state, if RBDC is allowed.
The SatLowerLayerService class holds information of a satellite lower layer service RA entry.
void SetHighLoadBackOffProbability(uint16_t highLoadBackOffProbability)
Set high load back off probability.
void SetBackOffProbability(uint16_t backOffProbability)
Set back off probability.
void SetMaximumUniquePayloadPerBlock(uint8_t maxUniquePayloadPerBlock)
Set maximum unique payload per block.
void SetAverageNormalizedOfferedLoadThreshold(double averageNormalizedOfferedLoadThreshold)
Set average normalized offered load threshold.
uint16_t GetBackOffProbability() const
Get back off probability.
SatLowerLayerServiceRaEntry()
void SetMinimumIdleBlock(uint8_t minimumIdleBlock)
Set minimum idle block.
uint16_t m_backOffProbability
bool GetIsEssaAllowed() const
Get ESSA allowance.
void SetBackOffTimeInMilliSeconds(uint16_t backOffTimeInMilliSeconds)
Set back off time in milliseconds.
void SetMaximumConsecutiveBlockAccessed(uint8_t maxConsecutiveBlockAccessed)
Set maximum consecutive block accessed.
double GetAverageNormalizedOfferedLoadThreshold() const
Get average normalized offered load threshold.
void SetIsCrdsaAllowed(bool isCrdsaAllowed)
Set CRDSA allowance.
uint8_t m_maxUniquePayloadPerBlock
uint8_t GetNumberOfInstances() const
Get number of instances.
uint16_t GetHighLoadBackOffTimeInMilliSeconds() const
Get high load back off time in milliseconds.
uint8_t GetMaximumConsecutiveBlockAccessed() const
Get maximum consecutive block accessed.
uint8_t m_minimumIdleBlock
bool GetIsCrdsaAllowed() const
Get CRDSA allowance.
uint8_t m_numberOfInstances
bool m_isSlottedAlohaAllowed
void SetIsSlottedAlohaAllowed(bool isSlottedAlohaAllowed)
Set Slotted Aloha allowance.
uint16_t m_highLoadBackOffTimeInMilliSeconds
void SetHighLoadBackOffTimeInMilliSeconds(uint16_t backOffTimeInMilliSeconds)
Set high load back off time in milliseconds.
uint16_t m_highLoadBackOffProbability
uint8_t m_maxConsecutiveBlockAccessed
bool GetIsSlottedAlohaAllowed() const
Get Slotted Aloha allowance.
uint16_t GetBackOffTimeInMilliSeconds() const
Get back off time in milliseconds.
void SetNumberOfInstances(uint8_t numberOfInstances)
Set number of instances.
uint8_t GetMinimumIdleBlock() const
Get minimum idle block.
~SatLowerLayerServiceRaEntry()
Destructor for SatLowerLayerServiceRaEntry.
void SetIsEssaAllowed(bool isEssaAllowed)
Set ESSA allowance.
uint16_t GetHighLoadBackOffProbability() const
Get high load back off probability.
uint16_t m_backOffTimeInMilliSeconds
uint8_t GetMaximumUniquePayloadPerBlock() const
Get maximum unique payload per block.
double m_averageNormalizedOfferedLoadThreshold
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.