Developers guide
105
F. Selected code listings
F.1. Masterswitch module
F.1.1. Masterswitch.java
/**
* $Id: Masterswitch.java,v 1.4 2002/10/22 08:23:11 oliverm Exp $
* Author: Oliver Mather
*
*/
package apt.masterswitch;
import java.util.Date;
/**
* Description:
*
* <p>
* This is an interface to the APC AP9212 Masterswitch
* <a href="http://www.apc.com">www.apc.com</a>
* <p>
* It is a device that supplies 8 x 240V Power Outlets. These outlets can be
* powered on and off remotely. Controlling these outlets is the main purpose
* of the Masterswitch.java interface
*
* <p>
*
* @author $Author: oliverm $ <a href="mailto:oliverm@student.unsw.edu.au">Oliver Mather</a>
* @version $Revision: 1.4 $
* @see apt.masterswitch.MasterswitchListener
*
*/
public interface Masterswitch {
/**
* <p>
* Getting this state from an outlet means that the outlet is currenly On
* Setting an outlet to this state will switch the outlet On.
*/
public static final String OUTLET_ON = "On";
/**
* <p>
* Getting this state from an outlet means that the outlet is currenly Off
* Setting an outlet to this state will switch the outlet Off.
*/
public static final String OUTLET_OFF = "Off";
/**
* <p>
* Setting an outlet this state will Reboot the outlet.
*/
public static final String OUTLET_REBOOT = "Reboot";
/**
* This state can only be retrieved. It cannot be set.
* <p>
* An outlet will return this state when the apt.masterswitch.masterswitch cannot determine
its state.
* <p>
* If this state is returned by any outlet, all devices powered by the Masterswitch
* should be shut down. The Masterswitch's power should then be cycled
* to clear this condition.
*/
public static final String OUTLET_UNKNOWN = "Unknown";
/**
* <p>
* Setting an outlet to this state will turn the outlet on
* after the sPDUOutletPowerOnTime OID has elapsed. This option is not










