Exemple #1
0
        public void Test2()
        {
            byte[]       bytes        = "7B0008D0C5CFA2C4DAC8DD".ToHexBytes();
            JT808_0x8304 jT808_0X8304 = JT808Serializer.Deserialize <JT808_0x8304>(bytes);

            Assert.Equal(123, jT808_0X8304.InformationType);
            Assert.Equal("信息内容", jT808_0X8304.InformationContent);
            Assert.Equal(8, jT808_0X8304.InformationLength);
        }
Exemple #2
0
        public void Test1()
        {
            JT808_0x8304 jT808_0X8304 = new JT808_0x8304();

            jT808_0X8304.InformationType    = 123;
            jT808_0X8304.InformationContent = "信息内容";
            var hex = JT808Serializer.Serialize(jT808_0X8304).ToHexString();

            Assert.Equal("7B0008D0C5CFA2C4DAC8DD", hex);
        }