F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Os::WatchdogTimer Class Reference

#include <Os/WatchdogTimer.hpp>

Public Types

enum  WatchdogStatus { WATCHDOG_OK , WATCHDOG_INIT_ERROR , WATCHDOG_START_ERROR , WATCHDOG_CANCEL_ERROR }
 
typedef void(* WatchdogCb) (void *)
 

Public Member Functions

 WatchdogTimer ()
 
virtual ~WatchdogTimer ()
 
WatchdogStatus startTicks (I32 delayInTicks, WatchdogCb p_callback, void *parameter)
 
WatchdogStatus startMs (I32 delayInMs, WatchdogCb p_callback, void *parameter)
 
WatchdogStatus restart ()
 restart timer with previous value More...
 
WatchdogStatus cancel ()
 cancel timer More...
 
void expire ()
 Invoke the callback function with m_parameter. More...
 

Detailed Description

Definition at line 7 of file WatchdogTimer.hpp.

Member Typedef Documentation

◆ WatchdogCb

typedef void(* Os::WatchdogTimer::WatchdogCb) (void *)

Definition at line 17 of file WatchdogTimer.hpp.

Member Enumeration Documentation

◆ WatchdogStatus

Enumerator
WATCHDOG_OK 

Call was successful.

WATCHDOG_INIT_ERROR 

Timer initialization failed.

WATCHDOG_START_ERROR 

Timer startup failed.

WATCHDOG_CANCEL_ERROR 

Timer cancellation failed.

Definition at line 10 of file WatchdogTimer.hpp.

Constructor & Destructor Documentation

◆ WatchdogTimer()

Os::WatchdogTimer::WatchdogTimer ( )

Definition at line 6 of file WatchdogTimer.cpp.

◆ ~WatchdogTimer()

Os::WatchdogTimer::~WatchdogTimer ( )
virtual

Definition at line 11 of file WatchdogTimer.cpp.

Member Function Documentation

◆ cancel()

WatchdogTimer::WatchdogStatus Os::WatchdogTimer::cancel ( )

cancel timer

Definition at line 26 of file WatchdogTimer.cpp.

◆ expire()

void Os::WatchdogTimer::expire ( )

Invoke the callback function with m_parameter.

Definition at line 30 of file WatchdogTimer.cpp.

◆ restart()

WatchdogTimer::WatchdogStatus Os::WatchdogTimer::restart ( )

restart timer with previous value

Definition at line 22 of file WatchdogTimer.cpp.

◆ startMs()

WatchdogTimer::WatchdogStatus Os::WatchdogTimer::startMs ( I32  delayInMs,
WatchdogCb  p_callback,
void *  parameter 
)
Parameters
delayInMsnumber of ms to delay.
p_callbackroutine to call on time-out
parameterparameter with which to call routine

Definition at line 18 of file WatchdogTimer.cpp.

◆ startTicks()

WatchdogTimer::WatchdogStatus Os::WatchdogTimer::startTicks ( I32  delayInTicks,
WatchdogCb  p_callback,
void *  parameter 
)
Parameters
delayInTicksnumber of ticks to delay. OS/timing dependent
p_callbackroutine to call on time-out
parameterparameter with which to call routine

Definition at line 14 of file WatchdogTimer.cpp.


The documentation for this class was generated from the following files: