EGD_OPEN(3) | EEGDEV library manual | EGD_OPEN(3) |
egd_open - Open an EEG device
#include <eegdev.h>
struct eegdev* egd_open(const char* devstring);
egd_open() opens a EEG device according to the devstring description. If devstring is NULL, the first device supported by the library will be opened.
The devstring argument specifies the type of EEG device required to be opened and the parameters parameters which the system should be configured with (overriding defaults settings). The syntax of the string is defined in eegdev-open-options(5).
The syntax may change in future releases and programs should not rely on it to configure the device. It is provided only to users of the programs to select the EEG acquisition device and configure it. Programs using the eegdev library should pass the string provided by the users untouched.
devstring is not the only way to provides configuration information about the device to open. The configuration is read from the configuration files. The final values of the settings provided to the opening function are defined (and overriden) in the following order:
This order indicates that a setting value specified in devstring will always override any setting value defined by other mean.
The function returns a pointer to the opened EEG device in case of success. Otherwise NULL is returned errno is set accordingly.
egd_open() will fail if:
2010 | EPFL |