EGD_OPEN(3) EEGDEV library manual EGD_OPEN(3)NAME
egd_open - Open an EEG device
SYNOPSIS
#include <eegdev.h>
struct eegdev* egd_open(const char* devstring);
DESCRIPTION
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 con-
figured 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 configura-
tion files. The final values of the settings provided to the opening function are defined (and overriden) in the following order:
* default values
* shared configuration file
* device specific configuration file
* devstring
This order indicates that a setting value specified in devstring will always override any setting value defined by other mean.
RETURN VALUE
The function returns a pointer to the opened EEG device in case of success. Otherwise NULL is returned errno is set accordingly.
ERRORS
egd_open() will fail if:
ENOSYS the device part of devstring does not refer to a device supported by any of the installed eegdev plugin modules.
EINVAL one of the option specified in devstring is unknown.
ENODEV The specified device is not connected.
EBUSY The specified device is already in use.
ECHILD The specified device needs an auxiliary child process whose executable file cannot be found.
ENVIRONMENT
EEGDEV_PLUGINS_DIR
This variable controls which folder should be search to find plugin modules. If unset, they will be searched in the subfolder eegdev
of the installation folder of the libraries.
EEGDEV_CONF_DIR
This variable controls which folder should be search to find the configuration files. If unset, they will be searched in /etc/eegdev.
SEE ALSO egd_close(3), eegdev-open-options(5)EPFL 2010 EGD_OPEN(3)
Check Out this Related Man Page
autopush(1M)autopush(1M)NAME
autopush - manage system database of automatically pushed STREAMS modules
SYNOPSIS
file
major minor
major minor
DESCRIPTION
manages the system database that is used for automatic configuration of STREAMS devices. The command is used in three different ways as
dictated by the and command-line options described below.
Options
recognizes the following command-line options and arguments:
Using the configuration information contained in
file, load the system database with the names of the STREAMS devices and a list of modules to use for each device.
When a device is subsequently opened, the HP-UX STREAMS subsystem pushes the modules onto the stream for the device.
If appears as a file argument, uses the standard input.
file must contain one or more lines of at least four fields separated by a space as shown below:
major minor lastminor module1 module2 ... moduleN
The first field major can be either an integer or a device name. The device name is the name for the device used in
the master file. The next two fields are integers. If minor is set to -1, then all minor devices for the specified
major are configured and lastminor is ignored. If lastminor is 0, then only a single minor device is configured. To
configure a range of minor devices for a major device, minor must be less then lastminor. The remaining field(s)
list one or more module names. Each module is pushed in the order specified. A maximum of eight modules can be
pushed. Any text after a # character in file is treated as a comment for that line only.
This option is also used to restore device configuration information previously removed by However, when used in such
a manner, the entire database is restored, not just the information that was previously removed.
Display current configuration information from the system database for the
STREAMS device specified by the major device number (or device name for the device from the master file) and minor
number.
If a range of minors has been previously configured then returns the configuration information for the first minor in
the range, in addition to other information.
Remove configuration information from the system database for the
STREAMS device specified by the major device number (or device name for the device from the master file and minor
number. Removal is performed on the database only, not on the original configuration file. Therefore, the original
configuration can be restored by using the file option. To permanently exclude a STREAMS device from the database,
its information must be removed from the configuration file.
If minor matches the first minor of a previously configured range then removes the configuration information for the
entire configured range.
EXAMPLES
If the file contains:
Then will cause and to be pushed whenever major device is opened, and and to be pushed for the first six opens of device
This next example lists information about the stream for major device and its minor device
FILES
NLS catalog for
SEE ALSO sad(7), streamio(7).
autopush(1M)