Esempio n. 1
0
        public void Test4()
        {
            byte[]       bytes = "0100000000".ToHexBytes();
            JT808_0x8608 value = JT808Serializer.Deserialize <JT808_0x8608>(bytes);

            Assert.Equal(1, value.QueryType);
            Assert.Equal(0u, value.Count);
        }
Esempio n. 2
0
        public void Test3()
        {
            JT808_0x8608 value = new JT808_0x8608
            {
                QueryType = 1
            };
            var hex = JT808Serializer.Serialize(value).ToHexString();

            Assert.Equal("0100000000", hex);
        }
Esempio n. 3
0
        public void Test2()
        {
            byte[]       bytes = "0000000003000000010000000200000003".ToHexBytes();
            JT808_0x8608 value = JT808Serializer.Deserialize <JT808_0x8608>(bytes);

            Assert.Equal(0, value.QueryType);
            Assert.Equal(3u, value.Count);
            Assert.Equal(1u, value.Ids[0]);
            Assert.Equal(2u, value.Ids[1]);
            Assert.Equal(3u, value.Ids[2]);
        }
Esempio n. 4
0
        public void Test1()
        {
            JT808_0x8608 value = new JT808_0x8608
            {
                QueryType = 0,
                Ids       = new List <uint>()
                {
                    1, 2, 3
                }
            };
            var hex = JT808Serializer.Serialize(value).ToHexString();

            Assert.Equal("0000000003000000010000000200000003", hex);
        }