|
Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
Minimal layer providing single entry point: rte_reboot_request(reason). Integrator registers platform-specific OSAdapter via rte_osadapter_reboot_register(). No dynamic allocation; single OSAdapter pointer storage.
Requests controlled system restart. Does not return on success (CPU resets).
Registers platform-specific reboot implementation. Called at startup.
OSAdapter implements platform-specific reset mechanism:
rte_reboot_request(reason)
│
└─ Retrieve registered OSAdapter
├─ If no OSAdapter: return NOT_INITIALIZED
└─ If has OSAdapter: call osadapter->request(reason)
│
├─ On success: CPU resets (no return)
└─ On failure: return error code
16-bit reason code identifies why reboot requested. OSAdapter can:
Reason code is osadapter-interpreted; framework defines none.
Single static OSAdapter pointer. No allocation. Minimal state:
osadapter_ptr: NULL or pointer to rte_osadapter_reboot_t
✓ No dynamic allocation ✓ Single responsibility (request only) ✓ Function pointer via struct (vtable pattern) ✓ No global function pointers