NCP is a small, deterministic network + transport layer library for CubeSat onboard communication. It provides:
- Node addressing (8-bit Node IDs)
- Port-based service demultiplexing
- Static routing table
- End-to-end packet CRC
- Policy hooks (private node protection, broadcast allowlist, etc.)
- Link abstraction (CAN / UART-framed / RS485 / RF gateways) via a simple read/write frame interface
- Health counters for FDIR and debugging
The core is platform-agnostic C++17. Platform adapters (e.g., Linux SocketCAN, STM32 HAL CAN/FDCAN) live under platform/ and are built as separate targets to keep HAL/OS dependencies out of the core.
-
include/
Public headers for core NCP + stable link APIs (include/links/...) -
src/
Core implementation (no OS/HAL includes) -
platform/
Platform-specific link adapters (Linux, STM32, etc.) -
tests/
Unit tests (pure, no kernel modules required) -
examples/
Small runnable programs for platform bring-up (e.g., SocketCAN demo)
NCP exposes only three build options:
-
NCP_BUILD_TESTS(default: ON)
Build unit tests. -
NCP_PLATFORM_LINUX(default: OFF)
Build Linux platform adapters (e.g., SocketCAN). -
NCP_PLATFORM_STM32(default: OFF)
Build STM32 platform adapters (e.g., HAL CAN/FDCAN) — implementation may be added later.
cmake -S . -B build
cmake --build build -jcmake -S . -B build -DNCP_PLATFORM_LINUX=ON -DNCP_BUILD_TESTS=OFF
cmake --build build -j