ElementType
- type of the actual value elements. For primitives, this is the
boxed variant.public interface ChannelAccessNumericGraphicsValue<ElementType extends java.lang.Number> extends ChannelAccessGraphicsValue<ElementType>
Channel Access values that represent a type that stores numbers and provides alarm information, engineering units, and alarm and display limits.
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 |
---|---|
ChannelAccessNumericGraphicsValue<ElementType> |
asReadOnlyValue()
Returns a read-only version of this value.
|
ChannelAccessNumericGraphicsValue<ElementType> |
clone()
Creates and returns a copy of this object.
|
ElementType |
getGenericLowerAlarmLimit()
Returns the lower alarm limit.
|
ElementType |
getGenericLowerDisplayLimit()
Returns the lower display limit.
|
ElementType |
getGenericLowerWarningLimit()
Returns the lower warning limit.
|
ElementType |
getGenericUpperAlarmLimit()
Returns the upper alarm limit.
|
ElementType |
getGenericUpperDisplayLimit()
Returns the upper display limit.
|
ElementType |
getGenericUpperWarningLimit()
Returns the upper warning limit.
|
byte[] |
getRawUnits()
Returns the engineering units for this value in their raw representation.
|
java.lang.String |
getUnits()
Returns the engineerings units for this value.
|
void |
setRawUnits(byte[] rawUnits)
Sets the engineerings units for this value.
|
void |
setUnits(java.lang.String units)
Sets the engineerings units for this value.
|
getCharset
getAlarmSeverity, getAlarmStatus, setAlarmSeverity, setAlarmStatus
equals, getGenericValueElement, getType, getValueSize, hashCode, isReadOnly, iterator, toString
java.lang.String getUnits()
null
but possibly the empty
string).getRawUnits()
,
ChannelAccessGraphicsValue.getCharset()
byte[] getRawUnits()
Returns the engineering units for this value in their raw representation. The raw representation always is an array of exactly eight bytes and stores a null-terminated string.
This method returns a copy of the internal array, so changes to the
returned array will not affect this value. If changes shall take effect,
the setRawUnits(byte[])
method has to be called.
getUnits()
,
ChannelAccessGraphicsValue.getCharset()
void setUnits(java.lang.String units)
Java string
and the raw representation. If the raw
representation using the specified encoding
exceeds
the limit of eight characters (including the terminating null-byte), it
is silently trimmed to fit within this limit.units
- new engineering units (never null
but possibly
the empty string).setRawUnits(byte[])
,
ChannelAccessGraphicsValue.getCharset()
void setRawUnits(byte[] rawUnits)
Sets the engineerings units for this value. This sets both the the raw
representation and Java string
. The Java string is
generated by converting the specified raw representation using the
specified encoding
.
The supplied array is copied and only the first seven bytes are used (the eighth byte is reserved for the terminating null-byte). If the supplied array has less than seven bytes, the remaining bytes will be filled with zero.
rawUnits
- byte array containing the new raw representation (never null).
Only the first seven bytes of the supplied array are used.setUnits(String)
,
ChannelAccessGraphicsValue.getCharset()
ElementType getGenericUpperDisplayLimit()
Returns the upper display limit. The upper display limit is the limit that the value does typically not exceed and thus is suitable for choosing the layout of graphic displays (e.g. gauges). A value of zero typically indicates that the limit has not been configured and thus should not be used.
Code that wants to get this limit should prefer the type-specific methods that return primitives for better performance. This method is only provided for code that has to deal with values in a generic way (without knowing the exact type of the actual value).
null
).ElementType getGenericLowerDisplayLimit()
Returns the lower display limit. The lower display limit is the limit that the value does typically not undershoot and thus is suitable for choosing the layout of graphic displays (e.g. gauges). A value of zero typically indicates that the limit has not been configured and thus should not be used.
Code that wants to get this limit should prefer the type-specific methods that return primitives for better performance. This method is only provided for code that has to deal with values in a generic way (without knowing the exact type of the actual value).
null
).ElementType getGenericUpperAlarmLimit()
Returns the upper alarm limit. The upper alarm limit is the limit that, when exceeded, typically raises a major alarm. A value of zero typically indicates that the limit has not been configured and thus should not be used.
Code that wants to get this limit should prefer the type-specific methods that return primitives for better performance. This method is only provided for code that has to deal with values in a generic way (without knowing the exact type of the actual value).
null
).ElementType getGenericUpperWarningLimit()
Returns the upper warning limit. The upper warning limit is the limit that, when exceeded, typically raises a minor alarm. A value of zero typically indicates that the limit has not been configured and thus should not be used.
Code that wants to get this limit should prefer the type-specific methods that return primitives for better performance. This method is only provided for code that has to deal with values in a generic way (without knowing the exact type of the actual value).
null
).ElementType getGenericLowerWarningLimit()
Returns the lower warning limit. The lower warning limit is the limit that, when undershot, typically raises a minor alarm. A value of zero typically indicates that the limit has not been configured and thus should not be used.
Code that wants to get this limit should prefer the type-specific methods that return primitives for better performance. This method is only provided for code that has to deal with values in a generic way (without knowing the exact type of the actual value).
null
).ElementType getGenericLowerAlarmLimit()
Returns the lower alarm limit. The lower alarm limit is the limit that, when undershot, typically raises a major alarm. A value of zero typically indicates that the limit has not been configured and thus should not be used.
Code that wants to get this limit should prefer the type-specific methods that return primitives for better performance. This method is only provided for code that has to deal with values in a generic way (without knowing the exact type of the actual value).
null
).ChannelAccessNumericGraphicsValue<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 ChannelAccessAlarmValue<ElementType extends java.lang.Number>
asReadOnlyValue
in interface ChannelAccessGettableValue<ElementType extends java.lang.Number>
asReadOnlyValue
in interface ChannelAccessGraphicsValue<ElementType extends java.lang.Number>
asReadOnlyValue
in interface ChannelAccessValue<ElementType extends java.lang.Number>
null
).ChannelAccessNumericGraphicsValue<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 ChannelAccessAlarmValue<ElementType extends java.lang.Number>
clone
in interface ChannelAccessGettableValue<ElementType extends java.lang.Number>
clone
in interface ChannelAccessGraphicsValue<ElementType extends java.lang.Number>
clone
in interface ChannelAccessValue<ElementType extends java.lang.Number>
Copyright © 2014–2018 aquenos GmbH. All rights reserved.