Signal I/O Interface
Public Member Functions | List of all members
SIGNAL_IO_INTERFACE Class Reference

File/string/stream data input/output methods to be implemented by plugins. More...

#include <signal_io.h>

Public Member Functions

long int InitDevice (const char *deviceConfig)
 Creates plugin specific signal input/output device data structure. More...
 
void EndDevice (long int deviceID)
 Discards given signal input/output device data structure
More...
 
bool HasError (long int deviceID)
 Verifies occurence of errors on given device. More...
 
void Reset (long int deviceID)
 Resets data and errors for given device. More...
 
size_t GetMaxInputSamplesNumber (long int deviceID)
 Gets number of samples aquired for every given device input channel on each Read() call. More...
 
bool CheckInputChannel (long int deviceID, unsigned int channel)
 Check reading availability for specified input channel of given device. More...
 
size_t Read (long int deviceID, unsigned int channel, double *ref_value)
 Reads samples list from specified channel of given device. More...
 
bool AcquireOutputChannel (long int deviceID, unsigned int channel)
 Check availability and get exclusive access for specified output channel of given device. More...
 
void ReleaseOutputChannel (long int deviceID, unsigned int channel)
 Give up exclusive access for specified output channel of given device. More...
 
bool Write (long int deviceID, unsigned int channel, double value)
 Writes value to specified channel of given device. More...
 

Detailed Description

File/string/stream data input/output methods to be implemented by plugins.

Member Function Documentation

◆ AcquireOutputChannel()

bool AcquireOutputChannel ( long int  deviceID,
unsigned int  channel 
)

Check availability and get exclusive access for specified output channel of given device.

Parameters
[in]deviceIDoutput device identifier
[in]channeloutput device channel index
Returns
true on successful channel acquisition (availability for writing), false otherwise

◆ CheckInputChannel()

bool CheckInputChannel ( long int  deviceID,
unsigned int  channel 
)

Check reading availability for specified input channel of given device.

Parameters
[in]deviceIDinput device identifier
[in]channelinput device channel index
Returns
true on channel availability for reading, false otherwise

◆ EndDevice()

void EndDevice ( long int  deviceID)

Discards given signal input/output device data structure

Parameters
[in]deviceIDinput/output device identifier

◆ GetMaxInputSamplesNumber()

size_t GetMaxInputSamplesNumber ( long int  deviceID)

Gets number of samples aquired for every given device input channel on each Read() call.

Parameters
[in]deviceIDinput device identifier
Returns
max read samples number (0 on errors)

◆ HasError()

bool HasError ( long int  deviceID)

Verifies occurence of errors on given device.


Parameters
[in]deviceIDinput/output device identifier
Returns
true on detected error, false otherwise


◆ InitDevice()

long int InitDevice ( const char *  deviceConfig)

Creates plugin specific signal input/output device data structure.


Parameters
[in]deviceConfigimplementation specific device configuration string
Returns
generic identifier to newly created device (SIGNAL_IO_TASK_INVALID_ID on errors)

◆ Read()

size_t Read ( long int  deviceID,
unsigned int  channel,
double *  ref_value 
)

Reads samples list from specified channel of given device.

Parameters
[in]deviceIDinput device identifier
[in]channelinput device channel index
[out]ref_valueallocated buffer long enough to hold the samples number returned by GetMaxInputSamplesNumber()
Returns
number of samples read (0 on errors)

◆ ReleaseOutputChannel()

void ReleaseOutputChannel ( long int  deviceID,
unsigned int  channel 
)

Give up exclusive access for specified output channel of given device.

Parameters
[in]deviceIDoutput device identifier
[in]channeloutput device channel index

◆ Reset()

void Reset ( long int  deviceID)

Resets data and errors for given device.

Parameters
[in]deviceIDinput/output device identifier

◆ Write()

bool Write ( long int  deviceID,
unsigned int  channel,
double  value 
)

Writes value to specified channel of given device.

Parameters
[in]deviceIDoutput device identifier
[in]channeloutput device channel index
[in]valuevalue to be written
Returns
true on successful writing, false otherwise

The documentation for this class was generated from the following file: