31 NS_LOG_COMPONENT_DEFINE(
"SatRandomAccess");
 
   36 NS_OBJECT_ENSURE_REGISTERED(SatRandomAccess);
 
   42         TypeId(
"ns3::SatRandomAccess").SetParent<Object>().AddConstructor<SatRandomAccess>();
 
   47     : m_uniformRandomVariable(),
 
   48       m_randomAccessModel(
SatEnums::RA_MODEL_OFF),
 
   50       m_numOfAllocationChannels(),
 
   55     NS_LOG_FUNCTION(
this);
 
   57     NS_FATAL_ERROR(
"SatRandomAccess::SatRandomAccess - Constructor not in use");
 
   62     : m_uniformRandomVariable(),
 
   63       m_randomAccessModel(randomAccessModel),
 
   64       m_randomAccessConf(randomAccessConf),
 
   65       m_numOfAllocationChannels(randomAccessConf->GetNumOfAllocationChannelsConfigurations()),
 
   70     NS_LOG_FUNCTION(
this);
 
   76         NS_FATAL_ERROR(
"SatRandomAccess::SatRandomAccess - Configuration object is NULL");
 
   84     NS_LOG_FUNCTION(
this);
 
  103     NS_LOG_FUNCTION(
this);
 
  134     NS_LOG_FUNCTION(
this << allocationChannel);
 
  143     NS_LOG_FUNCTION(
this << allocationChannel);
 
  146         ->GetSlottedAlohaAllowed();
 
  152     NS_LOG_FUNCTION(
this << allocationChannel);
 
  162     NS_LOG_FUNCTION(
this << allocationChannelId
 
  172     NS_LOG_INFO(
"------------------------------------");
 
  173     NS_LOG_INFO(
"------ Starting Random Access ------");
 
  174     NS_LOG_INFO(
"------------------------------------");
 
  181         NS_LOG_INFO(
"Only CRDSA enabled && CRDSA trigger, checking allocation channel");
 
  185             NS_LOG_INFO(
"Valid CRDSA allocation channel, checking backoff status");
 
  189                 NS_LOG_INFO(
"CRDSA backoff period over, evaluating CRDSA");
 
  190                 txOpportunities = 
DoCrdsa(allocationChannel);
 
  194                 NS_LOG_INFO(
"CRDSA backoff period in effect, aborting");
 
  202                 "SatRandomAccess::DoRandomAccess - Invalid allocation channel for CRDSA");
 
  210             "SatRandomAccess::DoRandomAccess - Only ESSA enabled, checking allocation channel");
 
  215                 "SatRandomAccess::DoRandomAccess - Valid allocation channel, evaluating ESSA");
 
  217             txOpportunities = 
DoEssa(allocationChannel);
 
  221             NS_FATAL_ERROR(
"SatRandomAccess::DoRandomAccess - Invalid allocation channel for ESSA");
 
  228         NS_LOG_INFO(
"Only SA enabled, checking allocation channel");
 
  232             NS_LOG_INFO(
"Valid allocation channel, evaluating Slotted ALOHA");
 
  239                 "SatRandomAccess::DoRandomAccess - Invalid allocation channel for Slotted ALOHA");
 
  246         NS_LOG_INFO(
"RA based on RCS2 specification enabled");
 
  249                 ->GetCrdsaNumOfInstances() < 2)
 
  255                     NS_LOG_INFO(
"Valid Slotted ALOHA allocation channel, evaluating Slotted ALOHA");
 
  260                     NS_FATAL_ERROR(
"SatRandomAccess::DoRandomAccess - Invalid allocation channel " 
  261                                    "for Slotted ALOHA");
 
  266                 NS_LOG_INFO(
"Number of instances is < 2, only Slotted ALOHA is in use");
 
  275                     NS_LOG_INFO(
"Valid CRDSA allocation channel, checking backoff status");
 
  279                         NS_LOG_INFO(
"CRDSA backoff period over, evaluating CRDSA");
 
  280                         txOpportunities = 
