Ejemplo n.º 1
0
        protected internal override void HandleEvent(Command command)
        {
            base.HandleEvent(command);

            var report = new AlarmReport(Node, command.Payload);
            OnChanged(new ReportEventArgs<AlarmReport>(report));
        }
Ejemplo n.º 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));
 }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 6
0
 internal protected virtual void HandleEvent(Command command)
 {
 }
Ejemplo n.º 7
0
 public static Task<byte[]> Send(this ZWaveChannel channel, byte nodeID, Command command, Enum responseCommand)
 {
     return channel.Send(nodeID, command, Convert.ToByte(responseCommand));
 }
Ejemplo n.º 8
0
 public static Task Send(this ZWaveChannel channel, Node node, Command command)
 {
     return channel.Send(node.NodeID, command);
 }