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

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

public class CanOpenNumericSensor
extends NumericSensor

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
 
Fields inherited from class org.lsst.ccs.subsystems.fcs.NumericSensor
digitalValue
 
Fields inherited from class org.lsst.ccs.framework.Module
configMethods, log, name, nObserverThreads, registry, tickMillis
 
Constructor Summary
CanOpenNumericSensor()
           
 
Method Summary
 CanOpenDIO getDio()
           
 int getInputNumero()
           
 void setDio(CanOpenDIO dio)
           
 void setInputNumero(int inputNumero)
           
 void updateValue(String hex)
          This methods updates the digital value for this sensor.
 
Methods inherited from class org.lsst.ccs.subsystems.fcs.NumericSensor
getDigitalValue, initModule, setDigitalValue
 
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, toString, wait, wait, wait
 

Constructor Detail

CanOpenNumericSensor

public CanOpenNumericSensor()
Method Detail

getDio

public CanOpenDIO getDio()

setDio

public void setDio(CanOpenDIO dio)

getInputNumero

public int getInputNumero()

setInputNumero

public void setInputNumero(int inputNumero)

updateValue

public void updateValue(String hex)
This methods updates the digital value for this sensor. It takes as an argument the value in hexa sent by the CompactIOModule. This hexa value represents the 8 values for the 8 channels. To retrieve the value for this sensor, the hexa value is transformed in binary, then reverse and the digital value is the digit at the index= inputNumero. exmaple if hex = 80, and inputNumero=8, digital value=1 otherwise digital value=0.

Specified by:
updateValue in class NumericSensor
Parameters:
hex -


Copyright © 2012 LSST. All Rights Reserved.