1 package iotcode.interfaces;
4 // Standard Java Packages
5 import java.util.ArrayList;
6 import java.awt.image.BufferedImage;
9 import java.util.ArrayList;
12 import java.rmi.Remote;
13 import java.rmi.RemoteException;
17 /** Class Sprinkler interface for sprinkler devices.
19 * @author Ali Younis <ayounis @ uci.edu>
23 public interface Sprinkler extends Remote {
25 /** Method to set the state of a specified zone
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.
31 * @return [void] None.
33 public void setZone(int _zone, boolean _onOff, int _onDurationSeconds) throws RemoteException;
36 /** Method to get the current state of all the zones.
40 * @return [List<ZoneState>] list of the states for the zones.
42 public List<ZoneState> getZoneStates() throws RemoteException;
45 /** Method to get the number of zones this sprinkler can control.
49 * @return [int] number of zones that can be controlled.
51 public int getNumberOfZones() throws RemoteException;
54 /** Method to get whether or not this sprinkler can control durations.
58 * @return [boolean] boolean if this sprinkler can do durations.
60 public boolean doesHaveZoneTimers() throws RemoteException;
63 /** Method to initialize the sprinkler.
67 * @return [void] None.
69 public void init() throws RemoteException;