34 m_intervalExpiration(),
35 m_currentInterval(
Time(0)),
50 m_intervalExpiration(),
51 m_currentInterval(
Time(0)),
57 "Doublings value is too large");
86 "Doublings value is too large");
125 uint8_t doublings = 0;
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
bool IsRunning() const
This method is syntactic sugar for !IsExpired().
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
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.
virtual void Invoke()=0
Invoke the expire function.
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.
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.
TimerImpl * m_impl
The timer implementation, which contains the bound callback function and arguments.
void IntervalExpire()
Internal callback invoked when the interval expires.
uint16_t m_redundancy
Redundancy constant.
#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.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TrickleTimer timer class declaration.