public abstract class Alarm extends Object
Constructor and Description |
---|
Alarm() |
Modifier and Type | Method and Description |
---|---|
static Alarm |
create(AlarmSeverity alarmSeverity,
String alarmName)
New alarm with the given severity and status.
|
static Alarm |
disconnected()
Alarm condition for when a channel is disconnected.
|
boolean |
equals(Object obj)
Tests whether the give object is and Alarm with the same name and severity.
|
abstract String |
getName()
Returns a brief text representation of the highest currently active alarm.
|
abstract AlarmSeverity |
getSeverity()
Returns the alarm severity, which describes the quality of the
value returned.
|
int |
hashCode() |
static Alarm |
none()
No alarm.
|
static Alarm |
noValue()
Alarm condition for when a value is not present.
|
String |
toString() |
static String |
toString(org.diirt.vtype.next.AlarmProvider alarmProvider)
A null-safe method to retrieve a string version of an alarm of a
value;
|
public abstract AlarmSeverity getSeverity()
public abstract String getName()
public final boolean equals(Object obj)
public static String toString(org.diirt.vtype.next.AlarmProvider alarmProvider)
alarmProvider
- a value with an alarm; can be nullpublic static Alarm create(AlarmSeverity alarmSeverity, String alarmName)
alarmSeverity
- the alarm severityalarmName
- the alarm namepublic static Alarm none()
To test for no alarm, one should always check the severity, and not equality to this specific alarm: depending on the data source the status may be different and contain extra information.
public static Alarm noValue()
public static Alarm disconnected()
Copyright © 2015. All rights reserved.