DoCrdsa(allocationChannel);
 
  284                         NS_LOG_INFO(
"CRDSA backoff period in effect, aborting");
 
  292                         "SatRandomAccess::DoRandomAccess - Invalid allocation channel for CRDSA");
 
  297                 NS_LOG_INFO(
"Number of instances is > 1, only CRDSA is in use");
 
  304         NS_LOG_INFO(
"Slotted ALOHA is disabled");
 
  310         NS_LOG_INFO(
"CRDSA is disabled");
 
  318         std::map<uint32_t, std::set<uint32_t>>::iterator iter;
 
  319         uint32_t uniquePacketId = 1;
 
  325             std::set<uint32_t>::iterator iterSet;
 
  326             for (iterSet = iter->second.begin(); iterSet != iter->second.end(); iterSet++)
 
  328                 NS_LOG_INFO(
"CRDSA transmission opportunity for unique packet: " 
  329                             << uniquePacketId << 
" at slot: " << (*iterSet));
 
  341         NS_LOG_INFO(
"SatRandomAccess::DoRandomAccess - ESSA minimum time to wait: " 
  346         NS_LOG_INFO(
"No Tx opportunity");
 
  350         NS_FATAL_ERROR(
"SatRandomAccess::DoRandomAccess - Invalid result type");
 
  353     NS_LOG_INFO(
"------------------------------------");
 
  354     NS_LOG_INFO(
"------ Random Access FINISHED ------");
 
  355     NS_LOG_INFO(
"------------------------------------");
 
  357     return txOpportunities;
 
  363     NS_LOG_FUNCTION(
this);
 
  365     NS_LOG_INFO(
"Simulation time: " << Now().GetSeconds() << 
" seconds");
 
  369     NS_LOG_INFO(
"---------------");
 
  373         Ptr<SatRandomAccessAllocationChannel> allocationChannel =
 
  375         NS_LOG_INFO(
"ALLOCATION CHANNEL: " << index);
 
  376         NS_LOG_INFO(
"Backoff release at: " 
  377                     << allocationChannel->GetCrdsaBackoffReleaseTime().GetSeconds() << 
" seconds");
 
  378         NS_LOG_INFO(
"Backoff time: " << allocationChannel->GetCrdsaBackoffTimeInMilliSeconds()
 
  380         NS_LOG_INFO(
"Backoff probability: " << allocationChannel->GetCrdsaBackoffProbability() * 100
 
  382         NS_LOG_INFO(
"Slot randomization: " 
  383                     << allocationChannel->GetCrdsaNumOfInstances() *
 
  384                            allocationChannel->GetCrdsaMaxUniquePayloadPerBlock()
 
  385                     << 
" Tx opportunities with range from " 
  386                     << allocationChannel->GetCrdsaMinRandomizationValue() << 
" to " 
  387                     << allocationChannel->GetCrdsaMaxRandomizationValue());
 
  388         NS_LOG_INFO(
"Number of unique payloads per block: " 
  389                     << allocationChannel->GetCrdsaMaxUniquePayloadPerBlock());
 
  390         NS_LOG_INFO(
"Number of instances: " << allocationChannel->GetCrdsaNumOfInstances());
 
  391         NS_LOG_INFO(
"Number of consecutive blocks accessed: " 
  392                     << allocationChannel->GetCrdsaNumOfConsecutiveBlocksUsed() << 
"/" 
  393                     << allocationChannel->GetCrdsaMaxConsecutiveBlocksAccessed());
 
  394         NS_LOG_INFO(
"Number of idle blocks left: " << allocationChannel->GetCrdsaIdleBlocksLeft()
 
  396                                                    << allocationChannel->GetCrdsaMinIdleBlocks());
 
  409     NS_LOG_FUNCTION(
this);
 
  423         NS_FATAL_ERROR(
"SatRandomAccess::SetBackoffTime - Wrong random access model in use");
 
  432     NS_LOG_FUNCTION(
this);
 
  446         NS_FATAL_ERROR(
"SatRandomAccess::SetBackoffProbability - Wrong random access model in use");
 
  464     uint32_t controlRandomizationIntervalInMilliSeconds)
 
  466     NS_LOG_FUNCTION(
this << controlRandomizationIntervalInMilliSeconds);
 
  472             controlRandomizationIntervalInMilliSeconds);
 
  478         NS_FATAL_ERROR(
"SatRandomAccess::SetSlottedAlohaControlRandomizationIntervalInMilliSeconds " 
  479                        "- Wrong random access model in use");
 
  483         "New control randomization interval : " << controlRandomizationIntervalInMilliSeconds);
 
  489     NS_LOG_FUNCTION(
this);
 
  494     NS_LOG_INFO(
"---------------------------------------------");
 
  495     NS_LOG_INFO(
"------ Running Slotted ALOHA algorithm ------");
 
  496     NS_LOG_INFO(
"---------------------------------------------");
 
  497     NS_LOG_INFO(
"Slotted ALOHA control randomization interval: " 
  500     NS_LOG_INFO(
"---------------------------------------------");
 
  502     NS_LOG_INFO(
"Checking if we have DAMA allocations");
 
  507         NS_LOG_INFO(
"No DAMA -> Running Slotted ALOHA");
 
  514     NS_LOG_INFO(
"----------------------------------------------");
 
  515     NS_LOG_INFO(
"------ Slotted ALOHA algorithm FINISHED ------");
 
  516     NS_LOG_INFO(
"----------------------------------------------");
 
  518     return txOpportunity;
 
  524     NS_LOG_FUNCTION(
this);
 
  526     NS_LOG_INFO(
"Randomizing the release time...");
 
  532     NS_LOG_INFO(
"TX opportunity in the next slot after " << releaseTime << 
" milliseconds");
 
  542                                             uint32_t backoffTimeInFrames)
 
  547     NS_LOG_FUNCTION(
this);
 
  552             ->SetFSimBackoffTimeInFrames(backoffTimeInFrames);
 
  557             "SatRandomAccess::SetFSimBackoffTimeInFrames - Wrong random access model in use");
 
  567     NS_LOG_FUNCTION(
this);
 
  572             ->SetFSimBackoffProbability(backoffPersistence);
 
  577             "SatRandomAccess::SetFSimBackoffProbability - Wrong random access model in use");
 
  584     NS_LOG_FUNCTION(
this);
 
  588     NS_LOG_INFO(
"------------------------------------");
 
  589     NS_LOG_INFO(
"------ Running ESSA algorithm ------");
 
  590     NS_LOG_INFO(
"------------------------------------");
 
  599     uint32_t numberOfBackoff = 0;
 
  602                ->GetFSimBackoffProbability())
 
  608         numberOfBackoff * 
