.\"Copyright 2010 (c) EPFL .TH EGD_CHANNEL_INFO 3 2010 "EPFL" "EEGDEV library manual" .SH NAME egd_channel_info - Get various information about a particular channel .SH SYNOPSIS .LP .B #include .sp .BI "int egd_channel_info(const struct eegdev* " dev ", int " stype "," .br .BI " unsigned int " index ", int " fieldtype ", ...);" .br .SH DESCRIPTION .LP \fBegd_channel_info\fP() provides different type of information about the channel at the index \fIindex\fP of the group specified by \fIstype\fP of the device referenced by \fIdev\fP. As described for \fBegd_acq_setup\fP(3), \fIstype\fP specifies the type of channel. It must one of the values returned by \fBegd_sensor_type\fP(3). .LP 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 \fImust finish\fP by \fBEGD_END\fP. .LP The field identifers can be the following (The expected corresponding pointer type is provided in parenthesis): .TP \fBEGD_LABEL\fP (\fBchar*\fP) Name of the channel. The pointed array should be long enough to hold 32 characters (including the null termination character). .TP \fBEGD_ISINT\fP (\fBint*\fP) Indicates whether the data provided by the channel are integer or floating point. (zero indicates floating point, non-zero indicates integer). .TP \fBEGD_MM_I\fP (\fBint32_t*\fP) Returns in an array of 2 \fBint32_t\fP 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) .TP \fBEGD_MM_F\fP (\fBfloat*\fP) Returns in an array of 2 \fBfloat\fP 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) .TP \fBEGD_MM_D\fP (\fBdouble*\fP) Returns in an array of 2 \fBdouble\fP values the minimal and maximal values that the channel can deliver. .TP \fBEGD_UNIT\fP (\fBchar*\fP) Unit in which the channel data is expressed. The pointed array should be long enough to hold 16 characters (including the null termination character). .TP \fBEGD_TRANSDUCTER\fP (\fBchar*\fP) Transducter type of the sensor. The pointed array should be long enough to hold 128 characters (including the null termination character). .TP \fBEGD_PREFILTERING\fP (\fBchar*\fP) Information about the filters already applied on data. The pointed array should be long enough to hold 128 characters (including the null termination character). .SH "RETURN VALUE" .LP The function returns 0 in case of succes. Otherwise, \-1 is returned and \fIerrno\fP is set accordingly. .SH ERRORS .LP \fBegd_channel_info\fP() will fail if: .TP .B EINVAL \fIdev\fP is NULL, \fIstype\fP is an invalid sensor type, \fIindex\fP is bigger than the maximal number of channel in the group, any field identifier is unknown or any pointer used is NULL. .SH THREAD SAFETY .LP \fBegd_channel_info\fP() is thread-safe. .SH "SEE ALSO" .BR egd_acq_setup (3), .BR egd_sensor_type (3)