public NodeId GetLocalNodeId(NodeId remoteId)
{
if (remoteId == null || remoteId.NamespaceIndex == 0)
{
return remoteId;
}
ushort localIndex = GetLocalNamespaceIndex(remoteId.NamespaceIndex);
if (localIndex == remoteId.NamespaceIndex)
{
return remoteId;
}
return new NodeId(remoteId.Identifier, localIndex);
}