5.3.3 DiscreteItemType

5.3.3.1 General

This VariableType is an abstract type. That is, no instances of this type can exist. However, it can be used in a filter when browsing or querying. The DiscreteItemType derives from the DataItemType and therefore shares all of its characteristics. It is formally defined in Table 8.

Table 8 – DiscreteItemType definition
Attribute Value
BrowseNameDiscreteItemType
IsAbstractTrue
ValueRank−2 (−2 = ‘Any’)
DataTypeBaseDataType
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of the DataItemType defined in 5.2; i.e. the Properties of that type are inherited.
HasSubtypeVariableTypeTwoStateDiscreteTypeDefined in 5.3.3.2
HasSubtypeVariableTypeMultiStateDiscreteTypeDefined in 5.3.3.3
HasSubtypeVariableTypeMultiStateValueDiscreteTypeDefined in 5.3.3.4
Conformance Units
Data Access DiscreteItemType
5.3.3.2 TwoStateDiscreteType

This VariableType defines the general characteristics of a DiscreteItem that can have two states. The TwoStateDiscreteType derives from the DiscreteItemType. It is formally defined in Table 9.

Table 9 – TwoStateDiscreteType definition
Attribute Value
BrowseNameTwoStateDiscreteType
IsAbstractFalse
ValueRank−2 (−2 = ‘Any’)
DataTypeBoolean
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of the DiscreteItemType defined in 5.3.3; i.e. the Properties of that type are inherited.
HasPropertyVariableTrueStateLocalizedTextPropertyTypeMandatory
HasPropertyVariableFalseStateLocalizedTextPropertyTypeMandatory
Conformance Units
Data Access TwoState

TrueState contains a string to be associated with this DataItem when it is TRUE. This is typically used for a contact when it is in the closed (non-zero) state.

FalseState contains a string to be associated with this DataItem when it is FALSE. This is typically used for a contact when it is in the open (zero) state.

If the item contains an array, then the Properties will apply to all elements in the array.

The StatusCode SemanticsChanged bit shall be set if any of the FalseState or TrueState Properties are changed (see 5.2 for additional information).

5.3.3.3 MultiStateDiscreteType

This VariableType defines the general characteristics of a DiscreteItem that can have more than two states. The MultiStateDiscreteType derives from the DiscreteItemType. It is formally defined in Table 10.

Table 10 – MultiStateDiscreteType definition
Attribute Value
BrowseNameMultiStateDiscreteType
IsAbstractFalse
ValueRank−2 (−2 = ‘Any’)
DataTypeUInteger
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of the DiscreteItemType defined in 5.3.3; i.e. the Properties of that type are inherited.
HasPropertyVariableEnumStringsLocalizedText[]PropertyTypeMandatory
Conformance Units
Data Access MultiState

EnumStrings is a string lookup table corresponding to sequential numeric values (0, 1, 2, etc.)

Example:

Here the string "OPEN" corresponds to 0, "CLOSE" to 1 and "IN TRANSIT" to 2.

Clients should be prepared to handle item values outside of the range of the list; and robust Servers should be prepared to handle writes of illegal values, by providing error code “Bad_OutOfRange”.

If the item contains an array then this lookup table shall apply to all elements in the array.

The StatusCode SemanticsChanged bit shall be set if the EnumStrings Property is changed (see 5.2 for additional information).

5.3.3.4 MultiStateValueDiscreteType

This VariableType defines the general characteristics of a DiscreteItem that can have more than two states and where the state values (the enumeration) do not consist of consecutive numeric values (can have gaps) or where the enumeration is not zero-based. The MultiStateValueDiscreteType derives from the DiscreteItemType. It is formally defined in Table 11.

Table 11 – MultiStateValueDiscreteType definition
Attribute Value
BrowseNameMultiStateValueDiscreteType
IsAbstractFalse
ValueRank−2 (−2 = ‘Any’)
DataTypeNumber
References NodeClass BrowseName

DataType

TypeDefinition

ModellingRule
Subtype of the DiscreteItemType defined in 5.3.3; i.e. the Properties of that type are inherited.
HasPropertyVariableEnumValuesEnumValueType[]
PropertyType
Mandatory
HasPropertyVariableValueAsTextLocalizedText
PropertyType
Mandatory
Conformance Units
Data Access MultiStateValueDiscrete

EnumValues is an array of EnumValueType. Each entry of the array represents one enumeration value with its integer notation, a human-readable representation, and help information. This represents enumerations with integers that are not zero-based or have gaps (e.g. 1, 2, 4, 8, 16). See OPC 10000-3 for the definition of this type. MultiStateValueDiscrete Variables expose the current integer notation in their Value Attribute. Clients will often read the EnumValues Property in advance and cache it to lookup a name or help whenever they receive the numeric representation.

Only DataTypes that can be represented with EnumValues are allowed for Variables of MultiStateValueDiscreteType. These are Integers up to 64 Bits (signed and unsigned).

Clients should be prepared to handle item values outside of the range of the list; and robust Servers should be prepared to handle writes of illegal values, by providing error code “Bad_OutOfRange”.

The numeric representation of the current enumeration value is provided via the Value Attribute of the MultiStateValueDiscrete Variable. If the Value is scalar, the ValueAsText Property provides the localized text representation of the enumeration value. It can be used by Clients only interested in displaying the text to subscribe to the Property instead of the Value Attribute. If the Value is not scalar then ValueAsText should be Null. In that case, Clients can use the EnumValues Property to lookup the display information.

The StatusCode SemanticsChanged bit shall be set if the EnumValues Property value is changed (see clause 5.2 for additional information).