1EGD_GET_CAP(3) EEGDEV library manual EGD_GET_CAP(3)
2
3
4
6 egd_get_cap - Query various information about the device capabilities
7
9 #include <eegdev.h>
10
11 int egd_get_cap(const struct eegdev* dev, int cap, void* val);
12
14 egd_get_cap() returns the information about the capability specified by
15 cap of the recording device referenced by dev by the mean of the
16 pointer val.
17
18 The type of pointer passed through val is dependent on the requested
19 capability cap which can be one the following (The expected type
20 pointed by val is provided in parenthesis):
21
22 EGD_CAP_FS (int)
23 Sampling frequency that is currently set. The same value is
24 returned by the function.
25
26 EGD_CAP_TYPELIST (const int*)
27 Array of sensor types sampled by the device terminated by -1.
28 These values became valid as argument for egd_sensor_name(3)
29 when opening the device dev if they were not yet before. The
30 number of elements in the array (excluding the -1 element) is
31 provided by the return value of the function.
32
33 EGD_CAP_DEVTYPE (const char*)
34 Null terminated string describing the type of the recording
35 device (Manufacturer and model if dev refers to actual hard‐
36 ware). The length of string (excluding the null character) is
37 provided by the return value of the function.
38
39 EGD_DEVID (const char*)
40 Null-terminated string describing the model of the recording
41 device (or an unique identifier of the resource). The length of
42 string (excluding the null character) is provided by the return
43 value of the function.
44
46 In case of success, the function returns a positive value depending on
47 the requested capability. Otherwise, -1 is returned and errno is set
48 accordingly.
49
51 egd_get_cap() will fail if:
52
53 EINVAL dev is NULL, cap is not valid value or val is NULL while cap is
54 not EGD_CAP_FS.
55
57 egd_sensor_name(3)
58
59
60
61
62
63
64EPFL 2011 EGD_GET_CAP(3)