Skip to content

Commit

Permalink
Merge pull request #2 from umati/master
Browse files Browse the repository at this point in the history
Add GUID Support for UA_NodeId (#1)
  • Loading branch information
Sebastian Friedl authored Sep 28, 2021
2 parents 6f2d773 + 5f3b7cf commit 1647b95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Open62541Cpp/UA_NodeId.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ UA_NodeId::UA_NodeId(const UA_UInt16 nsIndex, const UA_UInt32 identifier) : UA_N
NodeId->identifier.numeric = identifier;
}

UA_NodeId::UA_NodeId(const UA_UInt16 nsIndex, const UA_Guid identifier) : UA_NodeId() {
NodeId->identifierType = UA_NODEIDTYPE_GUID;
NodeId->namespaceIndex = nsIndex;
NodeId->identifier.guid = identifier;
}

UA_NodeId::UA_NodeId(::UA_NodeId *nodeId, bool takeOwnership) {
if (takeOwnership) {
NodeId = nodeId;
Expand Down
2 changes: 1 addition & 1 deletion Open62541Cpp/UA_NodeId.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class UA_NodeId {
UA_NodeId(::UA_NodeId *nodeId, bool takeOwnership);
UA_NodeId(UA_UInt16 nsIndex, std::string identifier);
UA_NodeId(UA_UInt16 nsIndex, UA_UInt32 identifier);

UA_NodeId(UA_UInt16 nsIndex, UA_Guid identifier);
static UA_NodeId FromConstNodeId(const ::UA_NodeId *nodeId);

/// Do a copy
Expand Down

0 comments on commit 1647b95

Please sign in to comment.