Crate spacepackets

source ·
Expand description

CCSDS and ECSS packet standards implementations

This crate contains generic implementations for various CCSDS (Consultative Committee for Space Data Systems) and ECSS (European Cooperation for Space Standardization) packet standards. Currently, this includes the following components:

Features

spacepackets supports various runtime environments and is also suitable for no_std environments.

It also offers optional support for serde. This allows serializing and deserializing them with an appropriate serde provider like postcard.

Default features

  • std: Enables functionality relying on the standard library.
  • alloc: Enables features which operate on containers like alloc::vec::Vec. Enabled by the std feature.

Optional features

  • serde: Adds serde support for most types by adding Serialize and Deserialize derives

Module

This module contains helpers and data structures to generate Space Packets according to the CCSDS 133.0-B-2. This includes the SpHeader class to generate the Space Packet Header component common to all space packets.

Example

use spacepackets::SpHeader;
let sp_header = SpHeader::tc_unseg(0x42, 12, 1).expect("Error creating CCSDS TC header");
println!("{:?}", sp_header);
let mut ccsds_buf: [u8; 32] = [0; 32];
sp_header.write_to_be_bytes(&mut ccsds_buf).expect("Writing CCSDS TC header failed");
println!("{:x?}", &ccsds_buf[0..6]);

Modules

Structs

  • Abstraction for the CCSDS Packet ID, which forms the last thirteen bits of the first two bytes in the CCSDS primary header.
  • Abstraction for the CCSDS Packet Sequence Control (PSC) field which is the third and the fourth byte in the CCSDS primary header.
  • Space Packet Primary Header according to CCSDS 133.0-B-2.

Enums

Constants

Traits

Functions