29 NS_LOG_COMPONENT_DEFINE(
"SatRandomAccessAllocationChannel");
34 NS_OBJECT_ENSURE_REGISTERED(SatRandomAccessAllocationChannel);
39 static TypeId tid = TypeId(
"ns3::SatRandomAccessAllocationChannel")
41 .AddConstructor<SatRandomAccessAllocationChannel>();
46 : m_slottedAlohaAllowed(false),
47 m_crdsaAllowed(false),
49 m_crdsaMinRandomizationValue(),
50 m_crdsaMaxRandomizationValue(),
51 m_crdsaNumOfInstances(),
52 m_crdsaMinIdleBlocks(),
53 m_crdsaIdleBlocksLeft(0),
54 m_crdsaBackoffTimeInMilliSeconds(),
55 m_crdsaBackoffProbability(),
56 m_crdsaMaxUniquePayloadPerBlock(),
57 m_crdsaMaxConsecutiveBlocksAccessed(),
58 m_crdsaNumOfConsecutiveBlocksUsed(0),
59 m_crdsaBackoffReleaseTime(0),
60 m_fSimBackoffTimeInMilliSeconds(),
61 m_fSimBackoffProbability(),
62 m_fSimPhysicalLayerFrameInMilliSeconds()
64 NS_LOG_FUNCTION(
this);
69 NS_LOG_FUNCTION(
this);
75 NS_LOG_FUNCTION(
this);
79 NS_LOG_INFO(
"CRDSA disallowed: skipping sanity check");
85 NS_FATAL_ERROR(
"SatRandomAccessAllocationChannel::DoCrdsaVariableSanityCheck - max < 1");
90 NS_FATAL_ERROR(
"SatRandomAccessAllocationChannel::DoCrdsaVariableSanityCheck - min > max");
96 "SatRandomAccessAllocationChannel::DoCrdsaVariableSanityCheck - instances < 1");
101 NS_FATAL_ERROR(
"SatRandomAccessAllocationChannel::DoCrdsaVariableSanityCheck - (max - min) "
105 if (m_crdsaBackoffProbability < 0.0 || m_crdsaBackoffProbability > 1.0)
107 NS_FATAL_ERROR(
"SatRandomAccessAllocationChannel::CrdsaDoVariableSanityCheck - "
108 "m_crdsaBackoffProbability < 0.0 || m_crdsaBackoffProbability > 1.0");
111 NS_LOG_INFO(
"Variable sanity check done");
static TypeId GetTypeId(void)
NS-3 type id function.
virtual ~SatRandomAccessAllocationChannel()
Destructor.
uint32_t m_crdsaNumOfInstances
CRDSA number of packet instances (replicas)
void DoCrdsaVariableSanityCheck()
Function for checking the CRDSA parameter sanity.
uint32_t m_crdsaMinRandomizationValue
CRDSA minimum randomization value.
uint32_t m_crdsaMaxRandomizationValue
CRDSA maximum randomization value.
SatRandomAccessAllocationChannel()
Constructor.
bool m_crdsaAllowed
CRDSA allowed.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.