Back to Fprime

Svc::Ccsds::TcDeframer

Svc/Ccsds/TcDeframer/docs/sdd.md

4.2.24.1 KB
Original Source

Svc::Ccsds::TcDeframer

The Svc::Ccsds::TcDeframer is an implementation of the DeframerInterface for the CCSDS TC Space Data Link Protocol.

It receives payload data (such as a Space Packet or a VCA_SDU) on input and produces a TC frame on its output port as a result. Please refer to the CCSDS TC specification (CCSDS 232.0-B-4) for details on the frame format and protocol.

The Svc::Ccsds::TcDeframer is designed to work in the common F Prime telemetry stack, receiving data from a Communications Adapter or the Svc::FrameAccumulator, for deframing and transmission to the rest of the system. It is commonly coupled with the Svc::Ccsds::SpacePacketDeframer to unwrap CCSDS Space Packets from TC frames.

The TcDeframer currently functions only in the "Expedited Service" mode, for Type-B Frames. This means that should Type-A frames be received, no FARM checks would be performed on board.

Configuration

The TcDeframer component can be configured with a specific Virtual Channel ID (VCID) and Spacecraft ID. By default, it uses the spacecraft ID from config/ComCfg.fpp and accepts all VCIDs.

cpp
void configure(U16 vcId, U16 spacecraftId, bool acceptAllVcid);
  • vcId: The virtual channel ID to accept. This is only used if acceptAllVcid is false.
  • spacecraftId: The spacecraft ID to accept.
  • acceptAllVcid: If true, the deframer accepts all VCIDs. If false, it only accepts the vcId specified.

Port Descriptions

KindNamePort TypeDescription
Input (guarded)dataInSvc.ComDataWithContextPort to receive framed data
OutputdataOutSvc.ComDataWithContextPort to output deframed data
OutputdataReturnOutSvc.ComDataWithContextPort for returning ownership of received buffers to deframe
Input (sync)dataReturnInSvc.ComDataWithContextPort receiving back ownership of sent buffers
OutputerrorNotifyCcsds.ErrorNotifyPort to send notification of deframing errors

Events

NameSeverityDescription
InvalidSpacecraftIdwarning lowDeframing received an invalid SCID
InvalidFrameLengthwarning highDeframing received an invalid frame length
InvalidVcIdactivity lowDeframing received an invalid VCID
InvalidCrcwarning highDeframing received an invalid checksum

Requirements

NameDescriptionValidation
SVC-CCSDS-TC-DEFRAMER-001The TcDeframer shall deframe Telecommand (TC) Transfer Frames according to the CCSDS Space Data Link Protocol standard for Type-BD frames.Unit Test, Inspection
SVC-CCSDS-TC-DEFRAMER-002The TcDeframer shall perform Frame Validation Check Procedures, including Spacecraft ID, Virtual Channel ID, Frame Length, and CRC.Unit Test
SVC-CCSDS-TC-DEFRAMER-003The TcDeframer shall be configurable for a specific Spacecraft ID.Unit Test, Inspection
SVC-CCSDS-TC-DEFRAMER-004The TcDeframer shall be configurable with a specific Virtual Channel ID (VCID) OR to accept all VCIDs.Unit Test, Inspection
SVC-CCSDS-TC-DEFRAMER-005The TcDeframer shall log an InvalidSpacecraftId event if a frame with an unexpected Spacecraft ID is received.Unit Test
SVC-CCSDS-TC-DEFRAMER-006The TcDeframer shall log an InvalidFrameLength event if a frame with an invalid length is received.Unit Test
SVC-CCSDS-TC-DEFRAMER-007The TcDeframer shall log an InvalidVcId event if a frame with an unexpected VCID is received (when not configured to accept all VCIDs).Unit Test
SVC-CCSDS-TC-DEFRAMER-008The TcDeframer shall log an InvalidCrc event if a frame fails the CRC check.Unit Test
SVC-CCSDS-TC-DEFRAMER-009The TcDeframer shall provide an input port (dataIn) to receive framed data, and emit deframed data packets on its dataOut output port.Unit Test
SVC-CCSDS-TC-DEFRAMER-010The TcDeframer shall emit notifications on its errorNotify port when deframing errors occur.Unit Test