/// <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(); } }
/// <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); }
/// <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); }
/// <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(); } }