| | |
| | | import com.hdl.photovoltaic.ui.bean.CloudInverterDeviceBean; |
| | | import com.hdl.photovoltaic.ui.bean.InverterDeviceBean; |
| | | import com.hdl.photovoltaic.ui.bean.OidBean; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.uni.HDLUniMPSDKManager; |
| | | import com.hdl.sdk.link.common.exception.HDLLinkException; |
| | | import com.hdl.sdk.link.core.bean.gateway.GatewayBean; |
| | | import com.hdl.sdk.link.core.callback.GatewayCallBack; |
| | | import com.hdl.sdk.link.gateway.HDLLinkLocalGateway; |
| | | |
| | | import java.lang.reflect.Type; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 搜索网关列表 |
| | | * |
| | | * @param gatewayCallBack - |
| | | */ |
| | | public void searchGateway(GatewayCallBack gatewayCallBack) { |
| | | List<String> spks = this.getGatewaySpk(); |
| | | //网关搜索 |
| | | HDLLinkLocalGateway.getInstance().refreshGatewayByHomeIdAndSpk(UserConfigManage.getInstance().getHomeId(), spks, true, gatewayCallBack); |
| | | } |
| | | |
| | | /** |
| | | * 获取网关spk列表 |
| | | * |
| | | * @return - |
| | | */ |
| | | private List<String> getGatewaySpk() { |
| | | List<String> spks = new ArrayList<>(); |
| | | spks.add("energy.hdl_inverter"); |
| | | return spks; |
| | | } |
| | | } |