F Prime Data Products #1154
Replies: 9 comments 1 reply
-
A few features we may want to consider in the future (some discussed already):
|
Beta Was this translation helpful? Give feedback.
-
Personally, I have never experimented with F Prime components manipulating blobs (text, log, video, audio files... or even a file system) because my embedded software never has file systems. Who knows, maybe one day? Your feature, on the other hand, is interesting and well thought out, and it seems to meet one of your internal needs. In that case, it would be interesting to implement what you describe, but I don't have enough expertise to judge it properly at the moment. |
Beta Was this translation helpful? Give feedback.
-
Given that container is of predefined size, consider adding attribute overflow_policy to tag container with at least 3 possible values: WRAP_ON_OVERFLOW, OVERWRITE_LAST_ON_OVERFLOW, DROP_ON_OVERFLOW. |
Beta Was this translation helpful? Give feedback.
-
Addtions: Notion of quotas per DPID |
Beta Was this translation helpful? Give feedback.
-
Some updated discussions:
|
Beta Was this translation helpful? Give feedback.
-
Some more ideas: Upon activation, the Add the notion of Dp metadata in the container header - the user could have (two?) U32 fields with arbitrary values to inform the ground about the content (say, "flight1, image12"). That could be part of the catalog listing DP. |
Beta Was this translation helpful? Give feedback.
-
Add some ports to
|
Beta Was this translation helpful? Give feedback.
-
The current design on the FSW side is documented here: https://github.com/bocchino/fprime/blob/data-products/docs/Design/data-products.md. |
Beta Was this translation helpful? Give feedback.
-
Add a command to |
Beta Was this translation helpful? Give feedback.
-
Introduction
F Prime currently supports the download of generated files via the
Svc/FileDownlink
component. The files can have any structure desired by users, and are opaque to the ground system. Developers are required to write their own file decoders to access the contents. In addition, users must add explicit download commands to sequences, which can have typos and fail due to unknows file sizes and telecom windows. A feature to improve this would be the concept of Data Products.Data Products
Data Products would have the following features:
They would be structured. This means that they would have a typed representation described by the F Prime domain specific language (XML for the prototype, FPP for the final). This specification would allow the ground system and tools to decode them without manual implementation of tools. The ground system will provide a default text decoder, but would also allow users to override with a custom script. The data products will have a unique packet descriptor similar to other downlinked data like telemetry and events.
They would have multiple records. A data product could have multiple records in the generated file that are requested at run-time. This allows the storage of large generated data sets that whose size of may not be knowable until the activity is executed.
They would have a runtime specified priority. A generated data product would have a priority assigned to it that would allow the data product management system to prioritize the downlink of the set of data products currently on board.
The products will have containers. Containers are the objects that have a priority assigned. The container can hold any number of data product records of different types. This allows the collection of data to be managed as a unit for downloading and subsequent deletion.
The products and containers will be component-centric. Components will specify their own sets of containers and data products.
The containers and products will become new entries in the ground system dictionary.
Specification
The following is the proposed XML representation for data products:
component
import_serializable_type
products
container
id
name
default_priority
record
id
name
type
Port Types
The following new ports will be defined for data products:
Fw/DpRequestPortAi.xml
- output port from component to request a data product bufferFw/DpSupplyPortAi.xml
- input port to component to supply a buffer for filling with data productsFw/DpWritePortAi.xml
- output port to send filled bufferComponent Functions
The code generator will supply the following base class functions:
Dp_Request(ContainerIdEnum id, U32 size)
This will request a buffer to fill with data product records.
The
ContainerIdEnum
type is a generated enumeration of the name IDs that are part of the container specification. For the above example, it would look like:The
size
argument should be the max size in bytes of the buffer. This would consist of multiplying the size of the individual record by the number of records that the user intends to store in the buffer. For serialized types, the size would be the SERIALIZED_SIZE constant in the serializable header file, while built-in types could usesizeof
.The autocoder will generate a virtual function:
Dp_Write_handler(ContainerIdEnum id, Fw::Buffer& buffer)
This will supply a copy of
Fw::Buffer
. The user can then serialize the number of records of the data structure to the buffer.Dp_SerializeRecord_DataEntry(Fw::Buffer& buffer, const Somespace::Data& record);
This serializes a particular record. It is called as many times as necessary to fill the size requested.
Dp_WriteProduct(ContainerIdEnum id, Fw::Buffer& buffer);
This function will send the buffer back to the component writing the DP.
New Components
Diagrams to come...
DpWriter
DpWriter
will do the following:1) Service requests for DP Buffers (
DpRequest
port)2) Call
Svc::BufferManager
to request buffers3) Call
DpSupply
port to send buffer to component4) Receive the buffer filled with data products
5) Time-tag product generation (user will have to time-tag entries if needed)
6) Send the buffer out a
Fw::BufferSend
port. This can be connected toSvc::BufferAccumulator
orSvc::BufferLogger
depending on the use case. They are expected to send it back to the sourcingBufferManager
when done.DpCatalog
DpCatalog
will do the following:1) Upon initialization, read the DP directory and build a catalog of products
2) When commanded, start downloading based on priority and other TBD criterion (date? size?)
3) Manage deletion of data products (commands or file list)
4) Generate DP listings for download (file? self-defined DP?)
New Ground System work
1) Provide decoder for DPs based on new dictionary entries. Default would be text, but allow users to supply their own custom based on DP ID.
2) Provide download status views for GUI.
3) Provide view that shows current listings from
DpCatalog
listings.Please add any comments below...
Beta Was this translation helpful? Give feedback.
All reactions