| | |
| | | public void editGatewayParam(String mac, LinkCallBack<Boolean> linkCallBack) { |
| | | String requestUrl = TopicApi.SET_GATEWAY_EDIT; |
| | | JsonObject json = new JsonObject(); |
| | | json.addProperty("master", GatewayMasterType.MasterFalse); |
| | | json.addProperty("master", GatewayMasterType.MasterTrue); |
| | | TcpClient.getInstance().sendDataToLinkGateway(mac, requestUrl, json, "", new HDLLinkCallBack() { |
| | | @Override |
| | | public void onSuccess(String msg) { |
| | |
| | | if (linkCallBack != null) { |
| | | linkCallBack.onSuccess(true); |
| | | } |
| | | HdlLogLogic.print("初始化逆变器成功-->mac:" + mac, true); |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (linkCallBack != null) { |
| | | linkCallBack.onError(e); |
| | | } |
| | | HdlLogLogic.print("初始化逆变器失败-->mac:" + mac + "--->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | } |
| | | }); |
| | | |