Preparing Makefiles, stub, skeleton, config files, etc. for porting LifxLightBulb...
[iot2.git] / benchmarks / original_interfaces / Sprinkler.java
1 package iotcode.interfaces;
2
3
4 // Standard Java Packages
5 import java.util.ArrayList;
6 import java.awt.image.BufferedImage;
7 import java.util.Date;
8 import java.util.List;
9 import java.util.ArrayList;
10
11 //RMI packages
12 import java.rmi.Remote;
13 import java.rmi.RemoteException;
14
15
16
17 /** Class Sprinkler interface for sprinkler devices.
18  *
19  * @author      Ali Younis <ayounis @ uci.edu>
20  * @version     1.0
21  * @since       2016-03-31
22  */
23 public interface Sprinkler extends Remote {
24
25         /** Method to set the state of a specified zone
26          *
27          *   @param _zone [int]             : zone number to set.
28          *   @param _onOff [boolean]        : the state to set the zone to, on or off.
29          *   @param _onDurationSeconds [int]: the duration to set the state on to, if -1 then infinite.
30          *
31          *   @return [void] None.
32          */
33         public void setZone(int _zone, boolean _onOff, int _onDurationSeconds) throws RemoteException;
34
35
36         /** Method to get the current state of all the zones.
37          *
38          *   @param None.
39          *
40          *   @return [List<ZoneState>] list of the states for the zones.
41          */
42         public List<ZoneState> getZoneStates() throws RemoteException;
43
44
45         /** Method to get the number of zones this sprinkler can control.
46          *
47          *   @param None.
48          *
49          *   @return [int] number of zones that can be controlled.
50          */
51         public int getNumberOfZones() throws RemoteException;
52
53
54         /** Method to get whether or not this sprinkler can control durations.
55          *
56          *   @param None.
57          *
58          *   @return [boolean] boolean if this sprinkler can do durations.
59          */
60         public boolean doesHaveZoneTimers() throws RemoteException;
61
62
63         /** Method to initialize the sprinkler.
64          *
65          *   @param None.
66          *
67          *   @return [void] None.
68          */
69         public void init() throws RemoteException;
70 }
71
72
73
74
75
76
77
78
79
80
81
82
83
84