org.lsst.ccs.subsystems.fcs
Class Sensor14bits

java.lang.Object
  extended by java.util.Observable
      extended by org.lsst.ccs.framework.Module
          extended by org.lsst.ccs.subsystems.fcs.Sensor14bits
All Implemented Interfaces:
Serializable, Observer, org.lsst.ccs.framework.Configurable, Sensor
Direct Known Subclasses:
CanOpenSensor14bits, SimuSensor14bits

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

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

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
protected static int maxValue
           
protected static int minValue
           
protected  int value
           
 
Fields inherited from class org.lsst.ccs.framework.Module
environment, log, name, nObserverThreads, registry, tickMillis
 
Constructor Summary
Sensor14bits()
           
 
Method Summary
 int getValue()
          This method returns value if the sensor is not updating otherwise it waits until the update is completed and returns the new read value from the hardware.
 void initModule()
           
 void setValue(int aValue)
           
 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.
abstract  int updateValue(CanOpenProxy.PDOStorage pdoStorage)
          This methods update the field value in extracting it from the parameter sensorsValues which represents all the values read for an ADC.
 
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.Sensor
readNewValue
 

Field Detail

value

protected int value

minValue

protected static int minValue

maxValue

protected static int maxValue
Constructor Detail

Sensor14bits

public Sensor14bits()
Method Detail

initModule

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

getValue

public int getValue()
This method returns value if the sensor is not updating otherwise it waits until the update is completed and returns the new read value from the hardware.

Specified by:
getValue in interface Sensor
Returns:
value

setValue

public void setValue(int aValue)

updateValue

public void updateValue()
                 throws SensorValueOutOfRangeException,
                        HardwareError
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
Throws:
SensorValueOutOfRangeException
HardwareError

updateValue

public abstract int updateValue(CanOpenProxy.PDOStorage pdoStorage)
This methods update the field value in extracting it from the parameter sensorsValues which represents all the values read for an ADC.

Parameters:
sensorsValues -
Returns:
the value for this sensor.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 LSST. All Rights Reserved.