com.teravation.labjack
Class LabJackScan

java.lang.Object
  |
  +--com.teravation.labjack.LabJackScan

public class LabJackScan
extends java.lang.Object

This class holds the data for the scan data read from Burst mode. It is intended that it will also be used to hold scan information from Stream mode in the future. The interface is very similar to the LabJack interface, but each method takes the scan number as an additional parameter.

Copyright © 2003-2004 Teravation. All rights reserved.

Version:
4.0
Author:
Chris Reigrut

Method Summary
 float getAI(int channel, int scan)
          Returns the last updated voltage of the specified analog input for the specified scan, or -1.0f on an overvoltage.
 int getAvailable()
          Returns the number of scans available in this object.
 int getBacklog()
          Returns the number of scans in the backlog.
 long getCounter(int scan)
          Returns the last updated/set value of the counter for the specified scan.
 float getDifferentialAI(int channel, int scan)
          Returns the last updated voltage of the specified differential analog input for the specified scan, or -1.0f on an overvoltage.
 boolean getIO(int channel, int scan)
          Returns the last updated/set value of the specified digital input (screw terminal) for the specified scan.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAI

public float getAI(int channel,
                   int scan)
            throws LabJackException
Returns the last updated voltage of the specified analog input for the specified scan, or -1.0f on an overvoltage.

Parameters:
channel - the analog input channel to read.
scan - int the number of the scan to read.
Returns:
the voltage of the specified analog input.
Throws:
LabJackException - on any error

getDifferentialAI

public float getDifferentialAI(int channel,
                               int scan)
                        throws LabJackException
Returns the last updated voltage of the specified differential analog input for the specified scan, or -1.0f on an overvoltage. The differential channels are measured as follows:

Parameters:
channel - the differential analog input channel to read.
scan - int the number of the scan to read.
Returns:
the voltage of the specified differential analog input.
Throws:
LabJackException - on any error

getIO

public boolean getIO(int channel,
                     int scan)
              throws LabJackException
Returns the last updated/set value of the specified digital input (screw terminal) for the specified scan.

Parameters:
channel - the digital input channel to read.
scan - int the number of the scan to read.
Returns:
the value of the specified digital input.
Throws:
LabJackException - on any underlying DLL error.

getCounter

public long getCounter(int scan)
                throws LabJackException
Returns the last updated/set value of the counter for the specified scan.

Parameters:
scan - int the number of the scan to read.
Returns:
the value of the counter.
Throws:
LabJackException - on any underlying DLL error.

getAvailable

public int getAvailable()
Returns the number of scans available in this object.

Returns:
the number of scans available in this object

getBacklog

public int getBacklog()
Returns the number of scans in the backlog.

Returns:
the number of scans in the backlog