| | |
| | | } |
| | | |
| | | private void manager(LinkPacket linkPacket) throws UnsupportedEncodingException { |
| | | LogUtils.e(TAG, "===11"); |
| | | // LogUtils.e(TAG, "===11"); |
| | | LinkResponse response = new LinkResponse(); |
| | | String topic = linkPacket.getTopic(); |
| | | response.setTopic(topic); |
| | |
| | | bodyBytes = decryptBytes; |
| | | } |
| | | } |
| | | LogUtils.e(TAG, "===12"); |
| | | // LogUtils.e(TAG, "===12"); |
| | | response.setByteData(bodyBytes); |
| | | |
| | | //zigbee数据比较特殊,是json,但前面有其它数据 |
| | |
| | | } else { |
| | | response.setData(ByteUtils.encodeHexString(response.getByteData())); |
| | | } |
| | | LogUtils.e(TAG, "===13"); |
| | | // LogUtils.e(TAG, "===13"); |
| | | //云端数据已经外部打印,这里不用再打印 |
| | | if (!linkPacket.isCloudPacket()) { |
| | | // if (response.getTopic().endsWith("/custom/native/buspro/up")) { |
| | |
| | | LogUtils.i(tag, "本地接收数据,Topic:" + response.getTopic() + "\r\nPayload:" + response.getData()); |
| | | |
| | | } |
| | | LogUtils.e(TAG, "===14"); |
| | | // LogUtils.e(TAG, "===14"); |
| | | //解析完成,topic发送一次 |
| | | EventDispatcher.getInstance().post(response.getTopic(), response); |
| | | } |