Opc.Ua.Com.Server.ComNamespaceMapper.GetRemoteIntegerIdMapping C# (CSharp) Method

GetRemoteIntegerIdMapping() public method

Gets the remote node id associated with an integer id.
public GetRemoteIntegerIdMapping ( string mappingType, uint integerId ) : NodeId
mappingType string Type of the mapping.
integerId uint The integer id.
return NodeId
        public NodeId GetRemoteIntegerIdMapping(string mappingType, uint integerId)
        {
            lock (m_lock)
            {
                // check if no mappings defined.
                if (m_mappingSets == null)
                {
                    return null;
                }

                if (mappingType == null)
                {
                    mappingType = String.Empty;
                }

                // check for an existing mapping.
                NodeIdMappingSet mappingSet = null;

                if (!m_mappingSets.TryGetValue(mappingType, out mappingSet))
                {
                    return null;
                }

                // search for a existing integer id.
                if (mappingSet.Mappings != null)
                {
                    for (int ii = 0; ii < mappingSet.Mappings.Count; ii++)
                    {
                        NodeIdMapping mapping = mappingSet.Mappings[ii];

                        if (integerId == mapping.IntegerId)
                        {
                            return GetRemoteNodeId(mapping.NodeId);
                        }
                    }
                }

                // not found.
                return null;
            }
        }