Enum DataQuality
- java.lang.Object
-
- java.lang.Enum<DataQuality>
-
- com.inductiveautomation.ignition.common.sqltags.model.types.DataQuality
-
- All Implemented Interfaces:
Localized
,Quality
,java.io.Serializable
,java.lang.Comparable<DataQuality>
public enum DataQuality extends java.lang.Enum<DataQuality> implements Quality
Enum that represents a tag value quality.As of Ignition 8.0, please use
QualityCode
instead.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.common.model.values.Quality
Quality.Level
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCESS_DENIED
AGGREGATE_NOT_FOUND
COMM_ERROR
CONFIG_ERROR
DB_CONN_ERROR
DEMO_EXPIRED
DISABLED
EXPRESSION_EVAL_ERROR
GOOD_BACKFILL
GOOD_DATA
GOOD_PROVISIONAL
Good value, but shouldn't be trusted for long.GW_COMM_OFF
NOT_FOUND
OPC_BAD_DATA
OPC_BAD_SHOWING_LAST
OPC_COMM_FAIL
OPC_CONFIG_ERROR
OPC_DEVICE_FAILURE
OPC_GOOD_WITH_LOCAL_OVERRIDE
OPC_LIMIT_EXCEEDED
OPC_NOT_CONNECTED
OPC_OUT_OF_SERVICE
OPC_SENSOR_BAD
OPC_SENSOR_FAILURE
OPC_SUB_NORMAL
OPC_UNCERTAIN
OPC_UNCERTAIN_SHOWING_LAST
OPC_UNKNOWN
OPC_WAITING
REFERENCE_NOT_FOUND
Similar to NOT_FOUND, but that quality is used in the browse tree and in other places to mean "the tag you want doesn't exist".SQL_QUERY_ERROR
STALE
TAG_EXEC_ERROR
TAG_LIMIT_EXCEEDED
TYPE_CONVERSION_ERROR
UNKNOWN
WRITE_PENDING
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DataQuality
fromIntValue(java.lang.Integer value)
LocalizedString
getDescription()
This should be a short (~ 1-2 sentences) human-readable, localized description of what situation this quality represents.int
getIntValue()
Returns the integer value of this tag status.Quality.Level
getLevel()
A basic qualitative assertion of whether this "quality" represents a state that is good, bad, or unknown.java.lang.String
getName()
The "Name" of a quality should be a short (~5-50 char) code that identifies this quality.QualityCode
getQualityCode()
Bridge to the more modern (Ignition 8.0) QualityCodestatic DataQuality
getQualityFor(int value)
Returns the DataQuality for the given code.static DataQuality
getQualityFor(QualityCode qc)
Deprecated.boolean
isDataUsed()
Returns a boolean indicating whether or not the value should be used for this qualityboolean
isGood()
Synonym for isGoodData()boolean
isGoodData()
boolean
isOpcBadData()
Returns true if this DataQuality represents one of OPC's various "Bad Data" codes.java.lang.String
toString()
java.lang.String
toString(java.util.Locale locale)
static DataQuality
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DataQuality[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.static DataQuality
worstOf(DataQuality q1, DataQuality q2)
Returns the 'worst' or 'most severe' of the two qualities.static DataQuality
worstOfAll(DataQuality... q)
-
-
-
Enum Constant Detail
-
OPC_BAD_DATA
public static final DataQuality OPC_BAD_DATA
-
OPC_CONFIG_ERROR
public static final DataQuality OPC_CONFIG_ERROR
-
OPC_NOT_CONNECTED
public static final DataQuality OPC_NOT_CONNECTED
-
OPC_DEVICE_FAILURE
public static final DataQuality OPC_DEVICE_FAILURE
-
OPC_SENSOR_FAILURE
public static final DataQuality OPC_SENSOR_FAILURE
-
OPC_BAD_SHOWING_LAST
public static final DataQuality OPC_BAD_SHOWING_LAST
-
OPC_COMM_FAIL
public static final DataQuality OPC_COMM_FAIL
-
OPC_OUT_OF_SERVICE
public static final DataQuality OPC_OUT_OF_SERVICE
-
OPC_WAITING
public static final DataQuality OPC_WAITING
-
OPC_UNCERTAIN
public static final DataQuality OPC_UNCERTAIN
-
OPC_UNCERTAIN_SHOWING_LAST
public static final DataQuality OPC_UNCERTAIN_SHOWING_LAST
-
OPC_SENSOR_BAD
public static final DataQuality OPC_SENSOR_BAD
-
OPC_LIMIT_EXCEEDED
public static final DataQuality OPC_LIMIT_EXCEEDED
-
OPC_SUB_NORMAL
public static final DataQuality OPC_SUB_NORMAL
-
OPC_UNKNOWN
public static final DataQuality OPC_UNKNOWN
-
GOOD_DATA
public static final DataQuality GOOD_DATA
-
OPC_GOOD_WITH_LOCAL_OVERRIDE
public static final DataQuality OPC_GOOD_WITH_LOCAL_OVERRIDE
-
CONFIG_ERROR
public static final DataQuality CONFIG_ERROR
-
COMM_ERROR
public static final DataQuality COMM_ERROR
-
EXPRESSION_EVAL_ERROR
public static final DataQuality EXPRESSION_EVAL_ERROR
-
SQL_QUERY_ERROR
public static final DataQuality SQL_QUERY_ERROR
-
DB_CONN_ERROR
public static final DataQuality DB_CONN_ERROR
-
TAG_EXEC_ERROR
public static final DataQuality TAG_EXEC_ERROR
-
TYPE_CONVERSION_ERROR
public static final DataQuality TYPE_CONVERSION_ERROR
-
ACCESS_DENIED
public static final DataQuality ACCESS_DENIED
-
NOT_FOUND
public static final DataQuality NOT_FOUND
-
DISABLED
public static final DataQuality DISABLED
-
STALE
public static final DataQuality STALE
-
UNKNOWN
public static final DataQuality UNKNOWN
-
WRITE_PENDING
public static final DataQuality WRITE_PENDING
-
DEMO_EXPIRED
public static final DataQuality DEMO_EXPIRED
-
GW_COMM_OFF
public static final DataQuality GW_COMM_OFF
-
TAG_LIMIT_EXCEEDED
public static final DataQuality TAG_LIMIT_EXCEEDED
-
GOOD_PROVISIONAL
public static final DataQuality GOOD_PROVISIONAL
Good value, but shouldn't be trusted for long. Do not cache.
-
REFERENCE_NOT_FOUND
public static final DataQuality REFERENCE_NOT_FOUND
Similar to NOT_FOUND, but that quality is used in the browse tree and in other places to mean "the tag you want doesn't exist". This quality is used to indicate a reference to a tag is not valid.
-
AGGREGATE_NOT_FOUND
public static final DataQuality AGGREGATE_NOT_FOUND
-
GOOD_BACKFILL
public static final DataQuality GOOD_BACKFILL
-
-
Method Detail
-
values
public static DataQuality[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DataQuality c : DataQuality.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataQuality valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getIntValue
public int getIntValue()
Returns the integer value of this tag status.
-
fromIntValue
public static DataQuality fromIntValue(java.lang.Integer value)
-
getQualityCode
public QualityCode getQualityCode()
Bridge to the more modern (Ignition 8.0) QualityCode- Specified by:
getQualityCode
in interfaceQuality
- Returns:
- the integer value for the QualityCode that this DataQuality maps to.
-
getQualityFor
@Deprecated public static DataQuality getQualityFor(QualityCode qc)
Deprecated.This is only for use when bridging to/from old systems that absolutely need DataQuality. It is not implemented with a high degree of fidelity, but only maps the values that should have very important meanings in legacy systems.
-
getQualityFor
public static DataQuality getQualityFor(int value)
Returns the DataQuality for the given code. Returns a quality of UNKNOWN if the code is undefined.
-
isDataUsed
public boolean isDataUsed()
Returns a boolean indicating whether or not the value should be used for this quality
-
isOpcBadData
public boolean isOpcBadData()
Returns true if this DataQuality represents one of OPC's various "Bad Data" codes.
-
isGoodData
public boolean isGoodData()
-
worstOf
public static DataQuality worstOf(DataQuality q1, DataQuality q2)
Returns the 'worst' or 'most severe' of the two qualities.
-
worstOfAll
public static DataQuality worstOfAll(DataQuality... q)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<DataQuality>
-
toString
public java.lang.String toString(java.util.Locale locale)
-
getName
public java.lang.String getName()
Description copied from interface:Quality
The "Name" of a quality should be a short (~5-50 char) code that identifies this quality. Should NOT be localized. Treat this like an ID.
-
getDescription
public LocalizedString getDescription()
Description copied from interface:Quality
This should be a short (~ 1-2 sentences) human-readable, localized description of what situation this quality represents.- Specified by:
getDescription
in interfaceQuality
-
getLevel
public Quality.Level getLevel()
Description copied from interface:Quality
A basic qualitative assertion of whether this "quality" represents a state that is good, bad, or unknown.
-
-