Skip to content

CCSDS Protocol Functionality

References

Overview

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.

Space Packet Protocol

The Space Packet layer provides application-level packet framing per CCSDS 133.0-B-2:

  • Space Packet Framer — Constructs CCSDS Space Packets from user data. Each packet is assigned an Application Process Identifier (APID) and a sequence count for tracking.
  • Space Packet Deframer — Extracts and validates received Space Packets, verifying the packet structure and sequence counts to detect dropped or out-of-order packets.

APID Management

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. To add project-specific data types with their own APIDs, see the Add Custom Uplink and Downlink Data Types guide.

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 frame data field is delivered complete by the upstream ComAggregator, which is configured per instance with the aggregate size (ComCcsdsConfig.Aggregator.aggregationSize, Svc.Ccsds.TmDataFieldSize by default) and fills any residual space with a Space Packet Idle Packet before the data reaches any intermediate layer such as SDLS encryption. When packet spanning is enabled in the upstream ComAggregator (ComCcsdsConfig.Aggregator.enablePacketSpanning), Space Packets may span consecutive TM Transfer Frames and the First Header Pointer in each frame locates the first packet header, per 132.0-B-3 section 4.1.2.7.6; spanning is disabled by default. Enabling it requires a ground deframer that reassembles spanned packets using the First Header Pointer.

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:

  • CcsdsSdlsFramer — Delegates encryption of outgoing data and prepends the SA index to build the SDLS frame (downlink).
  • CcsdsSdlsDeframer — Extracts the SA index from incoming frames and delegates decryption (uplink).
  • SdlsSaRouter — Routes encryption/decryption requests to downstream crypto components based on the SA index.
  • SdlsFileKeyManager — Supplies encryption keys read from a configured file.
  • ClearTextEncryptor / ClearTextDecryptor — Pass-through default crypto components (no security); the defaults selected by the Svc.ComCcsdsSdls subtopology configuration.
  • AesGcmEncryptor / AesGcmDecryptor — AES-256-GCM authenticated encryption (OpenSSL 3.x), producing/consuming an IV (12) | ciphertext | MAC (16) security payload with the VC and SA index authenticated as additional data. The decryptor reports a failed MAC check as MAC_VERIFICATION_FAILURE, distinct from DECRYPTION_FAILURE. Each frame's 28-byte overhead must be subtracted from ComCcsdsConfig.Aggregator.aggregationSize (see the Svc.ComCcsdsSdls SDD).

Protocol Layering

The CCSDS components can be stacked to provide multiple protocol layers. A typical downlink path might be: data source → Space Packet Framer → ComAggregator → TM Framer → byte stream driver (the TM Framer requires complete, idle-filled data fields from Svc.ComAggregator). A typical uplink path: byte stream driver → Frame Accumulator → TC Deframer → Space Packet Deframer → Router. The optional SDLS layer sits between the aggregator and the transfer frame layer on downlink, and between the transfer frame layer and the Space Packet layer on uplink (see the Svc.ComCcsdsSdls subtopology). The modular design allows missions to select the specific protocol layers they require.

Unsupported Features

The current CCSDS implementation does not support:

  • Multiple Virtual Channel Identifiers (VCIDs) — only a single VCID is available per TM Framer or TC Deframer instance.

Off Nominal

  • Malformed frames or packets are rejected with diagnostic events.
  • Sequence count mismatches indicate dropped or reordered packets and are reported via events. The onboard sequence count is synchronized to the received value and processing continues.
  • CRC or checksum failures cause the affected frame to be dropped.