
public class Channel extends Object implements HasLifecycle, ConfigurationBulkChangeHandler
| 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 |
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 |
|---|---|
double |
convertRawValue(double rawValue)
Convert a raw value by applying this Channel's offset and scale factors.
|
void |
enableAlarm(boolean isLow,
boolean enable)
Enables or disables an alarm.
|
String |
getAlarmNameHi()
Gets the channel high limit alarm name.
|
String |
getAlarmNameLo()
Gets the channel low limit alarm name.
|
String |
getDescription()
Gets the channel description.
|
Device |
getDevice() |
String |
getFormat()
Gets the display format.
|
String |
getGroup() |
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 |
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
|
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.
|
void |
setValid(boolean isValid)
Sets whether the channel is valid.
|
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, waitbuild, postBuild, 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 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 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 String getAlarmNameLo()
public double getLimitHi()
public double getWarnLo()
public double getWarnHi()
public String getAlarmNameHi()
public void enableAlarm(boolean isLow,
boolean enable)
isLow - True for low limit alarm, false for high.enable - True to enable the alarm, false to disable it.@Command(type=QUERY, category=CORE) public double getValue()
public double readValue()
public void setValid(boolean isValid)
isValid - Value to setpublic String getPath()
public String getName()
public String getGroup()
public int getType()
public String getTypeStr()
public Measurement getLastMeasurement()
Copyright © 2021 LSST. All rights reserved.