Пример #1
0
 /// <summary>
 /// Raises the node operation progress event.
 /// </summary>
 /// <param name="args">Arguments.</param>
 protected virtual void OnNodeOperationProgress(NodeOperationProgressEventArgs args)
 {
     Utility.logger.Debug("{0} {1}", args.NodeId, args.Status);
     if (NodeOperationProgress != null)
     {
         NodeOperationProgress(this, args);
     }
 }
Пример #2
0
 static void Controller_NodeOperationProgress(object sender, NodeOperationProgressEventArgs args)
 {
     Console.WriteLine("NodeOperationProgress {0} {1}", args.NodeId, args.Status);
 }
Пример #3
0
 /// <summary>
 /// Raises the node operation progress event.
 /// </summary>
 /// <param name="args">Arguments.</param>
 protected virtual void OnNodeOperationProgress(NodeOperationProgressEventArgs args)
 {
     Utility.logger.Debug("{0} {1}", args.NodeId, args.Status);
     if (NodeOperationProgress != null)
         NodeOperationProgress(this, args);
 }
Пример #4
0
 private void Controller_NodeOperationProgress(object sender, NodeOperationProgressEventArgs args)
 {
     // this will fire on a node operation such as Add, Remove, Updating Routing, etc..
     switch (args.Status)
     {
     case NodeQueryStatus.NodeAdded:
         lastAddedNode = args.NodeId;
         OnInterfacePropertyChanged(this.GetDomain(), "1", "Z-Wave Controller", "Controller.Status", "Added node " + args.NodeId);
         OnInterfaceModulesChanged(this.GetDomain());
         break;
     case NodeQueryStatus.NodeUpdated:
         OnInterfacePropertyChanged(this.GetDomain(), "1", "Z-Wave Controller", "Controller.Status", "Updated node " + args.NodeId);
         //OnInterfaceModulesChanged(this.Domain);
         break;
     case NodeQueryStatus.NodeRemoved:
         lastRemovedNode = args.NodeId;
         OnInterfacePropertyChanged(this.GetDomain(), "1", "Z-Wave Controller", "Controller.Status", "Removed node " + args.NodeId);
         OnInterfaceModulesChanged(this.GetDomain());
         break;
     case NodeQueryStatus.Timeout:
         OnInterfacePropertyChanged(this.GetDomain(), "1", "Z-Wave Controller", "Controller.Status", "Node " + args.NodeId + " response timeout!");
         break;
     case NodeQueryStatus.Error:
         OnInterfacePropertyChanged(this.GetDomain(), args.NodeId.ToString(), "Z-Wave Node", "Status.Error", "Response timeout!");
         break;
     default:
         OnInterfacePropertyChanged(this.GetDomain(), "1", "Z-Wave Controller", "Controller.Status", String.Format("Node {0} Status {1}", args.NodeId, args.Status.ToString()));
         break;
     }
 }
Пример #5
0
 private void Controller_NodeOperationProgress(object sender, NodeOperationProgressEventArgs args)
 {
     // this will fire on a node operation such as Add, Remove, Updating Routing, etc..
     switch (args.Status)
     {
     case NodeQueryStatus.NodeAdded:
         RaisePropertyChanged(new InterfacePropertyChangedAction() {
             Domain = this.Domain,
             SourceId = "1",
             SourceType = "Z-Wave Controller",
             Path = "Controller.Status",
             Value = "Added node " + args.NodeId
         });
         lastAddedNode = args.NodeId;
         if (InterfaceModulesChangedAction != null)
             InterfaceModulesChangedAction(new InterfaceModulesChangedAction(){ Domain = this.Domain });
         break;
     case NodeQueryStatus.NodeUpdated:
         RaisePropertyChanged(new InterfacePropertyChangedAction() {
             Domain = this.Domain,
             SourceId = "1",
             SourceType = "Z-Wave Controller",
             Path = "Controller.Status",
             Value = "Updated node " + args.NodeId
         });
         //if (InterfaceModulesChangedAction != null) InterfaceModulesChangedAction(new InterfaceModulesChangedAction(){ Domain = this.Domain });
         break;
     case NodeQueryStatus.NodeRemoved:
         lastRemovedNode = args.NodeId;
         RaisePropertyChanged(new InterfacePropertyChangedAction() {
             Domain = this.Domain,
             SourceId = "1",
             SourceType = "Z-Wave Controller",
             Path = "Controller.Status",
             Value = "Removed node " + args.NodeId
         });
         if (InterfaceModulesChangedAction != null)
             InterfaceModulesChangedAction(new InterfaceModulesChangedAction(){ Domain = this.Domain });
         break;
     case NodeQueryStatus.Timeout:
         RaisePropertyChanged(new InterfacePropertyChangedAction() {
             Domain = this.Domain,
             SourceId = "1",
             SourceType = "Z-Wave Controller",
             Path = "Controller.Status",
             Value = "Node " + args.NodeId + " response timeout!"
         });
         break;
     default:
         RaisePropertyChanged(new InterfacePropertyChangedAction() {
             Domain = this.Domain,
             SourceId = "1",
             SourceType = "Z-Wave Controller",
             Path = "Controller.Status",
             Value = args.Status.ToString()
         });
         break;
     }
 }