27 NS_LOG_COMPONENT_DEFINE(
"SatRandomAccessAllocationChannel");
32 NS_OBJECT_ENSURE_REGISTERED(SatRandomAccessAllocationChannel);
37 static TypeId tid = TypeId(
"ns3::SatRandomAccessAllocationChannel")
39 .AddConstructor<SatRandomAccessAllocationChannel>();
44 : m_slottedAlohaAllowed(false),
45 m_crdsaAllowed(false),
47 m_crdsaMinRandomizationValue(),
48 m_crdsaMaxRandomizationValue(),
49 m_crdsaNumOfInstances(),
50 m_crdsaMinIdleBlocks(),
51 m_crdsaIdleBlocksLeft(0),
52 m_crdsaBackoffTimeInMilliSeconds(),
53 m_crdsaBackoffProbability(),
54 m_crdsaMaxUniquePayloadPerBlock(),
55 m_crdsaMaxConsecutiveBlocksAccessed(),
56 m_crdsaNumOfConsecutiveBlocksUsed(0),
57 m_crdsaBackoffReleaseTime(0),
58 m_fSimBackoffTimeInMilliSeconds(),
59 m_fSimBackoffProbability(),
60 m_fSimPhysicalLayerFrameInMilliSeconds()
62 NS_LOG_FUNCTION(
this);
67 NS_LOG_FUNCTION(
this);
73 NS_LOG_FUNCTION(
this);
77 NS_LOG_INFO(
"CRDSA disallowed: skipping sanity check");
83 NS_FATAL_ERROR(
"SatRandomAccessAllocationChannel::DoCrdsaVariableSanityCheck - max < 1");
88 NS_FATAL_ERROR(
"SatRandomAccessAllocationChannel::DoCrdsaVariableSanityCheck - min > max");
94 "SatRandomAccessAllocationChannel::DoCrdsaVariableSanityCheck - instances < 1");
99 NS_FATAL_ERROR(
"SatRandomAccessAllocationChannel::DoCrdsaVariableSanityCheck - (max - min) "
103 if (m_crdsaBackoffProbability < 0.0 || m_crdsaBackoffProbability > 1.0)
105 NS_FATAL_ERROR(
"SatRandomAccessAllocationChannel::CrdsaDoVariableSanityCheck - "
106 "m_crdsaBackoffProbability < 0.0 || m_crdsaBackoffProbability > 1.0");
109 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.