a very simple watchdog More...
#include <watchdog.h>
 Collaboration diagram for ns3::Watchdog:
 Collaboration diagram for ns3::Watchdog:| Public Member Functions | |
| Watchdog () | |
| ~Watchdog () | |
| void | Ping (Time delay) | 
| template<typename T1 > | |
| void | SetArguments (T1 a1) | 
| template<typename T1 , typename T2 > | |
| void | SetArguments (T1 a1, T2 a2) | 
| template<typename T1 , typename T2 , typename T3 > | |
| void | SetArguments (T1 a1, T2 a2, T3 a3) | 
| template<typename T1 , typename T2 , typename T3 , typename T4 > | |
| void | SetArguments (T1 a1, T2 a2, T3 a3, T4 a4) | 
| template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
| void | SetArguments (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) | 
| template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > | |
| void | SetArguments (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) | 
| template<typename FN > | |
| void | SetFunction (FN fn) | 
| template<typename MEM_PTR , typename OBJ_PTR > | |
| void | SetFunction (MEM_PTR memPtr, OBJ_PTR objPtr) | 
| Private Member Functions | |
| void | Expire (void) | 
| Private Attributes | |
| Time | m_end | 
| EventId | m_event | 
| TimerImpl * | m_impl | 
a very simple watchdog
If you don't ping the watchdog sufficiently often, it triggers its listening function.
Definition at line 37 of file watchdog.h.
| ns3::Watchdog::Watchdog | ( | ) | 
Definition at line 27 of file watchdog.cc.
References NS_LOG_FUNCTION_NOARGS.
| ns3::Watchdog::~Watchdog | ( | ) | 
Definition at line 35 of file watchdog.cc.
References m_impl, and NS_LOG_FUNCTION.
| 
 | private | 
Definition at line 55 of file watchdog.cc.
References ns3::TimerImpl::Invoke(), m_end, m_event, m_impl, ns3::Now(), ns3::Simulator::Now(), NS_LOG_FUNCTION, and ns3::Simulator::Schedule().
Referenced by Ping().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::Watchdog::Ping | ( | Time | delay | ) | 
| delay | the watchdog delay | 
After a call to this method, the watchdog will not be triggered until the delay specified has been expired. This operation is sometimes named "re-arming" a watchdog in some operating systems.
Definition at line 42 of file watchdog.cc.
References Expire(), ns3::EventId::IsRunning(), m_end, m_event, ns3::Now(), ns3::Simulator::Now(), NS_LOG_FUNCTION, and ns3::Simulator::Schedule().
Referenced by WatchdogTestCase::DoRun().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::Watchdog::SetArguments | ( | T1 | a1 | ) | 
| a1 | the first argument | 
Store this argument in this Timer for later use by Timer::Schedule.
Definition at line 159 of file watchdog.h.
References m_impl, NS_FATAL_ERROR, and ns3::TimerImpl::SetArgs().
Referenced by WatchdogTestCase::DoRun().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::Watchdog::SetArguments | ( | T1 | a1, | 
| T2 | a2 | ||
| ) | 
| a1 | the first argument | 
| a2 | the second argument | 
Store these arguments in this Timer for later use by Timer::Schedule.
Definition at line 170 of file watchdog.h.
References m_impl, NS_FATAL_ERROR, and ns3::TimerImpl::SetArgs().
 Here is the call graph for this function:
 Here is the call graph for this function:| void ns3::Watchdog::SetArguments | ( | T1 | a1, | 
| T2 | a2, | ||
| T3 | a3 | ||
| ) | 
| a1 | the first argument | 
| a2 | the second argument | 
| a3 | the third argument | 
Store these arguments in this Timer for later use by Timer::Schedule.
Definition at line 182 of file watchdog.h.
References m_impl, NS_FATAL_ERROR, and ns3::TimerImpl::SetArgs().
 Here is the call graph for this function:
 Here is the call graph for this function:| void ns3::Watchdog::SetArguments | ( | T1 | a1, | 
| T2 | a2, | ||
| T3 | a3, | ||
| T4 | a4 | ||
| ) | 
| a1 | the first argument | 
| a2 | the second argument | 
| a3 | the third argument | 
| a4 | the fourth argument | 
Store these arguments in this Timer for later use by Timer::Schedule.
Definition at line 194 of file watchdog.h.
References m_impl, NS_FATAL_ERROR, and ns3::TimerImpl::SetArgs().
 Here is the call graph for this function:
 Here is the call graph for this function:| void ns3::Watchdog::SetArguments | ( | T1 | a1, | 
| T2 | a2, | ||
| T3 | a3, | ||
| T4 | a4, | ||
| T5 | a5 | ||
| ) | 
| a1 | the first argument | 
| a2 | the second argument | 
| a3 | the third argument | 
| a4 | the fourth argument | 
| a5 | the fifth argument | 
Store these arguments in this Timer for later use by Timer::Schedule.
Definition at line 206 of file watchdog.h.
References m_impl, NS_FATAL_ERROR, and ns3::TimerImpl::SetArgs().
 Here is the call graph for this function:
 Here is the call graph for this function:| void ns3::Watchdog::SetArguments | ( | T1 | a1, | 
| T2 | a2, | ||
| T3 | a3, | ||
| T4 | a4, | ||
| T5 | a5, | ||
| T6 | a6 | ||
| ) | 
| a1 | the first argument | 
| a2 | the second argument | 
| a3 | the third argument | 
| a4 | the fourth argument | 
| a5 | the fifth argument | 
| a6 | the sixth argument | 
Store these arguments in this Timer for later use by Timer::Schedule.
Definition at line 218 of file watchdog.h.
References m_impl, NS_FATAL_ERROR, and ns3::TimerImpl::SetArgs().
 Here is the call graph for this function:
 Here is the call graph for this function:| void ns3::Watchdog::SetFunction | ( | FN | fn | ) | 
| fn | the function | 
Store this function in this Timer for later use by Timer::Schedule.
Definition at line 144 of file watchdog.h.
References m_impl, and ns3::MakeTimerImpl().
Referenced by WatchdogTestCase::DoRun().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::Watchdog::SetFunction | ( | MEM_PTR | memPtr, | 
| OBJ_PTR | objPtr | ||
| ) | 
| memPtr | the member function pointer | 
| objPtr | the pointer to object | 
Store this function and object in this Timer for later use by Timer::Schedule.
Definition at line 151 of file watchdog.h.
References m_impl, and ns3::MakeTimerImpl().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | private | 
Definition at line 132 of file watchdog.h.
| 
 | private | 
Definition at line 131 of file watchdog.h.
| 
 | private | 
Definition at line 130 of file watchdog.h.
Referenced by Expire(), SetArguments(), SetFunction(), and ~Watchdog().