OPC-UA DataType and TypeDefinition

General topics regarding OPC Foundation and communication technology in general.

Moderator: Support Team

Post Reply
JohnBurr
Jr. Member
Jr. Member
Posts: 2
Joined: 15 Aug 2013, 14:53

OPC-UA DataType and TypeDefinition

Post by JohnBurr »

Very many of the variables in the Unified Automation demo server (.NET SDK) have a HasTypeDefinition of “BaseDataVariableType” and one example is the Demo.Static.Scalar.Boolean varialbe. I believe this use of the HasTypeDefinition is compliant with the specification, but is it typical or best practice? Someone is telling me that all variables with a data type of Boolean should have a HasTypeDefinition of "TwoStateDescreteType" but I cannot confirm this. I can find information about a variable's DataType and about a HasTypeDefintion reference in the specifications and I find information about deriving custom object types, but I cannot find this kind of advice, nor can I find a reference server that claims to be following best practices. My use case is essentially providing an OPC-UA server that shows values that come from an embedded controller that is much like a PLC. I am particularly interested in understanding Integers that have enumerated values (such as 0 means "red" and 1 means "blue" and 2 means "green") and in Booleans with and without associated text for the meaning of True and False. Thank you in advance for any advice or reading material.

Post Reply