public class APC7900 extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
APC7900.ConnType
Public enumerations.
|
| Constructor and Description |
|---|
APC7900() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the connection
|
int |
delayedOutletOff(int outlet)
Turns outlet power off with delay.
|
int |
delayedOutletOff(String outlet)
Turns named outlet power off with delay.
|
int |
delayedOutletOn(int outlet)
Turns outlet power on with delay.
|
int |
delayedOutletOn(String outlet)
Turns named outlet power on with delay.
|
int |
delayedOutletsOff(int[] outlets)
Turns outlets power off with delay.
|
int |
delayedOutletsOff(String[] outlets)
Turns named outlets power off with delay.
|
int |
delayedOutletsOn(int[] outlets)
Turns outlets power on with delay.
|
int |
delayedOutletsOn(String[] outlets)
Turns named outlets power on with delay.
|
String |
getFWVersion()
Gets the firmware version
|
int |
getOutletCount()
Gets the number of outlets
|
String |
getOutletName(int outlet)
Gets the name of an outlet
|
int |
getOutletNumber(String outlet)
Gets an outlet number, given its name
|
Map<String,Integer> |
getOutletNumberMap()
Gets the map of outlet names to numbers
|
int |
getOutletOffDelay(int outlet)
Gets the off delay for an outlet
|
int |
getOutletOffDelay(String outlet)
Gets the off delay for a named outlet
|
Map<String,Integer> |
getOutletOffDelayMap()
Gets the map of outlet names to off delays
|
int[] |
getOutletOffDelays()
Gets the off delay for all outlets
|
int |
getOutletOnDelay(int outlet)
Gets the on delay for an outlet
|
int |
getOutletOnDelay(String outlet)
Gets the on delay for a named outlet
|
Map<String,Integer> |
getOutletOnDelayMap()
Gets the map of outlet names to on delays
|
int[] |
getOutletOnDelays()
Gets the on delay for all outlets
|
Map<String,Boolean> |
getOutletOnStateMap()
Gets the map of outlet names to on (powered) states
|
boolean[] |
getOutletOnStates()
Gets the on (powered) state of all outlets
|
int |
getPhaseCount()
Gets the number of phases
|
String |
getProductName()
Gets the product name
|
String |
getPrompt()
Gets the prompt
|
boolean |
isOutletOn(int outlet)
Gets the on (powered) state of an outlet
|
boolean |
isOutletOn(String outlet)
Gets the on (powered) state of an outlet
|
void |
open(APC7900.ConnType connType,
String ident)
Opens a connection.
|
void |
open(APC7900.ConnType connType,
String ident,
String username,
String password)
Opens a connection and logs in.
|
double[] |
readCurrent()
Reads input currents, one per phase
|
double |
readPower()
Reads input power
|
double[] |
readPowers()
Reads input VA and power
|
double |
readVA()
Reads input VA
|
String[] |
receive()
Receives a response
|
String[] |
receive(String command)
Sends a command and receives the response
|
String[] |
receiveString(String command)
Sends a command and receives a string array
|
void |
send(String command)
Sends a command
|
void |
setOutletName(int outlet,
String name)
Sets the name of an outlet
|
int |
setOutletOff(int outlet)
Turns outlet power off immediately.
|
int |
setOutletOff(String outlet)
Turns named outlet power off immediately.
|
void |
setOutletOffDelay(int delay,
int outlet)
Sets outlet off delay.
|
void |
setOutletOffDelay(int delay,
int[] outlets)
Sets outlets off delay.
|
void |
setOutletOffDelay(int delay,
String outlet)
Sets named outlet off delay.
|
void |
setOutletOffDelay(int delay,
String[] outlets)
Sets named outlets off delay.
|
int |
setOutletOn(int outlet)
Turns outlet power on immediately.
|
int |
setOutletOn(String outlet)
Turns named outlet power on immediately.
|
void |
setOutletOnDelay(int delay,
int outlet)
Sets outlet on delay.
|
void |
setOutletOnDelay(int delay,
int[] outlets)
Sets outlets on delay.
|
void |
setOutletOnDelay(int delay,
String outlet)
Sets named outlet on delay.
|
void |
setOutletOnDelay(int delay,
String[] outlets)
Sets named outlets on delay.
|
int |
setOutletsOff(int[] outlets)
Turns outlets power off immediately.
|
int |
setOutletsOff(String[] outlets)
Turns named outlets power off immediately.
|
int |
setOutletsOn(int[] outlets)
Turns outlets power on immediately.
|
int |
setOutletsOn(String[] outlets)
Turns named outlets power on immediately.
|
public void open(APC7900.ConnType connType, String ident, String username, String password) throws org.lsst.ccs.drivers.commons.DriverException
connType - The enumerated connection type: TELNET, FTDI or SERIALident - The host name (TELNET), USB ID (FTDI) or port name (SERIAL)username - The user namepassword - The passwordorg.lsst.ccs.drivers.commons.DriverExceptionpublic void open(APC7900.ConnType connType, String ident) throws org.lsst.ccs.drivers.commons.DriverException
connType - The enumerated connection type: FTDI or SERIALident - The USB ID (FTDI) or port name (SERIAL)org.lsst.ccs.drivers.commons.DriverExceptionpublic void close()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic String getProductName() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic String getFWVersion() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int getPhaseCount()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int getOutletCount()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic String getOutletName(int outlet) throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet number, starting from 1org.lsst.ccs.drivers.commons.DriverExceptionpublic void setOutletName(int outlet,
String name)
throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet number, starting from 1name - The outlet nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic int getOutletNumber(String outlet) throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic Map<String,Integer> getOutletNumberMap() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int getOutletOnDelay(int outlet)
throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet number, starting from 1org.lsst.ccs.drivers.commons.DriverExceptionpublic int getOutletOffDelay(int outlet)
throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet number, starting from 1org.lsst.ccs.drivers.commons.DriverExceptionpublic int getOutletOnDelay(String outlet) throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic int getOutletOffDelay(String outlet) throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic int[] getOutletOnDelays()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int[] getOutletOffDelays()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic Map<String,Integer> getOutletOnDelayMap() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic Map<String,Integer> getOutletOffDelayMap() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void setOutletOnDelay(int delay,
int outlet)
throws org.lsst.ccs.drivers.commons.DriverException
delay - The delay (sec) before the outlet is powered on (-1 = never)outlet - The outlet number, starting from 1org.lsst.ccs.drivers.commons.DriverExceptionpublic void setOutletOffDelay(int delay,
int outlet)
throws org.lsst.ccs.drivers.commons.DriverException
delay - The delay (sec) before the outlet is powered off (-1 = never)outlet - The outlet number, starting from 1org.lsst.ccs.drivers.commons.DriverExceptionpublic void setOutletOnDelay(int delay,
String outlet)
throws org.lsst.ccs.drivers.commons.DriverException
delay - The delay (sec) before the outlet is powered on (-1 = never)outlet - The outlet nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setOutletOffDelay(int delay,
String outlet)
throws org.lsst.ccs.drivers.commons.DriverException
delay - The delay (sec) before the outlet is powered off (-1 = never)outlet - The outlet nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setOutletOnDelay(int delay,
int[] outlets)
throws org.lsst.ccs.drivers.commons.DriverException
delay - The delay (sec) before the outlet is powered on (-1 = never)outlets - The array of outlet numbersorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setOutletOffDelay(int delay,
int[] outlets)
throws org.lsst.ccs.drivers.commons.DriverException
delay - The delay (sec) before the outlet is powered off (-1 = never)outlets - The array of outlet numbersorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setOutletOnDelay(int delay,
String[] outlets)
throws org.lsst.ccs.drivers.commons.DriverException
delay - The delay (sec) before the outlet is powered on (-1 = never)outlets - The array of outlet namesorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setOutletOffDelay(int delay,
String[] outlets)
throws org.lsst.ccs.drivers.commons.DriverException
delay - The delay (sec) before the outlet is powered off (-1 = never)outlets - The array of outlet namesorg.lsst.ccs.drivers.commons.DriverExceptionpublic boolean isOutletOn(int outlet)
throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet number, starting from 1org.lsst.ccs.drivers.commons.DriverExceptionpublic boolean isOutletOn(String outlet) throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic boolean[] getOutletOnStates()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic Map<String,Boolean> getOutletOnStateMap() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int setOutletOn(int outlet)
throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet number, starting from 1org.lsst.ccs.drivers.commons.DriverExceptionpublic int setOutletOff(int outlet)
throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet number, starting from 1org.lsst.ccs.drivers.commons.DriverExceptionpublic int setOutletOn(String outlet) throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic int setOutletOff(String outlet) throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic int setOutletsOn(int[] outlets)
throws org.lsst.ccs.drivers.commons.DriverException
outlets - An array of outlet numbersorg.lsst.ccs.drivers.commons.DriverExceptionpublic int setOutletsOff(int[] outlets)
throws org.lsst.ccs.drivers.commons.DriverException
outlets - An array of outlet numbersorg.lsst.ccs.drivers.commons.DriverExceptionpublic int setOutletsOn(String[] outlets) throws org.lsst.ccs.drivers.commons.DriverException
outlets - An array of outlet namesorg.lsst.ccs.drivers.commons.DriverExceptionpublic int setOutletsOff(String[] outlets) throws org.lsst.ccs.drivers.commons.DriverException
outlets - An array of outlet namesorg.lsst.ccs.drivers.commons.DriverExceptionpublic int delayedOutletOn(int outlet)
throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet number, starting from 1org.lsst.ccs.drivers.commons.DriverExceptionpublic int delayedOutletOff(int outlet)
throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet number, starting from 1org.lsst.ccs.drivers.commons.DriverExceptionpublic int delayedOutletOn(String outlet) throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic int delayedOutletOff(String outlet) throws org.lsst.ccs.drivers.commons.DriverException
outlet - The outlet nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic int delayedOutletsOn(int[] outlets)
throws org.lsst.ccs.drivers.commons.DriverException
outlets - An array of outlet numbersorg.lsst.ccs.drivers.commons.DriverExceptionpublic int delayedOutletsOff(int[] outlets)
throws org.lsst.ccs.drivers.commons.DriverException
outlets - An array of outlet numbersorg.lsst.ccs.drivers.commons.DriverExceptionpublic int delayedOutletsOn(String[] outlets) throws org.lsst.ccs.drivers.commons.DriverException
outlets - An array of outlet namesorg.lsst.ccs.drivers.commons.DriverExceptionpublic int delayedOutletsOff(String[] outlets) throws org.lsst.ccs.drivers.commons.DriverException
outlets - An array of outlet namesorg.lsst.ccs.drivers.commons.DriverExceptionpublic double[] readCurrent()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic double readVA()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic double readPower()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic double[] readPowers()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic String[] receiveString(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to sendorg.lsst.ccs.drivers.commons.DriverExceptionpublic void send(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to sendorg.lsst.ccs.drivers.commons.DriverExceptionpublic String[] receive() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic String[] receive(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to sendorg.lsst.ccs.drivers.commons.DriverExceptionpublic String getPrompt()
Copyright © 2017 LSST. All rights reserved.