ElementType
- type of the actual value elements. For primitives, this is the
boxed variant.public interface ChannelAccessAlarmValue<ElementType> extends ChannelAccessGettableValue<ElementType>
Channel Access value that represent a type with alarm information and
possibly additional information (DBR_STS_*
,
DBR_TIME_*
, DBR_GR_*
, or DBR_CTRL_*
).
This interface should not be implemented by user-defined classes. Code that
wants to create an instance implementing this interface should use the
methods provided by ChannelAccessValueFactory
instead.
Modifier and Type | Method and Description |
---|---|
ChannelAccessAlarmValue<ElementType> |
asReadOnlyValue()
Returns a read-only version of this value.
|
ChannelAccessAlarmValue<ElementType> |
clone()
Creates and returns a copy of this object.
|
ChannelAccessAlarmSeverity |
getAlarmSeverity()
Returns the alarm severity of the value.
|
ChannelAccessAlarmStatus |
getAlarmStatus()
Returns the alarm status of the value.
|
void |
setAlarmSeverity(ChannelAccessAlarmSeverity alarmSeverity)
Sets the alarm severity of the value.
|
void |
setAlarmStatus(ChannelAccessAlarmStatus alarmStatus)
Set the alarm status of the value.
|
equals, getGenericValueElement, getType, getValueSize, hashCode, isReadOnly, iterator, toString
forEach, spliterator
ChannelAccessAlarmStatus getAlarmStatus()
null
).void setAlarmStatus(ChannelAccessAlarmStatus alarmStatus)
alarmStatus
- new alarm status of the value (never null
).UnsupportedOperationException
- if this value is read-only (ChannelAccessValue.isReadOnly()
returns
true
).ChannelAccessAlarmSeverity getAlarmSeverity()
null
).void setAlarmSeverity(ChannelAccessAlarmSeverity alarmSeverity)
alarmSeverity
- new alarm severity of the value (never null
).UnsupportedOperationException
- if this value is read-only (ChannelAccessValue.isReadOnly()
returns
true
).ChannelAccessAlarmValue<ElementType> asReadOnlyValue()
Returns a read-only version of this value. If the value is read-only, this value is returned. Otherwise, a wrapped version of this value, that does not allow modifications is returned.
Please note that the read-only value is not a copy of this value, but just a wrapper around it. This means, that modifications of the wrapped value will result in modifications of the read-only value. Therefore it is bad practice to modify a value that has been used as the base for a read-only value, because code that still has a reference to the read-only value might not expect this change and thus fail unexpectedly.
asReadOnlyValue
in interface ChannelAccessGettableValue<ElementType>
asReadOnlyValue
in interface ChannelAccessValue<ElementType>
null
).ChannelAccessAlarmValue<ElementType> clone()
Creates and returns a copy of this object. The object returned is completely independent from this object. This means that modifications to this object will not affect the returned object and vice-versa.
The object returned is guaranteed to be completely identical to this
object, including its type. This means that
x.clone().equals(x)
and
x.clone().getClass() == x.getClass()
are always
true
.
The returned value is guaranteed to allow write access, even if this value is read-only. This means that cloning a read-only value is a good way to get a writable copy.
clone
in interface ChannelAccessGettableValue<ElementType>
clone
in interface ChannelAccessValue<ElementType>
Copyright © 2014–2017 aquenos GmbH. All rights reserved.