|
Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
Files | |
| file | src/oal/fsou/rte_fsou.c |
| Implementation of the optional FSOU output-permission OSAdapter seam (ADR-041). | |
Functions | |
| 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). | |
REQ-FSOU-001: rte_osadapter_fsou_register() shall reject a NULL adapter with RTE_STATUS_INVALID_PARAM and shall be setup-only (RTE_STATUS_INVALID_STATE once the setup phase is locked). REQ-FSOU-002: rte_fsou_grant() and rte_fsou_revoke() shall return RTE_STATUS_NOT_INITIALIZED if no OSAdapter is registered, RTE_STATUS_NOT_SUPPORTED if the registered OSAdapter's slot is NULL, and otherwise the OSAdapter's own status. REQ-FSOU-003: rte_fsou_report_presence() shall log whether an FSOU OSAdapter is registered exactly once per process; later calls log nothing.
| 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).
| cycle_id | Cycle the permission is for (the cycle whose checkpoint returned OK, ADR-041). |
Definition at line 52 of file rte_fsou.c.
| rte_status_t rte_fsou_revoke | ( | rte_safestate_reason_t | reason | ) |
Withdraws this channel's output permission from the FSOU (REQ-FSOU-002).
| reason | Why the permission is withdrawn (same codes as rte_safestate_enter()). |
Definition at line 73 of file rte_fsou.c.
| bool rte_fsou_is_present | ( | void | ) |
Tells whether an FSOU OSAdapter is registered.
Definition at line 94 of file rte_fsou.c.
| void rte_fsou_report_presence | ( | void | ) |
Logs once whether an FSOU is present (REQ-FSOU-003).
The first call logs "FSOU present" or "no FSOU registered" (rte_log, INFO, tag "FSOU") and latches; every later call logs nothing. Intended caller: the integrator's init, after OSAdapter registration, single-threaded.
Latch: true once the presence line was logged (block scope, MISRA rule 8.9).
Definition at line 99 of file rte_fsou.c.