EGD_GET_NUMCH(3) EEGDEV library manual EGD_GET_NUMCH(3)NAME
egd_get_numch - Get the number of channels sampled by type
SYNOPSIS
#include <eegdev.h>
int egd_get_numch(const struct eegdev* dev, int stype);
DESCRIPTION
egd_get_numch() returns the number of channels of type stype sampled by the recording device referenced by dev. stype must be one of the
values returned by egd_sensor_type(3).
RETURN VALUE
In case of success, the function returns a non negative value corresponding to the number of channels of type stype (possibly 0 if the
device does not sample this type of data). Otherwise, -1 is returned and errno is set accordingly.
ERRORS
egd_get_numch() will fail if:
EINVAL dev is NULL or stype is not valid value.
SEE ALSO egd_get_cap(3), egd_sensor_type(3)EPFL 2011 EGD_GET_NUMCH(3)
Check Out this Related Man Page
EGD_CHANNEL_INFO(3) EEGDEV library manual EGD_CHANNEL_INFO(3)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 ter-
mination character).
EGD_TRANSDUCTER (char*)
Transducter type of the sensor. The pointed array should be long enough to hold 128 characters (including the null termination char-
acter).
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)EPFL 2010 EGD_CHANNEL_INFO(3)