![]() |
F´ Flight Software - C/C++ Documentation devel
A framework for building embedded system applications to NASA flight quality standards.
|
Svc::DpManager is an active component for managing data products. It does the following:
Fw::Buffer from a buffer manager. Return the buffer to the client component so the component can fill it.Fw::Buffer from a buffer manager. Send the buffer to the client component so the component can fill it.Svc::BufferAccumulator or Svc::DpWriter will process the buffer and then send it back to the buffer manager for deallocation.| Requirement | Description | Rationale | Verification Method |
|---|---|---|---|
| SVC-DPMANAGER-001 | Svc::DpManager shall provide an array of ports for synchronously requesting and receiving data product buffers. | This capability supports the product get port in the auto-generated code for components that define data products. | Unit test |
| SVC-DPMANAGER-002 | Svc::DpManager shall provide arrays of ports for receiving and asynchronously responding to requests for data product buffers. | This capability supports the product request and product recv ports in the auto-generated code for components that define data products. | Unit test |
| SVC-DPMANAGER-003 | Svc::DpManager shall receive data product buffers and forward them for further processing. | This requirement provides a pass-through capability for sending data product buffers to downstream components. Svc::DpManager receives data product input on a port of type Fw::DpSend. This input consists of a container ID and an Fw::Buffer B. Svc::DpManager sends B on a port of type Fw::BufferSend. This port type is used by the standard F Prime components for managing and logging data, e.g., Svc::BufferAccumulator, Svc::DpWriter. | Unit test |
| SVC-DPMANAGER-004 | Svc::DpManager shall provide telemetry that reports the number of successful allocations, the number of failed allocations, and the volume of data handled. | This requirement establishes the telemetry interface for the component. | Unit test |
The diagram below shows the DpManager component.
DpManager has the following ports:
| Kind | Name | Port Type | Usage |
|---|---|---|---|
async input | schedIn | Svc.Sched | Schedule in port |
sync input | productGetIn | [DpManagerNumPorts] Fw.DpGet | Ports for responding to a data product get from a client component |
async input | productRequestIn | [DpManagerNumPorts] Fw.DpRequest | Ports for receiving data product buffer requests from a client component |
output | productResponseOut | [DpManagerNumPorts] Fw.DpResponse | Ports for sending requested data product buffers to a client component |
output | bufferGetOut | [DpManagerNumPorts] Fw.BufferGet | Ports for getting buffers from a Buffer Manager |
async input | productSendIn | [DpManagerNumPorts] Fw.DpSend | Ports for receiving filled data product buffers from a client component |
output | productSendOut | [DpManagerNumPorts] Fw.BufferSend | Ports for sending filled data product buffers to a downstream component |
time get | timeGetOut | Fw.Time | Time get port |
telemetry | tlmOut | Fw.Tlm | Telemetry port |
event | eventOut | Fw.Log | Event port |
text event | textEventOut | Fw.LogText | Text event port |
DpManager maintains the following state:
numSuccessfulAllocations (U32): The number of successful buffer allocations.numFailedAllocations (U32): The number of failed buffer allocations.numDataProducts (U32): The number of data products handled.numBytes (U64): The number of bytes handled.The configuration constant DpManagerNumPorts specifies the number of ports for requesting data product buffers and for sending filled data products.
No special runtime setup is required.
The handler for this port sends out the state variables as telemetry.
This handler receives a port number portNum, a container ID id, a requested buffer size size, and a mutable reference to a buffer B. It does the following:
status = getBuffer(portNum, id, size, B).status.This handler receives a port number portNum, a container ID id and a requested buffer size size. It does the following:
B with an invalid buffer.status = getBuffer(portNum id, size, B).(id, B, status) on port portNum of productResponseOut.This handler receives a port number portNum, a data product ID I and a buffer B. It does the following:
numDataProducts and numBytes.B on port portNum of productSendOut.This function receives a port number portNum, a container ID id, a requested buffer size size, and a mutable reference to a buffer B. It does the following:
status = FAILURE.B = bufferGetOut_out(portNum, size).B is valid, then atomically increment numSuccessfulAllocations and set status = SUCCESS.numFailedAllocations and emit a warning event.status.| Name | Type | Description |
|---|---|---|
NumSuccessfulAllocations | U32 | The number of successful buffer allocations |
NumFailedAllocations | U32 | The number of failed buffer allocations |
NumDataProds | U32 | Number of data products handled |
NumBytes | U32 | Number of bytes handled |
| Name | Severity | Description |
|---|---|---|
BufferAllocationFailed | warning high | Buffer allocation failed |
The following topology diagrams show how to connect Svc::DpManager to a client component, a buffer manager, and a data product writer. The diagrams use the following instances:
bufferManager: An instance of Svc::BufferManager.dpManager: An instance of Svc::DpManager.dpWriter: An instance of Svc::DpWriter.producer: A client component that produces data products. productRequestOut is the special product request port. productRecvIn is the special product recv port.The connections shown use port zero for requesting, receiving, and sending data product buffers. If DpManagerNumPorts is greater than one, then you can also use other ports, e.g., port one or port two. That way you can use one DpManager instance to support multiple sets of connections.