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.CanOpenDevice
              extended by org.lsst.ccs.subsystems.fcs.drivers.CanOpenADC
All Implemented Interfaces:
Serializable, Observer, org.lsst.ccs.framework.Configurable, PieceOfHardware

public class CanOpenADC
extends CanOpenDevice

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
 
Nested classes/interfaces inherited from interface org.lsst.ccs.framework.Configurable
org.lsst.ccs.framework.Configurable.Environment
 
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
environment, log, name, nObserverThreads, registry, tickMillis
 
Constructor Summary
CanOpenADC()
           
CanOpenADC(String transmissionType, String serialNB, String nodeID)
           
 
Method Summary
 String getTransmissionType()
           
 String initializeHardware()
          This methods has to be overridden if there is some initialization to do for the device.
 String readAnalogInput(int inputNB)
          Read the analog input whom number is given as a parameter
 void setTransmissionType(String transmission_type)
           
 
Methods inherited from class org.lsst.ccs.subsystems.fcs.drivers.CanOpenDevice
getNodeID, getSerialNB, initModule, isInitalized, isNodeIdBootedAndOK, readSDO, setNodeID, setSerialNB, toString, writeSDO
 
Methods inherited from class org.lsst.ccs.framework.Module
change, checkHardware, dropConfigurationContext, getCheckedValueFromConfiguration, getChildren, getContext, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, newConfigurationContext, notifyChange, notifyChangeWithoutPreliminaryChecks, processUpdate, publishData, publishData, publishData, publishData, register, register, sendToReply, sendToStatus, setBeanName, setContext, setEnvironment, 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 transmissionType,
                  String serialNB,
                  String nodeID)
Method Detail

getTransmissionType

public String getTransmissionType()

setTransmissionType

public void setTransmissionType(String transmission_type)

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

initializeHardware

public String initializeHardware()
                          throws SDORequestError,
                                 org.lsst.ccs.bus.ErrorInCommandExecutionException,
                                 org.lsst.ccs.bus.BadCommandException
Description copied from class: CanOpenDevice
This methods has to be overridden if there is some initialization to do for the device.

Specified by:
initializeHardware in interface PieceOfHardware
Overrides:
initializeHardware in class CanOpenDevice
Returns:
a message
Throws:
SDORequestError
org.lsst.ccs.bus.ErrorInCommandExecutionException
org.lsst.ccs.bus.BadCommandException


Copyright © 2013 LSST. All Rights Reserved.