Esempio n. 1
0
        public void Test2()
        {
            var bytes = "000004D2".ToHexBytes();
            JT809_0x1300_0x1302 jT809_0x1300_0x1302 = JT809Serializer.Deserialize <JT809_0x1300_0x1302>(bytes);

            Assert.Equal((uint)1234, jT809_0x1300_0x1302.InfoID);
        }
Esempio n. 2
0
        public void Test_2019_2()
        {
            var bytes = "00990000000B".ToHexBytes();
            JT809_0x1300_0x1302 jT809_0x1300_0x1302 = JT809_2019_Serializer.Deserialize <JT809_0x1300_0x1302>(bytes);

            Assert.Equal(0u, jT809_0x1300_0x1302.InfoID);
            Assert.Equal(0x99, jT809_0x1300_0x1302.SourceDataType);
            Assert.Equal(11u, jT809_0x1300_0x1302.SourceMsgSn);
        }
Esempio n. 3
0
        public void Test1()
        {
            JT809_0x1300_0x1302 jT809_0x1300_0x1302 = new JT809_0x1300_0x1302
            {
                InfoID = 1234
            };
            var hex = JT809Serializer.Serialize(jT809_0x1300_0x1302).ToHexString();

            Assert.Equal("000004D2", hex);
        }
Esempio n. 4
0
        public void Test_2019_1()
        {
            JT809_0x1300_0x1302 jT809_0x1300_0x1302 = new JT809_0x1300_0x1302
            {
                InfoID         = 1234,
                SourceDataType = 0x99,
                SourceMsgSn    = 11
            };
            var hex = JT809_2019_Serializer.Serialize(jT809_0x1300_0x1302).ToHexString();

            Assert.Equal("00990000000B", hex);
        }