Exemplo n.º 1
0
        public void Test_Analyze()
        {
            //0x00 -- 0x07 指令和这个单元测试一样
            byte[] bytes = "00557A000000002F".ToHexBytes();
            var    value = JT808Serializer.Analyze <JT808_0x8700>(bytes);

            // 0x08 -- 0x15 测试用例一样
            bytes = "08557A08000E00200322101010200323101010000129".ToHexBytes();
            value = JT808Serializer.Analyze <JT808_0x8700>(bytes);
        }
 public void Json()
 {
     string str = JT808Serializer.Serialize(new JT808_0x8B0A {
         IPAddress = "192.168.1.1", Port = 9400, UserName = "******", Password = "******"
     }).ToHexString();
     var json = JT808Serializer.Analyze <JT808_0x8B0A>(str.ToHexBytes());
 }
Exemplo n.º 3
0
        public ActionResult <JTResultDto> Analyze808([FromBody] JTRequestDto parameter)
        {
            JTResultDto jTResultDto = new JTResultDto();

            try
            {
                jTResultDto.Code = 200;
                jTResultDto.Data = jT808Serializer.Analyze(parameter.HexData.ToHexBytes());
            }
            catch (JT808Exception ex)
            {
                jTResultDto.Code    = 500;
                jTResultDto.Message = $"{ex.ErrorCode}-{ex.Message}";
            }
            catch (Exception ex)
            {
                jTResultDto.Code    = 500;
                jTResultDto.Message = ex.Message;
            }
            return(jTResultDto);
        }
Exemplo n.º 4
0
        public void Test_Analyze()
        {
            //0x82
            byte[] bytes = "82557A820027003132333435363738393132333435363738D4C142313233343500000000D6D8D0CDBBF5B3B500008E".ToHexBytes();
            var    value = JT808Serializer.Analyze <JT808_0x8701>(bytes);

            // 0x83
            bytes = "83557A83000600200323101010BA".ToHexBytes();
            value = JT808Serializer.Analyze <JT808_0x8701>(bytes);
            //0x84
            bytes = "84557A84005700200323101010FFD7D4B6A8D2E531000000D7D4B6A8D2E532000000D7D4B6A8D2E533000000BDFCB9E2B5C600000000D4B6B9E2B5C600000000D3D2D7AACFF200000000D7F3D7AACFF200000000D6C6B6AF00000000000006".ToHexBytes();
            value = JT808Serializer.Analyze <JT808_0x8701>(bytes);
            // 0xC2
            bytes = "C2557AC2000600200323101010FB".ToHexBytes();
            value = JT808Serializer.Analyze <JT808_0x8701>(bytes);
            //0xC3
            bytes = "C3557AC30008002003231010100032C6".ToHexBytes();
            value = JT808Serializer.Analyze <JT808_0x8701>(bytes);
            // 0xC4
            bytes = "C4557AC40014002003231010102003221010100000100000005000BE".ToHexBytes();
            value = JT808Serializer.Analyze <JT808_0x8701>(bytes);
        }
Exemplo n.º 5
0
 public void Test3()
 {
     byte[] bytes = "34 61 73 64 66 67 0C 71 73 63 76 68 69 75 79 74 72 65 77 00 00 00 05 01 02 03 04 05".ToHexBytes();
     string json  = JT808Serializer.Analyze <JT808_0x8108>(bytes);
 }
Exemplo n.º 6
0
 public void Test3()
 {
     byte[] bytes = "3051000200000102007B01000000010000000200BA7F0E07E4F11C0028003C000018111620202000000103027C00000000010000000200BA7F0E07E4F11C0028003C0000181116222222".ToHexBytes();
     string json  = JT808Serializer.Analyze <JT808_0x0802>(bytes);
 }
Exemplo n.º 7
0
 public void Json()
 {
     var json = JT808Serializer.Analyze <JT808_0x1211>("0846696C654E616D650200000001".ToHexBytes());
 }
