Provided by: libeegdev-dev_0.2-9build2_amd64
NAME
egd_channel_info - Get various information about a particular channel
SYNOPSIS
#include <eegdev.h> int egd_channel_info(const struct eegdev* dev, int stype, unsigned int index, int fieldtype, ...);
DESCRIPTION
egd_channel_info() provides different type of information about the channel at the index index of the group specified by stype of the device referenced by dev. As described for egd_acq_setup(3), stype specifies the type of channel. It must one of the values returned by egd_sensor_type(3). The information returned by the function is defined by the variable list of argument. This list is composed of successive couple grouping one field type identifier specifying the feature to be get and a pointer to a value whose type depends on the previous field type. The list must finish by EGD_END. The field identifers can be the following (The expected corresponding pointer type is provided in parenthesis): EGD_LABEL (char*) Name of the channel. The pointed array should be long enough to hold 32 characters (including the null termination character). EGD_ISINT (int*) Indicates whether the data provided by the channel are integer or floating point. (zero indicates floating point, non-zero indicates integer). EGD_MM_I (int32_t*) Returns in an array of 2 int32_t the minimal and maximal values that the channel can deliver (If the channel deliver floating point data, these values can be underestimated due to overflow) EGD_MM_F (float*) Returns in an array of 2 float values the minimal and maximal values that the channel can deliver (If the channel deliver double floating point data, these values can be underestimated due to overflow) EGD_MM_D (double*) Returns in an array of 2 double values the minimal and maximal values that the channel can deliver. EGD_UNIT (char*) Unit in which the channel data is expressed. The pointed array should be long enough to hold 16 characters (including the null termination character). EGD_TRANSDUCTER (char*) Transducter type of the sensor. The pointed array should be long enough to hold 128 characters (including the null termination character). EGD_PREFILTERING (char*) Information about the filters already applied on data. The pointed array should be long enough to hold 128 characters (including the null termination character).
RETURN VALUE
The function returns 0 in case of succes. Otherwise, -1 is returned and errno is set accordingly.
ERRORS
egd_channel_info() will fail if: EINVAL dev is NULL, stype is an invalid sensor type, index is bigger than the maximal number of channel in the group, any field identifier is unknown or any pointer used is NULL.
THREAD SAFETY
egd_channel_info() is thread-safe.
SEE ALSO
egd_acq_setup(3), egd_sensor_type(3)