Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
rte_watchdog.h File Reference

Watchdog mechanism for detecting system/task hang conditions. More...

Include dependency graph for rte_watchdog.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rte_watchdog_config_t
 Watchdog configuration. More...
struct  rte_watchdog_status_t
 Watchdog health/status information. More...

Enumerations

enum  rte_watchdog_type_t { RTE_WATCHDOG_SYSTEM , RTE_WATCHDOG_TASK , RTE_WATCHDOG_CHANNEL , RTE_WATCHDOG_CHECKPOINT }
 Watchdog type. More...
enum  rte_watchdog_action_t {
  RTE_WATCHDOG_ACTION_LOG , RTE_WATCHDOG_ACTION_SAFESTATE , RTE_WATCHDOG_ACTION_REBOOT , RTE_WATCHDOG_ACTION_FAILOVER ,
  RTE_WATCHDOG_ACTION_CUSTOM
}
 Recovery action when watchdog fires. More...

Functions

rte_status_t rte_watchdog_create (rte_watchdog_t *handle_out, const rte_watchdog_config_t *config)
 Create a watchdog.
rte_status_t rte_watchdog_start (rte_watchdog_t watchdog)
 Start watchdog timer.
rte_status_t rte_watchdog_stop (rte_watchdog_t watchdog)
 Stop watchdog timer.
rte_status_t rte_watchdog_kick (rte_watchdog_t watchdog)
 Kick (pet) watchdog - prove liveness.
rte_status_t rte_watchdog_get_status (rte_watchdog_t watchdog, rte_watchdog_status_t *status_out)
 Get watchdog status.
rte_status_t rte_watchdog_destroy (rte_watchdog_t watchdog)
 Destroy watchdog.
rte_status_t rte_watchdog_manager_initialize (void)
 Initialize watchdog manager (call once at startup).
rte_status_t rte_watchdog_manager_shutdown (void)
 Shutdown watchdog manager (call once at shutdown).
void rte_watchdog_timeout_handler (uint32_t watchdog_id)
 Watchdog timeout handler (INTERNAL - called by framework).
void rte_watchdog_timer_tick (void)
 Poll all active watchdogs for expiry (call periodically).

Detailed Description

Watchdog mechanism for detecting system/task hang conditions.

Provides system-level, task-level, and channel-level watchdog timers that detect hung components and trigger recovery actions (log, safe-state, reboot, failover, or a custom callback). Implemented as a fixed-size static pool, timed via rte_timer_now() - see src/watchdog/rte_watchdog.c and rte_watchdog_timer_tick()'s own doc for how expiry is detected (poll-driven, not an OS-specific interrupt of its own).

Definition in file rte_watchdog.h.