public final class JackieVStringFromByteArray extends JackieAlarmAndTime<ChannelAccessTimeChar> implements org.diirt.vtype.VString
VString
implementation that is backed by a
ChannelAccessTimeChar
. This implementation is suitable when an array
of type DBR_TIME_CHAR
shall be interpreted as a null-terminated
string.JackieVString
disconnectTime, scalar, timeValue
Constructor and Description |
---|
JackieVStringFromByteArray(ChannelAccessTimeChar value,
java.time.Instant disconnectTime,
java.nio.charset.Charset charset)
Creates a value backed by the specified
value . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getValue() |
int |
hashCode() |
java.lang.String |
toString() |
getAlarmName, getAlarmSeverity, getTimestamp, getTimeUserTag, isTimeValid
public JackieVStringFromByteArray(ChannelAccessTimeChar value, java.time.Instant disconnectTime, java.nio.charset.Charset charset)
Creates a value backed by the specified value
. The value
is used for the alarm status, time-stamp, and value. The value is
interpreted as null-terminated string that is decoded using the specified
charset
.
If disconnectTime
is not null
, it is used as the
time-stamp and the alarm severity is set to UNDEFINED
.
value
- value used for alarm status, time-stamp, and value.disconnectTime
- time at which the channel was disconnected. Usually this
should be null
. If it is not null
,
the alarm severity is set to UNDEFINED
and this
parameter is used as the time-stamp (instead of using the
time-stamp from the timeValue
.charset
- character set that is used for decoding the array of bytes
into a string.public boolean equals(java.lang.Object obj)
equals
in class JackieAlarmAndTime<ChannelAccessTimeChar>
public java.lang.String getValue()
getValue
in interface org.diirt.vtype.Scalar
getValue
in interface org.diirt.vtype.VString
public int hashCode()
hashCode
in class JackieAlarmAndTime<ChannelAccessTimeChar>
public java.lang.String toString()
toString
in class JackieAlarmAndTime<ChannelAccessTimeChar>
Copyright © 2017–2017 aquenos GmbH. All rights reserved.