Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_watchdog_t Struct Reference

Watchdog handle (opaque). More...

Collaboration diagram for sapi_watchdog_t:
[legend]

Data Fields

uint8_t in_use
uint8_t active
uint8_t fired
sapi_watchdog_config_t config
sapi_timestamp_ms_t deadline_ms
sapi_timestamp_ms_t last_kick_ms
uint32_t kicks
uint32_t fires
uint32_t recoveries

Detailed Description

Watchdog handle (opaque).

One pool slot's full state. The public sapi_watchdog_t handle is a pointer to one of these slots. This module owns the storage itself (a static pool), unlike most other OAL services in this framework, which take caller-owned storage via SAFEAPI_DECLARE_STORAGE - sapi_watchdog.h's own documented API (sapi_watchdog_create() takes only a config and returns a handle from an implicit "manager", with no caller-storage parameter anywhere in its signature or its own doc examples) was written against a pool-owned design from the start; this implementation follows that, rather than silently changing the public API's contract.

Definition at line 48 of file sapi_watchdog.c.

Field Documentation

◆ in_use

uint8_t sapi_watchdog_t::in_use

1 if this pool slot is allocated to a live watchdog.

Definition at line 50 of file sapi_watchdog.c.

◆ active

uint8_t sapi_watchdog_t::active

1 if counting down (started and not stopped).

Definition at line 51 of file sapi_watchdog.c.

◆ fired

uint8_t sapi_watchdog_t::fired

Fired and not yet restarted via start().

Definition at line 52 of file sapi_watchdog.c.

◆ config

sapi_watchdog_config_t sapi_watchdog_t::config

Configuration this watchdog was created with.

Definition at line 53 of file sapi_watchdog.c.

◆ deadline_ms

sapi_timestamp_ms_t sapi_watchdog_t::deadline_ms

Absolute time at which this watchdog next fires.

Definition at line 54 of file sapi_watchdog.c.

◆ last_kick_ms

sapi_timestamp_ms_t sapi_watchdog_t::last_kick_ms

Absolute time of the most recent kick/start.

Definition at line 55 of file sapi_watchdog.c.

◆ kicks

uint32_t sapi_watchdog_t::kicks

Total number of successful kicks.

Definition at line 56 of file sapi_watchdog.c.

◆ fires

uint32_t sapi_watchdog_t::fires

Total number of times this watchdog has fired.

Definition at line 57 of file sapi_watchdog.c.

◆ recoveries

uint32_t sapi_watchdog_t::recoveries

Total number of recovery actions dispatched.

Definition at line 58 of file sapi_watchdog.c.


The documentation for this struct was generated from the following file: