F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
WatchdogTimer.hpp
Go to the documentation of this file.
1#ifndef _WatchdogTimer_hpp_
2#define _WatchdogTimer_hpp_
3
4#include <FpConfig.hpp>
5
6namespace Os {
8 public:
9
10 typedef enum {
16
17 typedef void (*WatchdogCb)(void *);
18
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 );
30
31
33
34 void expire();
35
36 private:
37
38 I32 m_handle;
39 WatchdogCb m_cb;
40 void* m_parameter;
41 I32 m_timerTicks;
42 I32 m_timerMs;
44
45 };
46}
47
48#endif
C++-compatible configuration header for fprime configuration.
WatchdogStatus startMs(I32 delayInMs, WatchdogCb p_callback, void *parameter)
WatchdogStatus startTicks(I32 delayInTicks, WatchdogCb p_callback, void *parameter)
void(* WatchdogCb)(void *)
@ WATCHDOG_INIT_ERROR
Timer initialization failed.
@ WATCHDOG_OK
Call was successful.
@ WATCHDOG_CANCEL_ERROR
Timer cancellation failed.
@ WATCHDOG_START_ERROR
Timer startup failed.
WatchdogStatus restart()
restart timer with previous value
WatchdogStatus cancel()
cancel timer
void expire()
Invoke the callback function with m_parameter.
Definition File.cpp:6