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

All Known Implementing Classes:
CanOpenDIO, CanOpenSensor14bits, CanOpenThermometer, CompactIOModule, Sensor14bits, SimuClampFilterPresenceSensor, SimuClampLockSensor, 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()
                 throws HardwareError
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.
Throws:
HardwareError

updateValue

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


Copyright © 2013 LSST. All Rights Reserved.