121 template <
typename FN>
130 template <
typename MEM_PTR,
typename OBJ_PTR>
139 template <
typename T1>
147 template <
typename T1,
typename T2>
156 template <
typename T1,
typename T2,
typename T3>
166 template <
typename T1,
typename T2,
typename T3,
typename T4>
177 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
189 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
190 void SetArguments (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6);
303 template <
typename FN>
310 template <
typename MEM_PTR,
typename OBJ_PTR>
318 template <
typename T1>
324 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
329 template <
typename T1,
typename T2>
335 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
341 template <
typename T1,
typename T2,
typename T3>
347 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
353 template <
typename T1,
typename T2,
typename T3,
typename T4>
359 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
365 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
371 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
377 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
383 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
NS_FATAL_x macro definitions.
Simulation virtual time values and global simulation resolution.
TimerImpl * MakeTimerImpl(FN fn)
Make a TimerImpl from a function pointer taking varying numbers of arguments.
Timer()
Create a timer with a default event lifetime management policy:
This policy enforces a check from the destructor of the Timer to verify that the timer has already ex...
#define NS_FATAL_ERROR(msg)
Fatal error handling.
bool IsRunning(void) const
Time m_delay
The delay configured for this Timer.
Timer has already expired.
void Schedule(void)
Schedule a new event using the currently-configured delay, function, and arguments.
void Remove(void)
Remove from the simulation event-list the currently-running event if there is one.
Time m_delayLeft
The amount of time left on the Timer while it is suspended.
ns3::IntToType template class.
void SetDelay(const Time &delay)
int m_flags
Bitfield for Timer State, DestroyPolicy and InternalSuspended.
InternalSuspended
Internal bit marking the suspended state.
enum Timer::State GetState(void) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
State
The possible states of the Timer.
void Resume(void)
Restart the timer to expire within the amount of time left saved during Suspend.
The timer implementation underlying Timer and Watchdog.
Time GetDelay(void) const
This policy removes the event from the simulation event list when the destructor of the Timer is invo...
Timer is currently running.
An identifier for simulation events.
TimerImpl * m_impl
The timer implementation, which contains the bound callback function and arguments.
EventId m_event
The future event scheduled to expire the timer.
void Cancel(void)
Cancel the currently-running event if there is one.
bool IsExpired(void) const
void Suspend(void)
Cancel the timer and save the amount of time left until it was set to expire.
void SetArgs(T1 a1)
Set the arguments to be used when invoking the expire function.
bool IsSuspended(void) const
Time GetDelayLeft(void) const
ns3::TimerImpl declaration and implementation.
This policy cancels the event from the destructor of the Timer to verify that the event has already e...
ns3::EventId declarations.
DestroyPolicy
The policy to use to manager the internal timer when an instance of the Timer class is destroyed...