Refuse empty Space Packet views in add_packet()
The add_packet(const sp_view &) overloads of uslp_vc_tx and uslp_cop_vc_tx accepted a default-constructed sp_view: they started a frame, counted the packet as streamed and returned packet_pack_status::complete although nothing was packed.
Return error::invalid_state for a view that wraps no packet before changing any state, as the add_packet(const sp &) overloads already do for an empty container.
Signed-off-by: dzourn dzourn@gmail.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Open Space Data Link Protocol (OSDLP)
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/newfree), ensuring deterministic execution, hard real-time safety, and bounded memory usage on resource-constrained microcontrollers.Supported Standards
Key Features
etl::vector,etl::span, etc.).std::span/etl::span, designated initializers, and type-safe bitstream readers/writers.*_view) to inspect headers and extract payloads in-place directly from DMA / transceiver ring buffers.Getting Started
Prerequisites
Cloning the Repository
Because OSDLP utilizes ETL and submodules for documentation assets, clone with
--recursive:If already cloned, initialize submodules with:
Building
Configure and build with CMake:
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_CACHEto 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:Cross-Language Interoperability (spacepackets)
The suite in
test/interop/checks OSDLP against the latest release of the Python spacepackets library and runs as part ofctest. The same suite can be run with OSDLP cross-compiled and executed underqemu-user, to cover 32-bit and big-endian targets:Mission Control Interoperability (Yamcs)
OSDLP includes an automated end-to-end mission control verification suite against Yamcs located in
test/yamcs/: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.Code Coverage
OSDLP supports code coverage reports using
gcovr: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:
https://librespacefoundation.gitlab.io/osdlp/<branch>/Building Documentation Locally
OSDLP uses Doxygen with the Doxygen Awesome theme to generate clean API reference documentation locally:
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-formatandcmake-format.Before submitting merge requests, format your code or verify formatting:
Community and Contact
OSDLP is maintained by the Libre Space Foundation.
License
© 2016-2026 Libre Space Foundation.
Licensed under the GNU General Public License v3.0 (GPLv3).