|
2009-01-09 1.2.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.
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 |
executeRead(ChannelService channel)
Forces an asyncronous hardware read of the current value. |
void |
executeWrite(ChannelService channel,
java.lang.Object value)
Forces an asyncronous hardware write of the specified 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 |
getTimestamp(ChannelService channel)
Gets the Object timestamp property value. |
java.lang.Object |
getValue()
Returns the locally cached value of the measurement. |
java.lang.Object |
getValue(ChannelService channel)
Returns the locally cached value of the measurement. |
java.lang.Object |
read(ChannelService channel,
long timeout)
Perform the read method and return the Object result. |
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(ChannelService channel,
java.lang.Object value)
This method forces a synchronous write of the locally cached value. |
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 measurement listener (MeasurementListener) parameter.removeMeasurementListener(MeasurementListener)void executeRead()
executeRead(ChannelService)void executeRead(ChannelService channel)
channel - The channel (ChannelService) parameter.executeRead()
void executeWrite(ChannelService channel,
java.lang.Object value)
channel - The channel (ChannelService) parameter.value - The value (Object) parameter.executeWrite(Object)void executeWrite(java.lang.Object value)
value - The value (Object) parameter.executeWrite(ChannelService,Object)java.lang.Object getTimestamp()
Object timestamp property value. This method returns the time of the last value received from the hardware device.
getTimestamp(ChannelService)java.lang.Object getTimestamp(ChannelService channel)
Object timestamp property value. This method returns the time of the last value received from the hardware device.
channel - The channel (ChannelService) parameter.
getTimestamp()java.lang.Object getValue()
getValue(ChannelService),
setValue(ChannelService,Object),
setValue(Object)java.lang.Object getValue(ChannelService channel)
channel - The channel (ChannelService) parameter.
getValue(),
setValue(ChannelService,Object),
setValue(Object)
java.lang.Object read(ChannelService channel,
long timeout)
throws java.lang.RuntimeException
Object result. This method forces a synchronous hardware read with a timeout specified in milliseconds.
channel - The channel (ChannelService) parameter.timeout - The timeout (long) parameter.
Object) value.
java.lang.RuntimeException - Runtime Exception.read(long)
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 - The timeout (long) parameter.
Object) value.
java.lang.RuntimeException - Runtime Exception.read(ChannelService,long)void removeMeasurementListener(MeasurementListener measurementListener)
measurementListener - The measurement listener (MeasurementListener) parameter.addMeasurementListener(MeasurementListener)
void setValue(ChannelService channel,
java.lang.Object value)
channel - The channel (ChannelService) parameter.value - The value (Object) parameter.getValue(),
getValue(ChannelService),
setValue(Object)void setValue(java.lang.Object value)
value - The value (Object) parameter.getValue(),
getValue(ChannelService),
setValue(ChannelService,Object)
|
2009-01-09 1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||