1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
.\"Copyright 2011 (c) EPFL
.TH EGD_GET_CAP 3 2011 "EPFL" "EEGDEV library manual"
.SH NAME
egd_get_cap - Query various information about the device capabilities
.SH SYNOPSIS
.LP
.B #include <eegdev.h>
.sp
.BI "int egd_get_cap(const struct eegdev* " dev ", int " cap ", void* " val ");"
.br
.SH DESCRIPTION
.LP
\fBegd_get_cap\fP() returns the information about the capability specified
by \fIcap\fP of the recording device referenced by \fIdev\fP by the mean of
the pointer \fIval\fP.
.LP
The type of pointer passed through \fIval\fP is dependent on the requested
capability \fIcap\fP which can be one the following (The expected type
pointed by \fIval\fP is provided in parenthesis):
.TP
\fBEGD_CAP_FS\fP (\fBint\fP)
Sampling frequency that is currently set. The same value is returned by the
function.
.TP
\fBEGD_CAP_TYPELIST\fP (\fBconst int*\fP)
Array of sensor types sampled by the device terminated by \-1. These values
became valid as argument for \fBegd_sensor_name\fP(3) when opening the
device \fIdev\fP if they were not yet before. The number of elements in
the array (excluding the \-1 element) is provided by the return value of the
function.
.TP
\fBEGD_CAP_DEVTYPE\fP (\fBconst char*\fP)
Null terminated string describing the type of the recording device
(Manufacturer and model if \fIdev\fP refers to actual hardware). The length
of string (excluding the null character) is provided by the return value of
the function.
.TP
\fBEGD_DEVID\fP (\fBconst char*\fP)
Null-terminated string describing the model of the recording device (or an
unique identifier of the resource). The length of string (excluding the
null character) is provided by the return value of the function.
.SH "RETURN VALUE"
.LP
In case of success, the function returns a positive value depending on the
requested capability. Otherwise, \-1 is returned and \fIerrno\fP is set
accordingly.
.SH ERRORS
.LP
\fBegd_get_cap\fP() will fail if:
.TP
.B EINVAL
\fIdev\fP is NULL, \fIcap\fP is not valid value or \fIval\fP is NULL while
\fIcap\fP is not \fBEGD_CAP_FS\fP.
.SH "SEE ALSO"
.BR egd_sensor_name (3)
|