Note: to read/write signals see stream assistant
|
LIBED247_EXPORT ed247_status_t | ed247_stream_get_assistant (ed247_stream_t stream, ed247_stream_assistant_t *assistant) |
| Get an assistant to build stream samples based on signals. More...
|
|
LIBED247_EXPORT ed247_status_t | ed247_stream_allocate_sample (ed247_stream_t stream, void **sample_data, uint32_t *sample_size) |
| Allocate a sample to store one stream. More...
|
|
LIBED247_EXPORT ed247_status_t | ed247_stream_free_sample (void *sample_data) |
| Free memory allocated by ed247_stream_allocate_sample(). More...
|
|
LIBED247_EXPORT ed247_status_t | ed247_stream_samples_number (ed247_stream_t stream, ed247_direction_t direction, uint32_t *size) |
| Number of samples in the stream stack. More...
|
|
LIBED247_EXPORT ed247_status_t | ed247_stream_push_sample (ed247_stream_t stream, const void *sample_data, uint32_t sample_data_size, const ed247_timestamp_t *data_timestamp, bool *full) |
| Write and push a single sample in the samples stack of the stream. More...
|
|
LIBED247_EXPORT ed247_status_t | ed247_stream_push_samples (ed247_stream_t stream, const void *samples_data, const uint32_t *samples_size, uint32_t samples_number, const ed247_timestamp_t *data_timestamp, bool *full) |
| Write and push several samples in the samples stack of the stream. More...
|
|
LIBED247_EXPORT ed247_status_t | ed247_stream_pop_sample (ed247_stream_t stream, const void **sample_data, uint32_t *sample_size, const ed247_timestamp_t **data_timestamp, const ed247_timestamp_t **recv_timestamp, const ed247_sample_details_t **sample_details, bool *empty) |
| Pop a sample from stream samples stack. More...
|
|
Get an assistant to build stream samples based on signals.
- Parameters
-
[in] | stream | Stream identifier |
[out] | assistant | Stream assistant |
- Return values
-
ED247_STATUS_SUCCESS | |
ED247_STATUS_FAILURE | When the stream is not signal based |
Allocate a sample to store one stream.
The size of the sample is deducted from the SampleMaxSizeBytes ED247 parameter of the stream.
Memory has to be released with ed247_stream_free_sample().
- Parameters
-
[in] | stream | Stream identifier |
[out] | sample_data | Pointer to the allocated memory |
[out] | sample_size | Size of the memory allocated for the sample |
- Return values
-
ED247_STATUS_SUCCESS | |
ED247_STATUS_FAILURE | |
LIBED247_EXPORT ed247_status_t ed247_stream_free_sample |
( |
void * |
sample_data | ) |
|
Number of samples in the stream stack.
- Parameters
-
[in] | stream | Stream identifier |
[in] | direction | Only ED247_DIRECTION_IN or ED247_DIRECTION_OUT accepted, reference the desired stack to write on |
[out] | size | Number of samples in the stack |
- Return values
-
Write and push a single sample in the samples stack of the stream.
Data will be effectively sent by ed247_send_pushed_samples().
If internal stack is full, the oldest sample will be silently dropped. This is not an error.
- Parameters
-
[in] | stream | Stream identifier |
[in] | sample_data | Sample data to write, copied internally |
[in] | sample_data_size | Size of the sample data to write, in bytes |
[in] | data_timestamp | either NULL or define the data timestamp associated with the sample. |
[out] | full | set to true if the internal stack is full after the push. Set to NULL if not desired. |
- Return values
-
ED247_STATUS_SUCCESS | |
ED247_STATUS_FAILURE | |
Write and push several samples in the samples stack of the stream.
Data will be effectively sent by ed247_send_pushed_samples().
If internal stack is full, the oldest samples will be silently dropped. This is not an error.
- Parameters
-
[in] | stream | Stream identifier |
[in] | samples_data | Array of samples to be pushed |
[in] | samples_size | Array of sample sizes (one size for each sample in samples_data) |
[in] | samples_number | Number of samples to write. It must correspond to the number of elements in samples_data & samples_size |
[in] | data_timestamp | either NULL or define the data timestamp associated with the samples. |
[out] | full | Set to true if the internal stack is full after the push. Set to NULL if not desired. |
- Return values
-
ED247_STATUS_SUCCESS | |
ED247_STATUS_FAILURE | |
Pop a sample from stream samples stack.
Argument empty
, if not NULL, will be set to false if the samples stack is empty after the pop.
Return value will be ED247_STATUS_NODATA if the samples stack is empty before the pop.
- Parameters
-
[in] | stream | Stream identifier |
[out] | sample_data | Pointer on the internal stream buffer sample. Do not free it! |
[out] | sample_size | Size of the received sample data |
[out] | data_timestamp | if not NULL, filed with the data timestamp associated with the sample. |
[out] | recv_timestamp | if not NULL, filed with the receive timestamp. See ed247_get_receive_timestamp(). |
[out] | sample_details | Stream sample details (ECID, S/N, TTS). |
[out] | empty | set to true if the internal stack is empty after the pop. |
- Return values
-
ED247_STATUS_SUCCESS | |
ED247_STATUS_NODATA | Receive stack is empty before the pop. |
ED247_STATUS_FAILURE | |