Signal I/O Interface
Macros
signal_io.h File Reference

Signal aquisition/generation functions. More...

#include <math.h>
#include "plugin_loader/loader_macros.h"

Go to the source code of this file.

Macros

#define M_PI   3.14159
 Defines mathematical Pi value if standard math.h one is not available.
 
#define SIGNAL_IO_DEVICE_INVALID_ID   -1
 Device identifier to be returned on device creation errors.
 
#define SIGNAL_IO_INTERFACE(Namespace, INIT_FUNCTION)
 Signal input/output interface declaration macro. More...
 

Detailed Description

Signal aquisition/generation functions.

Physical/virtual signal aquisition and generation interface to be implemented by hardware specific plugins

Macro Definition Documentation

◆ SIGNAL_IO_INTERFACE

#define SIGNAL_IO_INTERFACE (   Namespace,
  INIT_FUNCTION 
)
Value:
INIT_FUNCTION( long int, Namespace, InitDevice, const char* ) \
INIT_FUNCTION( void, Namespace, EndDevice, long int ) \
INIT_FUNCTION( void, Namespace, Reset, long int ) \
INIT_FUNCTION( bool, Namespace, HasError, long int ) \
INIT_FUNCTION( size_t, Namespace, GetMaxInputSamplesNumber, long int ) \
INIT_FUNCTION( size_t, Namespace, Read, long int, unsigned int, double* ) \
INIT_FUNCTION( bool, Namespace, CheckInputChannel, long int, unsigned int ) \
INIT_FUNCTION( bool, Namespace, Write, long int, unsigned int, double ) \
INIT_FUNCTION( bool, Namespace, AcquireOutputChannel, long int, unsigned int ) \
INIT_FUNCTION( void, Namespace, ReleaseOutputChannel, long int, unsigned int )

Signal input/output interface declaration macro.

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