| | |
| | | // 字节转16进制字符串 |
| | | String s = bytesToHexString(req); |
| | | //获取字符串的长度 |
| | | int length = s.length(); |
| | | // int length = s.length(); |
| | | // System.out.println("数据长度>>>>>> = " + length); |
| | | //数据解析 |
| | | dataHandler(s); |
| | |
| | | * @param s 16位字符串 |
| | | */ |
| | | private void dataHandler(String s) { |
| | | s = "AAAACCCC220000000033373933343732393100000000000000000000000052D50451F77D5D406C04E275FD723C400000015F0000000507E70306103B0A"; |
| | | // s = "AAAACCCC220000000033373933343732393100000000000000000000000052D50451F77D5D406C04E275FD723C400000015F0000000507E70306103B0A"; |
| | | //创建设备对象 |
| | | PoliceCarEquipment backEquipment = new PoliceCarEquipment(); |
| | | if (s.substring(4,8).equals("CCCC")) { |