m_randomAccessConf->GetAllocationChannelConfiguration(allocationChannel)
 
  609                               ->GetFSimBackoffTimeInMilliSeconds(); 
 
  611     NS_LOG_INFO(
"-------------------------------------");
 
  612     NS_LOG_INFO(
"------ ESSA algorithm FINISHED ------");
 
  613     NS_LOG_INFO(
"-------------------------------------");
 
  615     return txOpportunity;
 
  624                                                    uint32_t backoffTimeInMilliSeconds)
 
  626     NS_LOG_FUNCTION(
this);
 
  633             ->SetCrdsaBackoffTimeInMilliSeconds(backoffTimeInMilliSeconds);
 
  636             ->DoCrdsaVariableSanityCheck();
 
  640         NS_FATAL_ERROR(
"SatRandomAccess::SetCrdsaBackoffTimeInMilliSeconds - Wrong random access " 
  648     NS_LOG_FUNCTION(
this);
 
  655             ->SetCrdsaBackoffProbability(backoffProbability);
 
  658             ->DoCrdsaVariableSanityCheck();
 
  663             "SatRandomAccess::SetCrdsaBackoffProbability - Wrong random access model in use");
 
  669                                                  uint32_t minRandomizationValue,
 
  670                                                  uint32_t maxRandomizationValue,
 
  671                                                  uint32_t numOfInstances)
 
  673     NS_LOG_FUNCTION(
this);
 
  680             ->SetCrdsaMinRandomizationValue(minRandomizationValue);
 
  682             ->SetCrdsaMaxRandomizationValue(maxRandomizationValue);
 
  684             ->SetCrdsaNumOfInstances(numOfInstances);
 
  687             ->DoCrdsaVariableSanityCheck();
 
  692             "SatRandomAccess::SetCrdsaRandomizationParameters - Wrong random access model in use");
 
  698                                                              uint32_t maxUniquePayloadPerBlock,
 
  699                                                              uint32_t maxConsecutiveBlocksAccessed,
 
  700                                                              uint32_t minIdleBlocks)
 
  702     NS_LOG_FUNCTION(
this);
 
  709             ->SetCrdsaMaxUniquePayloadPerBlock(maxUniquePayloadPerBlock);
 
  711             ->SetCrdsaMaxConsecutiveBlocksAccessed(maxConsecutiveBlocksAccessed);
 
  713             ->SetCrdsaMinIdleBlocks(minIdleBlocks);
 
  716             ->DoCrdsaVariableSanityCheck();
 
  720         NS_FATAL_ERROR(
"SatRandomAccess::SetCrdsaMaximumDataRateLimitationParameters - Wrong " 
  721                        "random access model in use");
 
  728     NS_LOG_FUNCTION(
this);
 
  736     NS_LOG_FUNCTION(
this);
 
  738     bool hasCrdsaBackoffTimePassed = 
