org.lsst.ccs.subsystems.fcs.drivers
Class CanOpenADC

java.lang.Object
  extended by java.util.Observable
      extended by org.lsst.ccs.framework.Module
          extended by org.lsst.ccs.subsystems.fcs.drivers.CanOpenADC
All Implemented Interfaces:
Serializable, Observer, PieceOfHardware

public class CanOpenADC
extends org.lsst.ccs.framework.Module
implements PieceOfHardware

This is the driver class for the ADC we use in the FCS test bench and in SINGLE FILTER TEST CAN-CBX-AI814

Author:
virieux
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.lsst.ccs.framework.Module
org.lsst.ccs.framework.Module.ValueUpdate
 
Field Summary
static double adcVoltsPerBit
          One bit read on the input of the ADC represents 0.3125 mV
static double waterFreezeTemp
           
 
Fields inherited from class org.lsst.ccs.framework.Module
configMethods, log, name, nObserverThreads, registry, tickMillis
 
Constructor Summary
CanOpenADC()
           
CanOpenADC(String nodeID, String serial)
           
 
Method Summary
 String getNodeID()
           
 String getSerialNB()
           
 void initialize()
           
 void initModule()
           
 boolean isConfigOK()
           
 String readAnalogInput(int inputNB)
          Read the analog input whom number is given as a parameter
 String readInputs()
           
 void setNodeID(String nodeID)
           
 void setSerialNB(String serialNB)
           
 String toString()
           
 
Methods inherited from class org.lsst.ccs.framework.Module
change, checkHardware, dropConfigurationContext, getCheckedValueFromConfiguration, getContext, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, newConfigurationContext, notifyChange, notifyChangeWithoutPreliminaryChecks, processUpdate, publishData, publishData, publishData, publishData, register, register, sendToReply, sendToStatus, setBeanName, setContext, setName, setNObserverThreads, setObservables, setStateModularSubsystem, setStateModularSubsystem, setTickMillis, shutdownCommand, shutdownNow, start, startTicking, tick, update
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.lsst.ccs.subsystems.fcs.common.PieceOfHardware
getName
 

Field Detail

adcVoltsPerBit

public static final double adcVoltsPerBit
One bit read on the input of the ADC represents 0.3125 mV

See Also:
Constant Field Values

waterFreezeTemp

public static final double waterFreezeTemp
See Also:
Constant Field Values
Constructor Detail

CanOpenADC

public CanOpenADC()

CanOpenADC

public CanOpenADC(String nodeID,
                  String serial)
Method Detail

getSerialNB

public String getSerialNB()
Specified by:
getSerialNB in interface PieceOfHardware

getNodeID

public String getNodeID()
Specified by:
getNodeID in interface PieceOfHardware

setSerialNB

public void setSerialNB(String serialNB)
Parameters:
serialNB - the serialNB to set

setNodeID

public void setNodeID(String nodeID)
Parameters:
nodeID - the nodeID to set

isConfigOK

public boolean isConfigOK()
Specified by:
isConfigOK in interface PieceOfHardware
Returns:
true If this piece of hardware is booted and its configuration on the hardware is the same than the one in the Configuration DB.

initModule

public void initModule()
Overrides:
initModule in class org.lsst.ccs.framework.Module

readAnalogInput

public String readAnalogInput(int inputNB)
                       throws SDORequestError,
                              HardwareNotDetectedException
Read the analog input whom number is given as a parameter

Parameters:
input - : integer from 1 to 8
Returns:
the value read in hexa (on 16bits)
Throws:
SDORequestError
HardwareNotDetectedException

readInputs

public String readInputs()
                  throws TimeoutException
Throws:
TimeoutException

initialize

public void initialize()
Specified by:
initialize in interface PieceOfHardware

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 LSST. All Rights Reserved.