Svc/FprimeFramer/docs/sdd.md
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.
It is designed to receive packets from a Svc::ComQueue and passes frames to a Communications Adapter, such as a Radio manager component or Svc::ComStub, for transmission on the wire.
The Svc::FprimeFramer component is used in the uplink stack of many reference F´ application such as the tutorials source code.
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:
outBuffer (of type Fw::Buffer) to hold the F´ frame, of size size(dataPacket) + size(FprimeHeader) + size(FprimeTrailer)0xDEADBEEF) and length token (size(dataPacket)) into outBufferoutBufferoutBufferoutBuffer on the dataOut output port. Ownership of outBuffer is handed to the receiverdataPacket to the dataReturnOut port. This usually should be connected to the same component that sent the original packet to dataIn.| 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 | dataReturnIn | Svc.ComDataWithContext | Port to receive back ownership of buffer sent out of dataOut |
output | dataReturnOut | Svc.ComDataWithContext | Port to return ownership of buffer received on dataIn |
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 |
| 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 |
| SVC-FPRIME_FRAMER-004 | Svc::FprimeFramer shall pass through all Fw.SuccessCondition received on comStatusIn to comStatusOut | Unit Test |