com.gatespace.service.adc.impl
Class ADC16LowLevel

java.lang.Object
  |
  +--com.gatespace.service.adc.impl.ADC16LowLevel

public class ADC16LowLevel
extends java.lang.Object
implements ADCLowLevel

Handles low-level protocol to ADC 16


Field Summary
protected  int adc_type
           
protected  int adc_version
           
protected  byte[] buf
           
protected  java.io.InputStream in
           
protected  java.io.OutputStream out
           
protected static byte REQUEST_VERSION
           
 
Constructor Summary
ADC16LowLevel()
           
 
Method Summary
 int getChannelCount()
          Number of channels
 int getDifferentialMode()
          Measure in differetial mode
 int getResolutionMax()
          Maximum number of bits in resolution
 int getResolutionMin()
          Minimum number of bits in resolution
 int getSingleEndedMode()
          Measure in single-ended mode
 int getType()
          Get type of attached ADC
 int getVersion()
          Get version of attached ADC
 boolean isValid()
          Return true if attached ADC is valid
 int readValue(Channel channel)
          Read an int value from ADC unit.
 boolean wakeup(com.gatespace.service.adc.impl.SerialPort serialPort)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buf

protected byte[] buf

REQUEST_VERSION

protected static byte REQUEST_VERSION

adc_type

protected int adc_type

adc_version

protected int adc_version

in

protected java.io.InputStream in

out

protected java.io.OutputStream out
Constructor Detail

ADC16LowLevel

public ADC16LowLevel()
Method Detail

getResolutionMin

public int getResolutionMin()
Description copied from interface: ADCLowLevel
Minimum number of bits in resolution
Specified by:
getResolutionMin in interface ADCLowLevel

getResolutionMax

public int getResolutionMax()
Description copied from interface: ADCLowLevel
Maximum number of bits in resolution
Specified by:
getResolutionMax in interface ADCLowLevel

getChannelCount

public int getChannelCount()
Description copied from interface: ADCLowLevel
Number of channels
Specified by:
getChannelCount in interface ADCLowLevel

getSingleEndedMode

public int getSingleEndedMode()
Description copied from interface: ADCLowLevel
Measure in single-ended mode
Specified by:
getSingleEndedMode in interface ADCLowLevel

getDifferentialMode

public int getDifferentialMode()
Description copied from interface: ADCLowLevel
Measure in differetial mode
Specified by:
getDifferentialMode in interface ADCLowLevel

getType

public int getType()
Description copied from interface: ADCLowLevel
Get type of attached ADC
Specified by:
getType in interface ADCLowLevel

getVersion

public int getVersion()
Description copied from interface: ADCLowLevel
Get version of attached ADC
Specified by:
getVersion in interface ADCLowLevel

isValid

public boolean isValid()
Description copied from interface: ADCLowLevel
Return true if attached ADC is valid
Specified by:
isValid in interface ADCLowLevel

wakeup

public boolean wakeup(com.gatespace.service.adc.impl.SerialPort serialPort)

readValue

public int readValue(Channel channel)
              throws java.io.IOException
Read an int value from ADC unit.
Specified by:
readValue in interface ADCLowLevel