/// <summary>
        /// Initializes the area.
        /// </summary>
        public SourceState(
            QuickstartNodeManager nodeManager,
            NodeId nodeId,
            string sourcePath)
            :
            base(null)
        {
            Initialize(nodeManager.SystemContext);

            // save the node manager that owns the source.
            m_nodeManager = nodeManager;

            // create the source with the underlying system.
            m_source = ((UnderlyingSystem)nodeManager.SystemContext.SystemHandle).CreateSource(sourcePath, OnAlarmChanged);

            // initialize the area with the fixed metadata.
            this.SymbolicName     = m_source.Name;
            this.NodeId           = nodeId;
            this.BrowseName       = new QualifiedName(Utils.Format("{0}", m_source.Name), nodeId.NamespaceIndex);
            this.DisplayName      = BrowseName.Name;
            this.Description      = null;
            this.ReferenceTypeId  = null;
            this.TypeDefinitionId = ObjectTypeIds.BaseObjectType;
            this.EventNotifier    = EventNotifiers.None;

            // create a dialog.
            m_dialog = CreateDialog("OnlineState");

            // create the table of conditions.
            m_alarms   = new Dictionary <string, AlarmConditionState>();
            m_events   = new Dictionary <string, AlarmConditionState>();
            m_branches = new Dictionary <NodeId, AlarmConditionState>();

            // request an updated for all alarms.
            m_source.Refresh();
        }
Exemple #2
0
        /// <summary>
        /// Initializes the area.
        /// </summary>
        public SourceState(
            QuickstartNodeManager nodeManager,
            NodeId nodeId,
            string sourcePath) 
        : 
            base(null)
        {
            Initialize(nodeManager.SystemContext);

            // save the node manager that owns the source.
            m_nodeManager = nodeManager;

            // create the source with the underlying system.
            m_source = ((UnderlyingSystem)nodeManager.SystemContext.SystemHandle).CreateSource(sourcePath, OnAlarmChanged);
            
            // initialize the area with the fixed metadata.
            this.SymbolicName = m_source.Name;
            this.NodeId = nodeId;
            this.BrowseName = new QualifiedName(Utils.Format("{0}", m_source.Name), nodeId.NamespaceIndex);
            this.DisplayName = BrowseName.Name;
            this.Description = null;
            this.ReferenceTypeId = null;
            this.TypeDefinitionId = ObjectTypeIds.BaseObjectType;
            this.EventNotifier = EventNotifiers.None;

            // create a dialog.
            m_dialog = CreateDialog("OnlineState");

            // create the table of conditions.
            m_alarms = new Dictionary<string, AlarmConditionState>();
            m_events = new Dictionary<string, AlarmConditionState>();
            m_branches = new Dictionary<NodeId, AlarmConditionState>();
            
            // request an updated for all alarms.
            m_source.Refresh();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="MonitoredNode2"/> class.
 /// </summary>
 /// <param name="nodeManager">The node manager.</param>
 /// <param name="node">The node.</param>
 public MonitoredNode(QuickstartNodeManager nodeManager, NodeState node)
 {
     NodeManager = nodeManager;
     Node        = node;
 }