protected override void OnServerStarted(IUaServerData server)
        {
            base.OnServerStarted(server);

            // request notifications when the user identity is changed.
            // All valid users are accepted by default.
            server.SessionManager.ImpersonateUserEvent += OnImpersonateUser;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes the node manager.
        /// </summary>
        public EmptyServerNodeManager(IUaServer opcServer,
                                      IUaServerPlugin opcServerPlugin,
                                      IUaServerData uaServer,
                                      ApplicationConfiguration configuration,
                                      params string[] namespaceUris)
            : base(uaServer, configuration, namespaceUris)
        {
            opcServer_       = opcServer;
            opcServerPlugin_ = opcServerPlugin;

            SystemContext.NodeIdFactory = this;
        }
Beispiel #3
0
        /// <summary>
        /// Called after the server has been started.
        /// </summary>
        protected override void OnServerStarted(IUaServerData server)
        {
            base.OnServerStarted(server);

            // request notifications when the user identity is changed. all valid users are accepted by default.
            server.SessionManager.ImpersonateUserEvent += OnImpersonateUser;

            try
            {
                // allow a faster sampling interval for CurrentTime node.
                lock (server.Status.Lock)
                {
                    server.Status.Variable.CurrentTime.MinimumSamplingInterval = 250;
                }
            }
            catch (Exception exception)
            {
                Utils.Trace("Exception:" + exception.Message);
            }
        }
Beispiel #4
0
        /// <summary>
        /// Initializes the node manager.
        /// </summary>
        public ModelDesignServerNodeManager(IUaServer opcServer,
                                            IUaServerPlugin opcServerPlugin,
                                            IUaServerData uaServer,
                                            ApplicationConfiguration configuration,
                                            params string[] namespaceUris)
            : base(uaServer, configuration, namespaceUris)
        {
            opcServer_       = opcServer;
            opcServerPlugin_ = opcServerPlugin;

            // get the configuration for the node manager. In case no configuration exists
            // use suitable defaults.
            configuration_ = configuration.ParseExtension <ModelDesignServerConfiguration>() ??
                             new ModelDesignServerConfiguration();

            var configurationFile = configuration_.ConfigurationFile;

            Console.WriteLine("Specified configuration file: {0}", configurationFile);

            SystemContext.NodeIdFactory = this;
        }
 public UaBaseNodeManager OnGetNodeManager(IUaServer opcServer, IUaServerData uaServer, ApplicationConfiguration configuration, params string[] namespaceUris)
 {
     Utils.Trace(Utils.TraceMasks.Information, "OnGetNodeManager(): Request the instance of the node manager.");
     return(new SampleServerNodeManager(opcServer, this, uaServer, configuration, namespaceUris));
 }
 /// <summary>
 /// Adds all encodeable types to the server.
 /// </summary>
 /// <param name="uaServerData">The uaServerData data implementing the IUaServerData interface.</param>
 public override void AddEncodeableTypes(IUaServerData uaServerData)
 {
     // add the types defined in the information model library to the factory.
     uaServerData.Factory.AddEncodeableTypes(GetType().GetTypeInfo().Assembly);
 }