/// <summary>
        /// Initializes the node manager.
        /// </summary>
        public TestDataNodeManager(Opc.Ua.Server.IServerInternal server, ApplicationConfiguration configuration)
            :
            base(server, configuration)
        {
            // update the namespaces.
            List <string> namespaceUris = new List <string>();

            namespaceUris.Add(Namespaces.TestData);
            namespaceUris.Add(Namespaces.TestData + "/Instance");

            NamespaceUris = namespaceUris;

            // get the configuration for the node manager.
            m_configuration = configuration.ParseExtension <TestDataNodeManagerConfiguration>();

            // use suitable defaults if no configuration exists.
            if (m_configuration == null)
            {
                m_configuration = new TestDataNodeManagerConfiguration();
            }

            m_lastUsedId = m_configuration.NextUnusedId - 1;

            // create the object used to access the test system.
            m_system = new TestDataSystem(this, server.NamespaceUris, server.ServerUris);

            // update the default context.
            SystemContext.SystemHandle = m_system;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes the node manager.
        /// </summary>
        public TestDataNodeManager(Opc.Ua.Server.IServerInternal server, ApplicationConfiguration configuration, string[] namespaceUris)
            :
            base(server, configuration)
        {
            // update the namespaces.
            NamespaceUris = namespaceUris;

            Server.Factory.AddEncodeableTypes(typeof(TestDataNodeManager).Assembly.GetExportedTypes().Where(t => t.FullName.StartsWith(typeof(TestDataNodeManager).Namespace)));

            // get the configuration for the node manager.
            m_configuration = configuration.ParseExtension <TestDataNodeManagerConfiguration>();

            // use suitable defaults if no configuration exists.
            if (m_configuration == null)
            {
                m_configuration = new TestDataNodeManagerConfiguration();
            }

            m_lastUsedId = m_configuration.NextUnusedId - 1;

            // create the object used to access the test system.
            m_system = new TestDataSystem(this, server.NamespaceUris, server.ServerUris);

            // update the default context.
            SystemContext.SystemHandle = m_system;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes the node manager.
        /// </summary>
        public UaNodeManager(
            Opc.Ua.Server.IServerInternal server,
            ApplicationConfiguration configuration
            )
            :
            base(server)
        {
            List <string> namespaceUris = new List <string>
            {
                Namespaces.vc2opcua,
                Namespaces.vc2opcua + "/Instance"
            };

            NamespaceUris = namespaceUris;
            context       = SystemContext;

            m_typeNamespaceIndex = Server.NamespaceUris.GetIndexOrAppend(namespaceUris[0]);
            m_namespaceIndex     = Server.NamespaceUris.GetIndexOrAppend(namespaceUris[1]);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes the node manager.
        /// </summary>
        public BoilerNodeManager(
            Opc.Ua.Server.IServerInternal server,
            ApplicationConfiguration configuration)
            :
            base(server)
        {
            List <string> namespaceUris = new List <string>();

            namespaceUris.Add(Namespaces.Boiler);
            namespaceUris.Add(Namespaces.Boiler + "Instance");
            NamespaceUris = namespaceUris;

            m_typeNamespaceIndex = Server.NamespaceUris.GetIndexOrAppend(namespaceUris[0]);
            m_namespaceIndex     = Server.NamespaceUris.GetIndexOrAppend(namespaceUris[1]);

            AddEncodeableNodeManagerTypes(typeof(BoilerNodeManager).Assembly, typeof(BoilerNodeManager).Namespace);

            m_lastUsedId = 0;
            m_boilers    = new List <BoilerState>();
        }
 public PublisherNodeManager(Opc.Ua.Server.IServerInternal server, ApplicationConfiguration configuration)
     : base(server, configuration, Namespaces.PublisherApplications)
 {
     SystemContext.NodeIdFactory = this;
 }
 public PublisherNodeManager(Opc.Ua.Server.IServerInternal server, ApplicationConfiguration configuration)
     : base(server, configuration, "http://microsoft.com/Opc/Publisher/")
 {
     SystemContext.NodeIdFactory = this;
 }