Accessing data from a stream
Since data is the main ingredient in Simband, and streams are the main flavor of that data, the streams API is a single point of producing or consuming data in Simband.
The streams API is used by the Simband applications, the Simsense driver, the validation tools and any installable algorithm.
This API is available in the file
vobio.h, and is made to be fully IPC. The IO API is divided into the following categories:
System APIs will allow developers to interact with the Simband runtime—e.g., register their algorithms in the system, run them, stop them.
Data access APIs will enable algorithms to access or produce data into Simband. The function
vobio_send() is the main function to produce data into Simband.
vobio_get_timestamps() allow reading existing data in Simband based on a time period.
vobio_get_samples_from() are more powerful APIs where developers can define a time to access or produce data from specific streams.
vobio_receiver_create() is the most basic way to handle Simband streams. You receive a callback with a data array when another client has produced data.
Though this is a simple API, using it effectively in algorithms requires a basic understanding of how the original streams are going to send their data.
Clock allows accessing the data using a data-driven clock, or time-gate. Unlike the regular wall-clock, a data-driven clock only "ticks" when data is available in all the streams that were used to create that clock.
When using large amounts of data for live analysis, a buffer enables an efficient way of continuously reading that data. Use of buffer is effective and reuses the memory more efficiently.
Some of the buffer APIs:
Discovery and Metadata
These APIs allow accessing the stream registry, providing information about the stream's metadata. This allows an algorithm developer to discover which streams are actually available on the system, and use that information to plug into the right streams.
Some discovery and metadata APIs: