Modifier and Type | Class and Description |
---|---|
static class |
DataItemValue.Builder
A mutable version of
DataItemValue |
Modifier and Type | Field and Description |
---|---|
static DataItemValue |
DISCONNECTED
A default instance that means
disconnected |
Constructor and Description |
---|
DataItemValue(DataItemValue div) |
DataItemValue(Variant value,
Map<String,Variant> attributes,
SubscriptionState subscriptionState) |
DataItemValue(Variant value,
Map<String,Variant> attributes,
SubscriptionState subscriptionState,
Throwable subscriptionError) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static Calendar |
getAsTimestamp(Map<String,Variant> attributes,
String attributeName)
get an attribute as timestamp
|
Calendar |
getAsTimestamp(String attributeName)
get an attribute as timestamp
|
boolean |
getAttributeAsBoolean(String attributeName)
Get an attribute as boolean value
|
Boolean |
getAttributeAsBoolean(String attributeName,
Boolean defaultValue) |
Map<String,Variant> |
getAttributes()
Get an unmodifiable map of the attributes
|
Throwable |
getSubscriptionError() |
String |
getSubscriptionErrorString()
Get the message of the subscription error
|
SubscriptionState |
getSubscriptionState() |
Calendar |
getTimestamp()
get the timestamp of the value
|
Variant |
getValue() |
int |
hashCode() |
boolean |
isAlarm() |
Boolean |
isAttribute(String attributeName)
Get the value of the attribute
|
boolean |
isAttribute(String attributeName,
boolean defaultValue)
Get the boolean value of the named attribute
|
boolean |
isBlocked() |
boolean |
isConnected() |
boolean |
isError() |
boolean |
isManual()
Check if the value has the manual override attribute set
|
boolean |
isWarning() |
String |
toString() |
public static final DataItemValue DISCONNECTED
disconnected
public DataItemValue(Variant value, Map<String,Variant> attributes, SubscriptionState subscriptionState)
public DataItemValue(Variant value, Map<String,Variant> attributes, SubscriptionState subscriptionState, Throwable subscriptionError)
public DataItemValue(DataItemValue div)
public Variant getValue()
public Map<String,Variant> getAttributes()
public SubscriptionState getSubscriptionState()
public String getSubscriptionErrorString()
null
if no subscription error is knownpublic Throwable getSubscriptionError()
public Boolean isAttribute(String attributeName)
attributeName
- the name of the attributenull
if the attribute is not setpublic boolean isAttribute(String attributeName, boolean defaultValue)
attributeName
- the attribute name to checkdefaultValue
- the default value, if the attribute is not setpublic boolean isManual()
true
if the value is manually overridden, false
otherwisepublic boolean isAlarm()
public boolean isBlocked()
public boolean isWarning()
public boolean isConnected()
public boolean isError()
public static Calendar getAsTimestamp(Map<String,Variant> attributes, String attributeName)
attributeName
- the attribute to getnull
if the timestamp property is not setpublic Calendar getAsTimestamp(String attributeName)
attributeName
- the attribute to getnull
if the timestamp property is not setpublic boolean getAttributeAsBoolean(String attributeName)
attributeName
- the name of the attribute to fetchfalse
if the attribute is not setVariant.asBoolean()
public Boolean getAttributeAsBoolean(String attributeName, Boolean defaultValue)
public Calendar getTimestamp()
null
if the timestamp property is not setCopyright © 2016 Eclipse NeoSCADA Project. All rights reserved.