Exemplo n.º 8
0
 public void Test3()
 {
     byte[] bytes = "00000A070000017B000000010000000200BA7F0E07E4F11C0028003C000018111523261001020304".ToHexBytes();
     string json  = JT808Serializer.Analyze <JT808_0x0801>(bytes);
 }
Exemplo n.º 9
0
 public void Test3()
 {
     byte[] bytes = "7E0107004111223344556622B8000531303630313130343535353435393535313033303030303030346436613133301234567890123456789007616263646566670A706F69757974726577710709DA7E".ToHexBytes();
     string json  = JT808Serializer.Analyze(bytes);
 }
Exemplo n.º 10
0
 public void Json()
 {
     var json = JT808Serializer.Analyze <JT808_0x8103>("010000F366243939393939393939393939390008000400060005000300020001000A0007010203040506".ToHexBytes());
 }
Exemplo n.º 11
0
 public void Test3()
 {
     byte[] bytes = "7E0201002811223344556622B83039000000010000000200BA7F0E07E4F11C0028003C000018071510101001040000006402020037517E".ToHexBytes();
     string json  = JT808Serializer.Analyze(bytes);
 }
 public void Json()
 {
     var json = JT808Serializer.Analyze <JT808_0x0200>("000000010000000200BA7F0E07E4F11C0028003C00001807151010106520000000010C060512010203041100070000000D0000000E191211183100001334343434343434191210183100030200".ToHexBytes());
 }
Exemplo n.º 13
0
 public void Test3()
 {
     byte[] bytes = "7E 07 04 00 53 11 22 33 44 55 66 22 B8 00 02 00 00 26 00 00 00 01 00 00 00 02 00 BA 7F 0E 07 E4 F1 1C 00 28 00 3C 00 00 18 07 15 10 10 10 01 04 00 00 00 64 02 02 00 37 00 26 00 00 00 02 00 00 00 01 00 CB 73 55 07 E6 A3 23 00 29 00 36 00 78 18 07 15 10 10 30 01 04 00 00 00 60 02 02 00 42 D4 7E".ToHexBytes();
     string json  = JT808Serializer.Analyze <JT808Package>(bytes);
 }
Exemplo n.º 14
0
 public void Test7()
 {
     var    bytes = "7E 81 00 00 13 01 23 45 67 89 00 00 0A 00 64 00 7A 73 73 64 61 66 32 33 31 32 34 73 66 64 73 63 3B 7E".ToHexBytes();
     string json  = JT808Serializer.Analyze(bytes);
 }
Exemplo n.º 15
0
 public void Test4()
 {
     var jT808_0X9101 = JT808Serializer.Analyze <JT808_0x9101>("093132372E302E302E3107600000010101".ToHexBytes());
 }
Exemplo n.º 16
0
 public void Test3()
 {
     var jT808_0x9206 = JT808Serializer.Analyze <JT808_0x9206>("093132372E302E302E31032802746B0631323334353608443A2F2F31313132031907161010101907161010110000000102050407".ToHexBytes());
 }
Exemplo n.º 17
0
 public void Test_2019_3()
 {
     byte[] bytes = "0101000005F200DE075BCD15075BCD15000000C8003CC8029A0008536D616C6C436869".ToHexBytes();
     string json  = JT808Serializer.Analyze <JT808_0x8600>(bytes, JT808Version.JTT2019);
 }
Exemplo n.º 18
0
 public void Test3()
 {
     byte[] bytes = "0B0000303901".ToHexBytes();
     string json  = JT808Serializer.Analyze <JT808_0x8900>(bytes);
 }
