Opc.Ua.Server.DiagnosticsNodeManager.CreateAddressSpace C# (CSharp) Method

CreateAddressSpace() public method

Does any initialization required before the address space can be used.
The externalReferences is an out parameter that allows the node manager to link to nodes in other node managers. For example, the 'Objects' node is managed by the CoreNodeManager and should have a reference to the root folder node(s) exposed by this node manager.
public CreateAddressSpace ( IDictionary externalReferences ) : void
externalReferences IDictionary
return void
        public override void CreateAddressSpace(IDictionary<NodeId, IList<IReference>> externalReferences)
        {
            lock (Lock)
            {
                base.CreateAddressSpace(externalReferences);
                      
                // sampling interval diagnostics not supported by the server.
                ServerDiagnosticsState serverDiagnosticsNode = (ServerDiagnosticsState)FindPredefinedNode(
                    ObjectIds.Server_ServerDiagnostics,
                    typeof(ServerDiagnosticsState));
                                
                if (serverDiagnosticsNode != null)
                {
                    NodeState samplingDiagnosticsArrayNode = serverDiagnosticsNode.FindChild(
                        SystemContext,
                        BrowseNames.SamplingIntervalDiagnosticsArray);

                    if (samplingDiagnosticsArrayNode != null)
                    {
                        serverDiagnosticsNode.SamplingIntervalDiagnosticsArray = null;
                    }
                }
                                
                // The nodes are now loaded by the DiagnosticsNodeManager from the file
                // output by the ModelDesigner V2. These nodes are added to the CoreNodeManager
                // via the AttachNode() method when the DiagnosticsNodeManager starts.
                Server.CoreNodeManager.ImportNodes(SystemContext, PredefinedNodes.Values, true);

                // hook up the server GetMonitoredItems method.
                MethodState getMonitoredItems = (MethodState)FindPredefinedNode(
                    MethodIds.Server_GetMonitoredItems,
                    typeof(MethodState));

                if (getMonitoredItems != null)
                {
                    getMonitoredItems.OnCallMethod = OnGetMonitoredItems;
                }
            }
        }