
public abstract class PowerDevice
extends org.lsst.ccs.monitor.Device
| Modifier and Type | Field and Description |
|---|---|
protected static int |
CONN_TYPE_NOT_CONFIG |
protected org.lsst.ccs.drivers.commons.DriverConstants.ConnType |
connType |
protected static int |
DEVC_ID_NOT_CONFIG |
protected static int |
DEVC_PARM_NOT_CONFIG |
protected String |
devcId
Data fields.
|
protected int |
devcParm |
protected static Logger |
LOG
Constants.
|
protected static int |
NETWORK_CONN_INVALID |
protected org.lsst.ccs.drivers.commons.PowerSupplyDriver |
psd |
| Constructor and Description |
|---|
PowerDevice(String name,
org.lsst.ccs.drivers.commons.PowerSupplyDriver psd,
org.lsst.ccs.drivers.commons.DriverConstants.ConnType connType,
String devcId,
int devcParm,
int options,
int minChan,
int maxChan)
Constructor.
|
PowerDevice(String name,
org.lsst.ccs.drivers.commons.PowerSupplyDriver psd,
int options,
int minChan,
int maxChan)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected int[] |
checkChannel(String name,
int hwChan,
String type,
String subtype)
Checks a monitoring channel's parameters for validity.
|
protected void |
close()
Closes the connection.
|
org.lsst.ccs.drivers.commons.DriverConstants.ConnType |
getConnType()
Gets the connection type.
|
String |
getDevcId()
Gets the device ID.
|
int |
getDevcParm()
Gets the device parameter.
|
int |
getMaxChannel()
Gets the maximum channel number.
|
int |
getMinChannel()
Gets the minimum channel number.
|
protected void |
handleException(org.lsst.ccs.drivers.commons.DriverException e)
Handle driver exceptions.
|
protected void |
initDevice()
Performs configuration.
|
protected void |
initialize()
Performs full initialization.
|
protected double |
readChannel(int hwChan,
int type)
Reads a monitoring channel.
|
protected double |
readCurrent(int hwChan)
Reads the current from the hardware.
|
protected void |
readCurrentGroup()
Reads a group of currents from the hardware.
|
protected boolean |
readOutput(int hwChan)
Reads the power output state from the hardware.
|
protected void |
readOutputGroup()
Reads a group of power output states from the hardware.
|
protected double |
readVoltage(int hwChan)
Reads the voltage from the hardware.
|
protected void |
readVoltageGroup()
Reads a group of voltages from the hardware.
|
protected void |
writeCurrent(double current,
int hwChan)
Writes the current to the hardware.
|
protected void |
writeCurrentGroup()
Writes a group of currents to the hardware.
|
protected void |
writeOffDelay(double offDelay,
int hwChan)
Writes the power-off delay to the hardware.
|
protected void |
writeOffDelayGroup()
Writes a group of power-off delays to the hardware.
|
protected void |
writeOnDelay(double onDelay,
int hwChan)
Writes the power-on delay to the hardware.
|
protected void |
writeOnDelayGroup()
Writes a group of power-on delays to the hardware.
|
protected void |
writeOutput(boolean value,
int hwChan)
Writes the power output state to the hardware.
|
protected void |
writeOutputGroup()
Writes a group of power output states to the hardware.
|
protected void |
writeVoltage(double voltage,
int hwChan)
Writes the voltage to the hardware.
|
protected void |
writeVoltageGroup()
Writes a group of voltages to the hardware.
|
addLine, checkHardware, checkHwLine, checkLine, checkOnline, checkTimeout, configure, disable, dropChannel, enable, getDeviceMonitorUpdateTasks, getFullName, getGroupForChannel, getMonitorUpdateTasksForChannels, getName, getOutputLines, getPath, init, initChannel, initChannel, initSensors, isHwLineSet, isLineSet, isOnline, isTimeout, readChannel, readChannelGroup, readChannelGroup, readChannelNow, setDisabled, setHwLine, setLine, setLineWarm, setOnline, setOutputLines, testOnlineprotected static final Logger LOG
protected static final int NETWORK_CONN_INVALID
protected static final int CONN_TYPE_NOT_CONFIG
protected static final int DEVC_ID_NOT_CONFIG
protected static final int DEVC_PARM_NOT_CONFIG
@ConfigurationParameter(name="devcId",
category="Power",
isFinal=true)
protected volatile String devcId
@ConfigurationParameter(name="devcParm",
category="Power",
isFinal=true)
protected volatile int devcParm
@ConfigurationParameter(name="connType",
category="Power",
isFinal=true)
protected volatile org.lsst.ccs.drivers.commons.DriverConstants.ConnType connType
protected org.lsst.ccs.drivers.commons.PowerSupplyDriver psd
public PowerDevice(String name, org.lsst.ccs.drivers.commons.PowerSupplyDriver psd, int options, int minChan, int maxChan)
name - The device namepsd - The power supply device driver objectoptions - The options wordminChan - The minimum channel numbermaxChan - The maximum channel numberpublic PowerDevice(String name, org.lsst.ccs.drivers.commons.PowerSupplyDriver psd, org.lsst.ccs.drivers.commons.DriverConstants.ConnType connType, String devcId, int devcParm, int options, int minChan, int maxChan)
name - The device namepsd - The power supply device driver objectconnType - The connection type: network; ftdi; serialdevcId - The device ID: host name; USB serial no.; serial device namedevcParm - The device parameter: port number; baud rate; baud rateoptions - The options wordminChan - The minimum channel numbermaxChan - The maximum channel numberpublic int getMinChannel()
public int getMaxChannel()
public org.lsst.ccs.drivers.commons.DriverConstants.ConnType getConnType()
public String getDevcId()
public int getDevcParm()
protected void initDevice()
initDevice in class org.lsst.ccs.monitor.Deviceprotected void initialize()
initialize in class org.lsst.ccs.monitor.Deviceprotected void close()
close in class org.lsst.ccs.monitor.Deviceprotected int[] checkChannel(String name, int hwChan, String type, String subtype) throws Exception
checkChannel in class org.lsst.ccs.monitor.Devicename - The channel namehwChan - The hardware channeltype - The channel type stringsubtype - The channel subtype stringException - If parameters are invalidprotected double readChannel(int hwChan,
int type)
readChannel in class org.lsst.ccs.monitor.DevicehwChan - The hardware channel numbertype - The encoded channel typeprotected void writeVoltage(double voltage,
int hwChan)
throws PowerException
voltage - The voltage to sethwChan - The hardware channel numberPowerExceptionprotected double readVoltage(int hwChan)
throws PowerException
hwChan - The hardware channel numberPowerExceptionprotected void writeCurrent(double current,
int hwChan)
throws PowerException
current - The current to sethwChan - The hardware channel numberPowerExceptionprotected double readCurrent(int hwChan)
throws PowerException
hwChan - The hardware channel numberPowerExceptionprotected void writeOnDelay(double onDelay,
int hwChan)
throws PowerException
onDelay - The delay to sethwChan - The hardware channel numberPowerExceptionprotected void writeOffDelay(double offDelay,
int hwChan)
throws PowerException
offDelay - The delay to sethwChan - The hardware channel numberPowerExceptionprotected void writeOutput(boolean value,
int hwChan)
throws PowerException
value - The output state to sethwChan - The hardware channel numberPowerExceptionprotected boolean readOutput(int hwChan)
throws PowerException
hwChan - The hardware channel numberPowerExceptionprotected void writeVoltageGroup()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionprotected void readVoltageGroup()
protected void writeCurrentGroup()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionprotected void readCurrentGroup()
protected void writeOnDelayGroup()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionprotected void writeOffDelayGroup()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionprotected void writeOutputGroup()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionprotected void readOutputGroup()
protected void handleException(org.lsst.ccs.drivers.commons.DriverException e)
throws PowerException
e - The exceptionPowerExceptionCopyright © 2021 LSST. All rights reserved.