public class Channel extends Object implements HasLifecycle, ConfigurationBulkChangeHandler, HasConfigurationParameterDescription
| Modifier and Type | Field and Description |
|---|---|
protected String |
alarmHi |
protected Alarm |
alarmHiA |
protected String |
alarmLo |
protected Alarm |
alarmLoA |
protected String |
checkHi |
protected String |
checkLo |
protected String |
description
Data fields.
|
protected String |
devcName |
protected boolean |
doNotPublish |
protected boolean |
doNotTrend |
protected String |
format |
protected int |
hwChan |
protected double |
hysteresis |
protected double |
limitHi |
protected double |
limitLo |
protected double |
offset |
protected int |
pageId |
protected double |
scale |
protected String |
subtype |
protected String |
type |
static int |
TYPE_DIFF
Constants.
|
static int |
TYPE_POWER
Constants.
|
static int |
TYPE_PROD
Constants.
|
static int |
TYPE_QUOT
Constants.
|
static int |
TYPE_SUM
Constants.
|
static int |
TYPE_SWITCH
Constants.
|
static int |
TYPE_TEMP
Constants.
|
static int |
TYPE_UNKNOWN
Constants.
|
static int |
TYPE_VOLTS
Constants.
|
protected int |
typeI |
protected String |
units |
protected double |
warnHi |
protected double |
warnLo |
| Constructor and Description |
|---|
Channel() |
| Modifier and Type | Method and Description |
|---|---|
void |
build()
First lifecycle hook.
|
double |
convertRawValue(double rawValue)
Convert a raw value by applying this Channel's offset and scale factors.
|
ConfigurationParameterDescription |
getConfigurationParameterDescription(String parName)
Get a custom ConfigurationParameterDescription for the specified
parameter name.
|
String |
getDescription()
Gets the channel description.
|
Device |
getDevice()
Gets the Device associated with this Channel
|
String |
getFormat()
Gets the display format.
|
String |
getGroup() |
int |
getHwChan()
Gets the Hardware Channel
|
double |
getHysteresisLimitHi()
Gets the channel hysteresis high limit.
|
double |
getHysteresisLimitLo()
Gets the channel hysteresis low limit.
|
double |
getHysteresisWarnHi()
Gets the channel hysteresis high warning level
|
double |
getHysteresisWarnLo()
Gets the channel hysteresis low warning level
|
int |
getId()
Gets the channel ID.
|
Measurement |
getLastMeasurement()
Gets the last Measurement: a CCSTimeStamp, double pair
|
double |
getLimitHi()
Gets the channel high limit.
|
double |
getLimitLo()
Gets the channel low limit.
|
String |
getName() |
int |
getPageId()
Gets the display page ID.
|
String |
getPath() |
int |
getSubType() |
String |
getSubTypeStr() |
int |
getType() |
String |
getTypeStr() |
String |
getUnits()
Gets the channel units.
|
double |
getValue()
Gets the channel value.
|
double |
getWarnHi()
Gets the channel high warning level
|
double |
getWarnLo()
Gets the channel low warning level
|
boolean |
hasHysteresis()
Returns whether this channel has hysteresis
|
void |
init()
Called from the enclosing
Subsystem at initialization
phase. |
double |
readValue()
Reads the value directly from the hardware.
|
void |
setParameterBulk(Map<String,Object> params)
Set configuration parameters to new values and compute (derived)
quantities (for hysteresis, etc.)
|
void |
validateBulkChange(Map<String,Object> params)
Checks validity of a proposed set of ConfigurationParameters
limit and warn parameters are compared if checkLo or checkHi
(as relevant) is other than "NONE".
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpostBuild, postInit, postShutdown, postStart, shutdown, startpublic static final int TYPE_UNKNOWN
public static final int TYPE_TEMP
public static final int TYPE_VOLTS
public static final int TYPE_POWER
public static final int TYPE_SWITCH
public static final int TYPE_SUM
public static final int TYPE_DIFF
public static final int TYPE_PROD
public static final int TYPE_QUOT
protected String description
protected String units
protected double hysteresis
protected String devcName
protected int hwChan
protected String type
protected String subtype
protected double offset
protected double scale
protected String checkLo
protected String alarmLo
protected String checkHi
protected String alarmHi
protected int pageId
protected String format
protected boolean doNotTrend
protected boolean doNotPublish
@ConfigurationParameter(name="limitLo", category="Limits") protected volatile double limitLo
@ConfigurationParameter(name="limitHi", category="Limits") protected volatile double limitHi
@ConfigurationParameter(name="warnLo", category="Limits") protected volatile double warnLo
@ConfigurationParameter(name="warnHi", category="Limits") protected volatile double warnHi
protected int typeI
protected Alarm alarmLoA
protected Alarm alarmHiA
public void build()
HasLifecyclebuild in interface HasLifecyclepublic void init()
HasLifecycleSubsystem at initialization
phase.
This method is called before the children components of this
object have their init method called.
At the time it is called, connection to the messaging layer is not yet
done, so there should be no attempt to send messages in the body of
this method. Configuration for message listening can nevertheless be
done here, such as adding MessageListener
objects.
It is unnecessary to call super.init()
init in interface HasLifecyclepublic void validateBulkChange(Map<String,Object> params)
validateBulkChange in interface ConfigurationBulkChangeHandlerMap - of ConfigurationParameters from name to valuepublic void setParameterBulk(Map<String,Object> params)
setParameterBulk in interface ConfigurationBulkChangeHandlerMap - of parameters for which a change is requested,
keyed by namespublic double convertRawValue(double rawValue)
rawValue - The raw value to be converted.public final Device getDevice()
public String getDescription()
public String getFormat()
public String getUnits()
public int getPageId()
public double getLimitLo()
public double getLimitHi()
public double getWarnLo()
public double getWarnHi()
public int getId()
public int getHwChan()
@Command(type=QUERY, category=CORE) public double getValue()
public double readValue()
public String getPath()
public String getName()
public String getGroup()
public int getType()
public String getTypeStr()
public int getSubType()
public String getSubTypeStr()
public Measurement getLastMeasurement()
public boolean hasHysteresis()
public double getHysteresisLimitLo()
public double getHysteresisLimitHi()
public double getHysteresisWarnLo()
public double getHysteresisWarnHi()
public ConfigurationParameterDescription getConfigurationParameterDescription(String parName)
HasConfigurationParameterDescriptiongetConfigurationParameterDescription in interface HasConfigurationParameterDescriptionparName - The name of the field annotated with the ConfigurationParameter
annotation.Copyright © 2024 LSST. All rights reserved.