目录

Open Space Data Link Protocol (OSDLP)

pipeline status coverage report documentation standard license

OSDLP is a modern, OS/RTOS-agnostic C++20 library implementing the Consultative Committee for Space Data Systems (CCSDS) space data link protocols and recommendations.

The library is specifically engineered for high-reliability spaceflight avionics and embedded satellite systems. By leveraging the Embedded Template Library (ETL), OSDLP operates with zero dynamic memory allocation (malloc/new free), ensuring deterministic execution, hard real-time safety, and bounded memory usage on resource-constrained microcontrollers.


Supported Standards

Recommendation Standard Title Status
CCSDS 732.1-B-3 Unified Space Link Protocol (USLP) Supported
CCSDS 133.0-B-2 Space Packet Protocol (SPP) Supported
CCSDS 232.1-B-2 Communications Operation Procedure-1 (COP-1 / FARM-1 & FOP-1) Supported
CCSDS 301.0-B-4 Time Code Formats (CUC & CDS) Supported
CCSDS 232.0-B-4 TC Space Data Link Protocol (CLCW & Control Commands) Supported (CLCW & COP-1 Commands)
CCSDS 727.0-B-5 CCSDS File Delivery Protocol (CFDP) Partial (PDU encoding & decoding, checksums)
CCSDS 355.0-B-2 Space Data Link Security Protocol (SDLS) Supported (over USLP, integrator-supplied cryptography)
CCSDS 355.1-B-1 SDLS Extended Procedures Partial (Frame Security Report)

Design Choice: It is an intentional design decision that the legacy CCSDS TC (CCSDS 232.0-B-4) and TM (CCSDS 132.0-B-3) framing protocols are not covered, as they are superseded by the Unified Space Link Protocol (USLP, CCSDS 732.1-B-3). USLP provides unified bidirectional frame transfer while retaining full compatibility with COP-1 and Space Packets.


Key Features

  • Strict Zero Dynamic Memory Allocation: No heap usage. All container bounds, buffers, and protocol limits are compile-time configured or passed as bounded spans via ETL (etl::vector, etl::span, etc.).
  • RTOS & Architecture Agnostic: Seamlessly integrates with Zephyr RTOS, FreeRTOS, RTEMS, or bare-metal setups across ARM Cortex-M, RISC-V, and host systems.
  • Modern C++20 Ergonomics: Utilizes standard concepts, std::span / etl::span, designated initializers, and type-safe bitstream readers/writers.
  • Pluggable Link Security: SDLS over USLP with cryptography supplied by the integrator through C++20 concepts, so each mission can use hardware accelerators or the algorithms it chooses. Reference providers for OpenSSL and Mbed TLS are tested against published test vectors.
  • Zero-Copy Views: High-throughput non-owning frame and packet views (*_view) to inspect headers and extract payloads in-place directly from DMA / transceiver ring buffers.

Getting Started

Prerequisites

  • CMake ≥\ge 3.20
  • C++20 compliant compiler (GCC ≥\ge 11, Clang ≥\ge 13)
  • Git
  • OpenSSL 3, for the unit tests only

Cloning the Repository

Because OSDLP utilizes ETL and submodules for documentation assets, clone with --recursive:

git clone --recursive https://gitlab.com/librespacefoundation/osdlp.git
cd osdlp

If already cloned, initialize submodules with:

git submodule update --init --recursive

Building

Configure and build with CMake:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

Running Tests

The SDLS tests check OSDLP against two reference crypto providers: OpenSSL 3, which must be installed, and the PSA Crypto API of Mbed TLS 4, which CMake downloads with CPM when configuring, so the first configure needs network access. Set CPM_SOURCE_CACHE to keep the download across build directories. OSDLP itself depends on neither library. To build without the unit tests, configure with -DENABLE_ABI_TESTS=OFF.

Execute the automated test suite with ctest:

ctest --test-dir build --output-on-failure

Cross-Language Interoperability (spacepackets)

The suite in test/interop/ checks OSDLP against the latest release of the Python spacepackets library and runs as part of ctest. The same suite can be run with OSDLP cross-compiled and executed under qemu-user, to cover 32-bit and big-endian targets:

sh test/interop/run_interop.sh --arch armhf  # needs g++-arm-linux-gnueabihf, qemu-user
sh test/interop/run_interop.sh --arch s390x  # needs g++-s390x-linux-gnu, qemu-user

Mission Control Interoperability (Yamcs)

OSDLP includes an automated end-to-end mission control verification suite against Yamcs located in test/yamcs/:

# Run Yamcs interop test via CTest
ctest --test-dir build -R interop_yamcs --output-on-failure

# Or run directly via Python
python3 test/yamcs/test_yamcs_interop.py

# Keep Yamcs running after tests for inspection in Web UI (http://localhost:8090)
python3 test/yamcs/test_yamcs_interop.py --no-terminate

The suite also exchanges SDLS-secured frames with Yamcs in both directions (AES-256-GCM and HMAC-SHA-256). Yamcs 5.13.5 corrupts the COP-1 retransmissions of encrypted telecommand frames, so encrypted uplink retransmissions are not tested; see Section 6 of test/yamcs/README.md.

Note: By default, the test suite automatically starts Yamcs via Docker Compose and terminates the container upon completion. Pass --no-terminate (or set YAMCS_NO_TERMINATE=1) to bypass termination and inspect decoded packets and parameters via the Yamcs Web UI at http://localhost:8090. See test/yamcs/README.md for full details.

Code Coverage

OSDLP supports code coverage reports using gcovr:

# Configure with coverage enabled
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON
cmake --build build

# Run tests and print coverage summary to terminal
cmake --build build --target coverage

# Generate Cobertura XML and HTML reports
cmake --build build --target coverage-cobertura
cmake --build build --target coverage-html

The HTML report will be generated in build/coverage_html/index.html.

Documentation

The complete Doxygen API reference, architectural guides, and CCSDS standard mapping are hosted online via GitLab Pages:

👉 https://librespacefoundation.gitlab.io/osdlp/

Branch-specific documentation is also available:

Building Documentation Locally

OSDLP uses Doxygen with the Doxygen Awesome theme to generate clean API reference documentation locally:

cmake --build build --target docs

The generated HTML documentation will be located in build/docs/html/index.html.


Coding Style & Contribution

OSDLP enforces modern LLVM-based C++ style configured via .clang-format and cmake-format.

Before submitting merge requests, format your code or verify formatting:

# Verify C++ headers and tests
find include -iname '*.hpp' | xargs clang-format --dry-run --style file --Werror -i
find test -iname '*.hpp' -o -iname '*.cpp' | xargs clang-format --dry-run --style file --Werror -i

# Verify CMake files
find . -path ./etl -prune -o -path ./docs/doxygen-awesome-css -prune -o -name 'CMakeLists.txt' -print | xargs cmake-format --check

Community and Contact

OSDLP is maintained by the Libre Space Foundation.


License

Libre Space Foundation

© 2016-2026 Libre Space Foundation.

Licensed under the GNU General Public License v3.0 (GPLv3).

关于

开放空间数据链路协议项目,兼容 CCSDS 标准,提供链路层协议开源实现,帮助立方星团队低成本构建符合国际标准的星地链路。镜像收录自 https://gitlab.com/librespacefoundation/osdlp,License:GPL-3.0

1.6 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号