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_timer.h File Reference

OS Abstraction Layer - Timer service. More...

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

Go to the source code of this file.

Data Structures

struct  rte_timer_config_t
 Configuration for rte_timer_create(). More...

Typedefs

typedef struct rte_timer_impl_s * rte_timer_handle_t
typedef void(*) rte_timer_callback_t(rte_timer_handle_t handle, void *user_ctx)
 Signature for a timer expiry callback.

Enumerations

enum  rte_timer_mode_t { RTE_TIMER_MODE_ONE_SHOT = 0 , RTE_TIMER_MODE_PERIODIC = 1 }
 Whether a timer fires once or repeatedly every period_ms. More...

Functions

 RTE_DECLARE_STORAGE (rte_timer_storage_t, 64U)
rte_status_t rte_timer_create (rte_timer_storage_t *storage, const rte_timer_config_t *config, rte_timer_handle_t *out_handle)
 Creates a timer bound to caller-owned storage. Does not start it.
rte_status_t rte_timer_start (rte_timer_handle_t handle)
 Starts (or restarts) a created timer.
rte_status_t rte_timer_stop (rte_timer_handle_t handle)
 Stops a running timer; safe to call on an already-stopped timer.
rte_status_t rte_timer_destroy (rte_timer_handle_t handle)
 Destroys a timer, releasing any OSAdapter resources bound to it.
rte_status_t rte_timer_now (rte_timestamp_ms_t *out_now_ms)
 Returns the current monotonic time base used by all timers.

Detailed Description

OS Abstraction Layer - Timer service.

Provides one-shot and periodic timers with millisecond resolution for deadline supervision (e.g. ERTMS movement authority timeouts, cyclic task watchdogs). See ADR-001.

REQ-OAL-TIMER-001: no dynamic allocation; caller supplies storage. REQ-OAL-TIMER-002: callback execution time is the caller's responsibility to bound; the timer service itself must not block.

Definition in file rte_timer.h.