org.lsst.ccs.subsystems.fcs.common
Interface Sensor

All Known Implementing Classes:
CanOpenDIO, CanOpenSensor14bits, CompactIOModule, Sensor14bits, SimuCompactIOModule, SimuSensor14bits

public interface Sensor

This interface is the model of a generic sensor. It can juste return a value and update it.

Author:
virieux

Method Summary
 int getValue()
           
 int readNewValue()
          This method reads the current value in decimal measured by the hardware or compute a random value for the simulated sensor, and returns this current value.
 void updateValue()
          This method reads the current value, controls if this current value is correct depending on the type of the sensor (this value could be between a minimum and a maximum) and if the value is correct, updates the Sensor.value field.
 

Method Detail

getValue

int getValue()
Returns:
the field value for the object Sensor

readNewValue

int readNewValue()
This method reads the current value in decimal measured by the hardware or compute a random value for the simulated sensor, and returns this current value.

Returns:
the current value provided by the real or simulated sensor.

updateValue

void updateValue()
                 throws SensorValueOutOfRangeException
This method reads the current value, controls if this current value is correct depending on the type of the sensor (this value could be between a minimum and a maximum) and if the value is correct, updates the Sensor.value field.

Throws:
SensorValueOutOfRangeException


Copyright © 2012 LSST. All Rights Reserved.