public class DeviceClient extends AbstractClient
gson, HTTP_RSP_OK| 构造器和说明 |
|---|
DeviceClient(Credential credential) |
DeviceClient(Credential credential,
ClientProfile clientProfile) |
| 限定符和类型 | 方法和说明 |
|---|---|
GetDevicesResponse |
getDevicesByCloudId(int cloudId)
Get device list by cloud id
|
DeviceBasicInfo |
getDeviceState(Integer deviceId,
Integer cloudId)
Get device status
|
ModelList[] |
getModelList(String projectId)
Get device model list
|
ProjectModelList[] |
getProjectModelList(String projectId,
Constants.ModelListFilterType filterType,
Integer offset,
Integer limit)
Get device model list configured in web controller
|
<T extends ModelListInfoBase> |
getProjectModelListInfo(Integer listId,
Constants.ModelListFilterType filterType)
get model group info
|
void |
rebootDevice(ReportDeviceOfflineRequest request)
Reboot device
|
void |
reportDeviceOffline(ReportDeviceOfflineRequest request)
上报设备掉线
|
void |
setWdbPath(String path) |
void |
softRebootDevice(SoftRebootDeviceRequest request)
Soft-reboot device
|
String |
wdbConnect(String address,
String token,
int timeOut) |
getClientProfile, getCredential, getLogger, internalRequest, setClientProfile, setCredential, setLogger, setProfilepublic DeviceClient(Credential credential)
public DeviceClient(Credential credential, ClientProfile clientProfile)
public GetDevicesResponse getDevicesByCloudId(int cloudId) throws CloudTestSDKException
cloudId - intCloudTestSDKException - CloudTestSDKExceptionpublic DeviceBasicInfo getDeviceState(Integer deviceId, Integer cloudId) throws CloudTestSDKException
deviceId - IntegercloudId - IntegerCloudTestSDKException - CloudTestSDKExceptionpublic void reportDeviceOffline(ReportDeviceOfflineRequest request) throws CloudTestSDKException
request - ReportDeviceOfflineRequestCloudTestSDKException - CloudTestSDKExceptionpublic void rebootDevice(ReportDeviceOfflineRequest request) throws CloudTestSDKException
request - ReportDeviceOfflineRequestCloudTestSDKException - CloudTestSDKExceptionpublic void softRebootDevice(SoftRebootDeviceRequest request) throws CloudTestSDKException
request - SoftRebootDeviceRequestCloudTestSDKException - CloudTestSDKExceptionpublic ModelList[] getModelList(String projectId) throws CloudTestSDKException
CloudTestSDKException - CloudTestSDKExceptionpublic ProjectModelList[] getProjectModelList(String projectId, Constants.ModelListFilterType filterType, Integer offset, Integer limit) throws CloudTestSDKException
projectId - offset - start from 1limit - filterType - group by model or group by device,return all groups if filterType is nullCloudTestSDKExceptionpublic <T extends ModelListInfoBase> T[] getProjectModelListInfo(Integer listId, Constants.ModelListFilterType filterType) throws CloudTestSDKException
T - result type, sub-class of ModelListInfoBaselistId - id of the model groupfilterType - type of the model group, refer com.cloudtestapi.common.Constants.ModelListFilterTypeCloudTestSDKExceptionpublic String wdbConnect(String address, String token, int timeOut) throws IOException, InterruptedException, CloudTestSDKException
public void setWdbPath(String path)
Copyright © 2022. All rights reserved.