Back to Fprime

Svc::Ccsds::SpacePacketFramer

Svc/Ccsds/SpacePacketFramer/docs/sdd.md

4.2.24.1 KB
Original Source

Svc::Ccsds::SpacePacketFramer

The Svc::Ccsds::SpacePacketFramer is an implementation of the FramerInterface for the CCSDS Space Packet Protocol.

It receives user data on its input port and constructs a CCSDS Space Packet. Please refer to the CCSDS Space Packet Protocol specification (CCSDS 133.0-B-2) for details on the packet format.

The Svc::Ccsds::SpacePacketFramer is typically used upstream of a component that adds transfer frame headers, such as the Svc::Ccsds::TmFramer. It encapsulates user data into a Space Packet, adding the necessary header fields.

Configuration

The Svc::Ccsds::SpacePacketFramer requires an Application Process Identifier (APID) for the Space Packets it generates. This APID is typically provided during instantiation or configuration. It also uses a sequence count, which is managed per APID via the getApidSeqCount port.

CCSDS Header Fields

For each Space Packet generated, the Svc::Ccsds::SpacePacketFramer will populate the CCSDS Space Packet Primary Header fields as follows:

FieldValueNotes
Version Number000As per protocol 4.1.3.2
Packet Type0 (Telemetry)SpacePacketFramer emits reporting packets only (no commanding), as per 4.1.3.3.2
Secondary Header Flag0F Prime does not use secondary headers formally
Application Process Identifier (APID)Uses value passed in the context argumentProject APIDs are defined in config/ComCfg.fpp
Sequence Flags0b11 (Unsegmented)Unsegmented user data, F´ data fits in a single packet
Packet Sequence CountIncremented for each packet, unique count per APIDManaged externally by a Svc::Ccsds::ApidManager
Packet Data LengthSet to the length of the passed in dataCalculated based on the length of the data received on dataIn

Port Descriptions

KindNamePort TypeDescription
Input (sync)dataInSvc.ComDataWithContextPort to receive user data to be framed into a Space Packet
OutputdataOutSvc.ComDataWithContextPort to output the constructed Space Packet
OutputbufferAllocateFw.BufferGetPort to allocate buffers for the outgoing Space Packet
OutputbufferDeallocateFw.BufferSendPort to deallocate buffers after the Space Packet is sent
OutputgetApidSeqCountCcsds.ApidSequenceCountPort to retrieve the current sequence count for a given APID

Requirements

NameDescriptionValidation
SPF-001The SpacePacketFramer shall implement the Svc.FramerInterface.Inspection, Unit Test
SPF-002The SpacePacketFramer shall construct CCSDS Space Packets compliant with the CCSDS 133.0-B-2 standard.Unit Test, Inspection
SPF-003The SpacePacketFramer shall accept user data to be framed via its dataIn port.Unit Test
SPF-004The SpacePacketFramer shall output the constructed Space Packet via its dataOut port.Unit Test
SPF-005The SpacePacketFramer shall use the bufferAllocate port to request memory buffers for outgoing Space Packets.Unit Test
SPF-006The SpacePacketFramer shall use the bufferDeallocate port to return ownership of buffers after transmission.Unit Test
SPF-007The SpacePacketFramer shall utilize the getApidSeqCount port to obtain the correct sequence count for the configured APID before framing a packet.Unit Test
SPF-008The SpacePacketFramer shall correctly populate all mandatory fields of the Space Packet Primary Header, including Version Number, Packet Type, Secondary Header Flag, APID, Sequence Flags, Packet Sequence Count, and Packet Data Length.Unit Test
SPF-009The SpacePacketFramer shall be configurable with an Application Process Identifier (APID) to be used in the Space Packet Header.Inspection, Unit Test
SPF-010The SpacePacketFramer shall accurately calculate and set the Packet Data Length field in the Space Packet header based on the length of the user data.Unit Test