Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

egd_channel_info(3) [debian man page]

EGD_CHANNEL_INFO(3)					       EEGDEV library manual					       EGD_CHANNEL_INFO(3)

NAME
egd_channel_info - Get various information about a particular channel SYNOPSIS
#include <eegdev.h> int egd_channel_info(const struct eegdev* dev, int stype, unsigned int index, int fieldtype, ...); DESCRIPTION
egd_channel_info() provides different type of information about the channel at the index index of the group specified by stype of the device referenced by dev. As described for egd_acq_setup(3), stype specifies the type of channel. It must one of the values returned by egd_sensor_type(3). The information returned by the function is defined by the variable list of argument. This list is composed of successive couple grouping one field type identifier specifying the feature to be get and a pointer to a value whose type depends on the previous field type. The list must finish by EGD_END. The field identifers can be the following (The expected corresponding pointer type is provided in parenthesis): EGD_LABEL (char*) Name of the channel. The pointed array should be long enough to hold 32 characters (including the null termination character). EGD_ISINT (int*) Indicates whether the data provided by the channel are integer or floating point. (zero indicates floating point, non-zero indicates integer). EGD_MM_I (int32_t*) Returns in an array of 2 int32_t the minimal and maximal values that the channel can deliver (If the channel deliver floating point data, these values can be underestimated due to overflow) EGD_MM_F (float*) Returns in an array of 2 float values the minimal and maximal values that the channel can deliver (If the channel deliver double floating point data, these values can be underestimated due to overflow) EGD_MM_D (double*) Returns in an array of 2 double values the minimal and maximal values that the channel can deliver. EGD_UNIT (char*) Unit in which the channel data is expressed. The pointed array should be long enough to hold 16 characters (including the null ter- mination character). EGD_TRANSDUCTER (char*) Transducter type of the sensor. The pointed array should be long enough to hold 128 characters (including the null termination char- acter). EGD_PREFILTERING (char*) Information about the filters already applied on data. The pointed array should be long enough to hold 128 characters (including the null termination character). RETURN VALUE
The function returns 0 in case of succes. Otherwise, -1 is returned and errno is set accordingly. ERRORS
egd_channel_info() will fail if: EINVAL dev is NULL, stype is an invalid sensor type, index is bigger than the maximal number of channel in the group, any field identifier is unknown or any pointer used is NULL. THREAD SAFETY
egd_channel_info() is thread-safe. SEE ALSO
egd_acq_setup(3), egd_sensor_type(3) EPFL
2010 EGD_CHANNEL_INFO(3)

Check Out this Related Man Page

EGD_ACQ_SETUP(3)					       EEGDEV library manual						  EGD_ACQ_SETUP(3)

NAME
egd_acq_setup - specify which and how channel data should be obtained SYNOPSIS
#include <eegdev.h> int egd_acq_setup(struct eegdev* dev, unsigned int narr, const size_t *strides, unsigned int ngrp, const struct grpconf *grp); DESCRIPTION
egd_acq_setup() configures the way data is provided by the device referenced by dev for the next calls to egd_get_data(3). The narr argument specifies the number of buffers that will be supplied in the argument list of egd_get_data(3). strides should points to an array of narr values specifying respectively for each buffers its stride, i.e. the size in bytes between the data of two successive sam- ples in this buffer. The channels data that must be returns in those buffers are defined by ngrp groups of consecutive channels. The groups definition are passed by grp which points to an array of ngrp structures, defined as follows: struct grpconf { unsigned int sensortype; /* type of channel */ unsigned int index; /* index of the first channel */ unsigned int nch; /* number of channels */ unsigned int iarray; /* index of the array */ unsigned int arr_offset; /* offset in the array */ unsigned int datatype; /* type in the array */ }; The different fields in the structure defines the properties of the group: * sensortype specifies the type of channel. it must one of the following values returned by egd_sensor_type(3). * index indicates the index of the first channel in the group. Note that channel index i refers the i-th channel of the type specified previously, i.e. the channel index i refers to two differents channels if sensortype differs. * nch specifies the number of consecutive channels that should be in the group. * iarray indicates which buffer the data of the channel group must be written to. * arr_offset defines the offset of the memory location of the data in the buffers relatively to the beginning of each sample. * datatype specifies the type of data that must be written to the buffer. It must be one of the following value: EGD_INT32, EGD_FLOAT or EGD_DOUBLE RETURN VALUE
The function returns 0 in case of succes. Otherwise, -1 is returned and errno is set accordingly. ERRORS
egd_acq_setup() will fail if: EINVAL dev is NULL. EPERM The acquisition is running THREAD SAFETY
egd_acq_setup() is thread-safe. EXAMPLE
See egd_get_data(3) for a example SEE ALSO
egd_get_data(3), egd_start(3), egd_sensor_type(3) EPFL
2010 EGD_ACQ_SETUP(3)
Man Page