| | |
| | | import com.hdl.sdk.link.common.utils.ThreadToolUtils;
|
| | | import com.hdl.sdk.link.core.bean.LinkRequest;
|
| | | import com.hdl.sdk.link.core.bean.LinkResponse;
|
| | | import com.hdl.sdk.link.core.bean.ModbusResponse;
|
| | | import com.hdl.sdk.link.core.bean.ZigbeeResponse;
|
| | | import com.hdl.sdk.link.core.bean.gateway.GatewayBean;
|
| | | import com.hdl.sdk.link.core.config.HDLLinkConfig;
|
| | |
| | | //TODO 如果配置从网关的信息,通过主网关转达,这里oid要判断下
|
| | | if (replyTopic.equals(linkResponse.getTopic())) {
|
| | | notifySucceed(linkResponse.getData());
|
| | | }
|
| | | else{
|
| | | notifyFailure(HDLLinkCode.HDL_TOPIC_NOT_RIGHT);
|
| | | }
|
| | | }else if(msg instanceof ModbusResponse){
|
| | | ModbusResponse response = (ModbusResponse) msg;
|
| | | if (replyTopic.equals(response.getTopic())) {
|
| | | notifySucceed(response.getData());
|
| | | }
|
| | | else{
|
| | | notifyFailure(HDLLinkCode.HDL_TOPIC_NOT_RIGHT);
|
| | |
| | | */
|
| | | public static List<String> getGatewayTypeList() {
|
| | | List<String> typeList = new ArrayList<>();
|
| | | typeList.add("sensor.mmv_sleep");//睡眠毫米波spk
|
| | | typeList.add("sensor.mmv_pose");//姿态毫米波spk
|
| | | // typeList.add("sensor.mmv_sleep");//睡眠毫米波spk
|
| | | // typeList.add("sensor.mmv_pose");//姿态毫米波spk
|
| | | typeList.add("energy.hdl_inverter");//逆变器spk
|
| | | return typeList;
|
| | | }
|
| | |
|