F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WatchdogTimer.hpp
Go to the documentation of this file.
1 #ifndef _WatchdogTimer_hpp_
2 #define _WatchdogTimer_hpp_
3 
5 
6 namespace Os {
7  class WatchdogTimer {
8  public:
9 
10  typedef enum {
16 
17  typedef void (*WatchdogCb)(void *);
18 
19  WatchdogTimer();
20  virtual ~WatchdogTimer();
21  WatchdogStatus startTicks( I32 delayInTicks,
22  WatchdogCb p_callback,
23  void* parameter);
24 
25  WatchdogStatus startMs( I32 delayInMs,
26  WatchdogCb p_callback,
27  void* parameter);
28 
29  WatchdogStatus restart(void);
30 
31 
32  WatchdogStatus cancel(void);
33 
34 
35  private:
36 
37  I32 m_handle;
38  WatchdogCb m_cb;
39  void* m_parameter;
40  I32 m_timerTicks;
41  I32 m_timerMs;
43 
44  };
45 }
46 
47 #endif
Os
Definition: File.cpp:7
Os::WatchdogTimer::WatchdogStatus
WatchdogStatus
Definition: WatchdogTimer.hpp:10
Os::WatchdogTimer::~WatchdogTimer
virtual ~WatchdogTimer()
Definition: WatchdogTimer.cpp:10
Os::WatchdogTimer::restart
WatchdogStatus restart(void)
restart timer with previous value
Definition: WatchdogTimer.cpp:21
Os::WatchdogTimer::WATCHDOG_START_ERROR
@ WATCHDOG_START_ERROR
Timer startup failed.
Definition: WatchdogTimer.hpp:13
Os::WatchdogTimer::WatchdogTimer
WatchdogTimer()
Definition: WatchdogTimer.cpp:5
Os::WatchdogTimer::WATCHDOG_CANCEL_ERROR
@ WATCHDOG_CANCEL_ERROR
Timer cancellation failed.
Definition: WatchdogTimer.hpp:14
Os::WatchdogTimer::WatchdogCb
void(* WatchdogCb)(void *)
Definition: WatchdogTimer.hpp:17
Os::WatchdogTimer::WATCHDOG_INIT_ERROR
@ WATCHDOG_INIT_ERROR
Timer initialization failed.
Definition: WatchdogTimer.hpp:12
Os::WatchdogTimer::startMs
WatchdogStatus startMs(I32 delayInMs, WatchdogCb p_callback, void *parameter)
parameter with which to call routine);
Definition: WatchdogTimer.cpp:17
Os::WatchdogTimer::WATCHDOG_OK
@ WATCHDOG_OK
Call was successful.
Definition: WatchdogTimer.hpp:11
BasicTypes.hpp
Declares ISF basic types.
Os::WatchdogTimer::startTicks
WatchdogStatus startTicks(I32 delayInTicks, WatchdogCb p_callback, void *parameter)
parameter with which to call routine);
Definition: WatchdogTimer.cpp:13
Os::WatchdogTimer::cancel
WatchdogStatus cancel(void)
cancel timer
Definition: WatchdogTimer.cpp:25
Os::WatchdogTimer
Definition: WatchdogTimer.hpp:7