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

            var report = new BatteryReport(Node, command.Payload);

            OnChanged(new ReportEventArgs <BatteryReport>(report));
        }
Ejemplo n.º 2
0
        void ReceiveBatteryReport(ZWave.CommandClasses.BatteryReport report)
        {
            var r = new Report <BatteryReport>
            {
                Timestamp = DateTime.UtcNow,
                Data      = new BatteryReport
                {
                    IsLow = report.IsLow,
                    Value = report.Value
                }
            };

            var state = nodeStates[report.Node.NodeID];

            state.BatteryReport = r;
        }