04/01/2014
Hi ,
I wanted to understand the rules for doing the explicit conversion of built-in datatypes i.e. If I want to transfer the data from one node to another node which are having different datatypes ex: A node has Datatype as Int and B node has Datatype as String, so both nodes will show the same value (irrespective of DataTypes) but the datatypes of both nodes will be different.
As per my understanding following types are explicitly convertible to each other : Please correct me If I am wrong.
A’s Node DataType | B’s Node DataType (Allowed Explicitly) |
Boolean | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String, |
Byte | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String |
ByteString | ByteString, Guid |
DateTime | DateTime, String |
Double | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String, |
ExpandedNodeId | NodeId, Expanded NodeId, String |
Float | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String, |
Guid | ByteString, Guid, String |
Int16 | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String |
Int32 | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String, StatusCode |
Int64 | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String, StatusCode |
LocalizedText | LocalizedText, String |
NodeId | NodeId, Expanded NodeId, String |
QualifiedName | LocalizedText, String, QualifiedNAme |
Sbyte | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String |
Uint16 | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String, StatusCode |
Uint32 | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String, StatusCode |
Uint64 | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String, StatusCode |
StatusCode | Int32, Int64, StatusCode, Uint16, Uint32, Uint64 |
String | Boolean, Byte, Uint16,Uint32, UInt64, Double, Float, Sbyte, Int16, Int32, Int64, String, StatusCode, DatTime, ExpandedNodeId, Guid, NodeId, LocalizedText, QualifiedName |
I wanted to know if LocalizedText to String conversion should be allowed or not? If yes, how should we handle the locale.
Ex: 1) A node of LocalizedText has value “en” , “Test”, so B node String type should have value as “Test” or “en, Test” and vice versa
2) A node of Qualified Name has value “0” “Test”, so B node String type should have value as “test” or “0,test” and vice versa.
Regards,
Shubhi Gogna
1 Guest(s)