nidaqdev
Class NIDeviceInfo

java.lang.Object
  extended by nidaqdev.NIDeviceInfo

public class NIDeviceInfo
extends java.lang.Object


Field Summary
private  double[] aiVoltageRanges
           
private  int devNumber
           
private  int inputChannels
           
private  boolean isSimulated
           
private  boolean isSimultaneous
           
(package private)  double maxMultiChannelRate
           
(package private)  double maxSingleChannelRate
           
private  java.lang.String name
           
private  int outputChannels
           
private  int serialNum
           
 
Constructor Summary
NIDeviceInfo(int devNumber, java.lang.String name, int serialNum, boolean isSimulated, boolean isSimultaneous, int inputChannels, int outputChannels, double[] aiVoltageRanges)
           
 
Method Summary
 boolean canSample(double sampleRate, int nChannels)
           
 int findAIRangeIndex(double[] range)
          Get the index within a list of a voltage range
 int findAIRangeIndex(double[] range, int defaultValue)
          Get the index within a list of a voltage range
 double[] getAIVoltageRange(int iRange)
          Get a voltage range as a two element array
 double getAIVoltageRangeEnd(int iRange)
          Get the upper bound of a voltage range
 double getAIVoltageRangeStart(int iRange)
          Get the lower bound of a voltage range
 java.lang.String getAIVoltageRangeString(int iRange)
           
 int getDevNumber()
           
 java.lang.String gethoverInfo()
           
 int getInputChannels()
           
 double getMaxMultiChannelRate()
           
 double getMaxSingleChannelRate()
           
 java.lang.String getName()
           
 int getNumAIVoltageRanges()
          Get the number of voltage ranges for the device
 int getOutputChannels()
           
 int getSerialNum()
           
 boolean isExists()
           
 boolean isSimulated()
           
 boolean isSimultaneous()
           
 void setMaxMultiChannelRate(double maxMultiChannelRate)
           
 void setMaxSingleChannelRate(double maxSingleChannelRate)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

devNumber

private int devNumber

name

private java.lang.String name

serialNum

private int serialNum

isSimulated

private boolean isSimulated

isSimultaneous

private boolean isSimultaneous

inputChannels

private int inputChannels

outputChannels

private int outputChannels

aiVoltageRanges

private double[] aiVoltageRanges

maxSingleChannelRate

double maxSingleChannelRate

maxMultiChannelRate

double maxMultiChannelRate
Constructor Detail

NIDeviceInfo

public NIDeviceInfo(int devNumber,
                    java.lang.String name,
                    int serialNum,
                    boolean isSimulated,
                    boolean isSimultaneous,
                    int inputChannels,
                    int outputChannels,
                    double[] aiVoltageRanges)
Method Detail

getDevNumber

public int getDevNumber()

getName

public java.lang.String getName()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

gethoverInfo

public java.lang.String gethoverInfo()

getSerialNum

public int getSerialNum()
Returns:
the device serial number (0 for simulated or missing devices)

isSimulated

public boolean isSimulated()
Returns:
true if the device is simulated

isSimultaneous

public boolean isSimultaneous()
Returns:
the isSimultaneous

isExists

public boolean isExists()

getInputChannels

public int getInputChannels()
Returns:
the number of inputChannels

getOutputChannels

public int getOutputChannels()

getNumAIVoltageRanges

public int getNumAIVoltageRanges()
Get the number of voltage ranges for the device

Returns:
number of voltage ranges

getAIVoltageRange

public double[] getAIVoltageRange(int iRange)
Get a voltage range as a two element array

Parameters:
iRange - range index
Returns:
voltage range

getAIVoltageRangeStart

public double getAIVoltageRangeStart(int iRange)
Get the lower bound of a voltage range

Parameters:
iRange - range index
Returns:
range in volts

getAIVoltageRangeEnd

public double getAIVoltageRangeEnd(int iRange)
Get the upper bound of a voltage range

Parameters:
iRange - range index
Returns:
range in volts

getAIVoltageRangeString

public java.lang.String getAIVoltageRangeString(int iRange)
Parameters:
iRange - range index
Returns:
string describing the range (suitable for use in a combo box)

findAIRangeIndex

public int findAIRangeIndex(double[] range,
                            int defaultValue)
Get the index within a list of a voltage range

Parameters:
range - two element double array
defaultValue - default value to return
Returns:
range index or defalt value.

findAIRangeIndex

public int findAIRangeIndex(double[] range)
Get the index within a list of a voltage range

Parameters:
range - two element double array
Returns:
range index or -1 if range not found

getMaxSingleChannelRate

public double getMaxSingleChannelRate()

setMaxSingleChannelRate

public void setMaxSingleChannelRate(double maxSingleChannelRate)

getMaxMultiChannelRate

public double getMaxMultiChannelRate()

setMaxMultiChannelRate

public void setMaxMultiChannelRate(double maxMultiChannelRate)

canSample

public boolean canSample(double sampleRate,
                         int nChannels)