| | |
| | | * @throws Exception 异常 |
| | | */ |
| | | protected void doParse(byte[] bs, int bsLen, String dataCode, Data data) throws Exception { |
| | | DataV202404 dV1 = (DataV202404)data.getSubData() ; |
| | | DataV202404 dV202404 = (DataV202404)data.getSubData() ; |
| | | DataCd84Vo cdData = new DataCd84Vo(CodeV202404.getCodeName(dataCode)) ; |
| | | dV1.subData = cdData ; |
| | | dV202404.subData = cdData ; |
| | | int index = ProtocolConstantV206V202404.dataIndex ; |
| | | cdData.controllerType = ByteUtil.bytes2Hex(bs, false, index, 1) ; |
| | | |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | String hex = "69426981371425010201130084020AF00200000000620902003004050077289364503912943449101006255833070000000000000000000000000000000000014000009000C616"; |
| | | byte[] bs = ByteUtil.hex2Bytes(hex) ; |
| | | Cd_84_Up p = new Cd_84_Up() ; |
| | | Data d = new Data() ; |
| | | DataV202404 subd = new DataV202404() ; |
| | | d.subData = subd ; |
| | | p.doParse(bs, bs.length, "84", d); |
| | | System.out.println(d.toString()); |
| | | } |
| | | } |