Esempio n. 1
0
        public void Test3()
        {
            JT809_JT1078_0x1A00 jT809_JT1078_0x1A00 = new JT809_JT1078_0x1A00()
            {
                VehicleNo       = "粤B12345",
                VehicleColor    = Protocol.Enums.JT809VehicleColorType.黄色,
                SubBusinessType = (ushort)JT809_JT1078_SubBusinessType.远程录像回放控制应答消息,
                SubBodies       = new JT809_JT1078_0x1A00_0x1A02()
                {
                    Result = 1
                }
            };
            var hex = JT809Serializer.Serialize(jT809_JT1078_0x1A00).ToHexString();

            Assert.Equal("D4C142313233343500000000000000000000000000021A020000000101", hex);
        }
Esempio n. 2
0
        public void Test1()
        {
            JT809_JT1078_0x1A00 jT809_JT1078_0x1A00 = new JT809_JT1078_0x1A00()
            {
                VehicleNo       = "粤B12345",
                VehicleColor    = Protocol.Enums.JT809VehicleColorType.黄色,
                SubBusinessType = (ushort)JT809_JT1078_SubBusinessType.远程录像回放请求应答消息,
                SubBodies       = new JT809_JT1078_0x1A00_0x1A01()
                {
                    Result     = 1,
                    ServerIp   = "127.0.0.1",
                    ServerPort = 8080
                }
            };
            var hex = JT809Serializer.Serialize(jT809_JT1078_0x1A00).ToHexString();

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