|
|
## The Frame Class
|
|
|
Data is synchronised and organised into discrete frames that are represented by a `Frame` class. This page outlines the requirements and chosen design for this class since it is central to the entire system
|
|
|
|
|
|
Data is synchronised and organised into discrete frames that are represented by a `Frame` class. |
|
|
\ No newline at end of file |
|
|
### Requirements
|
|
|
Each frame is involved in a number of stages within the system, these are:
|
|
|
1. Formation
|
|
|
2. Transmitting
|
|
|
3. Receiving
|
|
|
4. Modifying Pipelines
|
|
|
5. Read-only Pipelines
|
|
|
|
|
|
A frame consists of a potentially large number of channels with diverse but mostly known data types. Each frame has a unique ID and an associated timestamp.
|
|
|
|
|
|
Question: Does a frame really ever become read-only? The same frame cannot be received twice and can only move in one direction through the stream. Therefore it can be modified for the next pipeline stage but cannot be sent back or be re-transmitted. A check might be that the timestamp must be newer than than any previously sent or received frame timestamp before that frame is allowed to be sent through a stream? Timestamps must be readonly after frame construction.
|
|
|
|
|
|
Some feed pipelines generate `Frame` callbacks when frames are received. Perhaps these must also provide and output frame into which new data can be written? However, it might be that the output is to a different frame or frameset. Instead require a call to `makeFrame` inside a `Feed` class, or similar, to provide a new frame object that will be posted once complete. A call to `flush` will post it and prevent a second post, although not prevent further modification.
|
|
|
|
|
|
Hence the following is true:
|
|
|
* Need a `Feed` class to manage the creation of `Frame`s.
|
|
|
* Frames can only be flushed once to transmit.
|
|
|
* Flushed status applies to received frames, these are effectively already flushed.
|
|
|
|
|
|
Question: How does a persistent state mechanism work? |
|
|
\ No newline at end of file |