.\"Copyright 2011 (c) EPFL .TH EGD_GET_NUMCH 3 2011 "EPFL" "EEGDEV library manual" .SH NAME egd_get_numch - Get the number of channels sampled by type .SH SYNOPSIS .LP .B #include .sp .BI "int egd_get_numch(const struct eegdev* " dev ", int " stype ");" .br .SH DESCRIPTION .LP \fBegd_get_numch\fP() returns the number of channels of type \fIstype\fP sampled by the recording device referenced by \fIdev\fP. \fIstype\fP must be one of the values returned by \fBegd_sensor_type\fP(3). .SH "RETURN VALUE" .LP In case of success, the function returns a non negative value corresponding to the number of channels of type \fIstype\fP (possibly 0 if the device does not sample this type of data). Otherwise, \-1 is returned and \fIerrno\fP is set accordingly. .SH ERRORS .LP \fBegd_get_numch\fP() will fail if: .TP .B EINVAL \fIdev\fP is NULL or \fIstype\fP is not valid value. .SH "SEE ALSO" .BR egd_get_cap (3), .BR egd_sensor_type (3)