| | |
| | | */ |
| | | public void analysis(InetAddress address, int port, String strMsg) { |
| | | |
| | | if (strMsg.startsWith("FE")) { |
| | | |
| | | //DO NOTHING |
| | | } else { |
| | | this.analysisGrainStep1(address, strMsg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | points.add(-100.00); |
| | | continue; |
| | | } |
| | | temp = BytesUtil.hexToInt(BytesUtil.tran_LH(tag)) * 0.0625; |
| | | temp = BytesUtil.hexToInt(tag) * 0.0625; |
| | | temp = NumberUtil.keepPrecision(temp, 1); |
| | | points.add(temp); |
| | | } |
| | |
| | | |
| | | |
| | | JSONObject properties = new JSONObject(); |
| | | properties.put("data", outPut); |
| | | properties.put("timestamp", grain.getTimestamp()); |
| | | |
| | | properties.put("timestamp", grain.getTimestamp()); |
| | | outPut.setDetectTime( grain.getTimestamp()); |
| | | if (StringUtils.isEmpty(height+"")) height = 0.0; |
| | | properties.put("liquidHeight", height); |
| | | |
| | | outPut.setLiquidHeight(height+""); |
| | | grain.setOutput(JSONObject.toJSONString(outPut)); |
| | | properties.put("output", outPut); |
| | | grain.setProperties(properties); |
| | | |
| | | //封装好的数据 |