Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

egd_acq_setup(3) [debian 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)

Check Out this Related Man Page

Tcl_GetStdChannel(3)					      Tcl Library Procedures					      Tcl_GetStdChannel(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_GetStdChannel, Tcl_SetStdChannel - procedures for retrieving and replacing the standard channels SYNOPSIS
#include <tcl.h> Tcl_Channel Tcl_GetStdChannel(type) Tcl_SetStdChannel(channel, type) ARGUMENTS
int type (in) The identifier for the standard channel to retrieve or modify. Must be one of TCL_STDIN, TCL_STDOUT, or TCL_STDERR. Tcl_Channel channel (in) The channel to use as the new value for the specified standard channel. _________________________________________________________________ DESCRIPTION
Tcl defines three special channels that are used by various I/O related commands if no other channels are specified. The standard input channel has a channel name of stdin and is used by read and gets. The standard output channel is named stdout and is used by puts. The standard error channel is named stderr and is used for reporting errors. In addition, the standard channels are inherited by any child processes created using exec or open in the absence of any other redirections. The standard channels are actually aliases for other normal channels. The current channel associated with a standard channel can be retrieved by calling Tcl_GetStdChannel with one of TCL_STDIN, TCL_STDOUT, or TCL_STDERR as the type. The return value will be a valid channel, or NULL. A new channel can be set for the standard channel specified by type by calling Tcl_SetStdChannel with a new channel or NULL in the channel argument. If the specified channel is closed by a later call to Tcl_Close, then the corresponding standard channel will automatically be set to NULL. If Tcl_GetStdChannel is called before Tcl_SetStdChannel, Tcl will construct a new channel to wrap the appropriate platform-specific stan- dard file handle. If Tcl_SetStdChannel is called before Tcl_GetStdChannel, then the default channel will not be created. If one of the standard channels is set to NULL, either by calling Tcl_SetStdChannel with a NULL channel argument, or by calling Tcl_Close on the channel, then the next call to Tcl_CreateChannel will automatically set the standard channel with the newly created channel. If more than one standard channel is NULL, then the standard channels will be assigned starting with standard input, followed by standard out- put, with standard error being last. See Tcl_StandardChannels for a general treatise about standard channels and the behaviour of the Tcl library with regard to them. SEE ALSO
Tcl_Close(3), Tcl_CreateChannel(3), Tcl_Main(3), tclsh(1) KEYWORDS
standard channel, standard input, standard output, standard error Tcl 7.5 Tcl_GetStdChannel(3)
Man Page