コード例 #1
0
        public override void Create(byte[] create)
        {
            Analysis(create);
            var n1 = DataArea.Take(7).ToArray();

            DeviceNumber = new DeviceNumber(n1);
        }
コード例 #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);
        }