false;
 
  740     if ((Now() >= 
m_randomAccessConf->GetAllocationChannelConfiguration(allocationChannel)
 
  741                       ->GetCrdsaBackoffReleaseTime()))
 
  743         hasCrdsaBackoffTimePassed = 
true;
 
  746     NS_LOG_INFO(
"For allocation channel " << allocationChannel << 
": " 
  747                                           << hasCrdsaBackoffTimePassed);
 
  749     return hasCrdsaBackoffTimePassed;
 
  755     NS_LOG_FUNCTION(
this);
 
  757     uint32_t idleBlocksLeft =
 
  759             ->GetCrdsaIdleBlocksLeft();
 
  761     if (idleBlocksLeft > 0)
 
  763         NS_LOG_INFO(
"Reducing allocation channel: " << allocationChannel << 
" idle blocks by one");
 
  765             ->SetCrdsaIdleBlocksLeft(idleBlocksLeft - 1);
 
  772     NS_LOG_FUNCTION(
this);
 
  783     NS_LOG_FUNCTION(
this << allocationChannel);
 
  786         ->SetCrdsaNumOfConsecutiveBlocksUsed(0);
 
  792     NS_LOG_FUNCTION(
this);
 
  803     NS_LOG_FUNCTION(
this);
 
  806             ->GetCrdsaIdleBlocksLeft() > 0)
 
  808         NS_LOG_INFO(
"Allocation channel: " << allocationChannel << 
" idle in effect");
 
  811     NS_LOG_INFO(
"Allocation channel: " << allocationChannel << 
" free");
 
  818     NS_LOG_FUNCTION(
this);
 
  820     bool doCrdsaBackoff = 
false;
 
  824             ->GetCrdsaBackoffProbability())
 
  826         doCrdsaBackoff = 
true;
 
  829     NS_LOG_INFO(
"For allocation channel " << allocationChannel << 
": " << doCrdsaBackoff);
 
  831     return doCrdsaBackoff;
 
  837     NS_LOG_FUNCTION(
this << allocationChannel);
 
  839     uint32_t backoff = 
m_randomAccessConf->GetAllocationChannelConfiguration(allocationChannel)
 
  840                            ->GetCrdsaBackoffTimeInMilliSeconds();
 
  842         ->SetCrdsaBackoffReleaseTime(Now() + MilliSeconds(backoff));
 
  848     NS_LOG_FUNCTION(
this);
 
  853     uint32_t maxUniquePackets =
 
  855             ->GetCrdsaMaxUniquePayloadPerBlock();
 
  865     std::pair<std::set<uint32_t>, std::set<uint32_t>> slots;
 
  867     for (uint32_t i = 0; i < maxUniquePackets; i++)
 
  876             NS_LOG_INFO(
"New Tx candidate for allocation channel: " << allocationChannel);
 
  881                     "Preparing for transmission with allocation channel: " << allocationChannel);
 
  888                     std::make_pair(*slots.second.begin(), slots.second));
 
  901     return txOpportunities;
 
  907     NS_LOG_FUNCTION(
this << allocationChannel);
 
  910         ->SetCrdsaNumOfConsecutiveBlocksUsed(
 
  912                 ->GetCrdsaNumOfConsecutiveBlocksUsed() +
 
  916             ->GetCrdsaNumOfConsecutiveBlocksUsed() >=
 
  918             ->GetCrdsaMaxConsecutiveBlocksAccessed())
 
  920         NS_LOG_INFO(
"Maximum number of consecutive blocks reached, forcing idle blocks for " 
  921                     "allocation channel: " 
  922                     << allocationChannel);
 
  925             ->SetCrdsaIdleBlocksLeft(
 
  927                     ->GetCrdsaMinIdleBlocks());
 
  936     NS_LOG_FUNCTION(
this);
 
  947     NS_LOG_FUNCTION(
this);
 
  952     NS_LOG_INFO(
"-------------------------------------");
 
  953     NS_LOG_INFO(
"------ Running CRDSA algorithm ------");
 
  954     NS_LOG_INFO(
"-------------------------------------");
 
  958     NS_LOG_INFO(
"-------------------------------------");
 
  960     NS_LOG_INFO(
"Backoff period over, checking DAMA status...");
 
  964         NS_LOG_INFO(
"No DAMA, checking buffer status...");
 
  968             NS_LOG_INFO(
"Data in buffer, continuing CRDSA");
 
  974                 NS_LOG_INFO(
"Evaluating back off...");
 
  978                     NS_LOG_INFO(
"Initial new data backoff triggered");
 
  993                 NS_LOG_INFO(
"Tx opportunity, increasing consecutive blocks used");
 
 1000                     "No Tx opportunity, reducing idle blocks & resetting consecutive blocks");
 
 1008             NS_LOG_INFO(
"Empty buffer, reducing idle blocks & resetting consecutive blocks, " 
 1009                         "aborting CRDSA...");
 
 1017         NS_LOG_INFO(
"DAMA allocation found, aborting CRDSA...");
 
 1023     NS_LOG_INFO(
"--------------------------------------");
 
 1024     NS_LOG_INFO(
"------ CRDSA algorithm FINISHED ------");
 
 1027                                   << 
" ---------------------");
 
 1028     NS_LOG_INFO(
"--------------------------------------");
 
 1030     return txOpportunities;
 
 1033 std::pair<std::set<uint32_t>, std::set<uint32_t>>
 
 1035     uint32_t allocationChannel,
 
 1036     std::pair<std::set<uint32_t>, std::set<uint32_t>> slots)
 
 1038     NS_LOG_FUNCTION(
this);
 
 1040     std::pair<std::set<uint32_t>::iterator, 
bool> resultAllSlotsInFrame;
 
 1041     std::pair<std::set<uint32_t>::iterator, 
bool> resultThisUniquePacket;
 
 1043     std::set<uint32_t> emptySet;
 
 1044     slots.second = emptySet;
 
 1046     NS_LOG_INFO(
"Randomizing TX opportunities for allocation channel: " << allocationChannel);
 
 1048     uint32_t successfulInserts = 0;
 
 1049     uint32_t instances = 
m_randomAccessConf->GetAllocationChannelConfiguration(allocationChannel)
 
 1050                              ->GetCrdsaNumOfInstances();
 
 1051     while (successfulInserts < instances)
 
 1055                 ->GetCrdsaMinRandomizationValue(),
 
 1057                 ->GetCrdsaMaxRandomizationValue());
 
 1059         resultAllSlotsInFrame = slots.first.insert(slot);
 
 1061         if (resultAllSlotsInFrame.second)
 
 1063             successfulInserts++;
 
 1065             resultThisUniquePacket = slots.second.insert(slot);
 
 1067             if (!resultAllSlotsInFrame.second)
 
 1069                 NS_FATAL_ERROR(
"SatRandomAccess::CrdsaRandomizeTxOpportunities - Slots out of " 
 1070                                "sync, this should never happen");
 
 1074         NS_LOG_INFO(
"Allocation channel: " 
 1075                     << allocationChannel << 
" insert successful " << resultAllSlotsInFrame.second
 
 1076                     << 
" for TX opportunity slot: " << (*resultAllSlotsInFrame.first));
 
 1079     NS_LOG_INFO(
"Randomizing done");
 
 1087     NS_LOG_FUNCTION(
this << &callback);
 
 1095     NS_LOG_FUNCTION(
this << &callback);
 
