
public abstract class Device
extends org.lsst.ccs.framework.ConfigurableComponent
| Modifier and Type | Field and Description |
|---|---|
protected BitSet |
chanMask |
protected Map<String,Control> |
ctlChans |
protected String |
fullName
Data fields.
|
protected boolean |
inited |
protected int |
lineMask |
protected int |
lineState |
protected int |
lineWarm |
protected Logger |
log |
protected Monitor |
mon |
protected boolean |
online |
| Constructor and Description |
|---|
Device() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addChannel(int id)
Adds a channel to the device's list of monitored channels.
|
protected void |
addConfigValues(Map<String,Object> map)
Adds to the map of configured items.
|
protected void |
addLine(int line)
Adds an output line to the known list.
|
protected int[] |
checkChannel(String name,
int hwChan,
String type,
String subtype)
Checks a monitor channel's parameters for validity.
|
protected void |
checkHwLine(String name,
int line)
Checks the validity of an output line.
|
protected void |
checkLine(String name,
int line)
Checks the validity of an output line.
|
protected void |
checkOnline()
Checks the online state.
|
protected void |
checkTimeout(Exception e,
Class<?> eClass)
Checks whether exception is a timeout.
|
protected abstract void |
close()
Closes the connection.
|
protected void |
configure(Monitor mon)
Performs common configuration.
|
protected void |
dropChannel(int id)
Drops a channel from the device's list of monitored channels.
|
Map<String,Object> |
getConfigValues()
Gets the map of configured items.
|
String |
getFullName()
Gets the full name.
|
protected void |
getOutputLines()
Gets the states of all output lines and saves them.
|
protected void |
initChannel(int hwChan,
int type,
int subtype)
Initializes a monitor channel.
|
protected abstract void |
initialize()
Performs hardware initialization.
|
protected void |
initSensors()
Initializes all attached sensors.
|
protected boolean |
isHwLineSet(int line)
Gets an output line set state.
|
protected boolean |
isLineSet(int line)
Gets an output line set state.
|
boolean |
isOnline()
Gets the online state.
|
protected boolean |
isTimeout(Exception e)
Tests whether exception is a timeout.
|
protected double |
readChannel(int hwChan,
int type)
Reads a monitor channel.
|
protected void |
readChannelGroup()
Reads the monitor channel group.
|
protected void |
readSensors()
Reads all attached sensors (monitor channels).
|
protected void |
setHwLine(int line,
boolean on)
Sets an output line on or off.
|
protected void |
setLine(int line,
boolean on)
Sets an output line on or off.
|
protected void |
setLineWarm(int line,
boolean on)
Sets the warm-start state of an output line.
|
protected void |
setOnline(boolean online)
Sets the online state.
|
protected void |
setOutputLines()
Sets all output lines from the saved state.
|
protected boolean |
testOnline()
Tests the online state.
|
getChildren, getEnvironment, setEnvironmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitalias, change, getCheckedValueFromConfiguration, getComponentByName, getDictionary, getName, getParent, getParentObject, getSubsystem, init, injectResources, listChildren, notifyChange, notifyChangeWithoutPreliminaryChecks, postStart, proceduralWalk, publish, publish, publish, publish, publish, publish, shutdownNow, start, treeWalkprotected String fullName
protected BitSet chanMask
protected boolean inited
protected boolean online
protected Monitor mon
protected Logger log
protected int lineMask
protected int lineWarm
protected int lineState
public String getFullName()
public boolean isOnline()
protected void configure(Monitor mon)
mon - The associated monitor@Command(type=QUERY, description="Gets map of configured items") public Map<String,Object> getConfigValues()
protected int[] checkChannel(String name, int hwChan, String type, String subtype) throws Exception
name - The name of the channel.hwChan - The hardware channel number.type - The channel type string.subtype - The channel subtype string.Exception - if any errors found in the parametersprotected abstract void initialize()
protected abstract void close()
protected void initSensors()
protected void initChannel(int hwChan,
int type,
int subtype)
hwChan - The hardware channel number.type - The encoded channel type returned by checkChannel.subtype - The channel subtype returned by checkChannel.protected void addChannel(int id)
id - The id of the channel.protected void dropChannel(int id)
id - The id of the channel.protected void checkOnline()
protected boolean testOnline()
protected void setOnline(boolean online)
online - The online state to set: true or falseprotected void readSensors()
protected void readChannelGroup()
protected double readChannel(int hwChan,
int type)
hwChan - The hardware channel number.type - The encoded channel type returned by checkChannel.protected void addConfigValues(Map<String,Object> map)
map - The map of configured items to be added toprotected void checkTimeout(Exception e, Class<?> eClass) throws Exception
e - The exception to be checked.eClass - The class of the exception to be thrown.Exceptionprotected boolean isTimeout(Exception e)
e - The exception to be tested.protected void checkLine(String name, int line) throws Exception
name - The name of the output line.line - The hardware line number of the output line.Exception - if the line number is invalid.protected void checkHwLine(String name, int line) throws Exception
name - The name of the output line.line - The hardware line number of the output line.Exception - if the line number is invalid.protected void setLineWarm(int line,
boolean on)
line - The output line number.on - The warm-start on state to set: true or falseprotected void setLine(int line,
boolean on)
line - The output line number.on - The on state to set: true or falseprotected void setHwLine(int line,
boolean on)
line - The output line number.on - The on state to set: true or falseprotected boolean isLineSet(int line)
line - The output line number.protected boolean isHwLineSet(int line)
line - The output line number.protected void setOutputLines()
protected void getOutputLines()
protected void addLine(int line)
line - The output line number.Copyright © 2015 LSST. All rights reserved.