Exemple #1
0
        private static Pr1132Timer ParseTimer(byte[] buf)
        {
            var timer = new Pr1132Timer
            {
                Enabled = buf[0] != 0,
                RunOnce = buf[1] != 0,
                Hours   = buf[2],
                Minutes = buf[3],
                Channel = buf[5],
                Command = (Pr1132TimerCommad)buf[5]
            };

            var days = buf[4];

            for (int d = 0; d < 7; d++)
            {
                timer.Days[d] = ((days >> (d + 1)) & 1) > 0;
            }

            return(timer);
        }
Exemple #2
0
 public Pr1132Configuration()
 {
     Groups   = new Pr1132ControlGroup[16];
     Channels = new Pr1132Channel[32];
     Timers   = new Pr1132Timer[7];
 }