## 5.3.3.1 General

This VariableType is an abstract type. That is, no instances of this type can exist. However, it might 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 3.

Table 3 – DiscreteItemType definition

Attribute Value
BrowseName DiscreteItemType
IsAbstract True
ValueRank −2 (−2 = ‘Any’)
DataType BaseDataType

Subtype of the DataItemType defined in 5.2; i.e the Properties of that type are inherited.

References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasSubtype VariableType TwoStateDiscreteType Defined in 5.3.3.2
HasSubtype VariableType MultiStateDiscreteType Defined in 5.3.3.3
HasSubtype VariableType MultiStateValueDiscreteType Defined in 5.3.3.4

## 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 4.

Table 4 – TwoStateDiscreteType definition

Attribute Value
BrowseName TwoStateDiscreteType
IsAbstract False
ValueRank −2 (−2 = ‘Any’)
DataType Boolean

Subtype of the DiscreteItemType defined in 5.3.3; i.e the Properties of that type are inherited.

References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable TrueState LocalizedText PropertyType Mandatory
HasProperty Variable FalseState LocalizedText PropertyType Mandatory

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.

for example: "RUN", "CLOSE", "ENABLE", "SAFE“, etc.


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.

for example: "STOP", "OPEN", "DISABLE", "UNSAFE“, etc.


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 (changes can cause misinterpretation by users or (scripting) programs) Properties are changed (see section 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 5.

Table 5 – MultiStateDiscreteType definition

Attribute Value
BrowseName MultiStateDiscreteType
IsAbstract False
ValueRank −2 (−2 = ‘Any’)
DataType UInteger

Subtype of the DiscreteItemType defined in 5.3.3; i.e the Properties of that type are inherited.

References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable EnumStrings LocalizedText[] PropertyType Mandatory

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

Example:

”OPEN”

”CLOSE”

”IN TRANSIT” etc.


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.

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

NOTE The EnumStrings property is also used for Enumeration DataTypes (for the specification of this DataType, see OPC 10000-3).

The StatusCode SemanticsChanged bit shall be set if the EnumStrings (changes can cause misinterpretation by users or (scripting) programs) Property is changed (see section 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) does not consist of consecutive numeric values (may have gaps) or where the enumeration is not zero-based. The MultiStateValueDiscreteType derives from the DiscreteItemType. It is formally defined in Table 6.

Table 6 – MultiStateValueDiscreteType definition

Attribute Value
BrowseName MultiStateValueDiscreteType
IsAbstract False
ValueRank −2 (−2 = ‘Any’)
DataType Number

Subtype of the DiscreteItemType defined in 5.3.3; i.e the Properties of that type are inherited.

References NodeClass BrowseName DataType/TypeDefinition ModellingRule
HasProperty Variable EnumValues EnumValueType[] PropertyType Mandatory
HasProperty Variable ValueAsText LocalizedText PropertyType Mandatory

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.

MultiStateValueDiscrete Variables can have any numeric Data Type; this includes signed and unsigned integers from 8 to 64 Bit length.

The numeric representation of the current enumeration value is provided via the Value Attribute of the MultiStateValueDiscrete Variable. 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.