Implements a basic UA Data Access Server.
Each server instance must have one instance of a StandardServer object which is responsible for reading the configuration file, creating the endpoints and dispatching incoming requests to the appropriate handler. This sub-class specifies non-configurable metadata such as Product Name and initializes the DataAccessServerNodeManager which provides access to the data exposed by the Server.
Inheritance: ComWrapperServer
Ejemplo n.º 1
0
        /// <summary>
        /// Creates a form which displays the status for a UA server.
        /// </summary>
        /// <param name="server">The server displayed in the form.</param>
        /// <param name="configuration">The configuration used to initialize the server.</param>
        public MainForm(ComDaServerWrapper server, ApplicationConfiguration configuration)
        {
            InitializeComponent();
            this.Text = configuration.ApplicationName;
            ServerDiagnosticsCTRL.Initialize(server, configuration);

            m_server = server;
            m_configuration = configuration;
            m_configuration.CertificateValidator.CertificateValidation += new CertificateValidationEventHandler(CertificateValidator_CertificateValidation);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a form which displays the status for a UA server.
        /// </summary>
        /// <param name="server">The server displayed in the form.</param>
        /// <param name="configuration">The configuration used to initialize the server.</param>
        public MainForm(ComDaServerWrapper server, ApplicationConfiguration configuration)
        {
            InitializeComponent();
            this.Text = configuration.ApplicationName;
            ServerDiagnosticsCTRL.Initialize(server, configuration);

            m_server        = server;
            m_configuration = configuration;
            m_configuration.CertificateValidator.CertificateValidation += new CertificateValidationEventHandler(CertificateValidator_CertificateValidation);
        }
Ejemplo n.º 3
0
 private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     try
     {
         if (m_server != null)
         {
             m_server.Stop();
             m_server = null;
         }
     }
     catch (Exception exception)
     {
         Utils.Trace("Error stopping server application. '{0}'.", exception.Message);
     }
 }
Ejemplo n.º 4
0
        private void Config_DeleteServerMI_Click(object sender, EventArgs e)
        {
            try
            {
                if (!new SelectComServerDlg().ShowDialogForDelete(m_configuration))
                {
                    return;
                }

                m_configuration.SaveToFile(m_configuration.SourceFilePath);

                m_server.Stop();
                m_server = new ComDaServerWrapper();
                m_server.Start(m_configuration);
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Ejemplo n.º 5
0
 private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     try
     {
         if (m_server != null)
         {
             m_server.Stop();
             m_server = null;
         }
     }
     catch (Exception exception)
     {
         Utils.Trace("Error stopping server application. '{0}'.", exception.Message);
     }
 }
Ejemplo n.º 6
0
        private void Config_DeleteServerMI_Click(object sender, EventArgs e)
        {
            try
            {
                if (!new SelectComServerDlg().ShowDialogForDelete(m_configuration))
                {
                    return;
                }

                m_configuration.SaveToFile(m_configuration.SourceFilePath);

                m_server.Stop();
                m_server = new ComDaServerWrapper();
                m_server.Start(m_configuration);
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }