| | |
| | | import org.greenrobot.eventbus.EventBus;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | |
| | | return;
|
| | | }
|
| | | String bodyStr = new String(bytes);
|
| | | LogUtils.d(TAG, "\r\n" + "mqtt->远程回复数据" + bodyStr);
|
| | | if (HDLConnectHelper.isInverterTopic(topic)) {
|
| | | LogUtils.d(TAG, "\r\n" + "mqtt->远程回复数据" + Arrays.toString(HDLConnectHelper.byteArrayConvertIntArray(bytes)));
|
| | | } else {
|
| | | LogUtils.d(TAG, "\r\n" + "mqtt->远程回复数据" + bodyStr);
|
| | | }
|
| | | /**
|
| | | * 红外宝设备通过/thing/topo/found主题 上报红外宝设备已经入网了 然后直接return 不需要再下行了
|
| | | */
|
| | |
| | | * @param sendTopic 请求主题
|
| | | */
|
| | | public synchronized void checkAndsubscribeAllTopics(String sendTopic) {
|
| | | if (null != sampleClient && sampleClient.isConnected() == false) {
|
| | | if (null != sampleClient && !sampleClient.isConnected()) {
|
| | | return;
|
| | | }
|
| | | try {
|
| | |
| | | mqttRecvClient.sampleClient.disconnect();
|
| | | mqttRecvClient.sampleClient.close();
|
| | | mqttRecvClient = null;
|
| | | lastTopicFilters.clear();
|
| | | }
|
| | | } catch (MqttException e) {
|
| | | e.printStackTrace();
|