Beispiel #1
0
        protected internal override void HandleEvent(Command command)
        {
            base.HandleEvent(command);

            var report = new AlarmReport(Node, command.Payload);
            OnChanged(new ReportEventArgs<AlarmReport>(report));
        }
Beispiel #2
0
 public NodeEventArgs(byte nodeID, Command command)
 {
     if ((NodeID = nodeID) == 0)
         throw new ArgumentOutOfRangeException(nameof(NodeID), nodeID, "NodeID can not be 0");
     if ((Command = command) == null)
         throw new ArgumentNullException(nameof(command));
 }
Beispiel #3
0
        protected internal override void HandleEvent(Command command)
        {
            base.HandleEvent(command);

            if (command.CommandID == Convert.ToByte(SceneActivation.command.Set))
            {
                var report = new SceneActivationReport(Node, command.Payload);
                OnChanged(new ReportEventArgs<SceneActivationReport>(report));
            }
        }
Beispiel #4
0
        protected internal override void HandleEvent(Command command)
        {
            base.HandleEvent(command);

            if (command.CommandID == Convert.ToByte(Meter.command.Report))
            {
                var report = new MeterReport(Node, command.Payload);
                OnChanged(new ReportEventArgs<MeterReport>(report));
            }
        }
Beispiel #5
0
        protected internal override void HandleEvent(Command command)
        {
            base.HandleEvent(command);

            if (command.CommandID == Convert.ToByte(WakeUp.command.Notification))
            {
                var report = new WakeUpReport(Node);
                OnChanged(new ReportEventArgs<WakeUpReport>(report));
                return;
            }
        }
Beispiel #6
0
 internal protected virtual void HandleEvent(Command command)
 {
 }
Beispiel #7
0
 public static Task<byte[]> Send(this ZWaveChannel channel, byte nodeID, Command command, Enum responseCommand)
 {
     return channel.Send(nodeID, command, Convert.ToByte(responseCommand));
 }
Beispiel #8
0
 public static Task Send(this ZWaveChannel channel, Node node, Command command)
 {
     return channel.Send(node.NodeID, command);
 }