OPC Studio User's Guide and Reference
Enumeration data type
Client and Subscriber Development > Extensions > Integrated Extensions > OPC UA Complex Data Extension > Generic data and data types > Working with data types > Data type kinds > Enumeration data type

The enumeration data type is a data type consisting of a set of named values. It is represented by an instance of the EnumerationDataType Class.

The SizeInBits Property determines how many bits the enumeration value can occupy. It is set to -1 when the size is unknown.

The EnumerationMembers Property contains a collection of enumeration members, i.e. descriptions of possible enumeration values. Each such description is an instance of EnumerationMember Class, and specifies:

Note that having the enumeration members in the EnumerationMembers Property is purely optional from the perspective of validation the generic data against the data type (see Generic data validation). Any enumeration value that first into the given size in bits (if specified) is valid.

The EnumerationDataType Class is an IEnumerable of EnumerationMember, and it has an Add Method for the same. It means that you can easily enumerate through its members, and it can also participate in collection initializers in C# or in VB.NET.

 

 

See Also

Recommended