Exemple #1
0
        public void Test2()
        {
            var          bytes        = "04D20201020203".ToHexBytes();
            JT808_0x0005 jT808_0X8005 = JT808Serializer.Deserialize <JT808_0x0005>(bytes);

            Assert.Equal(1234, jT808_0X8005.OriginalMsgNum);
            Assert.Equal(new byte[] { 0x01, 0x02, 0x02, 0x03 }, jT808_0X8005.AgainPackageData);
            Assert.Equal(2, jT808_0X8005.AgainPackageCount);
        }
Exemple #2
0
        public void Test1()
        {
            JT808_0x0005 jT808_0X8005 = new JT808_0x0005
            {
                OriginalMsgNum   = 1234,
                AgainPackageData = new byte[] { 0x01, 0x02, 0x02, 0x03 }
            };
            var hex = JT808Serializer.Serialize(jT808_0X8005).ToHexString();

            Assert.Equal("04D20201020203", hex);
        }