org.lsst.ccs.subsystems.fcs.common
Class Sensor12bits

java.lang.Object
  extended by java.util.Observable
      extended by org.lsst.ccs.framework.Module
          extended by org.lsst.ccs.subsystems.fcs.common.Sensor12bits
All Implemented Interfaces:
java.io.Serializable, java.util.Observer, Sensor
Direct Known Subclasses:
CanOpenSensor12bits, SimuSensor12bits

public abstract class Sensor12bits
extends org.lsst.ccs.framework.Module
implements Sensor

This class represents a 12bits sensor : the value returned by the sensor is coded with 12 bits, so its value is between 0 and 4095.

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.framework.Module
log, nObserverThreads, registry, tickMillis
 
Constructor Summary
Sensor12bits()
           
 
Method Summary
 int getMaxValue()
           
 int getValue()
           
 void setValue(int aValue)
           
 java.lang.String toString()
           
 void updateValue()
          This method updates the sensor value : first it reads a new value from the hardware or from the simulated sensor, then it checks if the value is in the range between minimal value and maximal value.
 
Methods inherited from class org.lsst.ccs.framework.Module
getContext, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, initModule, listens, processUpdate, publishData, publishData, publishData, publishData, sendToReply, sendToStatus, setBeanName, setContext, setName, setNObserverThreads, setObservables, setStateModularSubsystem, setStateModularSubsystem, setTickMillis, shutdownNow, start, 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.Sensor
readNewValue
 

Constructor Detail

Sensor12bits

public Sensor12bits()
Method Detail

getValue

public int getValue()
Specified by:
getValue in interface Sensor
Returns:
the field value for the object Sensor

setValue

public void setValue(int aValue)

getMaxValue

public int getMaxValue()
Returns:
the maxValue

updateValue

public void updateValue()
This method updates the sensor value : first it reads a new value from the hardware or from the simulated sensor, then it checks if the value is in the range between minimal value and maximal value. If it's ok it updates the sensor value with the new value, otherwise it throws an exception.

Specified by:
updateValue in interface Sensor

toString

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


Copyright © 2012 LSST. All Rights Reserved.