Expand description
Provides functionality to create, encode, and decode Space Packet Protocol packets specified by the CCSDS 133.0-B-2 June 2020 Standard.
General Usage:
use ccsds_rs::spp::{SpacePacket, PacketType, SequenceFlag};
// Define user specified data.
let my_payload = "Hello, world!".as_bytes().to_vec();
// Generate SpacePacket
let my_space_packet = SpacePacket::new(
PacketType::Telecommand,
false,
67,
SequenceFlag::Unsegmented,
0,
my_payload // User data (includes secondary header if used)
);
// Encode SpacePacket as vector of bytes for transmission
let encoded = my_space_packet.encode();
// Do something with space packet....
// Decoding a space packet.
let decoded = SpacePacket::decode(&encoded)
.expect("Failed to decode SpacePacket!");
Structs§
- Primary
Header - Primary Header used in the Space Packet Protocol.
- Space
Packet - SPP Packet as defined by the CCSDS 133.0-B-2 Standard.
Enums§
- Error
- Enum protraying various errors encountered during decoding of PrimaryHeader and SpacePacket.
- Packet
Type - Indicates if the SpacePacket packet is of the Telemetry or Telecommand type.
- Sequence
Flag - Sequence flag indicating if the packet is the start, end, or continuation in a sequence of SpacePackets, or is the packet is unsegmented.