OPC UA data type question
Posted: 17 Feb 2012, 15:27
Hello
I have a question regarding data type conversion for write.
Before I write a value from our systen to the OPC Server I need to do a conversion from our data types to the right OPC UA datatype. I know the node id of the tag to write, so I use the read OpcUa_Attribute_DataType. This gives me the node Id of the datatype.
I noticed that in the type nodeId the identifierType is numeric and the identifier values corresponds with the OpcUaType as defined by the OPC-UA spec part 6 and in opcua_builtintypes.h.
Can I expect this always to be the case in ever UA Server? It seems logical to me but I couldn’t find it in the spec.
If not, what is the best way the get the data type of a tag?
I have a question regarding data type conversion for write.
Before I write a value from our systen to the OPC Server I need to do a conversion from our data types to the right OPC UA datatype. I know the node id of the tag to write, so I use the read OpcUa_Attribute_DataType. This gives me the node Id of the datatype.
I noticed that in the type nodeId the identifierType is numeric and the identifier values corresponds with the OpcUaType as defined by the OPC-UA spec part 6 and in opcua_builtintypes.h.
Can I expect this always to be the case in ever UA Server? It seems logical to me but I couldn’t find it in the spec.
If not, what is the best way the get the data type of a tag?