docs/reference/system-functional/ccsds-protocol.md
F Prime provides components implementing the Consultative Committee for Space Data Systems (CCSDS) protocols for missions requiring standards-compliant space communication. These components plug into the communication stack in place of (or alongside) the default F Prime protocol components, providing CCSDS-standard framing at multiple protocol layers. The implementation covers the Space Packet Protocol, TM and TC Space Data Link protocols, and the AOS Space Data Link protocol.
The Space Packet layer provides application-level packet framing per CCSDS 133.0-B-2:
The APID Manager tracks per-APID sequence counts for both outgoing and incoming Space Packets. It provides incrementing sequence counts to the Space Packet Framer for each APID and validates received sequence counts in the Space Packet Deframer to detect packet loss.
By default, APIDs are assigned based on the F Prime data descriptor type (commands, telemetry, events, files, packetized telemetry). Missions requiring custom APID assignments can replace the default APID Manager component with a project-specific implementation.
The TM Framer implements the CCSDS Telemetry (TM) Space Data Link Protocol (132.0-B-3) for downlink. It wraps payload data (such as Space Packets) into TM Transfer Frames for transmission over the space link. The current implementation supports a single Virtual Channel Identifier (VCID).
The TC Deframer implements the CCSDS Telecommand (TC) Space Data Link Protocol (232.0-B-4) for uplink. It extracts payload data from received TC Transfer Frames.
The AOS Framer implements the CCSDS Advanced Orbiting Systems (AOS) Space Data Link Protocol (732.0-B-5). AOS provides an alternative to TM for missions requiring more flexible virtual channel management.
An optional SDLS layer provides per-frame encryption and decryption keyed by a 16-bit security association (SA) index:
The CCSDS components can be stacked to provide multiple protocol layers. A typical downlink path might be: data source → Space Packet Framer → TM Framer → byte stream driver. A typical uplink path: byte stream driver → Frame Accumulator → TC Deframer → Space Packet Deframer → Router. The optional SDLS layer sits between the Space Packet layer and the transfer frame layer in both directions (see the Svc.ComCcsdsSdls subtopology). The modular design allows missions to select the specific protocol layers they require.
The current CCSDS implementation does not support: