Opc.Ua.Com.Server.ComNamespaceMapper.GetRemoteExpandedNodeId C# (CSharp) 메소드

GetRemoteExpandedNodeId() 공개 메소드

Gets the remote node id.
public GetRemoteExpandedNodeId ( ExpandedNodeId localId ) : ExpandedNodeId
localId ExpandedNodeId The local id.
리턴 ExpandedNodeId
        public ExpandedNodeId GetRemoteExpandedNodeId(ExpandedNodeId localId)
        {
            if (localId == null)
            {
                return localId;
            }

            ushort localNamespaceIndex = localId.NamespaceIndex;
            uint localServerIndex = localId.ServerIndex;

            ushort remoteNamespaceIndex = GetRemoteNamespaceIndex(localNamespaceIndex);
            uint remoteServerIndex = GetRemoteServerIndex(localServerIndex);

            if (localNamespaceIndex == remoteNamespaceIndex && localServerIndex == remoteServerIndex)
            {
                return localId;
            }

            return new ExpandedNodeId(localId.Identifier, remoteNamespaceIndex, localId.NamespaceUri, remoteServerIndex);
        }