Example #1
0
 public ProcessRunning ProcessRunning()
 {
     ZWave.Log("WCFService", "ProcessRunning");
     return(new ProcessRunning()
     {
         IsRunning = managedProcess.IsProcessRunning(), Process = managedProcess.CurrentProcessName(), Arguments = managedProcess.CurrentProcessArguments()
     });
 }
Example #2
0
        public Boolean NodeLocation(string NodeID, String Value)
        {
            byte nodeID;

            ZWave.Log("WCFService", "NodeLocation:" + NodeID + "," + Value);
            if (byte.TryParse(NodeID, out nodeID))
            {
                zwaveControl.SetNodeLocation(nodeID, Value);
                return(true);
            }
            return(false);
        }
Example #3
0
        public Boolean NodePollingOff(string NodeID, string Value)
        {
            byte nodeID;

            ZWave.Log("WCFService", "NodePollngOn");
            if (byte.TryParse(NodeID, out nodeID))
            {
                zwaveControl.DisablePoll(nodeID, Value);
                return(true);
            }
            return(false);
        }
Example #4
0
        public Boolean NodeBasic(string NodeID, string Value)
        {
            byte nodeID, value;

            ZWave.Log("WCFService", "NodeBasic");
            if (byte.TryParse(NodeID, out nodeID) && byte.TryParse(Value, out value))
            {
                zwaveControl.SetNodeBasic(nodeID, value);
                return(true);
            }

            return(false);
        }
Example #5
0
        public List <NodeDetail> Nodes()
        {
            List <NodeDetail> nodeList = new List <NodeDetail>();
            ZWaveNode         n        = new ZWaveNode();

            ZWave.Log("WCFService", "Nodes");
            foreach (Byte nodeID in zwaveControl.ListOfNodeIDs())
            {
                nodeList.Add(new NodeDetail()
                {
                    NodeID     = nodeID
                    , Name     = zwaveControl.NodeName(nodeID)
                    , Type     = zwaveControl.NodeType(nodeID)
                    , Location = zwaveControl.NodeLocation(nodeID)
                    , Basic    = zwaveControl.NodeBasic(nodeID)
                    , Level    = zwaveControl.NodeLevel(nodeID)
                });
            }

            return(nodeList);
        }
Example #6
0
        public NodeDetail Node(string NodeID)
        {
            ZWave.Log("WCFService", "Node");
            byte       nodeID;
            ZWaveNode  n          = new ZWaveNode();
            NodeDetail nodeDetail = new NodeDetail();

            if (byte.TryParse(NodeID, out nodeID))
            {
                nodeDetail = new NodeDetail()
                {
                    NodeID     = nodeID
                    , Name     = zwaveControl.NodeName(nodeID)
                    , Type     = zwaveControl.NodeType(nodeID)
                    , Location = zwaveControl.NodeLocation(nodeID)
                    , Basic    = zwaveControl.NodeBasic(nodeID)
                    , Level    = zwaveControl.NodeLevel(nodeID)
                };
            }

            return(nodeDetail);
        }
Example #7
0
 public Boolean StopProcess()
 {
     ZWave.Log("WCFService", "StopProcess");
     managedProcess.StopProcess();
     return(true);
 }
Example #8
0
 public Boolean StartProcess(string Process, string Arguments)
 {
     ZWave.Log("WCFService", "StartProcess: " + Process + " with " + Arguments);
     managedProcess.StartProcess(Process, Arguments);
     return(true);
 }
Example #9
0
 public Boolean AllOff()
 {
     ZWave.Log("WCFService", "All Off");
     zwaveControl.AllOff();
     return(true);
 }
Example #10
0
 public Boolean IsAvailable()
 {
     ZWave.Log("WCFService", "IsAvailable");
     return(zwaveControl.IsNetworkReady);
 }