Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
Log Module - Architecture
  • Ring buffer logging. Fixed storage, circular writes. When full, oldest
  • entries overwritten. Never allocates.

Ring Buffer

  • Fixed-size buffer tracks write position. On overflow, wraps and overwrites
  • oldest entries. Preserves recent history.

Entry Format

  • [timestamp:4][level:1][message_len:2][message:N]
  • Compact format for bounded storage.

Retrieval

  • sapi_log_read() - Read most recent entries
  • Access NVM/flash via backend for persistence.
  • */