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_fsou.c File Reference

Implementation of the optional FSOU output-permission OSAdapter seam (ADR-041). More...

Include dependency graph for rte_fsou.c:

Go to the source code of this file.

Macros

#define RTE_FSOU_LOG_TAG   "FSOU"

Functions

rte_status_t rte_osadapter_fsou_register (const rte_osadapter_fsou_t *adapter)
 Registers the OSAdapter FSOU implementation (REQ-FSOU-001).
rte_status_t rte_fsou_grant (uint32_t cycle_id)
 Grants this channel's output permission to the FSOU for one cycle (REQ-FSOU-002).
rte_status_t rte_fsou_revoke (rte_safestate_reason_t reason)
 Withdraws this channel's output permission from the FSOU (REQ-FSOU-002).
bool rte_fsou_is_present (void)
 Tells whether an FSOU OSAdapter is registered.
void rte_fsou_report_presence (void)
 Logs once whether an FSOU is present (REQ-FSOU-003).

Variables

static const rte_osadapter_fsou_t * s_osadapter = NULL

Detailed Description

Implementation of the optional FSOU output-permission OSAdapter seam (ADR-041).

Definition in file rte_fsou.c.

Macro Definition Documentation

◆ RTE_FSOU_LOG_TAG

#define RTE_FSOU_LOG_TAG   "FSOU"

Local makros Log tag of this module.

Definition at line 14 of file rte_fsou.c.

Function Documentation

◆ rte_osadapter_fsou_register()

rte_status_t rte_osadapter_fsou_register ( const rte_osadapter_fsou_t * adapter)

Registers the OSAdapter FSOU implementation (REQ-FSOU-001).

Global variables declarations Local function declarations Global functions

Setup-only (ADR-026): refused once the application's setup phase is locked.

Parameters
adapterPointer to the FSOU operations vtable. Must stay valid for the life of the process.
Returns
RTE_STATUS_OK on success; RTE_STATUS_INVALID_PARAM if adapter is NULL; RTE_STATUS_INVALID_STATE if the setup phase is locked (the previous registration, if any, is kept).

Definition at line 29 of file rte_fsou.c.

Variable Documentation

◆ s_osadapter

const rte_osadapter_fsou_t* s_osadapter = NULL
static

Local types declarations Local variables declarations Single global OSAdapter, following ADR-005's established convention. NULL until rte_osadapter_fsou_register() is called; NULL means no FSOU.

Definition at line 21 of file rte_fsou.c.