|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.jaetzold.art.RawSensor | +--de.jaetzold.art.LightSensor
This class represents values which are associated with some kind of light-level. It is a sensor for a particular unit of measure.
Inner classes inherited from class de.jaetzold.art.RawSensor |
RawSensor.ValueSensorPort |
Fields inherited from class de.jaetzold.art.RawSensor |
changes, precision, precisionSet, propertyChangeEventDescriptor |
Constructor Summary | |
LightSensor()
|
Method Summary | |
void |
connectWith(SensorPort port)
Connects this Sensor with the given Port. |
protected double |
convertToIncoming(double value)
This is a Template-Method for subclasses. |
void |
disconnect()
Disconnects this Sensor from it's Peer and it's Port. |
boolean |
getDeliversFloatingPoint()
Tells whether this Sensor delivers discrete values or not. |
double |
getMeasurableMax()
This is the value above which the sensor isn't accurate enough anymore. |
double |
getMeasurableMin()
This is the value below which the sensor isn't accurate enough anymore. |
Conversion |
getScalingConversion()
Returns the delegate used for scale-conversion. |
boolean |
isIncomingConversionCacheable()
This is not the same as isCacheable() from Conversion or StateDecider. |
void |
setMeasurableMax(double max)
This sets the value above which the sensor isn't accurate enough anymore. |
void |
setMeasurableMin(double min)
This sets the value below which the sensor isn't accurate enough anymore. |
void |
setScalingConversion(Conversion scalingConversion)
This is a delegate used for scale-conversion. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LightSensor()
Method Detail |
public void setScalingConversion(Conversion scalingConversion)
public Conversion getScalingConversion()
protected double convertToIncoming(double value)
RawSensor
super
.convertToIncoming
in class RawSensor
de.jaetzold.art.RawSensor
RawSensor.convertToOutgoing(double)
,
RawSensor.isIncomingConversionCacheable()
public double getMeasurableMin()
LightSensorPeer
the value is taken from it until it is set explicitly.setMeasurableMin(double)
,
RawSensor.getPrecision()
public void setMeasurableMin(double min)
RawSensor.getPrecision()
public double getMeasurableMax()
LightSensorPeer
the value is taken from it otherwise it must be set explicitly.setMeasurableMax(double)
,
RawSensor.getPrecision()
public void setMeasurableMax(double max)
RawSensor.getPrecision()
public void connectWith(SensorPort port)
RawSensor
connectWith
in class RawSensor
de.jaetzold.art.RawSensor
RawSensor.ValueSensorPort
,
RawSensor.connectWith(Port)
public void disconnect()
Sensor
disconnect
in class RawSensor
de.jaetzold.art.Sensor
Sensor.connectWith(Port)
public boolean getDeliversFloatingPoint()
RawSensor
getDeliversFloatingPoint
in class RawSensor
de.jaetzold.art.RawSensor
RawSensor.convertToIncoming(double)
,
RawSensor.setIncomingConversionDelegate(Conversion)
,
RawSensor.setOutgoingConversionDelegate(Conversion)
public boolean isIncomingConversionCacheable()
RawSensor
isCacheable()
from Conversion or StateDecider. The Conversion may depend on a delegate and that delegate can be set more than once. Therefore it would be impossible to assure that the Conversion remains cacheable. But the contract is, that as long as the delegate doesn't change you can assume that the incoming conversion remains cacheable once it has become so.isIncomingConversionCacheable
in class RawSensor
de.jaetzold.art.RawSensor
RawSensor.isOutgoingConversionCacheable()
,
RawSensor.setIncomingConversionDelegate(Conversion)
,
Conversion.isCacheable()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |