24 m_intervalExpiration(),
25 m_currentInterval(
Time(0)),
40 m_intervalExpiration(),
41 m_currentInterval(
Time(0)),
47 "Doublings value is too large");
76 "Doublings value is too large");
109 return std::countr_zero(
m_ticks);
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
bool IsPending() const
This method is syntactic sugar for !IsExpired().
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static Time GetDelayLeft(const EventId &id)
Get the remaining time until this event will execute.
Simulation virtual time values and global simulation resolution.
int64_t AssignStreams(int64_t streamNum)
Assigns the stream number for the uniform random number generator to use.
uint8_t GetDoublings() const
Get the doublings of the timer.
Time m_minInterval
Minimum interval.
EventId m_timerExpiration
The future event scheduled to expire the timer.
void Stop()
Stop the timer.
Time m_currentInterval
Current interval.
Time m_maxInterval
Maximum interval.
void SetParameters(Time minInterval, uint8_t doublings, uint16_t redundancy)
Set the timer parameters.
internal::TimerImpl * m_impl
The timer implementation, which contains the bound callback function and arguments.
uint64_t m_ticks
Interval span (i.e., exp2(doublings)).
Time GetMinInterval() const
Get the MinInterval of the timer.
void InconsistentEvent()
Records an inconsistent event.
void Reset()
Reset the timer.
void TimerExpire()
Internal callback invoked when the timer expires.
EventId m_intervalExpiration
The future event scheduled to expire the interval.
Time GetDelayLeft() const
uint16_t GetRedundancy() const
Get the Redundancy constant of the timer.
void Enable()
Enable the timer.
Time GetMaxInterval() const
Get the MaxInterval of the timer.
Ptr< UniformRandomVariable > m_uniRand
Object to generate uniform random numbers.
~TrickleTimer()
Destructor.
void ConsistentEvent()
Records a consistent event.
Time GetIntervalLeft() const
TrickleTimer()
Constructor.
uint16_t m_counter
Event counter.
void IntervalExpire()
Internal callback invoked when the interval expires.
uint16_t m_redundancy
Redundancy constant.
virtual void Invoke()=0
Invoke the expire function.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#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 ",...
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TrickleTimer timer class declaration.