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

Common definitions and helpers required to create PUS TMTC packets according to ECSS-E-ST-70-41C
This module contains all components required to create a ECSS PUS C telecommand packets according to ECSS-E-ST-70-41C.
CCSDS Time Code Formats according to CCSDS 301.0-B-4
This module contains all components required to create a ECSS PUS C telemetry packets according to ECSS-E-ST-70-41C.

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

CCSDS packet type enumeration.

Constants

Traits

Generic trait to access fields of a CCSDS space packet header according to CCSDS 133.0-B-2.

Functions