public ZWaveMessage( ZWaveMessageType messageType, ZWaveFunction function, byte nodeId = 0x00, ZWaveCommandClass commandClass = 0x00, ZWaveCommand command = 0x00) { this.MessageType = messageType; this.Function = function; if (nodeId != 0x00) { this.NodeId = nodeId; } if (commandClass != 0x00) { this.CommandClass = commandClass; } if (command != 0x00) { this.Command = command; } Params = new List<byte>(); }
public ZWaveEventHandler(ZWaveFunction function, Action<ZWaveMessage> handler, ZWaveCommandClass commandClass = Empty, ZWaveCommand command = Empty) { this.function = function; this.commandClass = commandClass; this.command = command; this.handler = handler; if (handler == null) { throw new ArgumentNullException("handler"); } }
public ZWaveJob( ZWaveFunction function, byte nodeId = 0x00, ZWaveCommandClass commandClass = 0x00, ZWaveCommand command = 0x00, byte[] parameters = null, ZWaveEventHandler eventHandler = null, int timeoutInterval = 10000, Action onCancel = null) { this.eventHandler = eventHandler; this.timeoutInterval = timeoutInterval; this.onCancel = onCancel; Request = new ZWaveMessage(ZWaveMessageType.Request, function, nodeId, commandClass, command); if (parameters != null) { foreach (var param in parameters) { Request.AddParameter(param); } } }