public class TestWattsUp extends Object implements WattsUp.Listener
| Modifier and Type | Class and Description |
|---|---|
static class |
TestWattsUp.Currency |
static class |
TestWattsUp.DataType |
static class |
TestWattsUp.LogType |
static class |
TestWattsUp.MemFullAction |
static class |
TestWattsUp.OnOff |
| Constructor and Description |
|---|
TestWattsUp() |
| Modifier and Type | Method and Description |
|---|---|
void |
calShow()
Shows calibration data.
|
void |
close()
Closes meter connection.
|
void |
dataShow(TestWattsUp.DataType type)
Shows data.
|
void |
fldSet(int mask)
Sets the mask of logged fields.
|
void |
fldShow()
Shows the mask of logged fields.
|
void |
hdrShow()
Shows header strings.
|
void |
intSet(int intvl)
Sets the logging interval.
|
void |
limShow()
Shows the record limit.
|
void |
listen(TestWattsUp.OnOff action)
Turns the listener on or off.
|
void |
logSet(TestWattsUp.LogType type,
int intvl)
Sets the logging type and interval.
|
void |
logShow()
Shows the logging interval and state.
|
void |
memSet(TestWattsUp.MemFullAction action)
Sets the memory-full action.
|
void |
memShow()
Shows the memory-full action.
|
void |
open(String ident)
Opens connection to a meter.
|
void |
parmSet(double rate,
int thresh)
Sets the user parameters.
|
void |
parmSet(double rate,
int thresh,
TestWattsUp.Currency curr)
Sets the user parameters.
|
void |
parmShow()
Shows the user parameters.
|
void |
processData(double[] data)
Processes logged data.
|
void |
reset()
Resets memory.
|
void |
restart()
Restarts the meter.
|
void |
setClosed()
Handles error-induced port closure
|
void |
setPowered(boolean on)
Handles powered state change
|
void |
verShow()
Shows the version strings.
|
@Command(description="Open connection to meter")
public void open(@Argument(description="Device identification")
String ident)
throws org.lsst.ccs.drivers.commons.DriverException
ident - The device nameorg.lsst.ccs.drivers.commons.DriverException@Command(description="Close connection to meter")
public void close()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(description="Enable or disable the listener")
public void listen(@Argument(description="Action to take")
TestWattsUp.OnOff action)
action - Action to take: on or off@Command(name="fldset",
description="Set the mask of logged fields")
public void fldSet(@Argument(name="mask",description="Mask to set")
int mask)
throws org.lsst.ccs.drivers.commons.DriverException
mask - Mask of fields to be loggedorg.lsst.ccs.drivers.commons.DriverException@Command(name="fldshow",
description="Show the mask of logged fields")
public void fldShow()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="calshow",
description="Show the calibration data")
public void calShow()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="hdrshow",
description="Show the header strings")
public void hdrShow()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="limshow",
description="Show the record limit")
public void limShow()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="memset",
description="Set the memory-full action")
public void memSet(@Argument(name="action",description="Action to take")
TestWattsUp.MemFullAction action)
throws org.lsst.ccs.drivers.commons.DriverException
action - The memory-full action: suspend, overwrite or condenseorg.lsst.ccs.drivers.commons.DriverException@Command(name="memshow",
description="Show the memory-full action")
public void memShow()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="intset",
description="Set the logging interval")
public void intSet(@Argument(name="intvl",description="Logging interval")
int intvl)
throws org.lsst.ccs.drivers.commons.DriverException
intvl - The logging interval (secs)org.lsst.ccs.drivers.commons.DriverException@Command(name="logset",
description="Set the logging type and interval")
public void logSet(@Argument(name="type",description="Logging type")
TestWattsUp.LogType type,
@Argument(name="intvl",description="Logging Interval")
int intvl)
throws org.lsst.ccs.drivers.commons.DriverException
type - The logging type: internal or externalintvl - The logging interval (secs)org.lsst.ccs.drivers.commons.DriverException@Command(name="logshow",
description="Show the logging interval & state")
public void logShow()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="parmset",
description="Set the user parameters")
public void parmSet(@Argument(name="rate",description="Electricity rate")
double rate,
@Argument(name="thresh",description="Duty cycle threshold")
int thresh,
@Argument(name="curr",description="Currency")
TestWattsUp.Currency curr)
throws org.lsst.ccs.drivers.commons.DriverException
rate - The electricity rate: currency units / KWHthresh - The duty cycle thresholdcurr - The currency: dollar or euroorg.lsst.ccs.drivers.commons.DriverException@Command(name="parmset",
description="Set the user parameters")
public void parmSet(@Argument(name="rate",description="Electricity rate")
double rate,
@Argument(name="thresh",description="Duty cycle threshold")
int thresh)
throws org.lsst.ccs.drivers.commons.DriverException
rate - The electricity rate: currency units / KWHthresh - The duty cycle thresholdorg.lsst.ccs.drivers.commons.DriverException@Command(name="parmshow",
description="Show the user parameters")
public void parmShow()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="vershow",
description="Show the version strings")
public void verShow()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="reset",
description="Reset memory")
public void reset()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="restart",
description="Restart the meter")
public void restart()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="datashow",
description="Show data")
public void dataShow(@Argument(name="type",description="Display type")
TestWattsUp.DataType type)
throws org.lsst.ccs.drivers.commons.DriverException
type - The type of display: detail or summaryorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setPowered(boolean on)
setPowered in interface WattsUp.Listeneron - Whether the power is onpublic void setClosed()
setClosed in interface WattsUp.Listenerpublic void processData(double[] data)
WattsUp.ListenerprocessData in interface WattsUp.Listenerdata - An 18-element double array containing the data.Copyright © 2023 LSST. All rights reserved.