IDriverCallback Class Referenceabstract

Base class for all the OpenViBE acquisition server driver callbacks. More...

Inherited by CAcquisitionServer.

Public Member Functions

virtual void setSamples (const OpenViBE::float32 *pSample)=0
 Gives new sample buffer. More...
 
virtual void setSamples (const OpenViBE::float32 *pSample, const OpenViBE::uint32 ui32SampleCount)=0
 Gives new sample buffer. More...
 
virtual void setStimulationSet (const OpenViBE::IStimulationSet &rStimulationSet)=0
 Gives a new stimulation set corresponding to the last sample buffer. More...
 
virtual ~IDriverCallback (void)
 Destructor.
 

Detailed Description

Base class for all the OpenViBE acquisition server driver callbacks.

Author
Yann Renard (INRIA/IRISA)
Date
2007-04-01 Objects derived from this class are called by any driver to provide built sample buffers.
See also
IDriver
IDriver::loop

Member Function Documentation

virtual void setSamples ( const OpenViBE::float32 *  pSample)
pure virtual

Gives new sample buffer.

Parameters
pSample[in] : a buffer containing all the samples

This is used by the acquisition server to be notified when the driver has finished to build the whole buffer of data to send. This function is called by the driver during the IDriver::loop and should give an array of nSamplesPerChannel x nChannel organised by channel first.

The caller retains the ownership of the pSample pointer.

pSample[0] is channel 0 sample 0
pSample[1] is channel 0 sample 1
...
pSample[nSamplesPerChannel-1] is channel 0 sample nSamplesPerChannel-1
pSample[nSamplesPerChannel ] is channel 1 sample 0
pSample[nSamplesPerChannel+1] is channel 1 sample 1
...
pSample[i*nSamplesPerChannel+j] is channel i sample j
See also
IDriver::loop
virtual void setSamples ( const OpenViBE::float32 *  pSample,
const OpenViBE::uint32  ui32SampleCount 
)
pure virtual

Gives new sample buffer.

Parameters
pSample[in] : a buffer containing all the samples

This is used by the acquisition server to be notified when the driver has finished to build the whole buffer of data to send. This function is called by the driver during the IDriver::loop and should give an array of nSamplesPerChannel x nChannel organised by channel first.

The caller retains the ownership of the pSample pointer.

pSample[0] is channel 0 sample 0
pSample[1] is channel 0 sample 1
...
pSample[nSamplesPerChannel-1] is channel 0 sample nSamplesPerChannel-1
pSample[nSamplesPerChannel ] is channel 1 sample 0
pSample[nSamplesPerChannel+1] is channel 1 sample 1
...
pSample[i*nSamplesPerChannel+j] is channel i sample j
See also
IDriver::loop
virtual void setStimulationSet ( const OpenViBE::IStimulationSet &  rStimulationSet)
pure virtual

Gives a new stimulation set corresponding to the last sample buffer.

Parameters
rStimulationSet[in] : the stimulation set associated with the last sample buffer

This is used by the acquisition server to be notified when the driver has finished to build the whole buffer of data to send. This function is called by the driver during the IDriver::loop and immediatly after the IDriverCallback::setSamples function, even if the stimulation set is empty.

Warning
The stimulation dates are relative to the last buffer start time.
See also
IDriver::loop