Exemple #1
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;
            }
        }
Exemple #2
0
 private static void Controller_NodeOperationProgress(object sender, NodeOperationProgressEventArgs args)
 {
     Console.WriteLine("NodeOperationProgress {0} {1}", args.NodeId, args.Status);
 }