public void Dispose() { //_unloadZWavePort(); try { controller.DiscoveryEvent -= DiscoveryEvent; controller.UpdateNodeParameter -= controller_UpdateNodeParameter; controller.ManufacturerSpecificResponse -= controller_ManufacturerSpecificResponse; } catch { } // try { zwavePort.Disconnect(); } catch { } zwavePort = null; controller = null; }
private void _loadZWavePort() { if (_zwaveport == null) { _zwaveport = new ZWavePort(); // _controller = new Controller(_zwaveport); // _controller.DiscoveryEvent += DiscoveryEvent; _controller.UpdateNodeParameter += controller_UpdateNodeParameter; _controller.ManufacturerSpecificResponse += controller_ManufacturerSpecificResponse; } _zwaveport.PortName = _portname; }
private void LoadZwavePort() { if (zwavePort == null) { zwavePort = new ZWavePort(); // controller = new Controller(zwavePort); // controller.ControllerEvent += DiscoveryEvent; controller.UpdateNodeParameter += controller_UpdateNodeParameter; controller.ManufacturerSpecificResponse += controller_ManufacturerSpecificResponse; } zwavePort.PortName = this.GetOption("Port").Value; }
public Controller(ZWavePort zp) : base(1, zp) { zp.ZWaveMessageReceived += new ZWavePort.ZWaveMessageReceivedEvent((object sender, ZWaveMessageReceivedEventArgs args) => { try { _zwavemessagereceived(sender, args); } catch (Exception ex) { Console.WriteLine("ZWaveLib: ERROR in _zwavemessagereceived(...) " + ex.Message + "\n" + ex.StackTrace); } }); }
public Controller(ZWavePort zwavePort) : base(1, zwavePort) { zwavePort.ZWaveMessageReceived += new ZWavePort.ZWaveMessageReceivedEvent((object sender, ZWaveMessageReceivedEventArgs args) => { try { ZwaveMessageReceived(sender, args); } catch (Exception ex) { Console.WriteLine("ZWaveLib: ERROR in _zwavemessagereceived(...) " + ex.Message + "\n" + ex.StackTrace); } }); }
internal ZWaveNode(ZWavePort port, byte nodeId) { this._port = port; this._nodeId = nodeId; }
internal SwitchBinary(ZWavePort port, byte nodeId) : base(port, nodeId) { this._basicType = ZWaveProtocol.Type.Basic.ROUTING_SLAVE; this._genericType = ZWaveProtocol.Type.Generic.SWITCH_BINARY; }
internal SwitchMultilevel(ZWavePort port, byte nodeId) : base(port, nodeId) { this._basicType = ZWaveProtocol.Type.Basic.ROUTING_SLAVE; this._genericType = ZWaveProtocol.Type.Generic.SWITCH_MULTILEVEL; }
public ZWaveNode(byte nodeId, ZWavePort zp, byte genericType) { this.NodeId = nodeId; this.zwavePort = zp; this.GenericClass = genericType; }
public ZWaveNode(byte nodeId, ZWavePort zport) { this.NodeId = nodeId; this.zwavePort = zport; }
internal SensorBinary(ZWavePort port, byte nodeId) : base(port, nodeId) { }
internal Meter(ZWavePort port, byte nodeId) : base(port, nodeId) { this._basicType = ZWaveProtocol.Type.Basic.ROUTING_SLAVE; this._genericType = ZWaveProtocol.Type.Generic.METER; }
public ZWaveNode(byte nodeId, ZWavePort zp, byte genericType) { this.NodeId = nodeId; this.zp = zp; this.GenericClass = genericType; }
public ZWaveNode(byte nodeId, ZWavePort zp) { this.NodeId = nodeId; this.zp = zp; }
internal Controller(ZWavePort port, byte nodeId) : base(port, nodeId) { }