Beispiel #1
0
        public void Test3()
        {
            JT809_JT1078_0x1700 jT809_JT1078_0x1700 = new JT809_JT1078_0x1700()
            {
                VehicleNo       = "粤B12345",
                VehicleColor    = Protocol.Enums.JT809VehicleColorType.黄色,
                SubBusinessType = (ushort)JT809_JT1078_SubBusinessType.时效口令请求消息,
                SubBodies       = new JT809_JT1078_0x1700_0x1702()
            };
            var hex = JT809Serializer.Serialize(jT809_JT1078_0x1700).ToHexString();

            Assert.Equal("D4C14231323334350000000000000000000000000002170200000000", hex);
        }
Beispiel #2
0
        public void Test1()
        {
            var PlateFormIds    = Enumerable.Range(0, 11).Select(s => (byte)s).ToArray();
            var AuthorizeCode1s = Enumerable.Range(0, 64).Select(s => (byte)s).ToArray();
            var AuthorizeCode2s = Enumerable.Range(0, 64).Select(s => (byte)s).ToArray();

            JT809_JT1078_0x1700 jT809_JT1078_0x1700 = new JT809_JT1078_0x1700()
            {
                VehicleNo       = "粤B12345",
                VehicleColor    = Protocol.Enums.JT809VehicleColorType.黄色,
                SubBusinessType = (ushort)JT809_JT1078_SubBusinessType.时效口令上报消息,
                SubBodies       = new JT809_JT1078_0x1700_0x1701()
                {
                    PlateFormId    = PlateFormIds,
                    AuthorizeCode1 = AuthorizeCode1s,
                    AuthorizeCode2 = AuthorizeCode2s
                }
            };
            var hex = JT809Serializer.Serialize(jT809_JT1078_0x1700).ToHexString();

            Assert.Equal("D4C1423132333435000000000000000000000000000217010000008B000102030405060708090A000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F", hex);
        }
Beispiel #3
0
        public void Test1()
        {
            var PlateFormIds    = "01234567890";
            var AuthorizeCode1s = "0123456789012345678901234567890123456789012345678901234567890123";
            var AuthorizeCode2s = "0123456789012345678901234567890123456789012345678901234567890123";

            JT809_JT1078_0x1700 jT809_JT1078_0x1700 = new JT809_JT1078_0x1700()
            {
                VehicleNo       = "粤B12345",
                VehicleColor    = Protocol.Enums.JT809VehicleColorType.黄色,
                SubBusinessType = (ushort)JT809_JT1078_SubBusinessType.时效口令上报消息,
                SubBodies       = new JT809_JT1078_0x1700_0x1701()
                {
                    PlateFormId    = PlateFormIds,
                    AuthorizeCode1 = AuthorizeCode1s,
                    AuthorizeCode2 = AuthorizeCode2s
                }
            };
            var hex = JT809Serializer.Serialize(jT809_JT1078_0x1700).ToHexString();

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