Srp.BoardType| Modifier and Type | Field and Description |
|---|---|
protected static int |
REG_ADC_BASE
Constants and data.
|
protected static int |
REG_ALERTS
Constants and data.
|
protected static int |
REG_DEVICE_BASE
Constants and data.
|
protected static int |
REG_LINK_FAULT
Constants and data.
|
protected static int |
REG_MAIN_STATUS
Constants and data.
|
protected static int |
REG_MAIN_SWITCH
Constants and data.
|
protected static int |
REG_SWITCHES
Constants and data.
|
boardType, DEFAULT_PORT| Constructor and Description |
|---|
PduCommon() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAlert(int chan)
Clears a channel alert
|
void |
clearAlert(String chan)
Clears a named channel alert
|
void |
clearAlerts()
Clears all alerts
|
int |
getAlertStatus()
Gets the overall alert status
|
String[] |
getChannelNames()
Gets the array of channel names
|
int |
getLinkFault()
Gets the I2C link fault indicator
|
int |
getMainStatus()
Gets the status of the main power
|
int |
getPoweredStatus()
Gets the overall powered status
|
int |
getValidChannels()
Gets the mask of valid channels
|
boolean |
hasAlert(int chan)
Gets the alert state of a channel
|
boolean |
hasAlert(String chan)
Gets the alert state of a named channel
|
boolean |
isMainOn()
Gets the state of the main power
|
boolean |
isPowered(int chan)
Gets the powered state of a channel
|
boolean |
isPowered(String chan)
Gets the powered state of a named channel
|
void |
powerOff(int chan)
Powers off a channel
|
void |
powerOff(String chan)
Powers off a named channel
|
void |
powerOn(int chan)
Powers on a channel
|
void |
powerOn(String chan)
Powers on a named channel
|
double |
readCurrent(int chan)
Reads a channel's current
|
double |
readCurrent(String chan)
Reads a named channel's current
|
double |
readVoltage(int chan)
Reads a channel's voltage
|
double |
readVoltage(String chan)
Reads a named channel's voltage
|
protected void |
setChannelMap(Map chans)
Sets the map of channel names
|
protected void |
setCurrentScales(double[] scales)
Sets the array of current scale factors
|
void |
setMainOff()
Turns off the main power
|
void |
setMainOn()
Turns on the main power
|
protected void |
setValidChannels(int chans)
Sets the mask of valid channels
|
clearSimRegMap, close, getBoardType, getBuildStamp, getIpAddress, getNumSeqErr, getNumTimeout, getSimRegMap, isSimulated, open, open, open, open, putSimRegMap, readReg, readRegs, setDebug, setSrpVersion, setValidBoardTypes, simInitialize, simReadRegs, simWriteRegs, updateReg, writeReg, writeRegsprotected static final int REG_DEVICE_BASE
protected static final int REG_SWITCHES
protected static final int REG_MAIN_SWITCH
protected static final int REG_MAIN_STATUS
protected static final int REG_ALERTS
protected static final int REG_LINK_FAULT
protected static final int REG_ADC_BASE
protected void setValidChannels(int chans)
chans - The valid channel maskpublic int getValidChannels()
protected void setCurrentScales(double[] scales)
scales - The array of scales, indexed by channel numberprotected void setChannelMap(Map chans)
chans - The map of channel names to numberspublic String[] getChannelNames()
public void setMainOn()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void setMainOff()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic boolean isMainOn()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int getMainStatus()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void powerOn(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel numberorg.lsst.ccs.drivers.commons.DriverException - if the channel number is invalidpublic void powerOn(String chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel nameorg.lsst.ccs.drivers.commons.DriverException - if the channel name is invalidpublic void powerOff(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel numberorg.lsst.ccs.drivers.commons.DriverException - if the channel number is invalidpublic void powerOff(String chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel nameorg.lsst.ccs.drivers.commons.DriverException - if the channel name is invalidpublic int getPoweredStatus()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic boolean isPowered(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel numberorg.lsst.ccs.drivers.commons.DriverException - if the channel number is invalidpublic boolean isPowered(String chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel nameorg.lsst.ccs.drivers.commons.DriverException - if the channel name is invalidpublic int getAlertStatus()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic boolean hasAlert(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel numberorg.lsst.ccs.drivers.commons.DriverException - if the channel number is invalidpublic boolean hasAlert(String chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel nameorg.lsst.ccs.drivers.commons.DriverException - if the channel name is invalidpublic void clearAlert(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel numberorg.lsst.ccs.drivers.commons.DriverException - if the channel number is invalidpublic void clearAlert(String chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel nameorg.lsst.ccs.drivers.commons.DriverException - if the channel name is invalidpublic void clearAlerts()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if the channel number is invalidpublic int getLinkFault()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic double readVoltage(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel numberorg.lsst.ccs.drivers.commons.DriverException - if the channel number is invalidpublic double readVoltage(String chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel nameorg.lsst.ccs.drivers.commons.DriverException - if the channel name is invalidpublic double readCurrent(int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel numberorg.lsst.ccs.drivers.commons.DriverException - if the channel number is invalidpublic double readCurrent(String chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel nameorg.lsst.ccs.drivers.commons.DriverException - if the channel name is invalidCopyright © 2020 LSST. All rights reserved.