|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MeasurementService
The MeasurementService interface defines the MeasurementService concept. A MeasurementService is a persistant store of a value which exists on a hardware device. The reading and writing methods are used in order to modify the value of the MeasurementService. An application may register interest by using the MeasurementListener interface, and be notified whenever the MeasurementService changes.
Measurement,
ControlService,
MeasurementListener| Method Summary | |
|---|---|
void |
addMeasurementListener(MeasurementListener measurementListener)
Adds the specified listener to receive measurement listener notification. |
void |
executeRead()
Forces an asyncronous hardware read of the current value. |
void |
executeWrite(java.lang.Object value)
Forces an asyncronous hardware write of the specified value. |
java.lang.Object |
getTimestamp()
Gets the Object timestamp property value. |
java.lang.Object |
getValue()
Returns the locally cached value of the measurement. |
java.lang.Object |
read(long timeout)
Perform the read method and return the Object result. |
void |
removeMeasurementListener(MeasurementListener measurementListener)
Removes the specified listener from receiving listener notification. |
void |
setValue(java.lang.Object value)
This method forces a synchronous write of the locally cached value. |
| Methods inherited from interface org.eclipse.soda.dk.device.service.ControlService |
|---|
getKey |
| Method Detail |
|---|
void addMeasurementListener(MeasurementListener measurementListener)
measurementListener - The org.eclipse.soda.dk.measurement.service.MeasurementListener listener to be added.removeMeasurementListener(MeasurementListener)void executeRead()
void executeWrite(java.lang.Object value)
value - java.lang.Objectjava.lang.Object getTimestamp()
Object timestamp property value.
This method returns the time of the last value received from the hardware device.
java.lang.Object getValue()
setValue(Object)
java.lang.Object read(long timeout)
throws java.lang.RuntimeException
Object result.
This method forces a synchronous hardware read with a timeout specified in milliseconds.
timeout - long
Object) value.
java.lang.RuntimeException - Thrown if the read command does not result in a response from the device.void removeMeasurementListener(MeasurementListener measurementListener)
measurementListener - The org.eclipse.soda.dk.measurement.service.MeasurementListener listener to be removed.addMeasurementListener(MeasurementListener)void setValue(java.lang.Object value)
value - The new property value (java.lang.Object).getValue()
|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||