Class for random access algorithms. More...
#include "satellite-random-access-container.h"
Classes | |
struct | RandomAccessTxOpportunities_s |
Random access Tx opportunities. More... | |
Public Types | |
typedef Callback< bool > | AreBuffersEmptyCallback |
Typedef of callback for buffer status. More... | |
typedef Callback< bool > | IsDamaAvailableCallback |
Typedef of callback for known DAMA status. More... | |
Public Member Functions | |
SatRandomAccess () | |
Constructor. More... | |
SatRandomAccess (Ptr< SatRandomAccessConf > randomAccessConf, SatEnums::RandomAccessModel_t randomAccessModel) | |
Constructor. More... | |
virtual | ~SatRandomAccess () |
Destructor. More... | |
bool | CrdsaHasBackoffTimePassed (uint32_t allocationChannel) const |
Function for checking whether the backoff time has passed for this allocation channel. More... | |
SatRandomAccess::RandomAccessTxOpportunities_s | DoRandomAccess (uint32_t allocationChannel, SatEnums::RandomAccessTriggerType_t triggerType) |
Main function of this module. More... | |
uint32_t | GetCrdsaSignalingOverheadInBytes () |
Function for getting the CRDSA signaling overhead in bytes. More... | |
uint32_t | GetSlottedAlohaSignalingOverheadInBytes () |
Function for getting the Slotted ALOHA signaling overhead in bytes. More... | |
void | SetAreBuffersEmptyCallback (SatRandomAccess::AreBuffersEmptyCallback callback) |
Function for setting the AreBuffersEmpty callback. More... | |
void | SetBackoffProbability (uint32_t allocationChannel, uint16_t backoffProbability) |
Function for setting the backoff probability. More... | |
void | SetBackoffTime (uint32_t allocationChannel, uint32_t backoffTime) |
Function for setting the backoff time. More... | |
void | SetCrdsaBackoffProbability (uint32_t allocationChannel, uint16_t backoffProbability) |
Function for setting the backoff probability. More... | |
void | SetCrdsaBackoffTimeInMilliSeconds (uint32_t allocationChannel, uint32_t backoffTimeInMilliSeconds) |
Function for setting the backoff time in milliseconds. More... | |
void | SetCrdsaMaximumDataRateLimitationParameters (uint32_t allocationChannel, uint32_t maxUniquePayloadPerBlock, uint32_t maxConsecutiveBlocksAccessed, uint32_t minIdleBlocks) |
Function for setting the maximum rate limitation parameters. More... | |
void | SetCrdsaRandomizationParameters (uint32_t allocationChannel, uint32_t minRandomizationValue, uint32_t maxRandomizationValue, uint32_t numOfInstances) |
Function for setting the parameters related to CRDSA randomization. More... | |
void | SetFSimBackoffProbability (uint32_t allocationChannel, uint16_t backoffPersistence) |
Function for setting the backoff probability. More... | |
void | SetFSimBackoffTimeInFrames (uint32_t allocationChannel, uint32_t backoffTimeInFrames) |
Function for setting the backoff time in frames. More... | |
void | SetIsDamaAvailableCallback (SatRandomAccess::IsDamaAvailableCallback callback) |
Function for setting the IsDamaAvailable callback. More... | |
void | SetRandomAccessModel (SatEnums::RandomAccessModel_t randomAccessModel) |
Function for setting the used random access model. More... | |
void | SetSlottedAlohaControlRandomizationIntervalInMilliSeconds (uint32_t controlRandomizationIntervalInMilliSeconds) |
Function for setting the Slotted ALOHA control randomization interval. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
NS-3 type id function. More... | |
Protected Member Functions | |
void | DoDispose () |
Function for disposing the module and its variables. More... | |
Private Member Functions | |
bool | CrdsaDoBackoff (uint32_t allocationChannel) |
Function for evaluating the backoff for this allocation channel. More... | |
void | CrdsaIncreaseConsecutiveBlocksUsed (uint32_t allocationChannel) |
Function for increasing the allocation channel specific count of consecutive used blocks. More... | |
void | CrdsaIncreaseConsecutiveBlocksUsedForAllAllocationChannels () |
Function for increasing the count of consecutive used blocks for all allocation channels. More... | |
bool | CrdsaIsAllocationChannelFree (uint32_t allocationChannel) |
Function for checking if the allocation channel is free. More... | |
SatRandomAccess::RandomAccessTxOpportunities_s | CrdsaPrepareToTransmit (uint32_t allocationChannel) |
Function for evaluating backoff for each unique CRDSA packet and calling the randomization of Tx opportunities if backoff is not triggered. More... | |
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. More... | |
void | CrdsaReduceIdleBlocks (uint32_t allocationChannel) |
Function for reducing the allocation channel specific number of idle blocks in effect. More... | |
void | CrdsaReduceIdleBlocksForAllAllocationChannels () |
Function for reducing the idle blocks in effect for all allocation channels. More... | |
void | CrdsaResetConsecutiveBlocksUsed (uint32_t allocationChannel) |
Function for resetting the number of consecutive blocks to zero for a specific allocation channel. More... | |
void | CrdsaResetConsecutiveBlocksUsedForAllAllocationChannels () |
Function for resetting the number of consecutive blocks to zero for all allocation channels. More... | |
void | CrdsaSetBackoffTimer (uint32_t allocationChannel) |
Function for setting the allocation channel specific backoff timer. More... | |
SatRandomAccess::RandomAccessTxOpportunities_s | DoCrdsa (uint32_t allocationChannel) |
Main function for CRDSA algorithm. More... | |
SatRandomAccess::RandomAccessTxOpportunities_s | DoEssa (uint32_t allocationChannel) |
Main function for ESSA. More... | |
SatRandomAccess::RandomAccessTxOpportunities_s | DoSlottedAloha () |
Main function for Slotted ALOHA. More... | |
uint32_t | GetConfigurationIdForAllocationChannel (uint32_t allocationChannelId) |
Function to convert a carrier allocation channel ID into its allocation channel configuration ID. More... | |
bool | IsCrdsaAllocationChannel (uint32_t allocationChannel) |
Function for checking if the allocation channel is CRDSA allocation channel. More... | |
bool | IsEssaAllocationChannel (uint32_t allocationChannel) |
Function for checking if the allocation channel is ESSA allocation channel. More... | |
bool | IsSlottedAlohaAllocationChannel (uint32_t allocationChannel) |
Function for checking if the allocation channel is Slotted ALOHA allocation channel. More... | |
void | PrintVariables () |
Function for printing out various module variables to console. More... | |
void | SlottedAlohaDoVariableSanityCheck () |
Function for checking the sanity of Slotted ALOHA related variables. More... | |
uint32_t | SlottedAlohaRandomizeReleaseTime () |
Function for performing the Slotted ALOHA release time randomization, i.e., the time after which the next available slot is selected for Tx opportunity. More... | |
Private Attributes | |
AreBuffersEmptyCallback | m_areBuffersEmptyCb |
Callback for buffer status. More... | |
bool | m_crdsaNewData |
A flag defining whether the buffers were emptied the last time RA was evaluated, i.e., is the data now new. More... | |
IsDamaAvailableCallback | m_isDamaAvailableCb |
Callback for known DAMA status. More... | |
uint32_t | m_numOfAllocationChannels |
Number of allocation channels available. More... | |
Ptr< SatRandomAccessConf > | m_randomAccessConf |
A pointer to random access configuration. More... | |
SatEnums::RandomAccessModel_t | m_randomAccessModel |
The used random access model. More... | |
Ptr< UniformRandomVariable > | m_uniformRandomVariable |
Uniform random variable object. More... | |
Class for random access algorithms.
The purpose of this class is to implement Slotted ALOHA and CRDSA algorithms for randomizing the Tx opportunities. In Slotted ALOHAs case this means randomizing the wait time after which the next slot is selected for transmission. In CRDSAs case this means randomizing the slots within a frame for each unique packet and it's replicas.
Definition at line 51 of file satellite-random-access-container.h.
typedef Callback<bool> ns3::SatRandomAccess::AreBuffersEmptyCallback |
Typedef of callback for buffer status.
Definition at line 64 of file satellite-random-access-container.h.
typedef Callback<bool> ns3::SatRandomAccess::IsDamaAvailableCallback |
Typedef of callback for known DAMA status.
Definition at line 58 of file satellite-random-access-container.h.
ns3::SatRandomAccess::SatRandomAccess | ( | ) |
Constructor.
Definition at line 46 of file satellite-random-access-container.cc.
ns3::SatRandomAccess::SatRandomAccess | ( | Ptr< SatRandomAccessConf > | randomAccessConf, |
SatEnums::RandomAccessModel_t | randomAccessModel | ||
) |
Constructor.
Definition at line 60 of file satellite-random-access-container.cc.
References m_randomAccessConf, m_uniformRandomVariable, and SetRandomAccessModel().
|
virtual |
Destructor.
Definition at line 82 of file satellite-random-access-container.cc.
References m_areBuffersEmptyCb, m_isDamaAvailableCb, m_randomAccessConf, and m_uniformRandomVariable.
|
private |
Function for evaluating the backoff for this allocation channel.
allocationChannel | allocation channel |
Definition at line 816 of file satellite-random-access-container.cc.
References m_randomAccessConf, and m_uniformRandomVariable.
Referenced by CrdsaPrepareToTransmit(), and DoCrdsa().
bool ns3::SatRandomAccess::CrdsaHasBackoffTimePassed | ( | uint32_t | allocationChannel | ) | const |
Function for checking whether the backoff time has passed for this allocation channel.
allocationChannel | allocation channel |
Definition at line 734 of file satellite-random-access-container.cc.
References m_randomAccessConf.
Referenced by DoRandomAccess().
|
private |
Function for increasing the allocation channel specific count of consecutive used blocks.
If the maximum number of consecutive blocks is reached, this function triggers the call of idle period.
allocationChannel | allocation channel |
Definition at line 905 of file satellite-random-access-container.cc.
References CrdsaResetConsecutiveBlocksUsedForAllAllocationChannels(), and m_randomAccessConf.
Referenced by CrdsaIncreaseConsecutiveBlocksUsedForAllAllocationChannels().
|
private |
Function for increasing the count of consecutive used blocks for all allocation channels.
Definition at line 934 of file satellite-random-access-container.cc.
References CrdsaIncreaseConsecutiveBlocksUsed(), and m_numOfAllocationChannels.
Referenced by DoCrdsa().
|
private |
Function for checking if the allocation channel is free.
allocationChannel | allocation channel |
Definition at line 801 of file satellite-random-access-container.cc.
References m_randomAccessConf.
Referenced by CrdsaPrepareToTransmit().
|
private |
Function for evaluating backoff for each unique CRDSA packet and calling the randomization of Tx opportunities if backoff is not triggered.
allocationChannel | allocation channel |
TODO when multiple overlapping allocation channels for a single UT needs to be supported slots.first can be updated to take into account the reserved RA slots from MAC. For this the logic for determining the reserved slots needs to be implemented in UT MAC and the slots should be passed as parameter to RA logic and used instead of slots.first
This should be done by including the list of used slots in this SF as a parameter for the random access algorithm call. This functionality is needed with, e.g., multiple allocation channels
randomize instance slots for this unique packet
save the packet specific Tx opportunities into a vector
save the rest of the CRDSA Tx opportunity results
Definition at line 846 of file satellite-random-access-container.cc.
References CrdsaDoBackoff(), CrdsaIsAllocationChannelFree(), CrdsaRandomizeTxOpportunities(), CrdsaSetBackoffTimer(), ns3::SatRandomAccess::RandomAccessTxOpportunities_s::crdsaTxOpportunities, m_areBuffersEmptyCb, m_crdsaNewData, m_randomAccessConf, ns3::SatEnums::RA_TX_OPPORTUNITY_CRDSA, ns3::SatEnums::RA_TX_OPPORTUNITY_DO_NOTHING, and ns3::SatRandomAccess::RandomAccessTxOpportunities_s::txOpportunityType.
Referenced by DoCrdsa().
|
private |
Function for randomizing the CRDSA Tx opportunities (slots) for each unique packet.
allocationChannel | allocation channel |
slots | a set of reserved slots |
Definition at line 1034 of file satellite-random-access-container.cc.
References m_randomAccessConf, and m_uniformRandomVariable.
Referenced by CrdsaPrepareToTransmit().
|
private |
Function for reducing the allocation channel specific number of idle blocks in effect.
allocationChannel | allocation channel |
Definition at line 753 of file satellite-random-access-container.cc.
References m_randomAccessConf.
Referenced by CrdsaReduceIdleBlocksForAllAllocationChannels().
|
private |
Function for reducing the idle blocks in effect for all allocation channels.
Definition at line 770 of file satellite-random-access-container.cc.
References CrdsaReduceIdleBlocks(), and m_numOfAllocationChannels.
Referenced by DoCrdsa(), and DoRandomAccess().
|
private |
Function for resetting the number of consecutive blocks to zero for a specific allocation channel.
allocationChannel | allocation channel |
Definition at line 781 of file satellite-random-access-container.cc.
References m_randomAccessConf.
Referenced by CrdsaResetConsecutiveBlocksUsedForAllAllocationChannels().
|
private |
Function for resetting the number of consecutive blocks to zero for all allocation channels.
Definition at line 790 of file satellite-random-access-container.cc.
References CrdsaResetConsecutiveBlocksUsed(), and m_numOfAllocationChannels.
Referenced by CrdsaIncreaseConsecutiveBlocksUsed(), DoCrdsa(), and DoRandomAccess().
|
private |
Function for setting the allocation channel specific backoff timer.
allocationChannel | allocation channel |
Definition at line 835 of file satellite-random-access-container.cc.
References m_randomAccessConf.
Referenced by CrdsaPrepareToTransmit(), and DoCrdsa().
|
private |
Main function for CRDSA algorithm.
allocationChannel | allocation channel |
Definition at line 945 of file satellite-random-access-container.cc.
References CrdsaDoBackoff(), CrdsaIncreaseConsecutiveBlocksUsedForAllAllocationChannels(), CrdsaPrepareToTransmit(), CrdsaReduceIdleBlocksForAllAllocationChannels(), CrdsaResetConsecutiveBlocksUsedForAllAllocationChannels(), CrdsaSetBackoffTimer(), ns3::SatEnums::GetRandomAccessOpportunityTypeName(), m_areBuffersEmptyCb, m_crdsaNewData, m_isDamaAvailableCb, PrintVariables(), ns3::SatEnums::RA_TX_OPPORTUNITY_CRDSA, ns3::SatEnums::RA_TX_OPPORTUNITY_DO_NOTHING, and ns3::SatRandomAccess::RandomAccessTxOpportunities_s::txOpportunityType.
Referenced by DoRandomAccess().
|
protected |
Function for disposing the module and its variables.
Definition at line 101 of file satellite-random-access-container.cc.
References m_areBuffersEmptyCb, m_isDamaAvailableCb, m_randomAccessConf, and m_uniformRandomVariable.
|
private |
Main function for ESSA.
allocationChannel | allocation channel |
TODO: take into account inter-packet time ?
Calculate how many backoff slots must wait TODO: this should be done in a semi-periodic way: each time a backoff time has passed, check if we can send or not (the back-off time and probability may have changed in between).
Definition at line 582 of file satellite-random-access-container.cc.
References m_randomAccessConf, m_uniformRandomVariable, ns3::SatEnums::RA_TX_OPPORTUNITY_ESSA, ns3::SatRandomAccess::RandomAccessTxOpportunities_s::slottedAlohaTxOpportunity, and ns3::SatRandomAccess::RandomAccessTxOpportunities_s::txOpportunityType.
Referenced by DoRandomAccess().
SatRandomAccess::RandomAccessTxOpportunities_s ns3::SatRandomAccess::DoRandomAccess | ( | uint32_t | allocationChannel, |
SatEnums::RandomAccessTriggerType_t | triggerType | ||
) |
Main function of this module.
This will be called from outside and it is responsible for selecting the appropriate RA algorithm
allocationChannel | allocation channel |
triggerType | RA trigger type |
return variable initialization
Do CRDSA (MARSALA being a special form of CRDSA)
Do ESSA
Do Slotted ALOHA
If all RA based on RCS2 specification is enabled, CRDSA is used if the RA parameter number of instances is set >= 2. Otherwise SA is used.
For logging/debugging purposes TODO: This if statement is utilized only for logging, and thus could be optimized to be enabled only with debug build.
Definition at line 159 of file satellite-random-access-container.cc.
References ns3::SatRandomAccess::RandomAccessTxOpportunities_s::allocationChannel, CrdsaHasBackoffTimePassed(), CrdsaReduceIdleBlocksForAllAllocationChannels(), CrdsaResetConsecutiveBlocksUsedForAllAllocationChannels(), ns3::SatRandomAccess::RandomAccessTxOpportunities_s::crdsaTxOpportunities, DoCrdsa(), DoEssa(), DoSlottedAloha(), GetConfigurationIdForAllocationChannel(), ns3::SatEnums::GetRandomAccessTriggerTypeName(), IsCrdsaAllocationChannel(), IsEssaAllocationChannel(), IsSlottedAlohaAllocationChannel(), m_randomAccessConf, m_randomAccessModel, ns3::SatEnums::RA_MODEL_CRDSA, ns3::SatEnums::RA_MODEL_ESSA, ns3::SatEnums::RA_MODEL_MARSALA, ns3::SatEnums::RA_MODEL_RCS2_SPECIFICATION, ns3::SatEnums::RA_MODEL_SLOTTED_ALOHA, ns3::SatEnums::RA_TRIGGER_TYPE_CRDSA, ns3::SatEnums::RA_TRIGGER_TYPE_ESSA, ns3::SatEnums::RA_TRIGGER_TYPE_SLOTTED_ALOHA, ns3::SatEnums::RA_TX_OPPORTUNITY_CRDSA, ns3::SatEnums::RA_TX_OPPORTUNITY_DO_NOTHING, ns3::SatEnums::RA_TX_OPPORTUNITY_ESSA, ns3::SatEnums::RA_TX_OPPORTUNITY_SLOTTED_ALOHA, ns3::SatRandomAccess::RandomAccessTxOpportunities_s::slottedAlohaTxOpportunity, and ns3::SatRandomAccess::RandomAccessTxOpportunities_s::txOpportunityType.
|
private |
Main function for Slotted ALOHA.
Check if we have known DAMA allocations
Randomize Tx opportunity release time
Definition at line 487 of file satellite-random-access-container.cc.
References m_isDamaAvailableCb, m_randomAccessConf, ns3::SatEnums::RA_TX_OPPORTUNITY_DO_NOTHING, ns3::SatEnums::RA_TX_OPPORTUNITY_SLOTTED_ALOHA, SlottedAlohaRandomizeReleaseTime(), ns3::SatRandomAccess::RandomAccessTxOpportunities_s::slottedAlohaTxOpportunity, and ns3::SatRandomAccess::RandomAccessTxOpportunities_s::txOpportunityType.
Referenced by DoRandomAccess().
|
private |
Function to convert a carrier allocation channel ID into its allocation channel configuration ID.
allocationChannelId | The carrier allocation channel ID |
Definition at line 401 of file satellite-random-access-container.cc.
References m_randomAccessConf.
Referenced by DoRandomAccess().
uint32_t ns3::SatRandomAccess::GetCrdsaSignalingOverheadInBytes | ( | ) |
Function for getting the CRDSA signaling overhead in bytes.
Definition at line 726 of file satellite-random-access-container.cc.
References m_randomAccessConf.
uint32_t ns3::SatRandomAccess::GetSlottedAlohaSignalingOverheadInBytes | ( | ) |
Function for getting the Slotted ALOHA signaling overhead in bytes.
Definition at line 457 of file satellite-random-access-container.cc.
References m_randomAccessConf.
|
static |
NS-3 type id function.
Definition at line 39 of file satellite-random-access-container.cc.
|
private |
Function for checking if the allocation channel is CRDSA allocation channel.
allocationChannel | allocation channel |
Definition at line 132 of file satellite-random-access-container.cc.
References m_randomAccessConf.
Referenced by DoRandomAccess().
|
private |
Function for checking if the allocation channel is ESSA allocation channel.
allocationChannel | allocation channel |
Definition at line 150 of file satellite-random-access-container.cc.
References m_randomAccessConf.
Referenced by DoRandomAccess().
|
private |
Function for checking if the allocation channel is Slotted ALOHA allocation channel.
allocationChannel | allocation channel |
Definition at line 141 of file satellite-random-access-container.cc.
References m_randomAccessConf.
Referenced by DoRandomAccess().
|
private |
Function for printing out various module variables to console.
Definition at line 361 of file satellite-random-access-container.cc.
References m_crdsaNewData, m_numOfAllocationChannels, and m_randomAccessConf.
Referenced by DoCrdsa().
void ns3::SatRandomAccess::SetAreBuffersEmptyCallback | ( | SatRandomAccess::AreBuffersEmptyCallback | callback | ) |
Function for setting the AreBuffersEmpty callback.
callback | callback |
Definition at line 1093 of file satellite-random-access-container.cc.
References m_areBuffersEmptyCb.
void ns3::SatRandomAccess::SetBackoffProbability | ( | uint32_t | allocationChannel, |
uint16_t | backoffProbability | ||
) |
Function for setting the backoff probability.
allocationChannel | allocation channel |
backoffProbability | backoff probability |
Definition at line 430 of file satellite-random-access-container.cc.
References m_randomAccessModel, ns3::SatEnums::RA_MODEL_CRDSA, ns3::SatEnums::RA_MODEL_ESSA, ns3::SatEnums::RA_MODEL_RCS2_SPECIFICATION, SetCrdsaBackoffProbability(), and SetFSimBackoffProbability().
void ns3::SatRandomAccess::SetBackoffTime | ( | uint32_t | allocationChannel, |
uint32_t | backoffTime | ||
) |
Function for setting the backoff time.
allocationChannel | allocation channel |
backoffTime | backoff time |
Definition at line 407 of file satellite-random-access-container.cc.
References m_randomAccessModel, ns3::SatEnums::RA_MODEL_CRDSA, ns3::SatEnums::RA_MODEL_ESSA, ns3::SatEnums::RA_MODEL_RCS2_SPECIFICATION, SetCrdsaBackoffTimeInMilliSeconds(), and SetFSimBackoffTimeInFrames().
void ns3::SatRandomAccess::SetCrdsaBackoffProbability | ( | uint32_t | allocationChannel, |
uint16_t | backoffProbability | ||
) |
Function for setting the backoff probability.
allocationChannel | allocation channel |
backoffProbability | backoff probability |
Definition at line 646 of file satellite-random-access-container.cc.
References m_randomAccessConf, m_randomAccessModel, ns3::SatEnums::RA_MODEL_CRDSA, ns3::SatEnums::RA_MODEL_MARSALA, and ns3::SatEnums::RA_MODEL_RCS2_SPECIFICATION.
Referenced by SetBackoffProbability().
void ns3::SatRandomAccess::SetCrdsaBackoffTimeInMilliSeconds | ( | uint32_t | allocationChannel, |
uint32_t | backoffTimeInMilliSeconds | ||
) |
Function for setting the backoff time in milliseconds.
allocationChannel | allocation channel |
backoffTimeInMilliSeconds | backoff time |
Definition at line 623 of file satellite-random-access-container.cc.
References m_randomAccessConf, m_randomAccessModel, ns3::SatEnums::RA_MODEL_CRDSA, ns3::SatEnums::RA_MODEL_MARSALA, and ns3::SatEnums::RA_MODEL_RCS2_SPECIFICATION.
Referenced by SetBackoffTime().
void ns3::SatRandomAccess::SetCrdsaMaximumDataRateLimitationParameters | ( | uint32_t | allocationChannel, |
uint32_t | maxUniquePayloadPerBlock, | ||
uint32_t | maxConsecutiveBlocksAccessed, | ||
uint32_t | minIdleBlocks | ||
) |
Function for setting the maximum rate limitation parameters.
allocationChannel | allocation channel |
maxUniquePayloadPerBlock | maximum number of unique payloads per block |
maxConsecutiveBlocksAccessed | maximum number of consecutive blocks accessed |
minIdleBlocks | minimum number of idle blocks |
Definition at line 697 of file satellite-random-access-container.cc.
References m_randomAccessConf, m_randomAccessModel, ns3::SatEnums::RA_MODEL_CRDSA, ns3::SatEnums::RA_MODEL_MARSALA, and ns3::SatEnums::RA_MODEL_RCS2_SPECIFICATION.
void ns3::SatRandomAccess::SetCrdsaRandomizationParameters | ( | uint32_t | allocationChannel, |
uint32_t | minRandomizationValue, | ||
uint32_t | maxRandomizationValue, | ||
uint32_t | numOfInstances | ||
) |
Function for setting the parameters related to CRDSA randomization.
allocationChannel | allocation channel |
minRandomizationValue | minimum randomization value |
maxRandomizationValue | maximum randomization value |
numOfInstances | number of packet instances (packet replicas) |
Definition at line 668 of file satellite-random-access-container.cc.
References m_randomAccessConf, m_randomAccessModel, ns3::SatEnums::RA_MODEL_CRDSA, ns3::SatEnums::RA_MODEL_MARSALA, and ns3::SatEnums::RA_MODEL_RCS2_SPECIFICATION.
void ns3::SatRandomAccess::SetFSimBackoffProbability | ( | uint32_t | allocationChannel, |
uint16_t | backoffPersistence | ||
) |
Function for setting the backoff probability.
allocationChannel | allocation channel |
backoffPersistence | backoff persistence |
NOTE: this could be done with the same functions for Crdsa (SetCrdsaBackOffProbabaility) but changing the name of the function. The NCC should then send the backoff probability and not the persistence.
Definition at line 562 of file satellite-random-access-container.cc.
References m_randomAccessConf, m_randomAccessModel, and ns3::SatEnums::RA_MODEL_ESSA.
Referenced by SetBackoffProbability().
void ns3::SatRandomAccess::SetFSimBackoffTimeInFrames | ( | uint32_t | allocationChannel, |
uint32_t | backoffTimeInFrames | ||
) |
Function for setting the backoff time in frames.
allocationChannel | allocation channel |
backoffTimeInFrames | backoff time |
NOTE: this could be done with the same functions for Crdsa (SetCrdsaBackOffTime) but changing the name of the function. The NCC should then send the backofftime in ms, and not in frames.
Definition at line 541 of file satellite-random-access-container.cc.
References m_randomAccessConf, m_randomAccessModel, and ns3::SatEnums::RA_MODEL_ESSA.
Referenced by SetBackoffTime().
void ns3::SatRandomAccess::SetIsDamaAvailableCallback | ( | SatRandomAccess::IsDamaAvailableCallback | callback | ) |
Function for setting the IsDamaAvailable callback.
callback | callback |
Definition at line 1085 of file satellite-random-access-container.cc.
References m_isDamaAvailableCb.
void ns3::SatRandomAccess::SetRandomAccessModel | ( | SatEnums::RandomAccessModel_t | randomAccessModel | ) |
Function for setting the used random access model.
randomAccessModel | random access model |
Definition at line 124 of file satellite-random-access-container.cc.
References ns3::SatEnums::GetRandomAccessModelName(), and m_randomAccessModel.
Referenced by SatRandomAccess().
void ns3::SatRandomAccess::SetSlottedAlohaControlRandomizationIntervalInMilliSeconds | ( | uint32_t | controlRandomizationIntervalInMilliSeconds | ) |
Function for setting the Slotted ALOHA control randomization interval.
controlRandomizationIntervalInMilliSeconds | Control randomization interval in milliseconds |
Definition at line 463 of file satellite-random-access-container.cc.
References m_randomAccessConf, m_randomAccessModel, ns3::SatEnums::RA_MODEL_RCS2_SPECIFICATION, and ns3::SatEnums::RA_MODEL_SLOTTED_ALOHA.
|
private |
Function for checking the sanity of Slotted ALOHA related variables.
|
private |
Function for performing the Slotted ALOHA release time randomization, i.e., the time after which the next available slot is selected for Tx opportunity.
Control randomization interval defines the maximum release time.
Definition at line 522 of file satellite-random-access-container.cc.
References m_randomAccessConf, and m_uniformRandomVariable.
Referenced by DoSlottedAloha().
|
private |
Callback for buffer status.
Definition at line 406 of file satellite-random-access-container.h.
Referenced by ~SatRandomAccess(), CrdsaPrepareToTransmit(), DoCrdsa(), DoDispose(), and SetAreBuffersEmptyCallback().
|
private |
A flag defining whether the buffers were emptied the last time RA was evaluated, i.e., is the data now new.
Definition at line 396 of file satellite-random-access-container.h.
Referenced by CrdsaPrepareToTransmit(), DoCrdsa(), and PrintVariables().
|
private |
Callback for known DAMA status.
Definition at line 401 of file satellite-random-access-container.h.
Referenced by ~SatRandomAccess(), DoCrdsa(), DoDispose(), DoSlottedAloha(), and SetIsDamaAvailableCallback().
|
private |
Number of allocation channels available.
Definition at line 390 of file satellite-random-access-container.h.
Referenced by CrdsaIncreaseConsecutiveBlocksUsedForAllAllocationChannels(), CrdsaReduceIdleBlocksForAllAllocationChannels(), CrdsaResetConsecutiveBlocksUsedForAllAllocationChannels(), and PrintVariables().
|
private |
A pointer to random access configuration.
Definition at line 385 of file satellite-random-access-container.h.
Referenced by SatRandomAccess(), ~SatRandomAccess(), CrdsaDoBackoff(), CrdsaHasBackoffTimePassed(), CrdsaIncreaseConsecutiveBlocksUsed(), CrdsaIsAllocationChannelFree(), CrdsaPrepareToTransmit(), CrdsaRandomizeTxOpportunities(), CrdsaReduceIdleBlocks(), CrdsaResetConsecutiveBlocksUsed(), CrdsaSetBackoffTimer(), DoDispose(), DoEssa(), DoRandomAccess(), DoSlottedAloha(), GetConfigurationIdForAllocationChannel(), GetCrdsaSignalingOverheadInBytes(), GetSlottedAlohaSignalingOverheadInBytes(), IsCrdsaAllocationChannel(), IsEssaAllocationChannel(), IsSlottedAlohaAllocationChannel(), PrintVariables(), SetCrdsaBackoffProbability(), SetCrdsaBackoffTimeInMilliSeconds(), SetCrdsaMaximumDataRateLimitationParameters(), SetCrdsaRandomizationParameters(), SetFSimBackoffProbability(), SetFSimBackoffTimeInFrames(), SetSlottedAlohaControlRandomizationIntervalInMilliSeconds(), and SlottedAlohaRandomizeReleaseTime().
|
private |
The used random access model.
Definition at line 380 of file satellite-random-access-container.h.
Referenced by DoRandomAccess(), SetBackoffProbability(), SetBackoffTime(), SetCrdsaBackoffProbability(), SetCrdsaBackoffTimeInMilliSeconds(), SetCrdsaMaximumDataRateLimitationParameters(), SetCrdsaRandomizationParameters(), SetFSimBackoffProbability(), SetFSimBackoffTimeInFrames(), SetRandomAccessModel(), and SetSlottedAlohaControlRandomizationIntervalInMilliSeconds().
|
private |
Uniform random variable object.
Definition at line 375 of file satellite-random-access-container.h.
Referenced by SatRandomAccess(), ~SatRandomAccess(), CrdsaDoBackoff(), CrdsaRandomizeTxOpportunities(), DoDispose(), DoEssa(), and SlottedAlohaRandomizeReleaseTime().