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;
}
}
}