private static PR1132ControlGroup ParseGroup(byte[] buf)
        {
            var group = new PR1132ControlGroup();

            var nameBytes = buf.Take(24).ToArray();

            group.Name    = Encoding.GetEncoding(1251).GetString(nameBytes).TrimEnd((char)0);
            group.Enabled = buf[24] < 64;

            for (int j = 0; j < 4; j++)
            {
                group.Sensors[j] = buf[25 + j] >= 64;
            }

            for (int j = 0; j < 8; j++)
            {
                var channel = buf[24 + j] & 63;
                group.ChannelNumbers[j] = channel == 0 ? (int?)null : channel - 1;
            }

            return(group);
        }
 public PR1132Configuration()
 {
     Groups   = new PR1132ControlGroup[16];
     Channels = new PR1132Channel[32];
     Timers   = new PR1132Timer[7];
 }