ljacklm_wrapper.h
Go to the documentation of this file.
00001 #ifndef __LJACKLM_WRAPPER_H__
00002 #define __LJACKLM_WRAPPER_H__
00003 
00033 #include <ros/ros.h>
00034 #include <ljacklm.h>
00035 #include "labjack_driver_interface.h"
00036 
00037 // set the I/O lines
00038 // 0=input, 1=output
00039 
00040 // D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
00041 // 0   0   0   0   0   1   0  0  0  0  0  0  0  0  0  1  = 0x401
00042 #define CONFIG_D    0x401
00043 
00044 // IO3 IO2 IO1 IO0
00045 // 1   1   1   0   = 0xE
00046 #define CONFIG_IO   0xE
00047 
00048 // default values
00049 #define DEMO_MODE   0
00050 #define GAIN        0
00051 
00052 // identify the labjack (-1 => first found)
00053 #define ID_LJ       -1
00054 
00055 // error code because a wrong parameter
00056 #define ERROR_PARAM -1
00057 
00058 class LjacklmWrapper : public LabjackDriverInterface {
00059     public:
00064         long config();
00065 
00070         long reset();
00071 
00078         long readIO(long channel, long * state);
00079 
00086         long writeIO(long channel, long state);
00087 
00094         long readDIOs(long * stateD, long * stateIO);
00095 
00104         long writeDIOs(long * direcD, long * direcIO, long * stateD, long * stateIO);
00105 
00112         long writeDIOsCONFIG(long * stateD, long * stateIO);
00113 
00120         long readD(long channel, long * state);
00121 
00128         long writeD(long channel, long state);
00129 
00136         long writeDCONFIG(long channel, long state);
00137 
00144         long readAI(long channel, float * voltage);
00145 
00153         long readAIs(long num_channels, long * channels, float * voltages);
00154 
00161         long readDifferentialAI(long channel, float * voltage);
00162 
00169         long writeAO(int channel, float voltage);
00170 
00177         long writeAOs(float voltageAO0, float voltageAO1);
00178 
00186         long enableWatchdog(long timeout, int activeD, long state);
00187 
00193         long disableWatchdog(int activeD);
00194 
00203         long writePulse(long pulse_level, long line, long pulse_time, long line_type);
00204 
00210         long readDirectionDs(long * directions);
00211 };
00212 
00213 #endif


maggie_labjack_drivers
Author(s): Raul Perula-Martinez
autogenerated on Mon Sep 14 2015 03:06:34