Exemplo n.º 19
0
 public void Test3()
 {
     var    bytes = "7E 00 01 00 05 01 23 45 67 89 00 04 B3 03 E8 00 02 00 D3 7E".ToHexBytes();
     string json  = JT808Serializer.Analyze(bytes);
     //{"[7E]\u5F00\u59CB":126,"[0001]\u6D88\u606FId":1,"\u6D88\u606F\u4F53\u5C5E\u6027\u5BF9\u8C61":{"[0000000000000101]\u6D88\u606F\u4F53\u5C5E\u6027":5,"[0]\u4FDD\u7559":0,"[0]\u4FDD\u7559":0,"[0]\u662F\u5426\u5206\u5305":false,"[000]\u6570\u636E\u52A0\u5BC6":"None","[000000101]\u6D88\u606F\u4F53\u957F\u5EA6":5},"[12345678900]\u7EC8\u7AEF\u624B\u673A\u53F7":"12345678900","[04B3]\u6D88\u606F\u6D41\u6C34\u53F7":1203,"\u6570\u636E\u4F53\u5BF9\u8C61":{"\u7EC8\u7AEF\u901A\u7528\u5E94\u7B54":"03E8000200","[03E8]\u5E94\u7B54\u6D41\u6C34\u53F7":1000,"[0002]\u5E94\u7B54\u6D88\u606FId":2,"[0]\u7ED3\u679C":"Success"},"[D3]\u6821\u9A8C\u7801":211,"[D3]\u7ED3\u675F":211}
 }
Exemplo n.º 20
0
 public void Json()
 {
     var json = JT808Serializer.Analyze <JT808_0x0200>("000000010000000200BA7F0E07E4F11C0028003C0000180715101010663B000000010C1100070000000D0000000E191211183100001334343434343434191210183100030200020400010003000500020900060008000A0007".ToHexBytes());
 }
Exemplo n.º 21
0
 public void Test_0xF7_3()
 {
     var json = JT808Serializer.Analyze <JT808_0x0900_0xF7>("020105020000000102050200000001".ToHexBytes());
 }
Exemplo n.º 22
0
 public void Json()
 {
     var json = JT808Serializer.Analyze <JT808_0x8900_0xF7>("020102".ToHexBytes());
 }
Exemplo n.º 23
0
 public void Test3()
 {
     byte[] bytes = "7E8800000900012345678900010000008102010203048E7E".ToHexBytes();
     string json  = JT808Serializer.Analyze <JT808Package>(bytes);
 }
Exemplo n.º 24
0
 public void Test3()
 {
     byte[] bytes = "0400000001000000020000000300000004".ToHexBytes();
     string json  = JT808Serializer.Analyze <JT808_0x8607>(bytes);
 }
Exemplo n.º 25
0
 public void Test3()
 {
     var    bytes = "191126155850".ToHexBytes();
     string json  = JT808Serializer.Analyze <JT808_0x8004>(bytes);
 }
Exemplo n.º 26
0
 public void Test3()
 {
     byte[] bytes = "00 45 00 00 00 7B".ToHexBytes();
     string json = JT808Serializer.Analyze<JT808_0x8202>(bytes);
 }
Exemplo n.º 27
0
 public void Test2_1()
 {
     byte[] bodys = "00 00 00 01 00 00 00 02 00 BA 7F 0E 07 E4 F1 1C 00 28 00 3C 00 00 18 07 15 10 10 10 01 04 00 00 00 64 02 02 00 37".ToHexBytes();
     string json  = JT808Serializer.Analyze <JT808_0x0200>(bodys);
 }
Exemplo n.º 28
0
 public void Test3()
 {
     var jT808_0x9207 = JT808Serializer.Analyze <JT808_0x9207>("000102".ToHexBytes());
 }
Exemplo n.º 29
0
 public void Json()
 {
     var json = JT808Serializer.Analyze <JT808_0x9208>("0B3139322E3136382E312E311388138934343434343434191210183100030201313131313131313131313131313131313131313131313131313131313131313100000000000000000000000000000000".ToHexBytes());
 }
Exemplo n.º 30
0
 public void Json()
 {
     var json = JT808Serializer.Analyze <JT808_0x8103>("010000F367020201".ToHexBytes());
 }