58 template <
typename T1>
66 template <
typename T1,
typename T2>
76 template <
typename T1,
typename T2,
typename T3>
77 void SetArgs(T1 a1, T2 a2, T3 a3);
88 template <
typename T1,
typename T2,
typename T3,
typename T4>
89 void SetArgs(T1 a1, T2 a2, T3 a3, T4 a4);
102 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
103 void SetArgs(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
118 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
119 void SetArgs(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6);
149 template <
typename T1>
161 template <
typename T1,
typename T2>
174 template <
typename T1,
typename T2,
typename T3>
188 template <
typename T1,
typename T2,
typename T3,
typename T4>
203 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
219 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
232 virtual void SetArguments(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) = 0;
236 template <
typename T>
252 template <
typename FN>
264 template <
typename FN>
268 struct FnTimerImplZero :
public TimerImpl
270 FnTimerImplZero(FN fn)
280 void Invoke()
override
286 }*
function =
new FnTimerImplZero(fn);
295 template <
typename FN>
303 struct FnTimerImplOne :
public TimerImplOne<T1Parameter>
305 FnTimerImplOne(FN fn)
310 void SetArguments(T1Parameter a1)
override
320 void Invoke()
override
327 }*
function =
new FnTimerImplOne(fn);
336 template <
typename FN>
347 struct FnTimerImplTwo :
public TimerImplTwo<T1Parameter, T2Parameter>
349 FnTimerImplTwo(FN fn)
354 void SetArguments(T1Parameter a1, T2Parameter a2)
override
365 void Invoke()
override
373 }*
function =
new FnTimerImplTwo(fn);
382 template <
typename FN>
396 struct FnTimerImplThree :
public TimerImplThree<T1Parameter, T2Parameter, T3Parameter>
398 FnTimerImplThree(FN fn)
403 void SetArguments(T1Parameter a1, T2Parameter a2, T3Parameter a3)
override
415 void Invoke()
override
417 m_fn(m_a1, m_a2, m_a3);
424 }*
function =
new FnTimerImplThree(fn);
433 template <
typename FN>
450 struct FnTimerImplFour
451 :
public TimerImplFour<T1Parameter, T2Parameter, T3Parameter, T4Parameter>
453 FnTimerImplFour(FN fn)
458 void SetArguments(T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4)
override
471 void Invoke()
override
473 m_fn(m_a1, m_a2, m_a3, m_a4);
481 }*
function =
new FnTimerImplFour(fn);
490 template <
typename FN>
510 struct FnTimerImplFive
511 :
public TimerImplFive<T1Parameter, T2Parameter, T3Parameter, T4Parameter, T5Parameter>
513 FnTimerImplFive(FN fn)
518 void SetArguments(T1Parameter a1,
522 T5Parameter a5)
override
536 void Invoke()
override
538 m_fn(m_a1, m_a2, m_a3, m_a4, m_a5);
547 }*
function =
new FnTimerImplFive(fn);
556 template <
typename FN>
579 struct FnTimerImplSix :
public TimerImplSix<T1Parameter,
586 FnTimerImplSix(FN fn)
591 virtual void SetArguments(T1Parameter a1,
611 virtual void Invoke()
613 m_fn(m_a1, m_a2, m_a3, m_a4, m_a5, m_a6);
623 }*
function =
new FnTimerImplSix(fn);
637 template <
typename T>
649 template <
typename T>
674 template <
typename MEM_PTR,
typename OBJ_PTR>
688 template <
typename MEM_PTR,
typename OBJ_PTR>
692 struct MemFnTimerImplZero :
public TimerImpl
694 MemFnTimerImplZero(MEM_PTR memPtr, OBJ_PTR objPtr)
705 void Invoke()
override
712 }*
function =
new MemFnTimerImplZero(memPtr, objPtr);
721 template <
typename MEM_PTR,
typename OBJ_PTR>
729 struct MemFnTimerImplOne :
public TimerImplOne<T1Parameter>
731 MemFnTimerImplOne(MEM_PTR memPtr, OBJ_PTR objPtr)
737 void SetArguments(T1Parameter a1)
override
747 void Invoke()
override
755 }*
function =
new MemFnTimerImplOne(memPtr, objPtr);
764 template <
typename MEM_PTR,
typename OBJ_PTR>
775 struct MemFnTimerImplTwo :
public TimerImplTwo<T1Parameter, T2Parameter>
777 MemFnTimerImplTwo(MEM_PTR memPtr, OBJ_PTR objPtr)
783 void SetArguments(T1Parameter a1, T2Parameter a2)
override
794 void Invoke()
override
803 }*
function =
new MemFnTimerImplTwo(memPtr, objPtr);
812 template <
typename MEM_PTR,
typename OBJ_PTR>
826 struct MemFnTimerImplThree :
public TimerImplThree<T1Parameter, T2Parameter, T3Parameter>
828 MemFnTimerImplThree(MEM_PTR memPtr, OBJ_PTR objPtr)
834 void SetArguments(T1Parameter a1, T2Parameter a2, T3Parameter a3)
override
846 void Invoke()
override
856 }*
function =
new MemFnTimerImplThree(memPtr, objPtr);
865 template <
typename MEM_PTR,
typename OBJ_PTR>
882 struct MemFnTimerImplFour
883 :
public TimerImplFour<T1Parameter, T2Parameter, T3Parameter, T4Parameter>
885 MemFnTimerImplFour(MEM_PTR memPtr, OBJ_PTR objPtr)
891 void SetArguments(T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4)
override
904 void Invoke()
override
907 m_memPtr)(m_a1, m_a2, m_a3, m_a4);
916 }*
function =
new MemFnTimerImplFour(memPtr, objPtr);
925 template <
typename MEM_PTR,
typename OBJ_PTR>
945 struct MemFnTimerImplFive
946 :
public TimerImplFive<T1Parameter, T2Parameter, T3Parameter, T4Parameter, T5Parameter>
948 MemFnTimerImplFive(MEM_PTR memPtr, OBJ_PTR objPtr)
954 void SetArguments(T1Parameter a1,
958 T5Parameter a5)
override
972 void Invoke()
override
975 m_memPtr)(m_a1, m_a2, m_a3, m_a4, m_a5);
985 }*
function =
new MemFnTimerImplFive(memPtr, objPtr);
994 template <
typename MEM_PTR,
typename OBJ_PTR>
1017 struct MemFnTimerImplSix :
public TimerImplSix<T1Parameter,
1024 MemFnTimerImplSix(MEM_PTR memPtr, OBJ_PTR objPtr)
1030 virtual void SetArguments(T1Parameter a1,
1058 virtual void Invoke()
1061 m_memPtr)(m_a1, m_a2, m_a3, m_a4, m_a5, m_a6);
1072 }*
function =
new MemFnTimerImplSix(memPtr, objPtr);
1083 template <
typename T1>
1088 auto impl =
dynamic_cast<TimerImplBase*
>(
this);
1089 if (impl ==
nullptr)
1091 NS_FATAL_ERROR(
"You tried to set Timer arguments incompatible with its function.");
1094 impl->SetArguments(a1);
1097 template <
typename T1,
typename T2>
1104 auto impl =
dynamic_cast<TimerImplBase*
>(
this);
1105 if (impl ==
nullptr)
1107 NS_FATAL_ERROR(
"You tried to set Timer arguments incompatible with its function.");
1110 impl->SetArguments(a1, a2);
1113 template <
typename T1,
typename T2,
typename T3>
1121 auto impl =
dynamic_cast<TimerImplBase*
>(
this);
1122 if (impl ==
nullptr)
1124 NS_FATAL_ERROR(
"You tried to set Timer arguments incompatible with its function.");
1127 impl->SetArguments(a1, a2, a3);
1130 template <
typename T1,
typename T2,
typename T3,
typename T4>
1139 auto impl =
dynamic_cast<TimerImplBase*
>(
this);
1140 if (impl ==
nullptr)
1142 NS_FATAL_ERROR(
"You tried to set Timer arguments incompatible with its function.");
1145 impl->SetArguments(a1, a2, a3, a4);
1148 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
1158 auto impl =
dynamic_cast<TimerImplBase*
>(
this);
1159 if (impl ==
nullptr)
1161 NS_FATAL_ERROR(
"You tried to set Timer arguments incompatible with its function.");
1164 impl->SetArguments(a1, a2, a3, a4, a5);
1167 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
1178 auto impl =
dynamic_cast<TimerImplBase*
>(
this);
1181 NS_FATAL_ERROR(
"You tried to set Timer arguments incompatible with its function.");
1184 impl->SetArguments(a1, a2, a3, a4, a5, a6);
An identifier for simulation events.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Simulation virtual time values and global simulation resolution.
The timer implementation underlying Timer and Watchdog.
void SetArgs(T1 a1)
Set the arguments to be used when invoking the expire function.
virtual ~TimerImpl()
Destructor.
virtual void Invoke()=0
Invoke the expire function.
virtual EventId Schedule(const Time &delay)=0
Schedule the callback for a future time.
NS_FATAL_x macro definitions.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
TimerImpl * MakeTimerImpl(FN fn)
Make a TimerImpl from a function pointer taking varying numbers of arguments.
ns3::IntToType template class.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Simulator declaration.
Convert an integer into a type.
TimerImpl specialization class for varying numbers of arguments.
virtual void SetArguments(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)=0
Bind the arguments to be used when the callback function is invoked.
TimerImpl specialization class for varying numbers of arguments.
virtual void SetArguments(T1 a1, T2 a2, T3 a3, T4 a4)=0
Bind the arguments to be used when the callback function is invoked.
static T & GetReference(T *p)
Convert a pointer type to a reference.
Helper for the MakeTimerImpl functions which take a class method.
TimerImpl specialization class for varying numbers of arguments.
virtual void SetArguments(T1 a1)=0
Bind the arguments to be used when the callback function is invoked.
TimerImpl specialization class for varying numbers of arguments.
virtual void SetArguments(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)=0
Bind the arguments to be used when the callback function is invoked.
TimerImpl specialization class for varying numbers of arguments.
virtual void SetArguments(T1 a1, T2 a2, T3 a3)=0
Bind the arguments to be used when the callback function is invoked.
TimerImpl specialization class for varying numbers of arguments.
virtual void SetArguments(T1 a1, T2 a2)=0
Bind the arguments to be used when the callback function is invoked.
Type and reference traits for TimerImpl arguments.
TypeTraits< typename TypeTraits< T >::ReferencedType >::NonConstType StoredType
Storage type for an argument.
const StoredType & ParameterType
Parameter type for an argument.
Inspect a type to deduce its features.
ns3::TypeTraits introspection declaration and template implementation.