IPC API Reference#

Overview#

This module provides ipc for the SCORE Time Synchronization system.

Namespace: score_time::ipc#

ShmRegion#

class score_time::ipc::ShmRegion#

RAII wrapper for POSIX shared memory regions Manages lifecycle of shared memory objects (/dev/shm on Linux, shared memory objects on QNX) with automatic cleanup. Uses shm_open + mmap for portable POSIX shared memory access. Features: - RAII: Automatically unmaps and closes on destruction - Move-only: Prevents accidental copies of memory mappings - Create-or-open semantics for both producer and consumer - Size validation for safety Typical Usage: - Producer (tsyncd): Open with create_or_open=true, writes SharedState - Consumer (clients): Open with create_or_open=false, reads SharedState

Defined in: shm_region.hpp

Examples#

See the test files for usage examples:

  • Unit tests: tests/cpp/

  • Integration tests: tests/integration/