public interface ChannelAccessConfigureAcknowledgeTransientAlarms extends ChannelAccessPuttableValue<Short>
Channel Access value that represents the
DBR_PUT_ACKT
type. In its
internal representation, this type is mostly identical to the
DBR_SHORT
type. However, this type
has a very specific use. It can only be used in put operations and provides a
way to configure whether transient alarms for a channel have to be
acknowledged explicitly.
For all practical purposes, this type should store exactly one element. This element is a flag that indicates whether transient alarms need to be acknowledged explicitly (non-zero value) or are automatically acknowledged when they disappear (zero value).
The protocol technically allows for a number of elements that is different from one. However, extra elements are not used at all and thus have no effect. If the number of elements is zero, the behavior is undefined. However, the most plausible behavior is to treat this as a zero value (alarms are automatically acknowledged when they disappear).
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.
ChannelAccessAcknowledgeAlarm
,
ChannelAccessAlarmAcknowledgementStatus
Modifier and Type | Method and Description |
---|---|
ChannelAccessConfigureAcknowledgeTransientAlarms |
asReadOnlyValue()
Returns a read-only version of this value.
|
ChannelAccessConfigureAcknowledgeTransientAlarms |
clone()
Creates and returns a copy of this object.
|
ShortBuffer |
getValue()
Returns the buffer that stores the actual value elements.
|
boolean |
isExplicitlyAcknowledgeTransientAlarms()
Returns a flag indicating whether transient alarms have to be
acknowledged explicitly (
true ) or are automatically
acknowledged when they disappear(false ). |
void |
setExplicitlyAcknowledgeTransientAlarms(boolean explicitlyAcknowledgeTransientAlarms)
Sets the flag indicating whether transient alarms have to be acknowledged
explicitly (
true ) or are automatically acknowledged when
they disappear. |
void |
setValue(short[] value)
Replaces the buffer that stores the value's actual elements with a buffer
wrapping the passed array.
|
equals, getGenericValueElement, getType, getValueSize, hashCode, isReadOnly, iterator, toString
forEach, spliterator
ShortBuffer getValue()
Returns the buffer that stores the actual value elements.
The buffer returned is guaranteed to have a position of zero and a capacity and remaining elements equal to the number of elements in this value. In addition to that, the length of the array backing this buffer is equal to the buffer's capacity.
If this value is not read-only, the returned buffer's content can be modified and this modifications will directly affect this value and vice versa. Therefore, the buffer may not be modified after this value has been passed to a different component.
If this value is read-only, the returned buffer is also read-only.
null
).void setValue(short[] value)
Replaces the buffer that stores the value's actual elements with a buffer wrapping the passed array.
The buffer is backed by the passed array. This means that modifications of the array result in modifications of this value's elements and vice-versa.
The array passed to this method must not be changed after this value has been passed to another component, because changes to the array's content will affect this value's elements.
value
- array that replaces this value's elements.UnsupportedOperationException
- if this value is read-only (ChannelAccessValue.isReadOnly()
returns
true
).boolean isExplicitlyAcknowledgeTransientAlarms()
true
) or are automatically
acknowledged when they disappear(false
). If the array that
stores the actual value has no elements, false
is returned.void setExplicitlyAcknowledgeTransientAlarms(boolean explicitlyAcknowledgeTransientAlarms)
true
) or are automatically acknowledged when
they disappear. If the array that stores the actual value has exactly one
element, this element is updated with the specified value. Otherwise, the
whole array is replaced with a new array that has exactly one element
that represents the specified value.explicitlyAcknowledgeTransientAlarms
- true
if transient alarms should have to be
acknowledged explicitly, false
if they should be
automatically acknowledged when they disappear.UnsupportedOperationException
- if this value is read-only (ChannelAccessValue.isReadOnly()
returns
true
).ChannelAccessConfigureAcknowledgeTransientAlarms 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 ChannelAccessPuttableValue<Short>
asReadOnlyValue
in interface ChannelAccessValue<Short>
null
).ChannelAccessConfigureAcknowledgeTransientAlarms 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 ChannelAccessPuttableValue<Short>
clone
in interface ChannelAccessValue<Short>
Copyright © 2014–2017 aquenos GmbH. All rights reserved.