SatEnums class is for simplifying the use of enumerators in the satellite module.
 
static std::string GetRandomAccessModelName(RandomAccessModel_t model)
 
static std::string GetRandomAccessTriggerTypeName(RandomAccessTriggerType_t triggerType)
 
@ RA_TX_OPPORTUNITY_SLOTTED_ALOHA
 
@ RA_TX_OPPORTUNITY_CRDSA
 
@ RA_TX_OPPORTUNITY_DO_NOTHING
 
static std::string GetRandomAccessOpportunityTypeName(RandomAccessTxOpportunityType_t opportunityType)
 
RandomAccessModel_t
The defined random access models.
 
@ RA_MODEL_RCS2_SPECIFICATION
 
RandomAccessTriggerType_t
The defined random access trigger types.
 
@ RA_TRIGGER_TYPE_SLOTTED_ALOHA
 
SatEnums::RandomAccessModel_t m_randomAccessModel
The used random access model.
 
void CrdsaResetConsecutiveBlocksUsedForAllAllocationChannels()
Function for resetting the number of consecutive blocks to zero for all allocation channels.
 
bool IsEssaAllocationChannel(uint32_t allocationChannel)
Function for checking if the allocation channel is ESSA allocation channel.
 
void PrintVariables()
Function for printing out various module variables to console.
 
void SetCrdsaMaximumDataRateLimitationParameters(uint32_t allocationChannel, uint32_t maxUniquePayloadPerBlock, uint32_t maxConsecutiveBlocksAccessed, uint32_t minIdleBlocks)
Function for setting the maximum rate limitation parameters.
 
SatRandomAccess::RandomAccessTxOpportunities_s DoEssa(uint32_t allocationChannel)
Main function for ESSA.
 
void SetCrdsaBackoffTimeInMilliSeconds(uint32_t allocationChannel, uint32_t backoffTimeInMilliSeconds)
Function for setting the backoff time in milliseconds.
 
SatRandomAccess()
Constructor.
 
IsDamaAvailableCallback m_isDamaAvailableCb
Callback for known DAMA status.
 
std::pair< std::set< uint32_t >, std::set< uint32_t > > CrdsaRandomizeTxOpportunities(uint32_t allocationChannel, std::pair< std::set< uint32_t >, std::set< uint32_t >> slots)
Function for randomizing the CRDSA Tx opportunities (slots) for each unique packet.
 
bool IsSlottedAlohaAllocationChannel(uint32_t allocationChannel)
Function for checking if the allocation channel is Slotted ALOHA allocation channel.
 
SatRandomAccess::RandomAccessTxOpportunities_s DoRandomAccess(uint32_t allocationChannel, SatEnums::RandomAccessTriggerType_t triggerType)
Main function of this module.
 
uint32_t m_numOfAllocationChannels
Number of allocation channels available.
 
void CrdsaIncreaseConsecutiveBlocksUsed(uint32_t allocationChannel)
Function for increasing the allocation channel specific count of consecutive used blocks.
 
uint32_t GetConfigurationIdForAllocationChannel(uint32_t allocationChannelId)
Function to convert a carrier allocation channel ID into its allocation channel configuration ID.
 
void CrdsaResetConsecutiveBlocksUsed(uint32_t allocationChannel)
Function for resetting the number of consecutive blocks to zero for a specific allocation channel.
 
SatRandomAccess::RandomAccessTxOpportunities_s CrdsaPrepareToTransmit(uint32_t allocationChannel)
Function for evaluating backoff for each unique CRDSA packet and calling the randomization of Tx oppo...
 
bool CrdsaIsAllocationChannelFree(uint32_t allocationChannel)
Function for checking if the allocation channel is free.
 
void CrdsaIncreaseConsecutiveBlocksUsedForAllAllocationChannels()
Function for increasing the count of consecutive used blocks for all allocation channels.
 
