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

GetLocaleExpandedNodeId() 공개 메소드

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

            ushort remoteNamespaceIndex = remoteId.NamespaceIndex;
            uint remoteServerIndex = remoteId.ServerIndex;

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

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

            return new ExpandedNodeId(remoteId.Identifier, localNamespaceIndex, remoteId.NamespaceUri, localServerIndex);
        }