DOKK / manpages / debian 12 / libeegdev-dev / egd_channel_info.3.en
EGD_CHANNEL_INFO(3) EEGDEV library manual EGD_CHANNEL_INFO(3)

egd_channel_info - Get various information about a particular channel

#include <eegdev.h>

int egd_channel_info(const struct eegdev* dev, int stype,
unsigned int index, int fieldtype, ...);

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):

Name of the channel. The pointed array should be long enough to hold 32 characters (including the null termination character).
Indicates whether the data provided by the channel are integer or floating point. (zero indicates floating point, non-zero indicates integer).
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)
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)
Returns in an array of 2 double values the minimal and maximal values that the channel can deliver.
Unit in which the channel data is expressed. The pointed array should be long enough to hold 16 characters (including the null termination character).
Transducter type of the sensor. The pointed array should be long enough to hold 128 characters (including the null termination character).
Information about the filters already applied on data. The pointed array should be long enough to hold 128 characters (including the null termination character).

The function returns 0 in case of succes. Otherwise, -1 is returned and errno is set accordingly.

egd_channel_info() will fail if:

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.

egd_channel_info() is thread-safe.

egd_acq_setup(3), egd_sensor_type(3)

2010 EPFL