Safe Data API — API Traceability

The implementation half of the traceability chain. Every public API function or macro that names a requirement with Doxygen’s native @satisfies becomes an impl need, generated from the API documentation’s Doxygen XML. Each one is linked satisfies to its requirements in the Requirement Specification, and links to its page in the API reference.

The annotation sits on the declaration’s doc block in include/safe_data/safe_data.h, and only where the requirement names the symbol. Requirements that constrain the whole API rather than one symbol are not tagged; the traceability matrix lists them as not satisfied by a symbol.

Type-Erased Core

Implementation: safe_data_init IMPL-safe_data_init

Function safe_data_init — Initialise the lock and seal the current payload contents.

Declared in: include/safe_data/safe_data.h (line 266)

Implementation: safe_data_verify IMPL-safe_data_verify

Function safe_data_verify — Verify payload integrity. Pure: read-only and lock-free; it NEVER modifies the payload, so it is safe to call concurrently with writers (a transient mismatch may then be reported - callers needing atomicity should use the higher-level helpers).

Declared in: include/safe_data/safe_data.h (line 287)

Implementation: safe_data_verify_repair IMPL-safe_data_verify_repair

Function safe_data_verify_repair — Verify payload integrity and repair a recoverable fault in place.

Declared in: include/safe_data/safe_data.h (line 313)

Implementation: safe_data_read IMPL-safe_data_read

Function safe_data_read — Verify under lock and copy the payload out to out.

Declared in: include/safe_data/safe_data.h (line 337)

Implementation: safe_data_write IMPL-safe_data_write

Function safe_data_write — Copy in into the payload under lock and reseal the integrity tag.

Declared in: include/safe_data/safe_data.h (line 363)

Implementation: safe_data_update IMPL-safe_data_update

Function safe_data_update — Atomic read-modify-write: lock, verify, run fn, reseal on success.

Declared in: include/safe_data/safe_data.h (line 393)

Implementation: safe_data_commit IMPL-safe_data_commit
depends_on: defined(CONFIG_SAFE_DATA_ALLOW_UNCHECKED_COMMIT)

Function safe_data_commit — Reseal after an explicit external modification (advanced use). Lock, recompute the integrity tag, unlock.

Depends on: defined(CONFIG_SAFE_DATA_ALLOW_UNCHECKED_COMMIT)

Declared in: include/safe_data/safe_data.h (line 423)

Diagnostics and Fault Handling

Implementation: safe_data_fault_handler_register IMPL-safe_data_fault_handler_register
satisfies: SD-REQ-013

Function safe_data_fault_handler_register — Register the fault handler callback.

Declared in: include/safe_data/safe_data.h (line 164)

Implementation: safe_data_fault_handler IMPL-safe_data_fault_handler
satisfies: SD-REQ-011

Function safe_data_fault_handler — Legacy user-overridable (weak) fault handler.

Declared in: include/safe_data/safe_data.h (line 180)

Implementation: safe_data_stats_get IMPL-safe_data_stats_get

Function safe_data_stats_get — Snapshot the global statistics.

Declared in: include/safe_data/safe_data.h (line 207)

Implementation: safe_data_selftest IMPL-safe_data_selftest
depends_on: defined(CONFIG_SAFE_DATA_SELFTEST)
satisfies: SD-REQ-017

Function safe_data_selftest — Self-test of the integrity mechanism itself.

Depends on: defined(CONFIG_SAFE_DATA_SELFTEST)

Declared in: include/safe_data/safe_data.h (line 225)

Containers and Typed Access

Implementation: SAFE_CONTAINER_DEFINE IMPL-SAFE_CONTAINER_DEFINE
satisfies: SD-REQ-019

Define SAFE_CONTAINER_DEFINE — Declare a CRC-protected container type wrapping _payload_type.

Declared in: include/safe_data/safe_data.h (line 523)

Implementation: SAFE_COMMIT IMPL-SAFE_COMMIT
depends_on: defined(CONFIG_SAFE_DATA_ALLOW_UNCHECKED_COMMIT)
satisfies: SD-REQ-020

Define SAFE_COMMIT — Reseal after an explicit external modification.

Depends on: defined(CONFIG_SAFE_DATA_ALLOW_UNCHECKED_COMMIT)

Declared in: include/safe_data/safe_data.h (line 616)

Implementation: SAFE_SECTION IMPL-SAFE_SECTION
depends_on: defined(CONFIG_SAFE_DATA_GNU_EXTENSIONS)

Define SAFE_SECTION — Scoped lock + verify … reseal + unlock around a block.

Depends on: defined(CONFIG_SAFE_DATA_GNU_EXTENSIONS)

Declared in: include/safe_data/safe_data.h (line 663)