Provided by: libeegdev-dev_0.2-3.1_amd64 bug

NAME

       egd_get_cap - Query various information about the device capabilities

SYNOPSIS

       #include <eegdev.h>

       int egd_get_cap(const struct eegdev* dev, int cap, void* val);

DESCRIPTION

       egd_get_cap()  returns  the  information  about  the  capability  specified  by cap of the
       recording device referenced by dev by the mean of the pointer val.

       The type of pointer passed through val is dependent on the requested capability cap  which
       can be one the following (The expected type pointed by val is provided in parenthesis):

       EGD_CAP_FS (int)
              Sampling  frequency  that  is  currently  set.  The  same  value is returned by the
              function.

       EGD_CAP_TYPELIST (const int*)
              Array of sensor types sampled by the device terminated by -1. These  values  became
              valid  as  argument for egd_sensor_name(3) when opening the device dev 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.

       EGD_CAP_DEVTYPE (const char*)
              Null  terminated  string  describing the type of the recording device (Manufacturer
              and model if dev refers to actual hardware). The length of  string  (excluding  the
              null character) is provided by the return value of the function.

       EGD_DEVID (const char*)
              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.

RETURN VALUE

       In  case  of  success,  the  function  returns a positive value depending on the requested
       capability. Otherwise, -1 is returned and errno is set accordingly.

ERRORS

       egd_get_cap() will fail if:

       EINVAL dev is NULL, cap is not valid value or val is NULL while cap is not EGD_CAP_FS.

SEE ALSO

       egd_sensor_name(3)