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>
30 #include <unordered_set>
424 double averageNormalizedOfferedLoadThreshold)
766 std::stringstream ss;
767 ss << (double)number;
820 Ptr<RandomVariableStream> constantServiceRateStream);
917 double averageNormalizedOfferedLoadThreshold);
976 #define SAT_DA_SERVICE_ATTRIBUTE_ACCESSOR_DEFINE(index) \
977 inline void SetDaServ##index##ConstantAssignmentProvided(bool value) \
979 return SetDaConstantAssignmentProvided(index, value); \
981 inline bool GetDaServ##index##ConstantAssignmentProvided() const \
983 return GetDaConstantAssignmentProvided(index); \
985 inline void SetDaServ##index##RbdcAllowed(bool value) \
987 return SetDaRbdcAllowed(index, value); \
989 inline bool GetDaServ##index##RbdcAllowed() const \
991 return GetDaRbdcAllowed(index); \
993 inline void SetDaServ##index##VolumeAllowed(bool value) \
995 return SetDaVolumeAllowed(index, value); \
997 inline bool GetDaServ##index##VolumeAllowed() const \
999 return GetDaVolumeAllowed(index); \
1001 inline void SetDaServ##index##ConstantServiceRateStream(Ptr<RandomVariableStream> value) \
1003 return SetDaConstantServiceRateStream(index, value); \
1005 inline Ptr<RandomVariableStream> GetDaServ##index##ConstantServiceRateStream() const \
1007 return GetDaConstantServiceRateStream(index); \
1009 inline void SetDaServ##index##MaximumServiceRateInKbps(uint16_t value) \
1011 return SetDaMaximumServiceRateInKbps(index, value); \
1013 inline uint16_t GetDaServ##index##MaximumServiceRateInKbps() const \
1015 return GetDaMaximumServiceRateInKbps(index); \
1017 inline void SetDaServ##index##MinimumServiceRateInKbps(uint16_t value) \
1019 return SetDaMinimumServiceRateInKbps(index, value); \
1021 inline uint16_t GetDaServ##index##MinimumServiceRateInKbps() const \
1023 return GetDaMinimumServiceRateInKbps(index); \
1025 inline void SetDaServ##index##MaximumBacklogInKbytes(uint16_t value) \
1027 return SetDaMaximumBacklogInKbytes(index, value); \
1029 inline uint8_t GetDaServ##index##MaximumBacklogInKbytes() const \
1031 return GetDaMaximumBacklogInKbytes(index); \
1079 #define SAT_RA_SERVICE_ATTRIBUTE_ACCESSOR_DEFINE(index) \
1080 inline void SetRaServ##index##MaximumUniquePayloadPerBlock(uint8_t value) \
1082 return SetRaMaximumUniquePayloadPerBlock(index, value); \
1084 inline uint8_t GetRaServ##index##MaximumUniquePayloadPerBlock() const \
1086 return GetRaMaximumUniquePayloadPerBlock(index); \
1088 inline void SetRaServ##index##MaximumConsecutiveBlockAccessed(uint8_t value) \
1090 return SetRaMaximumConsecutiveBlockAccessed(index, value); \
1092 inline uint8_t GetRaServ##index##MaximumConsecutiveBlockAccessed() const \
1094 return GetRaMaximumConsecutiveBlockAccessed(index); \
1096 inline void SetRaServ##index##MinimumIdleBlock(uint8_t value) \
1098 return SetRaMinimumIdleBlock(index, value); \
1100 inline uint8_t GetRaServ##index##MinimumIdleBlock() const \
1102 return GetRaMinimumIdleBlock(index); \
1104 inline void SetRaServ##index##BackOffTimeInMilliSeconds(uint16_t value) \
1106 return SetRaBackOffTimeInMilliSeconds(index, value); \
1108 inline uint16_t GetRaServ##index##BackOffTimeInMilliSeconds() const \
1110 return GetRaBackOffTimeInMilliSeconds(index); \
1112 inline void SetRaServ##index##HighLoadBackOffTimeInMilliSeconds(uint16_t value) \
1114 return SetRaHighLoadBackOffTimeInMilliSeconds(index, value); \
1116 inline uint16_t GetRaServ##index##HighLoadBackOffTimeInMilliSeconds() const \
1118 return GetRaHighLoadBackOffTimeInMilliSeconds(index); \
1120 inline void SetRaServ##index##BackOffProbability(uint16_t value) \
1122 return SetRaBackOffProbability(index, value); \
1124 inline uint16_t GetRaServ##index##BackOffProbability() const \
1126 return GetRaBackOffProbability(index); \
1128 inline void SetRaServ##index##HighLoadBackOffProbability(uint16_t value) \
1130 return SetRaHighLoadBackOffProbability(index, value); \
1132 inline uint16_t GetRaServ##index##HighLoadBackOffProbability() const \
1134 return GetRaHighLoadBackOffProbability(index); \
1136 inline void SetRaServ##index##NumberOfInstances(uint8_t value) \
1138 return SetRaNumberOfInstances(index, value); \
1140 inline uint8_t GetRaServ##index##NumberOfInstances() const \
1142 return GetRaNumberOfInstances(index); \
1144 inline void SetRaServ##index##AverageNormalizedOfferedLoadThreshold(double value) \
1146 return SetRaAverageNormalizedOfferedLoadThreshold(index, value); \
1148 inline double GetRaServ##index##AverageNormalizedOfferedLoadThreshold() const \
1150 return GetRaAverageNormalizedOfferedLoadThreshold(index); \
1152 inline void SetRaServ##index##IsSlottedAlohaAllowed(bool value) \
1154 return SetRaIsSlottedAlohaAllowed(index, value); \
1156 inline bool GetRaServ##index##IsSlottedAlohaAllowed() const \
1158 return GetRaIsSlottedAlohaAllowed(index); \
1160 inline void SetRaServ##index##IsCrdsaAllowed(bool value) \
1162 return SetRaIsCrdsaAllowed(index, value); \
1164 inline bool GetRaServ##index##IsCrdsaAllowed() const \
1166 return GetRaIsCrdsaAllowed(index); \
1168 inline void SetRaServ##index##IsEssaAllowed(bool value) \
1170 return SetRaIsEssaAllowed(index, value); \
1172 inline bool GetRaServ##index##IsEssaAllowed() const \
1174 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.