public override void Create(byte[] create)
        {
            FullFrame = create;

            Analysis(create);
            var version = DataArea.Take(2).ToArray();

            HardwareVersion = new HardwareVersion(version);
            var version1 = DataArea.Skip(2).Take(2).ToArray();

            SoftwareVersion = new SoftwareVersion(version1);
        }
예제 #2
0
        public override void Create(byte[] create)
        {
            FullFrame = create;
            Analysis(create);
            var b1 = DataArea.Take(7).ToArray();

            DeviceNumber = new DeviceNumber(b1);
            var b2 = DataArea.Skip(7).Take(1).First();

            State = (State)(b2);
            var b3 = DataArea.Skip(8).Take(2).ToArray();

            HardwareVersion = new HardwareVersion(b3);
            var b4 = DataArea.Skip(10).Take(2).ToArray();

            SoftwareVersion = new SoftwareVersion(b4);
            var b5 = DataArea.Skip(12).Take(1).First();

            UpdateCount = b5;
            var b6 = DataArea.Skip(13).Take(2).ToArray();

            PacketSize = (ushort)(b6[0] + b6[1] * 0x100);
        }