void SetSlottedAlohaControlRandomizationIntervalInMilliSeconds(uint32_t controlRandomizationIntervalInMilliSeconds)
Function for setting the Slotted ALOHA control randomization interval.
 
AreBuffersEmptyCallback m_areBuffersEmptyCb
Callback for buffer status.
 
static TypeId GetTypeId(void)
NS-3 type id function.
 
Callback< bool > AreBuffersEmptyCallback
Typedef of callback for buffer status.
 
void CrdsaSetBackoffTimer(uint32_t allocationChannel)
Function for setting the allocation channel specific backoff timer.
 
void SetFSimBackoffTimeInFrames(uint32_t allocationChannel, uint32_t backoffTimeInFrames)
Function for setting the backoff time in frames.
 
SatRandomAccess::RandomAccessTxOpportunities_s DoCrdsa(uint32_t allocationChannel)
Main function for CRDSA algorithm.
 
void SetFSimBackoffProbability(uint32_t allocationChannel, uint16_t backoffPersistence)
Function for setting the backoff probability.
 
void SetCrdsaRandomizationParameters(uint32_t allocationChannel, uint32_t minRandomizationValue, uint32_t maxRandomizationValue, uint32_t numOfInstances)
Function for setting the parameters related to CRDSA randomization.
 
Ptr< SatRandomAccessConf > m_randomAccessConf
A pointer to random access configuration.
 
bool CrdsaHasBackoffTimePassed(uint32_t allocationChannel) const
Function for checking whether the backoff time has passed for this allocation channel.
 
Ptr< UniformRandomVariable > m_uniformRandomVariable
Uniform random variable object.
 
void SetAreBuffersEmptyCallback(SatRandomAccess::AreBuffersEmptyCallback callback)
Function for setting the AreBuffersEmpty callback.
 
void SetRandomAccessModel(SatEnums::RandomAccessModel_t randomAccessModel)
Function for setting the used random access model.
 
void SetIsDamaAvailableCallback(SatRandomAccess::IsDamaAvailableCallback callback)
Function for setting the IsDamaAvailable callback.
 
uint32_t GetSlottedAlohaSignalingOverheadInBytes()
Function for getting the Slotted ALOHA signaling overhead in bytes.
 
bool CrdsaDoBackoff(uint32_t allocationChannel)
Function for evaluating the backoff for this allocation channel.
 
SatRandomAccess::RandomAccessTxOpportunities_s DoSlottedAloha()
Main function for Slotted ALOHA.
 
uint32_t SlottedAlohaRandomizeReleaseTime()
Function for performing the Slotted ALOHA release time randomization, i.e., the time after which the ...
 
void CrdsaReduceIdleBlocksForAllAllocationChannels()
Function for reducing the idle blocks in effect for all allocation channels.
 
void SetBackoffTime(uint32_t allocationChannel, uint32_t backoffTime)
Function for setting the backoff time.
 
uint32_t GetCrdsaSignalingOverheadInBytes()
Function for getting the CRDSA signaling overhead in bytes.
 
bool m_crdsaNewData
A flag defining whether the buffers were emptied the last time RA was evaluated, i....
 
bool IsCrdsaAllocationChannel(uint32_t allocationChannel)
Function for checking if the allocation channel is CRDSA allocation channel.
 
void SetCrdsaBackoffProbability(uint32_t allocationChannel, uint16_t backoffProbability)
Function for setting the backoff probability.
 
void DoDispose()
Function for disposing the module and its variables.
 
void SetBackoffProbability(uint32_t allocationChannel, uint16_t backoffProbability)
Function for setting the backoff probability.
 
void CrdsaReduceIdleBlocks(uint32_t allocationChannel)
Function for reducing the allocation channel specific number of idle blocks in effect.
 
virtual ~SatRandomAccess()
Destructor.
 
Callback< bool > IsDamaAvailableCallback
Typedef of callback for known DAMA status.
 
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
 
Random access Tx opportunities.
 
uint32_t slottedAlohaTxOpportunity
 
SatEnums::RandomAccessTxOpportunityType_t txOpportunityType
 
uint32_t allocationChannel
 
std::map< uint32_t, std::set< uint32_t > > crdsaTxOpportunities