public class LJUD
extends java.lang.Object
LJUD library C to Java differences:
LJUD.Constants
class. The constant
name's "LJ_" prefix have been removed.
LJUD.Errors
enum. The
constants name's "LJE_" prefix have been removed.
LJUDException
exception, setting the error value and exception
message. The following methods do not throw a LJUDException:
//Allocate 100 bytes of memory for a a 100 character C string. Pointer stringPtr = new Memory(100);
byte x1[] = new byte[] { 0x05, (byte)0xF8, 0x02, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; Pointer px1 = new Memory(x1.length); //Copy x1 byte array into px1 pointer's memory px1.write(0, x1, 0, x1.length); LJUD.AddRequestPtr(handle, LJUD.Constants.ioRAW_OUT, 0, x1.length, px1, 0);
Version History
Modifier and Type | Class and Description |
---|---|
class |
LJUD.Constants
Constants is a class containing the constants from the LJUD driver.
|
static class |
LJUD.Errors
Errors is an enum containing the error constants from the LJUD driver.
|
static interface |
LJUD.LabJackUD |
Constructor and Description |
---|
LJUD() |
Modifier and Type | Method and Description |
---|---|
static int |
addRequest(int handle,
int ioType,
int channel,
double value,
int x1,
double userData) |
static int |
addRequestPtr(int handle,
int ioType,
int channel,
double value,
com.sun.jna.Pointer x1,
double userData) |
static int |
addRequestS(int handle,
java.lang.String pIOType,
int channel,
double value,
int x1,
double userData) |
static int |
addRequestSS(int handle,
java.lang.String ioType,
java.lang.String pChannel,
double value,
int x1,
double userData) |
static void |
close() |
static int |
doubleToStringAddress(double number,
com.sun.jna.Pointer pString,
int hexDot) |
static int |
eAddGoGet(int handle,
int numRequests,
int[] aIOTypes,
int[] aChannels,
double[] aValues,
int[] ax1s,
int[] aRequestErrors,
com.sun.jna.ptr.IntByReference goError,
int[] aResultErrors) |
static int |
eAIN(int handle,
int channelP,
int channelN,
com.sun.jna.ptr.DoubleByReference voltage,
int range,
int resolution,
int settling,
int binary,
int reserved1,
int reserved2) |
static int |
eDAC(int handle,
int channel,
double voltage,
int binary,
int reserved1,
int reserved2) |
static int |
eDI(int handle,
int channel,
com.sun.jna.ptr.IntByReference state) |
static int |
eDO(int handle,
int channel,
int state) |
static int |
eGet_DblArray(int handle,
int ioType,
int channel,
com.sun.jna.ptr.DoubleByReference pValue,
double[] x1) |
static int |
eGet_U8Array(int handle,
int ioType,
int channel,
com.sun.jna.ptr.DoubleByReference pValue,
byte[] x1) |
static int |
eGet(int handle,
int ioType,
int channel,
com.sun.jna.ptr.DoubleByReference pValue,
byte[] x1) |
static int |
eGet(int handle,
int ioType,
int channel,
com.sun.jna.ptr.DoubleByReference pValue,
double[] x1) |
static int |
eGet(int handle,
int ioType,
int channel,
com.sun.jna.ptr.DoubleByReference pValue,
int x1) |
static int |
eGetPtr(int handle,
int ioType,
int channel,
com.sun.jna.ptr.DoubleByReference pValue,
com.sun.jna.Pointer x1) |
static int |
eGetS_DblArray(int handle,
java.lang.String pIOType,
int channel,
com.sun.jna.ptr.DoubleByReference pValue,
double[] x1) |
static int |
eGetS_U8Array(int handle,
java.lang.String pIOType,
int channel,
com.sun.jna.ptr.DoubleByReference pValue,
byte[] x1) |
static int |
eGetS(int handle,
java.lang.String pIOType,
int channel,
com.sun.jna.ptr.DoubleByReference pValue,
int x1) |
static int |
eGetSS_DblArray(int handle,
java.lang.String pIOType,
java.lang.String pChannel,
com.sun.jna.ptr.DoubleByReference pValue,
double[] x1) |
static int |
eGetSS_U8Array(int handle,
java.lang.String pIOType,
java.lang.String pChannel,
com.sun.jna.ptr.DoubleByReference pValue,
byte[] x1) |
static int |
eGetSS(int handle,
java.lang.String pIOType,
java.lang.String pChannel,
com.sun.jna.ptr.DoubleByReference pValue,
int x1) |
static int |
eModbus(int handle,
int readwrite,
int addr,
int size,
byte[] value) |
static int |
ePut(int handle,
int ioType,
int channel,
double value,
byte[] x1) |
static int |
ePut(int handle,
int ioType,
int channel,
double value,
double[] x1) |
static int |
ePut(int handle,
int ioType,
int channel,
double value,
int x1) |
static int |
ePutS(int handle,
java.lang.String pIOType,
int channel,
double value,
int x1) |
static int |
ePutSS(int handle,
java.lang.String pIOType,
java.lang.String pChannel,
double value,
int x1) |
static void |
errorToString(int ErrorCode,
com.sun.jna.Pointer pString) |
static int |
eTCConfig(int handle,
int[] aEnableTimers,
int[] aEnableCounters,
int tcPinOffset,
int timerClockBaseIndex,
int timerClockDivisor,
int[] aTimerModes,
double[] aTimerValues,
int reserved1,
int reserved2) |
static int |
eTCValues(int handle,
int[] aReadTimers,
int[] aUpdateResetTimers,
int[] aReadCounters,
int[] aResetCounters,
double[] aTimerValues,
double[] aCounterValues,
int reserved1,
int reserved2) |
static double |
getDriverVersion() |
static int |
getFirstResult(int handle,
com.sun.jna.ptr.IntByReference pIOType,
com.sun.jna.ptr.IntByReference pChannel,
com.sun.jna.ptr.DoubleByReference pValue,
com.sun.jna.ptr.IntByReference px1,
com.sun.jna.ptr.DoubleByReference pUserData) |
static int |
getNextError(int handle,
com.sun.jna.ptr.IntByReference pIOType,
com.sun.jna.ptr.IntByReference pChannel) |
static int |
getNextResult(int handle,
com.sun.jna.ptr.IntByReference pIOType,
com.sun.jna.ptr.IntByReference pChannel,
com.sun.jna.ptr.DoubleByReference pValue,
com.sun.jna.ptr.IntByReference px1,
com.sun.jna.ptr.DoubleByReference pUserData) |
static int |
getResult(int handle,
int ioType,
int channel,
com.sun.jna.ptr.DoubleByReference pValue) |
static int |
getResultS(int handle,
java.lang.String pIOType,
int channel,
com.sun.jna.ptr.DoubleByReference pValue) |
static int |
getResultSS(int handle,
java.lang.String pIOType,
java.lang.String pChannel,
com.sun.jna.ptr.DoubleByReference pValue) |
static int |
getStreamError(int handle) |
static int |
getThreadID() |
static int |
go() |
static int |
goOne(int handle) |
static int |
listAll(int deviceType,
int connectionType,
com.sun.jna.ptr.IntByReference pNumFound,
int[] pSerialNumbers,
int[] pIDs,
double[] pAddresses) |
static int |
listAllS(java.lang.String pDeviceType,
java.lang.String pConnectionType,
com.sun.jna.ptr.IntByReference pNumFound,
int[] pSerialNumbers,
int[] pIDs,
double[] pAddresses) |
static int |
openLabJack(int deviceType,
int connectionType,
java.lang.String pAddress,
int firstFound,
com.sun.jna.ptr.IntByReference pHandle) |
static int |
openLabJackS(java.lang.String pDeviceType,
java.lang.String pConnectionType,
java.lang.String pAddress,
int firstFound,
com.sun.jna.ptr.IntByReference pHandle) |
static int |
resetLabJack(int handle) |
static int |
stringToConstant(java.lang.String pString) |
static int |
stringToDoubleAddress(java.lang.String pString,
com.sun.jna.ptr.DoubleByReference pNumber,
int hexDot) |
static int |
tcVoltsToTemp(int tcType,
double tcVolts,
double cjTempK,
com.sun.jna.ptr.DoubleByReference pTCTempK) |
public static void close()
public static int listAll(int deviceType, int connectionType, com.sun.jna.ptr.IntByReference pNumFound, int[] pSerialNumbers, int[] pIDs, double[] pAddresses)
public static int listAllS(java.lang.String pDeviceType, java.lang.String pConnectionType, com.sun.jna.ptr.IntByReference pNumFound, int[] pSerialNumbers, int[] pIDs, double[] pAddresses)
public static int openLabJack(int deviceType, int connectionType, java.lang.String pAddress, int firstFound, com.sun.jna.ptr.IntByReference pHandle)
public static int openLabJackS(java.lang.String pDeviceType, java.lang.String pConnectionType, java.lang.String pAddress, int firstFound, com.sun.jna.ptr.IntByReference pHandle)
public static int addRequest(int handle, int ioType, int channel, double value, int x1, double userData)
public static int addRequestS(int handle, java.lang.String pIOType, int channel, double value, int x1, double userData)
public static int addRequestSS(int handle, java.lang.String ioType, java.lang.String pChannel, double value, int x1, double userData)
public static int addRequestPtr(int handle, int ioType, int channel, double value, com.sun.jna.Pointer x1, double userData)
public static int go()
public static int goOne(int handle)
public static int eGet(int handle, int ioType, int channel, com.sun.jna.ptr.DoubleByReference pValue, int x1)
public static int eGet(int handle, int ioType, int channel, com.sun.jna.ptr.DoubleByReference pValue, byte[] x1)
public static int eGet(int handle, int ioType, int channel, com.sun.jna.ptr.DoubleByReference pValue, double[] x1)
public static int eGetPtr(int handle, int ioType, int channel, com.sun.jna.ptr.DoubleByReference pValue, com.sun.jna.Pointer x1)
public static int eGetS(int handle, java.lang.String pIOType, int channel, com.sun.jna.ptr.DoubleByReference pValue, int x1)
public static int eGetSS(int handle, java.lang.String pIOType, java.lang.String pChannel, com.sun.jna.ptr.DoubleByReference pValue, int x1)
public static int ePut(int handle, int ioType, int channel, double value, int x1)
public static int ePut(int handle, int ioType, int channel, double value, byte[] x1)
public static int ePut(int handle, int ioType, int channel, double value, double[] x1)
public static int ePutS(int handle, java.lang.String pIOType, int channel, double value, int x1)
public static int ePutSS(int handle, java.lang.String pIOType, java.lang.String pChannel, double value, int x1)
public static int eGet_DblArray(int handle, int ioType, int channel, com.sun.jna.ptr.DoubleByReference pValue, double[] x1)
public static int eGet_U8Array(int handle, int ioType, int channel, com.sun.jna.ptr.DoubleByReference pValue, byte[] x1)
public static int eGetS_DblArray(int handle, java.lang.String pIOType, int channel, com.sun.jna.ptr.DoubleByReference pValue, double[] x1)
public static int eGetS_U8Array(int handle, java.lang.String pIOType, int channel, com.sun.jna.ptr.DoubleByReference pValue, byte[] x1)
public static int eGetSS_DblArray(int handle, java.lang.String pIOType, java.lang.String pChannel, com.sun.jna.ptr.DoubleByReference pValue, double[] x1)
public static int eGetSS_U8Array(int handle, java.lang.String pIOType, java.lang.String pChannel, com.sun.jna.ptr.DoubleByReference pValue, byte[] x1)
public static int getResult(int handle, int ioType, int channel, com.sun.jna.ptr.DoubleByReference pValue)
public static int getResultS(int handle, java.lang.String pIOType, int channel, com.sun.jna.ptr.DoubleByReference pValue)
public static int getResultSS(int handle, java.lang.String pIOType, java.lang.String pChannel, com.sun.jna.ptr.DoubleByReference pValue)
public static int getFirstResult(int handle, com.sun.jna.ptr.IntByReference pIOType, com.sun.jna.ptr.IntByReference pChannel, com.sun.jna.ptr.DoubleByReference pValue, com.sun.jna.ptr.IntByReference px1, com.sun.jna.ptr.DoubleByReference pUserData)
public static int getNextResult(int handle, com.sun.jna.ptr.IntByReference pIOType, com.sun.jna.ptr.IntByReference pChannel, com.sun.jna.ptr.DoubleByReference pValue, com.sun.jna.ptr.IntByReference px1, com.sun.jna.ptr.DoubleByReference pUserData)
public static int eAIN(int handle, int channelP, int channelN, com.sun.jna.ptr.DoubleByReference voltage, int range, int resolution, int settling, int binary, int reserved1, int reserved2)
public static int eDAC(int handle, int channel, double voltage, int binary, int reserved1, int reserved2)
public static int eDI(int handle, int channel, com.sun.jna.ptr.IntByReference state)
public static int eDO(int handle, int channel, int state)
public static int eAddGoGet(int handle, int numRequests, int[] aIOTypes, int[] aChannels, double[] aValues, int[] ax1s, int[] aRequestErrors, com.sun.jna.ptr.IntByReference goError, int[] aResultErrors)
public static int eTCConfig(int handle, int[] aEnableTimers, int[] aEnableCounters, int tcPinOffset, int timerClockBaseIndex, int timerClockDivisor, int[] aTimerModes, double[] aTimerValues, int reserved1, int reserved2)
public static int eTCValues(int handle, int[] aReadTimers, int[] aUpdateResetTimers, int[] aReadCounters, int[] aResetCounters, double[] aTimerValues, double[] aCounterValues, int reserved1, int reserved2)
public static int eModbus(int handle, int readwrite, int addr, int size, byte[] value)
public static int resetLabJack(int handle)
public static int getNextError(int handle, com.sun.jna.ptr.IntByReference pIOType, com.sun.jna.ptr.IntByReference pChannel)
public static int getStreamError(int handle)
public static int doubleToStringAddress(double number, com.sun.jna.Pointer pString, int hexDot)
public static int stringToDoubleAddress(java.lang.String pString, com.sun.jna.ptr.DoubleByReference pNumber, int hexDot)
public static int stringToConstant(java.lang.String pString)
public static void errorToString(int ErrorCode, com.sun.jna.Pointer pString)
public static double getDriverVersion()
public static int getThreadID()
public static int tcVoltsToTemp(int tcType, double tcVolts, double cjTempK, com.sun.jna.ptr.DoubleByReference pTCTempK)