Myrddin Dundragon eb0e531d3a Fixed some bit shifting.
I was shifting before masking because I had been using a larger mask,
u16. Now it masks then shifts because I had changed it to being a u8
mask for each section.
2025-11-14 20:03:50 -05:00
2025-11-14 20:01:51 -05:00
2025-11-14 20:03:50 -05:00
2025-05-31 15:08:30 -04:00
2025-05-31 15:08:30 -04:00
2025-05-31 15:08:30 -04:00
2025-11-14 20:01:51 -05:00
2025-11-14 20:01:51 -05:00

ccsds_spp

A no_std, heapless Rust implementation of the CCSDS Space Packet Protocol, suitable for embedded and real-time systems.

This library is intended for use in satellite software, space simulation, and telemetry/telecommand tooling. It is designed to be robust, portable, and usable in constrained environments. No allocator required.


Features

  • no_std compatible
  • Heapless: works in memory-constrained environments
  • Bit-accurate parsing and encoding
  • FromBits / IntoBits traits for masked operations
  • CCSDS-compliant Version, PacketType, APID support
  • Designed for integration into embedded systems or FFI-safe libraries

Example

use ccsds_space_packet::{PacketHeader, PacketType, Version, ApId};

let mut header = PacketHeader { data: [0u8; 6] };

header.set_version(Version::One);
header.set_packet_type(PacketType::Telemetry);
header.set_ap_id(ApId::from(42));

assert_eq!(header.get_version(), Version::One);
assert_eq!(header.get_packet_type(), PacketType::Telemetry);
assert_eq!(u16::from(header.get_ap_id()), 42);

Design Notes

This is a work in progress.

Focus is on correctness and portability over performance for now.

Library avoids panics where possible and returns Result<T, &str> for error handling.

References


Copyright 2025 CyberMages LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this library except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS

Description
CCSDS Space Packet Protocol
Readme 675 KiB
Languages
Rust 100%