Enumerationsthat are used as parameters in the Messagesdefined in OPC 10000-4are encoded as xs:stringwith the following syntax:
<symbol>_<value>
The elements of the syntax are described in Table 27.
Table 27– Components of Enumeration
Field |
Type |
Description |
<symbol> |
String |
The symbolic name for the enumerated value. |
<value> |
UInt32 |
The numeric value associated with enumerated value. |
For example, the XML schema for the NodeClassenumeration is:
<xs:simpleType name="NodeClass">
<xs:restriction base="xs:string">
<xs:enumeration value="Unspecified_0" />
<xs:enumeration value="Object_1" />
<xs:enumeration value="Variable_2" />
<xs:enumeration value="Method_4" />
<xs:enumeration value="ObjectType_8" />
<xs:enumeration value="VariableType_16" />
<xs:enumeration value="ReferenceType_32" />
<xs:enumeration value="DataType_64" />
<xs:enumeration value="View_128" />
</xs:restriction>
</xs:simpleType>
Enumerationsthat are stored in a Variantare encoded as an Int32value.
For example, any Variablecould have a value with a DataTypeof NodeClass. In this case, the corresponding numeric value is placed in the Variant(e.g. NodeClass Objectwould be stored as a 1).