Preparing Makefiles, stub, skeleton, config files, etc. for porting LifxLightBulb...
[iot2.git] / benchmarks / original_interfaces / MoistureSensor.java
1 package iotcode.interfaces;
2
3 // Standard Java Packages
4 import java.util.Date;
5
6 //RMI packages
7 import java.rmi.Remote;
8 import java.rmi.RemoteException;
9
10 // Checker annotations
11 import iotchecker.qual.*;
12
13
14 /** Class Moisture sensor interface for Moisture sensor devices.
15  *
16  * @author      Ali Younis <ayounis @ uci.edu>
17  * @version     1.0
18  * @since       2016-04-19
19  */
20 public interface MoistureSensor extends Remote {
21
22         /** Method to get the latests moisture reading from the sensor
23          *
24          *   @return [float] Moisture as a percentage.
25          */
26         public float getMoisture() throws RemoteException;
27
28
29         /** Method to get the latests moisture reading timestamp from the sensor
30          *
31          *   @return [Date] timestamp of latest moisture reading, null if no reading occurred yet.
32          */
33         public Date getTimestampOfLastReading() throws RemoteException;
34
35
36         /** Method to initialize the moisture sensor.
37          *
38          *   @param None.
39          *
40          *   @return [void] None.
41          */
42         public void init() throws RemoteException;
43
44
45         /** Register an object to retrieve callbacks when new sensor reading is available
46          *
47          *   @param _callbackTo [MoistureSensorCallback].
48          *
49          *   @return [void] None.
50          */
51         public void registerCallback(@NonLocalRemote MoistureSensorCallback _callbackTo) throws RemoteException;
52 }
53
54
55
56
57
58
59
60
61
62
63
64
65
66