A base class for classes that implement an OPC COM specification.
상속: IDisposable
예제 #1
0
        /// <summary>
        /// Called when a new session is created.
        /// </summary>
        protected override void OnSessionCreated()
        {
            lock (Lock)
            {
                // fetch the configuration.
                m_configuration = Endpoint.ParseExtension <ComAe2ProxyConfiguration>(null);

                if (m_configuration == null)
                {
                    m_configuration = new ComAe2ProxyConfiguration();
                }

                Session session = Session;

                // update the mapping and pass the new session to other objects.
                m_mapper.Initialize(session, m_configuration);

                // save the configuration.
                Endpoint.UpdateExtension <ComAe2ProxyConfiguration>(null, m_configuration);
                SaveConfiguration();

                // create the browser.
                m_browser = new ComAe2Browser(this, m_configuration, m_mapper);
                m_conditionManager.Initialize();
            }
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ComHdaBrowser"/> class.
        /// </summary>
        public ComAe2Subscription(
            ComAe2Proxy server, 
            ComAe2ProxyConfiguration configuration,
            ComAeNamespaceMapper mapper,
            ComAe2Browser browser, 
            AeConditionManager conditionManager)
        {
            m_server = server;
            m_configuration = configuration;
            m_mapper = mapper;
            m_browser = browser;
            m_conditionManager = conditionManager;
            m_filter = new AeEventFilter(m_mapper);
            m_queue = new Queue<AeEvent>();
            m_notifiers = new NodeIdDictionary<MonitoredItem>();
            m_sourceNodes = new List<NodeId>();

            // set a default filters.
            m_filter.SetFilter(Constants.ALL_EVENTS, 0, UInt16.MaxValue, null, null); 
            UpdateAreaFilter(null);
            UpdateSourceFilter(null);
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ComHdaBrowser"/> class.
        /// </summary>
        public ComAe2Subscription(
            ComAe2Proxy server,
            ComAe2ProxyConfiguration configuration,
            ComAeNamespaceMapper mapper,
            ComAe2Browser browser,
            AeConditionManager conditionManager)
        {
            m_server           = server;
            m_configuration    = configuration;
            m_mapper           = mapper;
            m_browser          = browser;
            m_conditionManager = conditionManager;
            m_filter           = new AeEventFilter(m_mapper);
            m_queue            = new Queue <AeEvent>();
            m_notifiers        = new NodeIdDictionary <MonitoredItem>();
            m_sourceNodes      = new List <NodeId>();

            // set a default filters.
            m_filter.SetFilter(Constants.ALL_EVENTS, 0, UInt16.MaxValue, null, null);
            UpdateAreaFilter(null);
            UpdateSourceFilter(null);
        }
예제 #4
0
        /// <summary>
        /// Called when a new session is created.
        /// </summary>
        protected override void OnSessionCreated()
        {
            lock (Lock)
            {
                // fetch the configuration.
                m_configuration = Endpoint.ParseExtension<ComAe2ProxyConfiguration>(null);

                if (m_configuration == null)
                {
                    m_configuration = new ComAe2ProxyConfiguration();
                }

                Session session = Session;

                // update the mapping and pass the new session to other objects.
                m_mapper.Initialize(session, m_configuration);

                // save the configuration.
                Endpoint.UpdateExtension<ComAe2ProxyConfiguration>(null, m_configuration);
                SaveConfiguration();

                // create the browser.
                m_browser = new ComAe2Browser(this, m_configuration, m_mapper);
                m_conditionManager.Initialize();
            }
        }