Skip to content

Svc::FprimeFramer

The Svc::FprimeFramer is an implementation of the FramerInterface for the F Prime protocol.

It receives data (an F´ packet) on input and produces an F´ frame on its output port as a result. Please refer to the F Prime frame specification for details on the frame format.

Diagrams

Below is the common configuration in which the Svc::FprimeFramer can be used. It is receiving packets from a Svc::ComQueue and passes frames to a Communications Adapter, such as a Radio manager component (or a Svc::ComStub), for transmission.

./img/framer-topology.png

Internals

The Svc::FprimeFramer receives data packets of type Svc.ComDataWithContext. This type contains both a Fw::Buffer containing the packet data, and a context: FrameContext that contains contextual information about the data packet (such as an APID). In the default configuration (using Svc::ComQueue), the context is used to determine whether a packet is coming from the ComQueue's Fw::Buffer queue (as opposed to ComPacket queue). If it is, the original data packet Fw::Buffer is returned back to its original sender.

On receiving a data packet, the Svc::FprimeFramer performs the following actions:

  1. Allocates a new outBuffer (of type Fw::Buffer) to hold the F´ frame, of size size(dataPacket) + size(FprimeHeader) + size(FprimeTrailer)
  2. Serializes the F´ start word (0xDEADBEEF) and length token (size(dataPacket)) into outBuffer
  3. Serializes the F´ packet data into outBuffer
  4. Computes and serializes a CRC32 checksum into outBuffer
  5. Emits the outBuffer on the dataOut output port. Ownership of outBuffer is handed to the receiver
  6. Transfer ownership of input dataPacket to the dataReturnOut port. This usually should be connected to the same component that sent the original packet to dataIn.

Port Descriptions

Kind Name Port Type Usage
guarded input dataIn Svc.ComDataWithContext Port to receive data to frame, in a Fw::Buffer with optional context
output dataOut Svc.ComDataWithContext Port to output framed data, with optional context, for follow-up framing
sync input comStatusIn Fw.SuccessCondition Port receiving the general status from the downstream component
output comStatusOut Fw.SuccessCondition Port receiving indicating the status of framer for receiving more data

Requirements

Name Description Validation
SVC-FPRIME_FRAMER-001 Svc::FprimeFramer shall accept data buffers (packets) stored in Fw::Buffer through its dataIn input port Unit Test
SVC-FPRIME_FRAMER-002 Svc::FprimeFramer shall emit one F Prime frame on its framedOut output port for each packet received on dataIn input port Unit Test
SVC-FPRIME_FRAMER-003 Svc::FprimeFramer shall emit F Prime frames that conforms to the F´ frame specification Unit Test