ED247 Library  VA2.3.0
Implementation of ED247-A standard
Stream

Detailed Description

Modules

 Read and Write
 
 Stream list
 

Data Structures

struct  ed247_sample_details_s
 Sample Details. More...
 

Typedefs

typedef struct ed247_internal_stream_ted247_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)
 

Function Documentation

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)

Parameters
[in]streamStream identifier
[out]yesnoResult of the check, true for yes and false for no
Return values
ED247_STATUS_SUCCESS
ED247_STATUS_FAILURE

Here is the caller graph for this function:

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().

Parameters
[in]streamThe stream identifier
[out]signalsThe list of the signals. If no value, set to null.
Return values
ED247_STATUS_SUCCESS
ED247_STATUS_FAILUREThe stream list is empty

Here is the caller graph for this function:

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.

Parameters
[in]streamThe stream identifier
[in]regex_nameThe regular expression for name matching. If null, assume '.*'.
[out]signalsThe list of the signals. If no value, set to null.
Return values
ED247_STATUS_SUCCESS
ED247_STATUS_FAILUREThe stream list is empty
Note
The regular expressions are not implemented in gcc4.8.x (default linux), do not use complex requests.

Here is the caller graph for this function:

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.

Parameters
[in]streamThe stream identifier
[in]nameThe stream name.
[out]signalThe signal identifier.
Return values
ED247_STATUS_SUCCESS
ED247_STATUS_FAILUREThe stream list is empty

Here is the caller graph for this function:

LIBED247_EXPORT ed247_status_t ed247_stream_get_channel ( ed247_stream_t  stream,
ed247_channel_t channel 
)

Get the channel that contain this stream.

Parameters
[in]streamThe stream identifier
[out]channelThe channel identifier
Return values
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.

Parameters
[in]streamThe stream identifier
[in]user_dataPointer to user data
Return values
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.

Parameters
[in]streamThe stream identifier
[out]user_dataPointer to host pointer to user data
Return values
ED247_STATUS_SUCCESS
ED247_STATUS_FAILURE