37 m_rng = CreateObject<UniformRandomVariable>();
54 m_rng = CreateObject<UniformRandomVariable>();
72 uint32_t maxSlot = (uint32_t)pow(2, ceiling) - 1;
78 auto backoffSlots = (uint32_t)
m_rng->
GetValue(minSlot, maxSlot);
void ResetBackoffTime()
Indicates to the backoff object that the last packet was successfully transmitted and that the number...
uint32_t m_maxRetries
Maximum number of transmission retries before the packet is dropped.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
uint32_t m_maxSlots
Maximum number of backoff slots (when multiplied by m_slotTime, determines maximum backoff time)
uint32_t m_numBackoffRetries
Number of times that the transmitter has tried to unsuccessfuly transmit the current packet.
bool MaxRetriesReached() const
void IncrNumRetries()
Increments the number of retries by 1.
uint32_t m_minSlots
Minimum number of backoff slots (when multiplied by m_slotTime, determines minimum backoff time)
Ptr< UniformRandomVariable > m_rng
Random number generator.
uint32_t m_ceiling
Caps the exponential function when the number of retries reaches m_ceiling.
Time m_slotTime
Length of one slot.
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
Simulation virtual time values and global simulation resolution.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.