Hashmap and NodeId
Posted: 10 Jan 2013, 11:02
Hello, support team:
I'm implementing an index table class that can map the UaNodeId(principally String format) to integer ID, this index table is used to find the ID of a historian server tag or an IO server tag. And I prefer to use a hash table(boost unordered_map) instead of STL map. Because it is much more fast.
For a hash table, I need to implement the hash algorithm for the class UaNodeId, and the best way is to get the native OpcUa_NodeId inside the UaNodeId and hash it accord it's identity type(String, Integer or ByteString).
But I'm a little confused when I hash the struct type OpcUa_String:
typedef struct _OpcUa_String
{
OpcUa_UInt16 uReserved1;
OpcUa_UInt32 uReserved2;
OpcUa_Void* uReserved4;
} OpcUa_String, *OpcUa_pString;
What does each variable means?
And if you have some code to do this, can you please give me a hint?
Thanks a lot.
I'm implementing an index table class that can map the UaNodeId(principally String format) to integer ID, this index table is used to find the ID of a historian server tag or an IO server tag. And I prefer to use a hash table(boost unordered_map) instead of STL map. Because it is much more fast.
For a hash table, I need to implement the hash algorithm for the class UaNodeId, and the best way is to get the native OpcUa_NodeId inside the UaNodeId and hash it accord it's identity type(String, Integer or ByteString).
But I'm a little confused when I hash the struct type OpcUa_String:
typedef struct _OpcUa_String
{
OpcUa_UInt16 uReserved1;
OpcUa_UInt32 uReserved2;
OpcUa_Void* uReserved4;
} OpcUa_String, *OpcUa_pString;
What does each variable means?
And if you have some code to do this, can you please give me a hint?
Thanks a lot.