mcc
Class MccJniInterface

java.lang.Object
  extended by mcc.MccJniInterface

public class MccJniInterface
extends java.lang.Object

Interface to Measurement Computing data acquisition boards. Interfaces to native source code (MS Windows only)

Author:
Douglas Gillespie

Field Summary
static int BIP10VOLTS
           
static int BIP1PT25VOLTS
           
static int BIP1PT67VOLTS
           
static int BIP1VOLTS
           
static int BIP20VOLTS
           
static int BIP2PT5VOLTS
           
static int BIP2VOLTS
           
static int BIP4VOLTS
           
static int BIP5VOLTS
           
static int[] bipolarRanges
           
static int BIPPT005VOLTS
           
static int BIPPT01VOLTS
           
static int BIPPT05VOLTS
           
static int BIPPT1VOLTS
           
static int BIPPT25VOLTS
           
static int BIPPT2VOLTS
           
static int BIPPT5VOLTS
           
static int BIPPT625VOLTS
           
private  java.util.ArrayList<java.lang.String> boardList
           
private static boolean loadOK
           
private static boolean loadTried
           
private static int MAXMCCBOARDS
           
static double MCCERRORVALUE
           
private static java.lang.String SILIB
           
static int UNI10VOLTS
           
static int UNI1PT25VOLTS
           
static int UNI1PT67VOLTS
           
static int UNI1VOLTS
           
static int UNI2PT5VOLTS
           
static int UNI2VOLTS
           
static int UNI4VOLTS
           
static int UNI5VOLTS
           
static int UNIPT01VOLTS
           
static int UNIPT02VOLTS
           
static int UNIPT05VOLTS
           
static int UNIPT1VOLTS
           
static int UNIPT25VOLTS
           
static int UNIPT2VOLTS
           
static int UNIPT5VOLTS
           
 
Constructor Summary
MccJniInterface()
           
 
Method Summary
private  void createBoardList()
           
static int getBipolarRangeIndex(int range)
          Work out where in the list of bipolar ranges a particular range is.
 java.lang.String getBoardName(int iBoard)
           
 java.lang.String getErrorString(int errorCode)
           
 int getLastErrorCode()
           
 int getNumBoards()
           
private  java.lang.String jniGetBoardName(int iBoard)
           
private  java.lang.String jniGetErrorString(int errorCode)
           
private  int jniGetLastErrorCode()
           
private  double jniReadVoltage(int iBoard, int iChannel, int range)
           
static boolean loadLibrary()
           
 double readVoltage(int iBoard, int iChannel, int range)
           
static java.lang.String sayBibolarRange(int range)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BIP20VOLTS

public static final int BIP20VOLTS
See Also:
Constant Field Values

BIP10VOLTS

public static final int BIP10VOLTS
See Also:
Constant Field Values

BIP5VOLTS

public static final int BIP5VOLTS
See Also:
Constant Field Values

BIP4VOLTS

public static final int BIP4VOLTS
See Also:
Constant Field Values

BIP2PT5VOLTS

public static final int BIP2PT5VOLTS
See Also:
Constant Field Values

BIP2VOLTS

public static final int BIP2VOLTS
See Also:
Constant Field Values

BIP1PT25VOLTS

public static final int BIP1PT25VOLTS
See Also:
Constant Field Values

BIP1VOLTS

public static final int BIP1VOLTS
See Also:
Constant Field Values

BIPPT625VOLTS

public static final int BIPPT625VOLTS
See Also:
Constant Field Values

BIPPT5VOLTS

public static final int BIPPT5VOLTS
See Also:
Constant Field Values

BIPPT25VOLTS

public static final int BIPPT25VOLTS
See Also:
Constant Field Values

BIPPT2VOLTS

public static final int BIPPT2VOLTS
See Also:
Constant Field Values

BIPPT1VOLTS

public static final int BIPPT1VOLTS
See Also:
Constant Field Values

BIPPT05VOLTS

public static final int BIPPT05VOLTS
See Also:
Constant Field Values

BIPPT01VOLTS

public static final int BIPPT01VOLTS
See Also:
Constant Field Values

BIPPT005VOLTS

public static final int BIPPT005VOLTS
See Also:
Constant Field Values

BIP1PT67VOLTS

public static final int BIP1PT67VOLTS
See Also:
Constant Field Values

bipolarRanges

public static final int[] bipolarRanges

UNI10VOLTS

public static final int UNI10VOLTS
See Also:
Constant Field Values

UNI5VOLTS

public static final int UNI5VOLTS
See Also:
Constant Field Values

UNI4VOLTS

public static final int UNI4VOLTS
See Also:
Constant Field Values

UNI2PT5VOLTS

public static final int UNI2PT5VOLTS
See Also:
Constant Field Values

UNI2VOLTS

public static final int UNI2VOLTS
See Also:
Constant Field Values

UNI1PT67VOLTS

public static final int UNI1PT67VOLTS
See Also:
Constant Field Values

UNI1PT25VOLTS

public static final int UNI1PT25VOLTS
See Also:
Constant Field Values

UNI1VOLTS

public static final int UNI1VOLTS
See Also:
Constant Field Values

UNIPT5VOLTS

public static final int UNIPT5VOLTS
See Also:
Constant Field Values

UNIPT25VOLTS

public static final int UNIPT25VOLTS
See Also:
Constant Field Values

UNIPT2VOLTS

public static final int UNIPT2VOLTS
See Also:
Constant Field Values

UNIPT1VOLTS

public static final int UNIPT1VOLTS
See Also:
Constant Field Values

UNIPT05VOLTS

public static final int UNIPT05VOLTS
See Also:
Constant Field Values

UNIPT02VOLTS

public static final int UNIPT02VOLTS
See Also:
Constant Field Values

UNIPT01VOLTS

public static final int UNIPT01VOLTS
See Also:
Constant Field Values

SILIB

private static final java.lang.String SILIB
See Also:
Constant Field Values

loadTried

private static boolean loadTried

loadOK

private static boolean loadOK

MAXMCCBOARDS

private static final int MAXMCCBOARDS
See Also:
Constant Field Values

MCCERRORVALUE

public static final double MCCERRORVALUE
See Also:
Constant Field Values

boardList

private java.util.ArrayList<java.lang.String> boardList
Constructor Detail

MccJniInterface

public MccJniInterface()
Method Detail

getBipolarRangeIndex

public static int getBipolarRangeIndex(int range)
Work out where in the list of bipolar ranges a particular range is. Used for setting combo box list positions.

Parameters:
range - bipolar MCC range
Returns:
index in bipolarRanges list. or -1 if range not found.

sayBibolarRange

public static java.lang.String sayBibolarRange(int range)

jniGetBoardName

private java.lang.String jniGetBoardName(int iBoard)

jniReadVoltage

private double jniReadVoltage(int iBoard,
                              int iChannel,
                              int range)

jniGetLastErrorCode

private int jniGetLastErrorCode()

jniGetErrorString

private java.lang.String jniGetErrorString(int errorCode)

loadLibrary

public static boolean loadLibrary()

getNumBoards

public int getNumBoards()

createBoardList

private void createBoardList()

getBoardName

public java.lang.String getBoardName(int iBoard)

readVoltage

public double readVoltage(int iBoard,
                          int iChannel,
                          int range)

getLastErrorCode

public int getLastErrorCode()

getErrorString

public java.lang.String getErrorString(int errorCode)