ED247 Library
VA2.3.0
Implementation of ED247-A standard
|
Modules | |
Read and Write | |
Stream list | |
Data Structures | |
struct | ed247_sample_details_s |
Sample Details. More... | |
Typedefs | |
typedef struct ed247_internal_stream_t * | ed247_stream_t |
Stream identifier. | |
typedef struct ed247_sample_details_s | ed247_sample_details_t |
Sample Details. | |
Enumerations | |
enum | ed247_stream_type_t { ED247_STREAM_TYPE__INVALID, ED247_STREAM_TYPE_A664, ED247_STREAM_TYPE_A429, ED247_STREAM_TYPE_A825, ED247_STREAM_TYPE_M1553, ED247_STREAM_TYPE_SERIAL, ED247_STREAM_TYPE_AUDIO, ED247_STREAM_TYPE_VIDEO, ED247_STREAM_TYPE_ETHERNET, ED247_STREAM_TYPE_ANALOG, ED247_STREAM_TYPE_DISCRETE, ED247_STREAM_TYPE_NAD, ED247_STREAM_TYPE_VNAD, ED247_STREAM_TYPE__COUNT } |
Stream types. | |
enum | ed247_direction_t { ED247_DIRECTION__INVALID = 0, ED247_DIRECTION_IN = 0b01, ED247_DIRECTION_OUT = 0b10, ED247_DIRECTION_INOUT = ED247_DIRECTION_IN | ED247_DIRECTION_OUT } |
Stream direction. | |
Functions | |
LIBED247_EXPORT ed247_status_t | ed247_stream_has_signals (ed247_stream_t stream, uint8_t *yesno) |
Check if the stream is a signal based one (DISCRETE, ANALOG, NAD or VNAD) More... | |
LIBED247_EXPORT ed247_status_t | ed247_stream_get_signal_list (ed247_stream_t stream, ed247_signal_list_t *signals) |
Return all signals of a stream. More... | |
LIBED247_EXPORT ed247_status_t | ed247_stream_find_signals (ed247_stream_t stream, const char *regex_name, ed247_signal_list_t *signals) |
Find all signals of the channel whose names match regex_name . More... | |
LIBED247_EXPORT ed247_status_t | ed247_stream_get_signal (ed247_stream_t stream, const char *name, ed247_signal_t *signal) |
Get a signal of the stream. More... | |
LIBED247_EXPORT ed247_status_t | ed247_stream_get_channel (ed247_stream_t stream, ed247_channel_t *channel) |
Get the channel that contain this stream. More... | |
LIBED247_EXPORT ed247_status_t | ed247_stream_set_user_data (ed247_stream_t stream, void *user_data) |
Assign user data to the stream. More... | |
LIBED247_EXPORT ed247_status_t | ed247_stream_get_user_data (ed247_stream_t stream, void **user_data) |
Retrieve user data assigned to the stream. More... | |
LIBED247_EXPORT const char * | ed247_stream_get_name (ed247_stream_t stream) |
LIBED247_EXPORT ed247_direction_t | ed247_stream_get_direction (ed247_stream_t stream) |
LIBED247_EXPORT ed247_stream_type_t | ed247_stream_get_type (ed247_stream_t stream) |
LIBED247_EXPORT const char * | ed247_stream_get_comment (ed247_stream_t stream) |
LIBED247_EXPORT const char * | ed247_stream_get_icd (ed247_stream_t stream) |
LIBED247_EXPORT ed247_uid_t | ed247_stream_get_uid (ed247_stream_t stream) |
LIBED247_EXPORT uint32_t | ed247_stream_get_sample_max_number (ed247_stream_t stream) |
LIBED247_EXPORT uint32_t | ed247_stream_get_sample_max_size_bytes (ed247_stream_t stream) |
LIBED247_EXPORT uint32_t | ed247_stream_get_sampling_period_us (ed247_stream_t stream) |
LIBED247_EXPORT ed247_status_t ed247_stream_has_signals | ( | ed247_stream_t | stream, |
uint8_t * | yesno | ||
) |
Check if the stream is a signal based one (DISCRETE, ANALOG, NAD or VNAD)
[in] | stream | Stream identifier |
[out] | yesno | Result of the check, true for yes and false for no |
ED247_STATUS_SUCCESS | |
ED247_STATUS_FAILURE |
LIBED247_EXPORT ed247_status_t ed247_stream_get_signal_list | ( | ed247_stream_t | stream, |
ed247_signal_list_t * | signals | ||
) |
Return all signals of a stream.
The lifespan of returned signals
is the same as the context
, but you can safely call ed247_signal_list_free().
[in] | stream | The stream identifier |
[out] | signals | The list of the signals. If no value, set to null. |
ED247_STATUS_SUCCESS | |
ED247_STATUS_FAILURE | The stream list is empty |
LIBED247_EXPORT ed247_status_t ed247_stream_find_signals | ( | ed247_stream_t | stream, |
const char * | regex_name, | ||
ed247_signal_list_t * | signals | ||
) |
Find all signals of the channel whose names match regex_name
.
regex_name
shall follow the ECMAScript grammar.
This function allocates signals
. It has to be freed with ed247_signal_list_free().
If you know exact signal names, use ed247_get_signal() instead which is really faster and malloc-free.
If you want all stream signals, use ed247_stream_get_signal_list() instead which is really faster and malloc-free.
[in] | stream | The stream identifier |
[in] | regex_name | The regular expression for name matching. If null, assume '.*'. |
[out] | signals | The list of the signals. If no value, set to null. |
ED247_STATUS_SUCCESS | |
ED247_STATUS_FAILURE | The stream list is empty |
LIBED247_EXPORT ed247_status_t ed247_stream_get_signal | ( | ed247_stream_t | stream, |
const char * | name, | ||
ed247_signal_t * | signal | ||
) |
Get a signal of the stream.
[in] | stream | The stream identifier |
[in] | name | The stream name. |
[out] | signal | The signal identifier. |
ED247_STATUS_SUCCESS | |
ED247_STATUS_FAILURE | The stream list is empty |
LIBED247_EXPORT ed247_status_t ed247_stream_get_channel | ( | ed247_stream_t | stream, |
ed247_channel_t * | channel | ||
) |
Get the channel that contain this stream.
[in] | stream | The stream identifier |
[out] | channel | The channel identifier |
ED247_STATUS_SUCCESS | |
ED247_STATUS_FAILURE |
LIBED247_EXPORT ed247_status_t ed247_stream_set_user_data | ( | ed247_stream_t | stream, |
void * | user_data | ||
) |
Assign user data to the stream.
Memory has to be free by the user.
[in] | stream | The stream identifier |
[in] | user_data | Pointer to user data |
ED247_STATUS_SUCCESS | |
ED247_STATUS_FAILURE |
LIBED247_EXPORT ed247_status_t ed247_stream_get_user_data | ( | ed247_stream_t | stream, |
void ** | user_data | ||
) |
Retrieve user data assigned to the stream.
[in] | stream | The stream identifier |
[out] | user_data | Pointer to host pointer to user data |
ED247_STATUS_SUCCESS | |
ED247_STATUS_FAILURE |