F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
|
This build module defines FPP ports and C++ classes that support the collection and storage of data products. For more information on data products and records, see the data products documentation.
The following types and constants are configurable via the file config/DpCfg.fpp
:
Name | Kind | Description |
---|---|---|
Fw::DpCfg::ProcType | Type | The enumeration type that defines the bit mask for selecting a type of processing. The processing is applied to a container before writing it to disk. |
Fw::DpCfg::CONTAINER_USER_DATA_SIZE | Constant | The size of the user-configurable data in the container packet header. |
This build module defines the following FPP types:
DpState
: An enumeration describing the state of a data product.This build module defines the following FPP ports:
DpGet
: A port for synchronously getting a buffer to back a data product container.DpRequest
: A port for sending a request for a buffer to back a data product container.DpResponse
: A port for receiving a response to a buffer request.DpSend
: A port for sending a buffer holding data products.For more information, see the file Dp.fpp
in the parent directory.
This module defines a C++ class DpContainer
. DpContainer
is the base class for a data product container. When you specify a container C in an FPP component model, the auto-generated C++ for the component defines a container class for C. The container class is derived from DpContainer
. It provides all the generic operations defined in DpContainer
plus the operations that are specific to C, for example serializing the specific types of data that C can store.
In serialized form, each data product container consists of the following elements: a header, a header hash, data, and a data hash.
The data product header has the following format.
Field Name | Data Type | Serialized Size | Description |
---|---|---|---|
PacketDescriptor | FwPacketDescriptorType | sizeof(FwPacketDescriptorType) | The F Prime packet descriptor FW_PACKET_DP |
Id | FwDpIdType | sizeof(FwDpIdType) | The container ID. This is a system-global ID (component-local ID + component base ID) |
Priority | FwDpPriorityType | sizeof(FwDpPriorityType) | The container priority |
TimeTag | Fw::Time | Fw::Time::SERIALIZED_SIZE | The time tag associated with the container |
ProcTypes | Fw::DpCfg::ProcType::SerialType | sizeof(Fw::DpCfg::ProcType::SerialType) | The processing types, represented as a bit mask |
UserData | Header::UserData | DpCfg::CONTAINER_USER_DATA_SIZE | User-configurable data |
DpState | DpState | DpState::SERIALIZED_SIZE | The data product state |
DataSize | FwSizeType | sizeof(FwSizeStoreType) | The size of the data payload in bytes |
Header::UserData
is an array of U8
of size Fw::DpCfg::CONTAINER_USER_DATA_SIZE
.
The header hash has the following format.
Field Name | Serialized Size | Description |
---|---|---|
Header Hash | `HASH_DIGEST_LENGTH` | The hash value guarding the header. |
The data is a sequence of records. The serialized format of each record R depends on whether R is a single-value record or an array record.
Single-value records: A single-value record is specified in FPP in the form product record
name :
type. The record has name name and represents one item of data of type type. The type may be any FPP type, including a struct or array type. Single-value records with type = T have the following format:
Field Name | Data Type | Serialized Size | Description |
---|---|---|---|
Id | FwDpIdType | sizeof(FwDpIdType) | The record ID |
Data | T | sizeof( _T_) if T is a primitive type; otherwise T::SERIALIZED_SIZE | The serialized data |
Array records: An array record is specified in FPP in the form product record
name :
type array
. The record has name name and represents an array of items of type type. The type may be any FPP type, including a struct or array type. Array records with type = T have the following format:
Field Name | Data Type | Serialized Size | Description |
---|---|---|---|
Id | FwDpIdType | sizeof(FwDpIdType) | The record ID |
Size | FwSizeType | sizeof(FwSizeStoreType) | The number n of elements in the record |
Data | Array of n T | n * [sizeof( _T_) if T is a primitive type; otherwise T::SERIALIZED_SIZE ] | n elements, each of type T |
The data hash has the following format.
Field Name | Serialized Size | Description |
---|---|---|
Data Hash | `HASH_DIGEST_LENGTH` | The hash value guarding the data. |
For more information on the DpContainer
class, see the file DpContainer.hpp
in the parent directory.