public bool CanBeActivated(ZWaveMessage responseMessage)
        {
            if ((function == Empty || responseMessage.Function == function)
                && (commandClass == Empty || responseMessage.CommandClass == commandClass)
                && (command == Empty || responseMessage.Command == command))
            {
                return true;
            }

            return false;
        }
        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);
                }
            }
        }
 public virtual bool CanBeActivated(ZWaveMessage response)
 {
     return (eventHandler == null || eventHandler.CanBeActivated(response));
 }
        public virtual void Activate(ZWaveMessage response)
        {
            Done();

            if (eventHandler != null)
            {
                Response = response;
                eventHandler.Activate(response);
            }
        }
 public void Activate(ZWaveMessage responseMessage)
 {
     handler(responseMessage);
 }