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:
- Space Packet implementation according to CCSDS Blue Book 133.0-B-2
- PUS Telecommand and PUS Telemetry implementation according to the ECSS-E-ST-70-41C standard.
- CUC (CCSDS Unsegmented Time Code) implementation according to CCSDS 301.0-B-4 3.2
- CDS (CCSDS Day Segmented Time Code) implementation according to CCSDS 301.0-B-4 3.3
- Some helper types to support ASCII timecodes ad specified in CCSDS 301.0-B-4 3.5
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 likealloc::vec::Vec. Enabled by thestdfeature.
Optional features
serde: Addsserdesupport for most types by addingSerializeandDeserializederives
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
Constants
Traits
Generic trait to access fields of a CCSDS space packet header according to CCSDS 133.0-B-2.