Compare commits
19 Commits
Author | SHA1 | Date |
---|---|---|
huidong.tan | a1c9b03701 | 10 months ago |
huidong.tan | 9fb39873fa | 10 months ago |
huidong.tan | 1cdbf1b7b5 | 11 months ago |
sean.zhou | c196f70c0c | 11 months ago |
sean.zhou | 9b6bfb83fb | 11 months ago |
sean.zhou | 73f5ab467d | 11 months ago |
sean.zhou | 7bb8816683 | 1 year ago |
sean.zhou | e37df40061 | 1 year ago |
sean.zhou | 585f72380e | 1 year ago |
sean.zhou | b390ebe579 | 1 year ago |
sean.zhou | d68e3d3eae | 1 year ago |
sean.zhou | 12887aed11 | 1 year ago |
sean.zhou | 642dac3e70 | 2 years ago |
sean.zhou | fc67c10698 | 2 years ago |
sean.zhou | 694b9483c7 | 2 years ago |
sean.zhou | a7aaeabc78 | 2 years ago |
DJIsean | 8077e8b67b | 2 years ago |
sean.zhou | 2d8ded3e77 | 2 years ago |
sean.zhou | 56df98ce49 | 2 years ago |
@ -0,0 +1,48 @@
@@ -0,0 +1,48 @@
|
||||
# 如何接入CloudSDK |
||||
### 1. 在组件扫描中增加包名:com.dji.sdk |
||||
### [2. 连接MQTT](#如何连接MQTT) |
||||
### [3. 实现SDK 的方法](#如何实现SDK的方法) |
||||
### [4. 调用SDK 的方法](#如何调用SDK的方法) |
||||
|
||||
|
||||
## 如何连接MQTT |
||||
- 在spring容器中注入MqttConnectOptions和MqttPahoClientFactory; |
||||
![1](./image/6.png) |
||||
|
||||
- 在application.yml中配置cloud-sdk.mqtt.inbound-topic,未配置则不进行初始化订阅。 |
||||
|
||||
|
||||
## 如何实现SDK的方法 |
||||
- 定义一个类,继承com.dji.sdk.cloudapi.*.api包中的抽象类; |
||||
- 重写具体的方法以实现功能; |
||||
- 将定义的类放入spring容器中,由spring管理bean的生命周期。 |
||||
### 【设备上线】示例: |
||||
- 定义一个类:SDKDeviceService 继承AbstractDeviceService; |
||||
![1](./image/1.png) |
||||
- 重写方法updateTopoOnline,实现设备上线功能。 |
||||
![1](./image/2.png) |
||||
|
||||
## 如何调用SDK的方法 |
||||
- 定义一个类,继承com.dji.sdk.cloudapi.*.api包中的抽象类; |
||||
- 在需要调用的类中注入该类; |
||||
- 调用具体的方法。 |
||||
### 【航线预下发命令】示例: |
||||
- 定义一个类:SDKWaylineService 继承 AbstractWaylineService; |
||||
![1](./image/3.png) |
||||
- 在WaylineJobServiceImpl中注入该类; |
||||
![1](./image/4.png) |
||||
- 调用下发命令的方法: |
||||
![1](./image/5.png) |
||||
|
||||
## 如何实现CloudAPI 定义的http 接口 |
||||
- 定义一个类,实现com.dji.sdk.cloudapi.*.api包中的http接口类; |
||||
- 重写具体的方法以实现接口,无需定义请求地址和方法等数据。 |
||||
![1](./image/7.png) |
||||
|
||||
## 如何查看CloudAPI 定义的所有http 接口 |
||||
- 启动程序 |
||||
- 浏览器打开:http://localhost:6789/swagger-ui/index.html |
||||
|
||||
## 如何接入WebSocket |
||||
- CloudSDK 已经定义了WebSocket服务,但是没有实现WebSocket管理。默认地址为:http://localhost:6789/api/v1/ws |
||||
- 自定义接入参考:com.dji.sample.component.websocket.config |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 144 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 195 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 223 KiB |
After Width: | Height: | Size: 181 KiB |
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<parent> |
||||
<artifactId>cloud-api-sample</artifactId> |
||||
<groupId>com.dji</groupId> |
||||
<version>${revision}</version> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
|
||||
<artifactId>cloud-sdk</artifactId> |
||||
<version>${cloud-sdk.revision}</version> |
||||
|
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>org.springdoc</groupId> |
||||
<artifactId>springdoc-openapi-ui</artifactId> |
||||
<version>1.7.0</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-aop</artifactId> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-websocket</artifactId> |
||||
</dependency> |
||||
</dependencies> |
||||
</project> |
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
package com.dji.sdk.annotations; |
||||
|
||||
import com.dji.sdk.config.version.CloudSDKVersionEnum; |
||||
import com.dji.sdk.config.version.GatewayTypeEnum; |
||||
|
||||
import java.lang.annotation.*; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/5/22 |
||||
*/ |
||||
@Documented |
||||
@Retention(RetentionPolicy.RUNTIME) |
||||
@Target({ElementType.FIELD, ElementType.METHOD}) |
||||
public @interface CloudSDKVersion { |
||||
|
||||
CloudSDKVersionEnum since() default CloudSDKVersionEnum.V0_0_1; |
||||
|
||||
CloudSDKVersionEnum deprecated() default CloudSDKVersionEnum.V99; |
||||
|
||||
GatewayTypeEnum[] include() default {}; |
||||
|
||||
GatewayTypeEnum[] exclude() default {}; |
||||
|
||||
} |
@ -0,0 +1,178 @@
@@ -0,0 +1,178 @@
|
||||
package com.dji.sdk.cloudapi.airsense; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/16 |
||||
*/ |
||||
public class AirsenseWarning { |
||||
|
||||
/** |
||||
* ICAO civil aviation aircraft address |
||||
*/ |
||||
private String icao; |
||||
|
||||
/** |
||||
* The higher the danger level, the more dangerous it is. |
||||
* For levels greater than or equal to 3, it is recommended for aircraft to take evasive action. |
||||
*/ |
||||
private WarningLevelEnum warningLevel; |
||||
|
||||
/** |
||||
* The latitude of aircraft location is angular values. |
||||
* Negative values for south latitude and positive values for north latitude. |
||||
* It is accurate to six decimal places. |
||||
*/ |
||||
private Float latitude; |
||||
|
||||
/** |
||||
* The longitude of aircraft location is angular values. |
||||
* Negative values for west longitude and positive values for east longitude. |
||||
* It is accurate to six decimal places. |
||||
*/ |
||||
private Float longitude; |
||||
|
||||
/** |
||||
* Absolute height of flight. |
||||
* Unit: meter |
||||
*/ |
||||
private Integer altitude; |
||||
|
||||
/** |
||||
* Absolute height type |
||||
*/ |
||||
private AltitudeTypeEnum altitudeType; |
||||
|
||||
/** |
||||
* The angle of heading is angular values. |
||||
* 0 is north. 90 is east. |
||||
* It is accurate to one decimal places. |
||||
*/ |
||||
private Float heading; |
||||
|
||||
/** |
||||
* Relative height of flight to aircraft. |
||||
* Unit: meter |
||||
*/ |
||||
private Integer relativeAltitude; |
||||
|
||||
/** |
||||
* Relative height change trend |
||||
*/ |
||||
private VertTrendEnum vertTrend; |
||||
|
||||
/** |
||||
* Horizontal distance to aircraft. |
||||
* Unit: meter |
||||
*/ |
||||
private Integer distance; |
||||
|
||||
public AirsenseWarning() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "AirsenseWarning{" + |
||||
"icao='" + icao + '\'' + |
||||
", warningLevel=" + warningLevel + |
||||
", latitude=" + latitude + |
||||
", longitude=" + longitude + |
||||
", altitude=" + altitude + |
||||
", altitudeType=" + altitudeType + |
||||
", heading=" + heading + |
||||
", relativeAltitude=" + relativeAltitude + |
||||
", vertTrend=" + vertTrend + |
||||
", distance=" + distance + |
||||
'}'; |
||||
} |
||||
|
||||
public String getIcao() { |
||||
return icao; |
||||
} |
||||
|
||||
public AirsenseWarning setIcao(String icao) { |
||||
this.icao = icao; |
||||
return this; |
||||
} |
||||
|
||||
public WarningLevelEnum getWarningLevel() { |
||||
return warningLevel; |
||||
} |
||||
|
||||
public AirsenseWarning setWarningLevel(WarningLevelEnum warningLevel) { |
||||
this.warningLevel = warningLevel; |
||||
return this; |
||||
} |
||||
|
||||
public Float getLatitude() { |
||||
return latitude; |
||||
} |
||||
|
||||
public AirsenseWarning setLatitude(Float latitude) { |
||||
this.latitude = latitude; |
||||
return this; |
||||
} |
||||
|
||||
public Float getLongitude() { |
||||
return longitude; |
||||
} |
||||
|
||||
public AirsenseWarning setLongitude(Float longitude) { |
||||
this.longitude = longitude; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getAltitude() { |
||||
return altitude; |
||||
} |
||||
|
||||
public AirsenseWarning setAltitude(Integer altitude) { |
||||
this.altitude = altitude; |
||||
return this; |
||||
} |
||||
|
||||
public AltitudeTypeEnum getAltitudeType() { |
||||
return altitudeType; |
||||
} |
||||
|
||||
public AirsenseWarning setAltitudeType(AltitudeTypeEnum altitudeType) { |
||||
this.altitudeType = altitudeType; |
||||
return this; |
||||
} |
||||
|
||||
public Float getHeading() { |
||||
return heading; |
||||
} |
||||
|
||||
public AirsenseWarning setHeading(Float heading) { |
||||
this.heading = heading; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getRelativeAltitude() { |
||||
return relativeAltitude; |
||||
} |
||||
|
||||
public AirsenseWarning setRelativeAltitude(Integer relativeAltitude) { |
||||
this.relativeAltitude = relativeAltitude; |
||||
return this; |
||||
} |
||||
|
||||
public VertTrendEnum getVertTrend() { |
||||
return vertTrend; |
||||
} |
||||
|
||||
public AirsenseWarning setVertTrend(VertTrendEnum vertTrend) { |
||||
this.vertTrend = vertTrend; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getDistance() { |
||||
return distance; |
||||
} |
||||
|
||||
public AirsenseWarning setDistance(Integer distance) { |
||||
this.distance = distance; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
package com.dji.sdk.cloudapi.airsense; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/16 |
||||
*/ |
||||
public enum AltitudeTypeEnum { |
||||
|
||||
ELLIPSOID_HEIGHT(0), |
||||
|
||||
ABOVE_SEA_LEVEL(1), |
||||
|
||||
; |
||||
|
||||
private final int type; |
||||
|
||||
AltitudeTypeEnum(int type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getType() { |
||||
return type; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static AltitudeTypeEnum find(int type) { |
||||
return Arrays.stream(values()).filter(typeEnum -> typeEnum.type == type).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(AltitudeTypeEnum.class, type)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
package com.dji.sdk.cloudapi.airsense; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/16 |
||||
*/ |
||||
public enum VertTrendEnum { |
||||
|
||||
RELATIVE_HEIGHT_UNCHANGED(0), |
||||
|
||||
RELATIVE_HEIGHT_INCREASE(1), |
||||
|
||||
RELATIVE_HEIGHT_DECREASE(2), |
||||
|
||||
; |
||||
|
||||
private final int trend; |
||||
|
||||
VertTrendEnum(int trend) { |
||||
this.trend = trend; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getTrend() { |
||||
return trend; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static VertTrendEnum find(int trend) { |
||||
return Arrays.stream(values()).filter(trendEnum -> trendEnum.trend == trend).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(VertTrendEnum.class, trend)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
package com.dji.sdk.cloudapi.airsense; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/16 |
||||
*/ |
||||
public enum WarningLevelEnum { |
||||
|
||||
ZERO(0), |
||||
|
||||
ONE(1), |
||||
|
||||
TWO(2), |
||||
|
||||
THREE(3), |
||||
|
||||
FOUR(4), |
||||
|
||||
; |
||||
|
||||
private final int level; |
||||
|
||||
WarningLevelEnum(int level) { |
||||
this.level = level; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getLevel() { |
||||
return level; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static WarningLevelEnum find(int level) { |
||||
return Arrays.stream(values()).filter(levelEnum -> levelEnum.level == level).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(WarningLevelEnum.class, level)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.airsense.api; |
||||
|
||||
import com.dji.sdk.annotations.CloudSDKVersion; |
||||
import com.dji.sdk.cloudapi.airsense.AirsenseWarning; |
||||
import com.dji.sdk.config.version.CloudSDKVersionEnum; |
||||
import com.dji.sdk.mqtt.ChannelName; |
||||
import com.dji.sdk.mqtt.MqttReply; |
||||
import com.dji.sdk.mqtt.events.TopicEventsRequest; |
||||
import com.dji.sdk.mqtt.events.TopicEventsResponse; |
||||
import org.springframework.integration.annotation.ServiceActivator; |
||||
import org.springframework.messaging.Message; |
||||
import org.springframework.messaging.MessageHeaders; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/16 |
||||
*/ |
||||
public abstract class AbstractAirsenseService { |
||||
|
||||
|
||||
/** |
||||
* cloud-custom data transmit from psdk |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_EVENTS_AIRSENSE_WARNING, outputChannel = ChannelName.OUTBOUND_EVENTS) |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0) |
||||
public TopicEventsResponse<MqttReply> airsenseWarning(TopicEventsRequest<List<AirsenseWarning>> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("airsenseWarning not implemented"); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
package com.dji.sdk.cloudapi.config; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2022/11/10 |
||||
*/ |
||||
public enum ConfigScopeEnum { |
||||
|
||||
PRODUCT("product"); |
||||
|
||||
private final String scope; |
||||
|
||||
ConfigScopeEnum(String scope) { |
||||
this.scope = scope; |
||||
} |
||||
|
||||
@JsonValue |
||||
public String getScope() { |
||||
return scope; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static ConfigScopeEnum find(String scope) { |
||||
return Arrays.stream(values()).filter(scopeEnum -> scopeEnum.scope.equals(scope)).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(ConfigScopeEnum.class, scope)); |
||||
} |
||||
} |
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
package com.dji.sdk.cloudapi.config; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2022/11/10 |
||||
*/ |
||||
public enum ConfigTypeEnum { |
||||
|
||||
JSON("json"); |
||||
|
||||
private final String type; |
||||
|
||||
ConfigTypeEnum(String type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
@JsonValue |
||||
public String getType() { |
||||
return type; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static ConfigTypeEnum find(String type) { |
||||
return Arrays.stream(values()).filter(typeEnum -> typeEnum.type.equals(type)).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(ConfigTypeEnum.class, type)); |
||||
} |
||||
} |
@ -0,0 +1,73 @@
@@ -0,0 +1,73 @@
|
||||
package com.dji.sdk.cloudapi.config; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2022/11/10 |
||||
*/ |
||||
public class ProductConfigResponse extends BaseModel { |
||||
|
||||
private String ntpServerHost; |
||||
|
||||
@NotNull |
||||
private String appId; |
||||
|
||||
@NotNull |
||||
private String appKey; |
||||
|
||||
@NotNull |
||||
private String appLicense; |
||||
|
||||
public ProductConfigResponse() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "ProductConfigResponse{" + |
||||
"ntpServerHost='" + ntpServerHost + '\'' + |
||||
", appId='" + appId + '\'' + |
||||
", appKey='" + appKey + '\'' + |
||||
", appLicense='" + appLicense + '\'' + |
||||
'}'; |
||||
} |
||||
|
||||
public String getNtpServerHost() { |
||||
return ntpServerHost; |
||||
} |
||||
|
||||
public ProductConfigResponse setNtpServerHost(String ntpServerHost) { |
||||
this.ntpServerHost = ntpServerHost; |
||||
return this; |
||||
} |
||||
|
||||
public String getAppId() { |
||||
return appId; |
||||
} |
||||
|
||||
public ProductConfigResponse setAppId(String appId) { |
||||
this.appId = appId; |
||||
return this; |
||||
} |
||||
|
||||
public String getAppKey() { |
||||
return appKey; |
||||
} |
||||
|
||||
public ProductConfigResponse setAppKey(String appKey) { |
||||
this.appKey = appKey; |
||||
return this; |
||||
} |
||||
|
||||
public String getAppLicense() { |
||||
return appLicense; |
||||
} |
||||
|
||||
public ProductConfigResponse setAppLicense(String appLicense) { |
||||
this.appLicense = appLicense; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
package com.dji.sdk.cloudapi.config; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2022/11/10 |
||||
*/ |
||||
public class RequestsConfigRequest { |
||||
|
||||
private ConfigTypeEnum configType; |
||||
|
||||
private ConfigScopeEnum configScope; |
||||
|
||||
public RequestsConfigRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "RequestsConfigRequest{" + |
||||
"configType=" + configType + |
||||
", configScope=" + configScope + |
||||
'}'; |
||||
} |
||||
|
||||
public ConfigTypeEnum getConfigType() { |
||||
return configType; |
||||
} |
||||
|
||||
public RequestsConfigRequest setConfigType(ConfigTypeEnum configType) { |
||||
this.configType = configType; |
||||
return this; |
||||
} |
||||
|
||||
public ConfigScopeEnum getConfigScope() { |
||||
return configScope; |
||||
} |
||||
|
||||
public RequestsConfigRequest setConfigScope(ConfigScopeEnum configScope) { |
||||
this.configScope = configScope; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
package com.dji.sdk.cloudapi.config.api; |
||||
|
||||
import com.dji.sdk.cloudapi.config.ProductConfigResponse; |
||||
import com.dji.sdk.cloudapi.config.RequestsConfigRequest; |
||||
import com.dji.sdk.mqtt.ChannelName; |
||||
import com.dji.sdk.mqtt.requests.TopicRequestsRequest; |
||||
import com.dji.sdk.mqtt.requests.TopicRequestsResponse; |
||||
import org.springframework.integration.annotation.ServiceActivator; |
||||
import org.springframework.messaging.Message; |
||||
import org.springframework.messaging.MessageHeaders; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/29 |
||||
*/ |
||||
public abstract class AbstractConfigService { |
||||
|
||||
/** |
||||
* Inform of file uploading progress |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return requests_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_REQUESTS_CONFIG, outputChannel = ChannelName.OUTBOUND_REQUESTS) |
||||
public TopicRequestsResponse<ProductConfigResponse> requestsConfig(TopicRequestsRequest<RequestsConfigRequest> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("requestsConfig not implemented"); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,99 @@
@@ -0,0 +1,99 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/1 |
||||
*/ |
||||
public class CameraAimRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
@NotNull |
||||
private CameraTypeEnum cameraType; |
||||
|
||||
/** |
||||
* true: Lock the gimbal, the gimbal and the drone rotate together. |
||||
* false: Only the gimbal rotates, but the drone does not. |
||||
*/ |
||||
@NotNull |
||||
private Boolean locked; |
||||
|
||||
/** |
||||
* upper left corner as center point |
||||
*/ |
||||
@Min(0) |
||||
@Max(1) |
||||
private Float x; |
||||
|
||||
@Min(0) |
||||
@Max(1) |
||||
private Float y; |
||||
|
||||
public CameraAimRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraAimRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", cameraType=" + cameraType + |
||||
", locked=" + locked + |
||||
", x=" + x + |
||||
", y=" + y + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraAimRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public CameraTypeEnum getCameraType() { |
||||
return cameraType; |
||||
} |
||||
|
||||
public CameraAimRequest setCameraType(CameraTypeEnum cameraType) { |
||||
this.cameraType = cameraType; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getLocked() { |
||||
return locked; |
||||
} |
||||
|
||||
public CameraAimRequest setLocked(Boolean locked) { |
||||
this.locked = locked; |
||||
return this; |
||||
} |
||||
|
||||
public Float getX() { |
||||
return x; |
||||
} |
||||
|
||||
public CameraAimRequest setX(Float x) { |
||||
this.x = x; |
||||
return this; |
||||
} |
||||
|
||||
public Float getY() { |
||||
return y; |
||||
} |
||||
|
||||
public CameraAimRequest setY(Float y) { |
||||
this.y = y; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class CameraExposureModeSetRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
@NotNull |
||||
private ExposureCameraTypeEnum cameraType; |
||||
|
||||
@NotNull |
||||
private ExposureModeEnum exposureMode; |
||||
|
||||
public CameraExposureModeSetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraExposureModeSetRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", cameraType=" + cameraType + |
||||
", exposureMode=" + exposureMode + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraExposureModeSetRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public ExposureCameraTypeEnum getCameraType() { |
||||
return cameraType; |
||||
} |
||||
|
||||
public CameraExposureModeSetRequest setCameraType(ExposureCameraTypeEnum cameraType) { |
||||
this.cameraType = cameraType; |
||||
return this; |
||||
} |
||||
|
||||
public ExposureModeEnum getExposureMode() { |
||||
return exposureMode; |
||||
} |
||||
|
||||
public CameraExposureModeSetRequest setExposureMode(ExposureModeEnum exposureMode) { |
||||
this.exposureMode = exposureMode; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class CameraExposureSetRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
@NotNull |
||||
private ExposureCameraTypeEnum cameraType; |
||||
|
||||
@NotNull |
||||
private ExposureValueEnum exposureValue; |
||||
|
||||
public CameraExposureSetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraExposureSetRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", cameraType=" + cameraType + |
||||
", exposureValue=" + exposureValue + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraExposureSetRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public ExposureCameraTypeEnum getCameraType() { |
||||
return cameraType; |
||||
} |
||||
|
||||
public CameraExposureSetRequest setCameraType(ExposureCameraTypeEnum cameraType) { |
||||
this.cameraType = cameraType; |
||||
return this; |
||||
} |
||||
|
||||
public ExposureValueEnum getExposureValue() { |
||||
return exposureValue; |
||||
} |
||||
|
||||
public CameraExposureSetRequest setExposureValue(ExposureValueEnum exposureValue) { |
||||
this.exposureValue = exposureValue; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,66 @@
@@ -0,0 +1,66 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/1 |
||||
*/ |
||||
public class CameraFocalLengthSetRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
@NotNull |
||||
private ZoomCameraTypeEnum cameraType; |
||||
|
||||
@Min(2) |
||||
@Max(200) |
||||
@NotNull |
||||
private Float zoomFactor; |
||||
|
||||
public CameraFocalLengthSetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraFocalLengthSetRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", cameraType=" + cameraType + |
||||
", zoomFactor=" + zoomFactor + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraFocalLengthSetRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public ZoomCameraTypeEnum getCameraType() { |
||||
return cameraType; |
||||
} |
||||
|
||||
public CameraFocalLengthSetRequest setCameraType(ZoomCameraTypeEnum cameraType) { |
||||
this.cameraType = cameraType; |
||||
return this; |
||||
} |
||||
|
||||
public Float getZoomFactor() { |
||||
return zoomFactor; |
||||
} |
||||
|
||||
public CameraFocalLengthSetRequest setZoomFactor(Float zoomFactor) { |
||||
this.zoomFactor = zoomFactor; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class CameraFocusModeSetRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
@NotNull |
||||
private ExposureCameraTypeEnum cameraType; |
||||
|
||||
@NotNull |
||||
private FocusModeEnum focusMode; |
||||
|
||||
public CameraFocusModeSetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraFocusModeSetRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", cameraType=" + cameraType + |
||||
", focusMode=" + focusMode + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraFocusModeSetRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public ExposureCameraTypeEnum getCameraType() { |
||||
return cameraType; |
||||
} |
||||
|
||||
public CameraFocusModeSetRequest setCameraType(ExposureCameraTypeEnum cameraType) { |
||||
this.cameraType = cameraType; |
||||
return this; |
||||
} |
||||
|
||||
public FocusModeEnum getFocusMode() { |
||||
return focusMode; |
||||
} |
||||
|
||||
public CameraFocusModeSetRequest setFocusMode(FocusModeEnum focusMode) { |
||||
this.focusMode = focusMode; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class CameraFocusValueSetRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
@NotNull |
||||
private ExposureCameraTypeEnum cameraType; |
||||
|
||||
@NotNull |
||||
private Integer focusValue; |
||||
|
||||
public CameraFocusValueSetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraFocusValueSetRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", cameraType=" + cameraType + |
||||
", focusValue=" + focusValue + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraFocusValueSetRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public ExposureCameraTypeEnum getCameraType() { |
||||
return cameraType; |
||||
} |
||||
|
||||
public CameraFocusValueSetRequest setCameraType(ExposureCameraTypeEnum cameraType) { |
||||
this.cameraType = cameraType; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getFocusValue() { |
||||
return focusValue; |
||||
} |
||||
|
||||
public CameraFocusValueSetRequest setFocusValue(Integer focusValue) { |
||||
this.focusValue = focusValue; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,98 @@
@@ -0,0 +1,98 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/12 |
||||
*/ |
||||
public class CameraLookAtRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
/** |
||||
* Whether the relative location of drone head and gimbal is locked |
||||
*/ |
||||
@NotNull |
||||
private Boolean locked; |
||||
|
||||
/** |
||||
* The latitude of target point is angular values. |
||||
* Negative values for south latitude and positive values for north latitude. |
||||
* It is accurate to six decimal places. |
||||
*/ |
||||
@Min(-90) |
||||
@Max(90) |
||||
@NotNull |
||||
private Float latitude; |
||||
|
||||
/** |
||||
* The latitude of target point is angular values. |
||||
* Negative values for west longitude and positive values for east longitude. |
||||
* It is accurate to six decimal places. |
||||
*/ |
||||
@NotNull |
||||
@Min(-180) |
||||
@Max(180) |
||||
private Float longitude; |
||||
|
||||
/** |
||||
* Ellipsoid height |
||||
*/ |
||||
@NotNull |
||||
@Min(2) |
||||
@Max(10000) |
||||
private Float height; |
||||
|
||||
public CameraLookAtRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraLookAtRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", locked=" + locked + |
||||
", latitude=" + latitude + |
||||
", longitude=" + longitude + |
||||
", height=" + height + |
||||
'}'; |
||||
} |
||||
|
||||
public CameraLookAtRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public CameraLookAtRequest setLocked(Boolean locked) { |
||||
this.locked = locked; |
||||
return this; |
||||
} |
||||
|
||||
public CameraLookAtRequest setLatitude(Float latitude) { |
||||
this.latitude = latitude; |
||||
return this; |
||||
} |
||||
|
||||
public CameraLookAtRequest setLongitude(Float longitude) { |
||||
this.longitude = longitude; |
||||
return this; |
||||
} |
||||
|
||||
public CameraLookAtRequest setHeight(Float height) { |
||||
this.height = height; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.CameraModeEnum; |
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/1 |
||||
*/ |
||||
public class CameraModeSwitchRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
@NotNull |
||||
private CameraModeEnum cameraMode; |
||||
|
||||
public CameraModeSwitchRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraModeSwitchRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", cameraMode=" + cameraMode + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraModeSwitchRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public CameraModeEnum getCameraMode() { |
||||
return cameraMode; |
||||
} |
||||
|
||||
public CameraModeSwitchRequest setCameraMode(CameraModeEnum cameraMode) { |
||||
this.cameraMode = cameraMode; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class CameraPhotoStopRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
public CameraPhotoStopRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraPhotoStopRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraPhotoStopRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,56 @@
@@ -0,0 +1,56 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.wayline.FlighttaskStatusEnum; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class CameraPhotoTakeProgress { |
||||
|
||||
private PhotoTakeProgressExt ext; |
||||
|
||||
private PhotoTakeProgressData progress; |
||||
|
||||
private FlighttaskStatusEnum status; |
||||
|
||||
public CameraPhotoTakeProgress() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraPhotoTakeProgress{" + |
||||
"ext=" + ext + |
||||
", progress=" + progress + |
||||
", status=" + status + |
||||
'}'; |
||||
} |
||||
|
||||
public PhotoTakeProgressExt getExt() { |
||||
return ext; |
||||
} |
||||
|
||||
public CameraPhotoTakeProgress setExt(PhotoTakeProgressExt ext) { |
||||
this.ext = ext; |
||||
return this; |
||||
} |
||||
|
||||
public PhotoTakeProgressData getProgress() { |
||||
return progress; |
||||
} |
||||
|
||||
public CameraPhotoTakeProgress setProgress(PhotoTakeProgressData progress) { |
||||
this.progress = progress; |
||||
return this; |
||||
} |
||||
|
||||
public FlighttaskStatusEnum getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public CameraPhotoTakeProgress setStatus(FlighttaskStatusEnum status) { |
||||
this.status = status; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/1 |
||||
*/ |
||||
public class CameraPhotoTakeRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
public CameraPhotoTakeRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraPhotoTakeRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraPhotoTakeRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,93 @@
@@ -0,0 +1,93 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class CameraPointFocusActionRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
@NotNull |
||||
private ExposureCameraTypeEnum cameraType; |
||||
|
||||
/** |
||||
* The coordinate x of the temperature measurement point is the upper left corner of the lens as the coordinate center point, and the horizontal direction is x. |
||||
*/ |
||||
@NotNull |
||||
@Min(0) |
||||
@Max(1) |
||||
private Float x; |
||||
|
||||
/** |
||||
* The coordinate y of the temperature measurement point is the upper left corner of the lens as the coordinate center point, and the vertical direction is y. |
||||
*/ |
||||
@NotNull |
||||
@Min(0) |
||||
@Max(1) |
||||
private Float y; |
||||
|
||||
public CameraPointFocusActionRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraPointFocusActionRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", cameraType=" + cameraType + |
||||
", x=" + x + |
||||
", y=" + y + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraPointFocusActionRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public ExposureCameraTypeEnum getCameraType() { |
||||
return cameraType; |
||||
} |
||||
|
||||
public CameraPointFocusActionRequest setCameraType(ExposureCameraTypeEnum cameraType) { |
||||
this.cameraType = cameraType; |
||||
return this; |
||||
} |
||||
|
||||
public Float getX() { |
||||
return x; |
||||
} |
||||
|
||||
public CameraPointFocusActionRequest setX(Float x) { |
||||
this.x = x; |
||||
return this; |
||||
} |
||||
|
||||
public Float getY() { |
||||
return y; |
||||
} |
||||
|
||||
public CameraPointFocusActionRequest setY(Float y) { |
||||
this.y = y; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/1 |
||||
*/ |
||||
public class CameraRecordingStartRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
public CameraRecordingStartRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraRecordingStartRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraRecordingStartRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/1 |
||||
*/ |
||||
public class CameraRecordingStopRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
public CameraRecordingStopRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraRecordingStopRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraRecordingStopRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,58 @@
@@ -0,0 +1,58 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/12 |
||||
*/ |
||||
public class CameraScreenSplitRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
/** |
||||
* Whether enable the screen split |
||||
*/ |
||||
@NotNull |
||||
private Boolean enable; |
||||
|
||||
public CameraScreenSplitRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "CameraScreenSplitRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", enable=" + enable + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public CameraScreenSplitRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getEnable() { |
||||
return enable; |
||||
} |
||||
|
||||
public CameraScreenSplitRequest setEnable(Boolean enable) { |
||||
this.enable = enable; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/3 |
||||
*/ |
||||
public enum CameraTypeEnum { |
||||
|
||||
ZOOM("zoom"), |
||||
|
||||
WIDE("wide"), |
||||
|
||||
IR("ir"); |
||||
|
||||
private final String type; |
||||
|
||||
CameraTypeEnum(String type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
@JsonValue |
||||
public String getType() { |
||||
return type; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static CameraTypeEnum find(String type) { |
||||
return Arrays.stream(values()).filter(typeEnum -> typeEnum.type.equals(type)).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(CameraTypeEnum.class, type)); |
||||
} |
||||
} |
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/8/7 |
||||
*/ |
||||
public enum CommanderFlightModeEnum { |
||||
|
||||
SMART_HEIGHT(0), |
||||
|
||||
SETTING_HEIGHT(1); |
||||
|
||||
private final int mode; |
||||
|
||||
CommanderFlightModeEnum(int mode) { |
||||
this.mode = mode; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getMode() { |
||||
return mode; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static CommanderFlightModeEnum find(int mode) { |
||||
return Arrays.stream(values()).filter(modeEnum -> modeEnum.mode == mode).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(CommanderFlightModeEnum.class, mode)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/6 |
||||
*/ |
||||
public enum CommanderModeLostActionEnum { |
||||
|
||||
CONTINUE(0), |
||||
|
||||
EXECUTE_RC_LOST_ACTION(1); |
||||
|
||||
private final int action; |
||||
|
||||
CommanderModeLostActionEnum(int action) { |
||||
this.action = action; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getAction() { |
||||
return action; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static CommanderModeLostActionEnum find(int action) { |
||||
return Arrays.stream(values()).filter(actionEnum -> actionEnum.action == action).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(CommanderModeLostActionEnum.class, action)); |
||||
} |
||||
} |
@ -0,0 +1,91 @@
@@ -0,0 +1,91 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.common.IErrorInfo; |
||||
import com.dji.sdk.mqtt.events.IEventsErrorCode; |
||||
import com.dji.sdk.mqtt.services.IServicesErrorCode; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean.zhou |
||||
* @version 0.1 |
||||
* @date 2021/11/25 |
||||
*/ |
||||
public enum ControlErrorCodeEnum implements IServicesErrorCode, IEventsErrorCode, IErrorInfo { |
||||
|
||||
SETTING_RTH_FAILED(327000, "Height of return to home setting failed."), |
||||
|
||||
SETTING_LOST_ACTION_FAILED(327001, "Signal lost action setting failed."), |
||||
|
||||
OBTAIN_CONTROL_FAILED(327002, "Failed to obtain control."), |
||||
|
||||
DEVICE_OFFLINE(327003, "Failed to obtain control. Device offline."), |
||||
|
||||
DRAG_LIVESTREAM_VIEW_FAILED(327004, "Failed to drag livestream view."), |
||||
|
||||
AIM_FAILED(327005, "Failed to double tab to be AIM."), |
||||
|
||||
TAKE_PHOTO_FAILED(327006, "Failed to take photo."), |
||||
|
||||
START_RECORDING_FAILED(327007, "Failed to start recording."), |
||||
|
||||
STOP_RECORDING_FAILED(327008, "Failed to stop recording."), |
||||
|
||||
SWITCH_CAMERA_MODE_FAILED(327009, "Failed to switch camera modes."), |
||||
|
||||
ZOOM_CAMERA_ZOOM_FAILED(327010, "Failed to zoom in/out with zoom camera."), |
||||
|
||||
IR_CAMERA_ZOOM_FAILED(327011, "Failed to zoom in/out with IR camera."), |
||||
|
||||
DEVICE_LOCK(327012, "Failed to obtain control. Device is locked."), |
||||
|
||||
SETTING_WAYLINE_LOST_ACTION_FAILED(327013, "Wayline signal lost action setting failed."), |
||||
|
||||
GIMBAL_REACH_LIMIT(327014, "Gimbal reached movement limit."), |
||||
|
||||
WRONG_LENS_TYPE(327015, "Invalid camera lens type."), |
||||
|
||||
|
||||
DRC_ABNORMAL(514300, "DRC abnormal."), |
||||
|
||||
DRC_HEARTBEAT_TIMED_OUT(514301, "DRC heartbeat timed out."), |
||||
|
||||
DRC_CERTIFICATE_ABNORMAL(514302, "DRC certificate is abnormal."), |
||||
|
||||
DRC_LINK_LOST(514303, "DRC link is lost."), |
||||
|
||||
DRC_LINK_REFUSED(514304, "DRC link is refused."), |
||||
|
||||
UNKNOWN(-1, "UNKNOWN"), |
||||
|
||||
; |
||||
|
||||
|
||||
private final String msg; |
||||
|
||||
private final int code; |
||||
|
||||
ControlErrorCodeEnum(int code, String msg) { |
||||
this.code = code; |
||||
this.msg = msg; |
||||
} |
||||
|
||||
@Override |
||||
public String getMessage() { |
||||
return this.msg; |
||||
} |
||||
|
||||
@Override |
||||
public Integer getCode() { |
||||
return this.code; |
||||
} |
||||
|
||||
/** |
||||
* @param code error code |
||||
* @return enumeration object |
||||
*/ |
||||
public static ControlErrorCodeEnum find(int code) { |
||||
return Arrays.stream(values()).filter(codeEnum -> codeEnum.code == code).findAny().orElse(UNKNOWN); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,90 @@
@@ -0,0 +1,90 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/2 |
||||
*/ |
||||
public enum ControlMethodEnum { |
||||
|
||||
FLIGHT_AUTHORITY_GRAB("flight_authority_grab"), |
||||
|
||||
PAYLOAD_AUTHORITY_GRAB("payload_authority_grab"), |
||||
|
||||
DRC_MODE_ENTER("drc_mode_enter"), |
||||
|
||||
DRC_MODE_EXIT("drc_mode_exit"), |
||||
|
||||
FLY_TO_POINT("fly_to_point"), |
||||
|
||||
FLY_TO_POINT_STOP("fly_to_point_stop"), |
||||
|
||||
FLY_TO_POINT_UPDATE("fly_to_point_update"), |
||||
|
||||
TAKEOFF_TO_POINT("takeoff_to_point"), |
||||
|
||||
CAMERA_MODE_SWITCH("camera_mode_switch"), |
||||
|
||||
CAMERA_PHOTO_TAKE("camera_photo_take"), |
||||
|
||||
CAMERA_PHOTO_STOP("camera_photo_stop"), |
||||
|
||||
CAMERA_RECORDING_START("camera_recording_start"), |
||||
|
||||
CAMERA_RECORDING_STOP("camera_recording_stop"), |
||||
|
||||
CAMERA_AIM("camera_aim"), |
||||
|
||||
CAMERA_FOCAL_LENGTH_SET("camera_focal_length_set"), |
||||
|
||||
GIMBAL_RESET("gimbal_reset"), |
||||
|
||||
CAMERA_LOOK_AT("camera_look_at"), |
||||
|
||||
CAMERA_SCREEN_SPLIT("camera_screen_split"), |
||||
|
||||
PHOTO_STORAGE_SET("photo_storage_set"), |
||||
|
||||
VIDEO_STORAGE_SET("video_storage_set"), |
||||
|
||||
CAMERA_EXPOSURE_SET("camera_exposure_set"), |
||||
|
||||
CAMERA_EXPOSURE_MODE_SET("camera_exposure_mode_set"), |
||||
|
||||
CAMERA_FOCUS_MODE_SET("camera_focus_mode_set"), |
||||
|
||||
CAMERA_FOCUS_VALUE_SET("camera_focus_value_set"), |
||||
|
||||
IR_METERING_MODE_SET("ir_metering_mode_set"), |
||||
|
||||
IR_METERING_POINT_SET("ir_metering_point_set"), |
||||
|
||||
IR_METERING_AREA_SET("ir_metering_area_set"), |
||||
|
||||
CAMERA_POINT_FOCUS_ACTION("camera_point_focus_action"), |
||||
|
||||
DRONE_CONTROL("drone_control"), |
||||
|
||||
DRONE_EMERGENCY_STOP("drone_emergency_stop"), |
||||
|
||||
HEART_BEAT("heart_beat"), |
||||
|
||||
POI_MODE_ENTER("poi_mode_enter"), |
||||
|
||||
POI_MODE_EXIT("poi_mode_exit"), |
||||
|
||||
POI_CIRCLE_SPEED_SET("poi_circle_speed_set"), |
||||
|
||||
; |
||||
|
||||
private final String method; |
||||
|
||||
ControlMethodEnum(String method) { |
||||
this.method = method; |
||||
} |
||||
|
||||
public String getMethod() { |
||||
return method; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/29 |
||||
*/ |
||||
public class DelayInfoPush { |
||||
|
||||
private Integer sdrCmdDelay; |
||||
|
||||
private List<LiveviewDelay> liveviewDelayList; |
||||
|
||||
public DelayInfoPush() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "DelayInfoPush{" + |
||||
"sdrCmdDelay=" + sdrCmdDelay + |
||||
", liveviewDelayList=" + liveviewDelayList + |
||||
'}'; |
||||
} |
||||
|
||||
public Integer getSdrCmdDelay() { |
||||
return sdrCmdDelay; |
||||
} |
||||
|
||||
public DelayInfoPush setSdrCmdDelay(Integer sdrCmdDelay) { |
||||
this.sdrCmdDelay = sdrCmdDelay; |
||||
return this; |
||||
} |
||||
|
||||
public List<LiveviewDelay> getLiveviewDelayList() { |
||||
return liveviewDelayList; |
||||
} |
||||
|
||||
public DelayInfoPush setLiveviewDelayList(List<LiveviewDelay> liveviewDelayList) { |
||||
this.liveviewDelayList = liveviewDelayList; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,75 @@
@@ -0,0 +1,75 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.Valid; |
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2023/1/12 |
||||
*/ |
||||
public class DrcModeEnterRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
@Valid |
||||
private DrcModeMqttBroker mqttBroker; |
||||
|
||||
/** |
||||
* range: 1 - 30 |
||||
*/ |
||||
@Min(1) |
||||
@Max(30) |
||||
@NotNull |
||||
private Integer osdFrequency; |
||||
|
||||
/** |
||||
* range: 1 - 30 |
||||
*/ |
||||
@Min(1) |
||||
@Max(30) |
||||
@NotNull |
||||
private Integer hsiFrequency; |
||||
|
||||
public DrcModeEnterRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "DrcModeEnterRequest{" + |
||||
"mqttBroker=" + mqttBroker + |
||||
", osdFrequency=" + osdFrequency + |
||||
", hsiFrequency=" + hsiFrequency + |
||||
'}'; |
||||
} |
||||
|
||||
public DrcModeMqttBroker getMqttBroker() { |
||||
return mqttBroker; |
||||
} |
||||
|
||||
public DrcModeEnterRequest setMqttBroker(DrcModeMqttBroker mqttBroker) { |
||||
this.mqttBroker = mqttBroker; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getOsdFrequency() { |
||||
return osdFrequency; |
||||
} |
||||
|
||||
public DrcModeEnterRequest setOsdFrequency(Integer osdFrequency) { |
||||
this.osdFrequency = osdFrequency; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getHsiFrequency() { |
||||
return hsiFrequency; |
||||
} |
||||
|
||||
public DrcModeEnterRequest setHsiFrequency(Integer hsiFrequency) { |
||||
this.hsiFrequency = hsiFrequency; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,102 @@
@@ -0,0 +1,102 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2023/1/11 |
||||
*/ |
||||
public class DrcModeMqttBroker { |
||||
|
||||
@NotNull |
||||
private String address; |
||||
|
||||
@NotNull |
||||
private String username; |
||||
|
||||
@NotNull |
||||
private String password; |
||||
|
||||
@NotNull |
||||
private String clientId; |
||||
|
||||
@NotNull |
||||
@Min(1234567890) |
||||
@Max(9999999999L) |
||||
private Long expireTime; |
||||
|
||||
@NotNull |
||||
private Boolean enableTls; |
||||
|
||||
public DrcModeMqttBroker() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "DrcModeMqttBroker{" + |
||||
"address='" + address + '\'' + |
||||
", username='" + username + '\'' + |
||||
", password='" + password + '\'' + |
||||
", clientId='" + clientId + '\'' + |
||||
", expireTime=" + expireTime + |
||||
", enableTls=" + enableTls + |
||||
'}'; |
||||
} |
||||
|
||||
public String getAddress() { |
||||
return address; |
||||
} |
||||
|
||||
public DrcModeMqttBroker setAddress(String address) { |
||||
this.address = address; |
||||
return this; |
||||
} |
||||
|
||||
public String getUsername() { |
||||
return username; |
||||
} |
||||
|
||||
public DrcModeMqttBroker setUsername(String username) { |
||||
this.username = username; |
||||
return this; |
||||
} |
||||
|
||||
public String getPassword() { |
||||
return password; |
||||
} |
||||
|
||||
public DrcModeMqttBroker setPassword(String password) { |
||||
this.password = password; |
||||
return this; |
||||
} |
||||
|
||||
public String getClientId() { |
||||
return clientId; |
||||
} |
||||
|
||||
public DrcModeMqttBroker setClientId(String clientId) { |
||||
this.clientId = clientId; |
||||
return this; |
||||
} |
||||
|
||||
public Long getExpireTime() { |
||||
return expireTime; |
||||
} |
||||
|
||||
public DrcModeMqttBroker setExpireTime(Long expireTime) { |
||||
this.expireTime = expireTime; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getEnableTls() { |
||||
return enableTls; |
||||
} |
||||
|
||||
public DrcModeMqttBroker setEnableTls(Boolean enableTls) { |
||||
this.enableTls = enableTls; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,52 @@
@@ -0,0 +1,52 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.common.IErrorInfo; |
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/17 |
||||
*/ |
||||
public enum DrcStatusErrorEnum implements IErrorInfo { |
||||
|
||||
SUCCESS(0, "success"), |
||||
|
||||
MQTT_ERR(514300, "The mqtt connection error."), |
||||
|
||||
HEARTBEAT_TIMEOUT(514301, "The heartbeat times out and the dock disconnects."), |
||||
|
||||
MQTT_CERTIFICATE_ERR(514302, "The mqtt certificate is abnormal and the connection fails."), |
||||
|
||||
MQTT_LOST(514303, "The dock network is abnormal and the mqtt connection is lost."), |
||||
|
||||
MQTT_REFUSE(514304, "The dock connection to mqtt server was refused."); |
||||
|
||||
private final String msg; |
||||
|
||||
private final int code; |
||||
|
||||
DrcStatusErrorEnum(int code, String msg) { |
||||
this.code = code; |
||||
this.msg = msg; |
||||
} |
||||
|
||||
@Override |
||||
public String getMessage() { |
||||
return msg; |
||||
} |
||||
|
||||
@Override |
||||
public Integer getCode() { |
||||
return code; |
||||
} |
||||
|
||||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING) |
||||
public static DrcStatusErrorEnum find(int code) { |
||||
return Arrays.stream(values()).filter(error -> error.code == code).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(DrcStatusErrorEnum.class, code)); |
||||
} |
||||
} |
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.DrcStateEnum; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/17 |
||||
*/ |
||||
public class DrcStatusNotify { |
||||
|
||||
private DrcStatusErrorEnum result; |
||||
|
||||
private DrcStateEnum drcState; |
||||
|
||||
public DrcStatusNotify() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "DrcStatusNotify{" + |
||||
"result=" + result + |
||||
", drcState=" + drcState + |
||||
'}'; |
||||
} |
||||
|
||||
public DrcStatusErrorEnum getResult() { |
||||
return result; |
||||
} |
||||
|
||||
public DrcStatusNotify setResult(DrcStatusErrorEnum result) { |
||||
this.result = result; |
||||
return this; |
||||
} |
||||
|
||||
public DrcStateEnum getDrcState() { |
||||
return drcState; |
||||
} |
||||
|
||||
public DrcStatusNotify setDrcState(DrcStateEnum drcState) { |
||||
this.drcState = drcState; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,121 @@
@@ -0,0 +1,121 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/29 |
||||
*/ |
||||
public class DroneControlRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private Long seq; |
||||
|
||||
@Min(-17) |
||||
@Max(17) |
||||
private Float x; |
||||
|
||||
@Min(-17) |
||||
@Max(17) |
||||
private Float y; |
||||
|
||||
@Min(-4) |
||||
@Max(5) |
||||
private Float h; |
||||
|
||||
@Min(-90) |
||||
@Max(90) |
||||
private Float w; |
||||
|
||||
@Min(2) |
||||
@Max(10) |
||||
private Integer freq; |
||||
|
||||
@Min(100) |
||||
@Max(1000) |
||||
private Integer delayTime; |
||||
|
||||
public DroneControlRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "DroneControlRequest{" + |
||||
"seq=" + seq + |
||||
", x=" + x + |
||||
", y=" + y + |
||||
", h=" + h + |
||||
", w=" + w + |
||||
", freq=" + freq + |
||||
", delayTime=" + delayTime + |
||||
'}'; |
||||
} |
||||
|
||||
public Long getSeq() { |
||||
return seq; |
||||
} |
||||
|
||||
public DroneControlRequest setSeq(Long seq) { |
||||
this.seq = seq; |
||||
return this; |
||||
} |
||||
|
||||
public Float getX() { |
||||
return x; |
||||
} |
||||
|
||||
public DroneControlRequest setX(Float x) { |
||||
this.x = x; |
||||
return this; |
||||
} |
||||
|
||||
public Float getY() { |
||||
return y; |
||||
} |
||||
|
||||
public DroneControlRequest setY(Float y) { |
||||
this.y = y; |
||||
return this; |
||||
} |
||||
|
||||
public Float getH() { |
||||
return h; |
||||
} |
||||
|
||||
public DroneControlRequest setH(Float h) { |
||||
this.h = h; |
||||
return this; |
||||
} |
||||
|
||||
public Float getW() { |
||||
return w; |
||||
} |
||||
|
||||
public DroneControlRequest setW(Float w) { |
||||
this.w = w; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getFreq() { |
||||
return freq; |
||||
} |
||||
|
||||
public DroneControlRequest setFreq(Integer freq) { |
||||
this.freq = freq; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getDelayTime() { |
||||
return delayTime; |
||||
} |
||||
|
||||
public DroneControlRequest setDelayTime(Integer delayTime) { |
||||
this.delayTime = delayTime; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/29 |
||||
*/ |
||||
public class DroneControlResponse { |
||||
|
||||
private Long seq; |
||||
|
||||
public DroneControlResponse() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "DroneControlResponse{" + |
||||
"seq=" + seq + |
||||
'}'; |
||||
} |
||||
|
||||
public Long getSeq() { |
||||
return seq; |
||||
} |
||||
|
||||
public DroneControlResponse setSeq(Long seq) { |
||||
this.seq = seq; |
||||
return this; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public enum ExposureCameraTypeEnum { |
||||
|
||||
ZOOM("zoom"), |
||||
|
||||
WIDE("wide"); |
||||
|
||||
private final String type; |
||||
|
||||
ExposureCameraTypeEnum(String type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
@JsonValue |
||||
public String getType() { |
||||
return type; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static ExposureCameraTypeEnum find(String type) { |
||||
return Arrays.stream(values()).filter(typeEnum -> typeEnum.type.equals(type)).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(ExposureCameraTypeEnum.class, type)); |
||||
} |
||||
} |
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public enum ExposureModeEnum { |
||||
|
||||
AUTO(1), |
||||
|
||||
SHUTTER_PRIORITY(2), |
||||
|
||||
APERTURE_PRIORITY(3), |
||||
|
||||
MANUAL(4), |
||||
|
||||
; |
||||
|
||||
|
||||
private final int mode; |
||||
|
||||
ExposureModeEnum(int mode) { |
||||
this.mode = mode; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getMode() { |
||||
return mode; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static ExposureModeEnum find(int mode) { |
||||
return Arrays.stream(values()).filter(modeEnum -> modeEnum.mode == mode).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(ExposureModeEnum.class, mode)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,107 @@
@@ -0,0 +1,107 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public enum ExposureValueEnum { |
||||
|
||||
MINUS_5_DOT_0(1, "-5.0EV"), |
||||
|
||||
MINUS_4_DOT_7(2, "-4.7EV"), |
||||
|
||||
MINUS_4_DOT_3(3, "-4.3EV"), |
||||
|
||||
MINUS_4_DOT_0(4, "-4.0EV"), |
||||
|
||||
MINUS_3_DOT_7(5, "-3.7EV"), |
||||
|
||||
MINUS_3_DOT_3(6, "-3.3EV"), |
||||
|
||||
MINUS_3_DOT_0(7, "-3.0EV"), |
||||
|
||||
MINUS_2_DOT_7(8, "-2.7EV"), |
||||
|
||||
MINUS_2_DOT_3(9, "-2.3EV"), |
||||
|
||||
MINUS_2_DOT_0(10, "-2.0EV"), |
||||
|
||||
MINUS_1_DOT_7(11, "-1.7EV"), |
||||
|
||||
MINUS_1_DOT_3(12, "-1.3EV"), |
||||
|
||||
MINUS_1_DOT_0(13, "-1.0EV"), |
||||
|
||||
MINUS_0_DOT_7(14, "-0.7EV"), |
||||
|
||||
MINUS_0_DOT_3(15, "-0.3EV"), |
||||
|
||||
_0(16, "0EV"), |
||||
|
||||
_0_DOT_3(17, "0.3EV"), |
||||
|
||||
_0_DOT_7(18, "0.7EV"), |
||||
|
||||
_1_DOT_0(19, "1.0EV"), |
||||
|
||||
_1_DOT_3(20, "1.3EV"), |
||||
|
||||
_1_DOT_7(21, "1.7EV"), |
||||
|
||||
_2_DOT_0(22, "2.0EV"), |
||||
|
||||
_2_DOT_3(23, "2.3EV"), |
||||
|
||||
_2_DOT_7(24, "2.7EV"), |
||||
|
||||
_3_DOT_0(25, "3.0EV"), |
||||
|
||||
_3_DOT_3(26, "3.3EV"), |
||||
|
||||
_3_DOT_7(27, "3.7EV"), |
||||
|
||||
_4_DOT_0(28, "4.0EV"), |
||||
|
||||
_4_DOT_3(29, "4.3EV"), |
||||
|
||||
_4_DOT_7(30, "4.7EV"), |
||||
|
||||
_5_DOT_0(31, "5.0EV"), |
||||
|
||||
FIXED(255, "FIXED"), |
||||
|
||||
; |
||||
|
||||
|
||||
private final int value; |
||||
|
||||
private final String desc; |
||||
|
||||
ExposureValueEnum(int value, String desc) { |
||||
this.value = value; |
||||
this.desc = desc; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getValue() { |
||||
return value; |
||||
} |
||||
|
||||
public String getDesc() { |
||||
return desc; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static ExposureValueEnum find(int value) { |
||||
return Arrays.stream(values()).filter(valueEnum -> valueEnum.value == value).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(ExposureValueEnum.class, value)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.wayline.WaylineErrorCodeEnum; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/14 |
||||
*/ |
||||
public class FlyToPointProgress { |
||||
|
||||
private WaylineErrorCodeEnum result; |
||||
|
||||
private FlyToStatusEnum status; |
||||
|
||||
private String flyToId; |
||||
|
||||
private Integer wayPointIndex; |
||||
|
||||
public FlyToPointProgress() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "FlyToPointProgress{" + |
||||
"result=" + result + |
||||
", status=" + status + |
||||
", flyToId='" + flyToId + '\'' + |
||||
", wayPointIndex=" + wayPointIndex + |
||||
'}'; |
||||
} |
||||
|
||||
public WaylineErrorCodeEnum getResult() { |
||||
return result; |
||||
} |
||||
|
||||
public FlyToPointProgress setResult(WaylineErrorCodeEnum result) { |
||||
this.result = result; |
||||
return this; |
||||
} |
||||
|
||||
public FlyToStatusEnum getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public FlyToPointProgress setStatus(FlyToStatusEnum status) { |
||||
this.status = status; |
||||
return this; |
||||
} |
||||
|
||||
public String getFlyToId() { |
||||
return flyToId; |
||||
} |
||||
|
||||
public FlyToPointProgress setFlyToId(String flyToId) { |
||||
this.flyToId = flyToId; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getWayPointIndex() { |
||||
return wayPointIndex; |
||||
} |
||||
|
||||
public FlyToPointProgress setWayPointIndex(Integer wayPointIndex) { |
||||
this.wayPointIndex = wayPointIndex; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,70 @@
@@ -0,0 +1,70 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.Valid; |
||||
import javax.validation.constraints.*; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2023/2/14 |
||||
*/ |
||||
public class FlyToPointRequest extends BaseModel { |
||||
|
||||
@Pattern(regexp = "^[^<>:\"/|?*._\\\\]+$") |
||||
@NotNull |
||||
private String flyToId; |
||||
|
||||
@Min(1) |
||||
@Max(15) |
||||
@NotNull |
||||
private Integer maxSpeed; |
||||
|
||||
/** |
||||
* The M30 series only support one point. |
||||
*/ |
||||
@Size(min = 1) |
||||
@NotNull |
||||
private List<@Valid Point> points; |
||||
|
||||
public FlyToPointRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "FlyToPointRequest{" + |
||||
"flyToId='" + flyToId + '\'' + |
||||
", maxSpeed=" + maxSpeed + |
||||
", points=" + points + |
||||
'}'; |
||||
} |
||||
|
||||
public String getFlyToId() { |
||||
return flyToId; |
||||
} |
||||
|
||||
public FlyToPointRequest setFlyToId(String flyToId) { |
||||
this.flyToId = flyToId; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getMaxSpeed() { |
||||
return maxSpeed; |
||||
} |
||||
|
||||
public FlyToPointRequest setMaxSpeed(Integer maxSpeed) { |
||||
this.maxSpeed = maxSpeed; |
||||
return this; |
||||
} |
||||
|
||||
public List<Point> getPoints() { |
||||
return points; |
||||
} |
||||
|
||||
public FlyToPointRequest setPoints(List<Point> points) { |
||||
this.points = points; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,59 @@
@@ -0,0 +1,59 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.Valid; |
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
import javax.validation.constraints.Size; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class FlyToPointUpdateRequest extends BaseModel { |
||||
|
||||
@Min(1) |
||||
@Max(15) |
||||
@NotNull |
||||
private Integer maxSpeed; |
||||
|
||||
/** |
||||
* The M30 series only support one point. |
||||
*/ |
||||
@Size(min = 1, max = 1) |
||||
@NotNull |
||||
private List<@Valid Point> points; |
||||
|
||||
public FlyToPointUpdateRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "FlyToPointUpdateRequest{" + |
||||
"maxSpeed=" + maxSpeed + |
||||
", points=" + points + |
||||
'}'; |
||||
} |
||||
|
||||
public Integer getMaxSpeed() { |
||||
return maxSpeed; |
||||
} |
||||
|
||||
public FlyToPointUpdateRequest setMaxSpeed(Integer maxSpeed) { |
||||
this.maxSpeed = maxSpeed; |
||||
return this; |
||||
} |
||||
|
||||
public List<Point> getPoints() { |
||||
return points; |
||||
} |
||||
|
||||
public FlyToPointUpdateRequest setPoints(List<Point> points) { |
||||
this.points = points; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,47 @@
@@ -0,0 +1,47 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/14 |
||||
*/ |
||||
public enum FlyToStatusEnum { |
||||
|
||||
WAYLINE_PROGRESS("wayline_progress", "The FlyTo job is in progress."), |
||||
|
||||
WAYLINE_FAILED("wayline_failed", "The FlyTo job execution failed."), |
||||
|
||||
WAYLINE_OK("wayline_ok", "The FlyTo job executed successfully."), |
||||
|
||||
WAYLINE_CANCEL("wayline_cancel", "The FlyTo job is closed."); |
||||
|
||||
private final String status; |
||||
|
||||
private final String message; |
||||
|
||||
FlyToStatusEnum(String status, String message) { |
||||
this.status = status; |
||||
this.message = message; |
||||
} |
||||
|
||||
public String getMessage() { |
||||
return message; |
||||
} |
||||
|
||||
@JsonValue |
||||
public String getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING) |
||||
public static FlyToStatusEnum find(String status) { |
||||
return Arrays.stream(values()).filter(statusEnum -> statusEnum.status.equals(status)).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(FlyToStatusEnum.class, status)); |
||||
} |
||||
} |
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public enum FocusModeEnum { |
||||
|
||||
MF(0), |
||||
|
||||
AFS(1), |
||||
|
||||
AFC(2), |
||||
|
||||
; |
||||
private final int mode; |
||||
|
||||
FocusModeEnum(int mode) { |
||||
this.mode = mode; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getMode() { |
||||
return mode; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static FocusModeEnum find(int mode) { |
||||
return Arrays.stream(values()).filter(modeEnum -> modeEnum.mode == mode).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(FocusModeEnum.class, mode)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/13 |
||||
*/ |
||||
public enum GimbalResetModeEnum { |
||||
|
||||
RECENTER(0), |
||||
|
||||
DOWN(1), |
||||
|
||||
RECENTER_PAN(2), |
||||
|
||||
PITCH_DOWN(3); |
||||
|
||||
private final int mode; |
||||
|
||||
GimbalResetModeEnum(int mode) { |
||||
this.mode = mode; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getMode() { |
||||
return mode; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static GimbalResetModeEnum find(int mode) { |
||||
return Arrays.stream(values()).filter(resetModeEnum -> resetModeEnum.ordinal() == mode).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(GimbalResetModeEnum.class, mode)); |
||||
} |
||||
} |
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/1 |
||||
*/ |
||||
public class GimbalResetRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
@NotNull |
||||
private GimbalResetModeEnum resetMode; |
||||
|
||||
public GimbalResetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "GimbalResetRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", resetMode=" + resetMode + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public GimbalResetRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public GimbalResetModeEnum getResetMode() { |
||||
return resetMode; |
||||
} |
||||
|
||||
public GimbalResetRequest setResetMode(GimbalResetModeEnum resetMode) { |
||||
this.resetMode = resetMode; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/29 |
||||
*/ |
||||
public class HeartBeatRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private Long seq; |
||||
|
||||
@NotNull |
||||
@Min(123456789012L) |
||||
private Long timestamp; |
||||
|
||||
public HeartBeatRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "HeartBeatRequest{" + |
||||
"seq=" + seq + |
||||
", timestamp=" + timestamp + |
||||
'}'; |
||||
} |
||||
|
||||
public Long getSeq() { |
||||
return seq; |
||||
} |
||||
|
||||
public HeartBeatRequest setSeq(Long seq) { |
||||
this.seq = seq; |
||||
return this; |
||||
} |
||||
|
||||
public Long getTimestamp() { |
||||
return timestamp; |
||||
} |
||||
|
||||
public HeartBeatRequest setTimestamp(Long timestamp) { |
||||
this.timestamp = timestamp; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,248 @@
@@ -0,0 +1,248 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/29 |
||||
*/ |
||||
public class HsiInfoPush { |
||||
|
||||
private Integer upDistance; |
||||
|
||||
private Integer downDistance; |
||||
|
||||
private List<Integer> aroundDistance; |
||||
|
||||
private Boolean upEnable; |
||||
|
||||
private Boolean upWork; |
||||
|
||||
private Boolean downEnable; |
||||
|
||||
private Boolean downWork; |
||||
|
||||
private Boolean leftEnable; |
||||
|
||||
private Boolean leftWork; |
||||
|
||||
private Boolean rightEnable; |
||||
|
||||
private Boolean rightWork; |
||||
|
||||
private Boolean frontEnable; |
||||
|
||||
private Boolean frontWork; |
||||
|
||||
private Boolean backEnable; |
||||
|
||||
private Boolean backWork; |
||||
|
||||
private Boolean verticalEnable; |
||||
|
||||
private Boolean verticalWork; |
||||
|
||||
private Boolean horizontalEnable; |
||||
|
||||
private Boolean horizontalWork; |
||||
|
||||
public HsiInfoPush() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "HsiInfoPush{" + |
||||
"upDistance=" + upDistance + |
||||
", downDistance=" + downDistance + |
||||
", aroundDistance=" + aroundDistance + |
||||
", upEnable=" + upEnable + |
||||
", upWork=" + upWork + |
||||
", downEnable=" + downEnable + |
||||
", downWork=" + downWork + |
||||
", leftEnable=" + leftEnable + |
||||
", leftWork=" + leftWork + |
||||
", rightEnable=" + rightEnable + |
||||
", rightWork=" + rightWork + |
||||
", frontEnable=" + frontEnable + |
||||
", frontWork=" + frontWork + |
||||
", backEnable=" + backEnable + |
||||
", backWork=" + backWork + |
||||
", verticalEnable=" + verticalEnable + |
||||
", verticalWork=" + verticalWork + |
||||
", horizontalEnable=" + horizontalEnable + |
||||
", horizontalWork=" + horizontalWork + |
||||
'}'; |
||||
} |
||||
|
||||
public Integer getUpDistance() { |
||||
return upDistance; |
||||
} |
||||
|
||||
public HsiInfoPush setUpDistance(Integer upDistance) { |
||||
this.upDistance = upDistance; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getDownDistance() { |
||||
return downDistance; |
||||
} |
||||
|
||||
public HsiInfoPush setDownDistance(Integer downDistance) { |
||||
this.downDistance = downDistance; |
||||
return this; |
||||
} |
||||
|
||||
public List<Integer> getAroundDistance() { |
||||
return aroundDistance; |
||||
} |
||||
|
||||
public HsiInfoPush setAroundDistance(List<Integer> aroundDistance) { |
||||
this.aroundDistance = aroundDistance; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getUpEnable() { |
||||
return upEnable; |
||||
} |
||||
|
||||
public HsiInfoPush setUpEnable(Boolean upEnable) { |
||||
this.upEnable = upEnable; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getUpWork() { |
||||
return upWork; |
||||
} |
||||
|
||||
public HsiInfoPush setUpWork(Boolean upWork) { |
||||
this.upWork = upWork; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getDownEnable() { |
||||
return downEnable; |
||||
} |
||||
|
||||
public HsiInfoPush setDownEnable(Boolean downEnable) { |
||||
this.downEnable = downEnable; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getDownWork() { |
||||
return downWork; |
||||
} |
||||
|
||||
public HsiInfoPush setDownWork(Boolean downWork) { |
||||
this.downWork = downWork; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getLeftEnable() { |
||||
return leftEnable; |
||||
} |
||||
|
||||
public HsiInfoPush setLeftEnable(Boolean leftEnable) { |
||||
this.leftEnable = leftEnable; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getLeftWork() { |
||||
return leftWork; |
||||
} |
||||
|
||||
public HsiInfoPush setLeftWork(Boolean leftWork) { |
||||
this.leftWork = leftWork; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getRightEnable() { |
||||
return rightEnable; |
||||
} |
||||
|
||||
public HsiInfoPush setRightEnable(Boolean rightEnable) { |
||||
this.rightEnable = rightEnable; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getRightWork() { |
||||
return rightWork; |
||||
} |
||||
|
||||
public HsiInfoPush setRightWork(Boolean rightWork) { |
||||
this.rightWork = rightWork; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getFrontEnable() { |
||||
return frontEnable; |
||||
} |
||||
|
||||
public HsiInfoPush setFrontEnable(Boolean frontEnable) { |
||||
this.frontEnable = frontEnable; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getFrontWork() { |
||||
return frontWork; |
||||
} |
||||
|
||||
public HsiInfoPush setFrontWork(Boolean frontWork) { |
||||
this.frontWork = frontWork; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getBackEnable() { |
||||
return backEnable; |
||||
} |
||||
|
||||
public HsiInfoPush setBackEnable(Boolean backEnable) { |
||||
this.backEnable = backEnable; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getBackWork() { |
||||
return backWork; |
||||
} |
||||
|
||||
public HsiInfoPush setBackWork(Boolean backWork) { |
||||
this.backWork = backWork; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getVerticalEnable() { |
||||
return verticalEnable; |
||||
} |
||||
|
||||
public HsiInfoPush setVerticalEnable(Boolean verticalEnable) { |
||||
this.verticalEnable = verticalEnable; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getVerticalWork() { |
||||
return verticalWork; |
||||
} |
||||
|
||||
public HsiInfoPush setVerticalWork(Boolean verticalWork) { |
||||
this.verticalWork = verticalWork; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getHorizontalEnable() { |
||||
return horizontalEnable; |
||||
} |
||||
|
||||
public HsiInfoPush setHorizontalEnable(Boolean horizontalEnable) { |
||||
this.horizontalEnable = horizontalEnable; |
||||
return this; |
||||
} |
||||
|
||||
public Boolean getHorizontalWork() { |
||||
return horizontalWork; |
||||
} |
||||
|
||||
public HsiInfoPush setHorizontalWork(Boolean horizontalWork) { |
||||
this.horizontalWork = horizontalWork; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,116 @@
@@ -0,0 +1,116 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class IrMeteringAreaSetRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
/** |
||||
* The coordinate x of the temperature measurement point is the upper left corner of the lens as the coordinate center point, and the horizontal direction is x. |
||||
*/ |
||||
@NotNull |
||||
@Min(0) |
||||
@Max(1) |
||||
private Float x; |
||||
|
||||
/** |
||||
* The coordinate y of the temperature measurement point is the upper left corner of the lens as the coordinate center point, and the vertical direction is y. |
||||
*/ |
||||
@NotNull |
||||
@Min(0) |
||||
@Max(1) |
||||
private Float y; |
||||
|
||||
/** |
||||
* Temperature measurement area width |
||||
*/ |
||||
@NotNull |
||||
@Min(0) |
||||
@Max(1) |
||||
private Float width; |
||||
|
||||
/** |
||||
* Temperature measurement area height |
||||
*/ |
||||
@NotNull |
||||
@Min(0) |
||||
@Max(1) |
||||
private Float height; |
||||
|
||||
public IrMeteringAreaSetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "IrMeteringAreaSetRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", x=" + x + |
||||
", y=" + y + |
||||
", width=" + width + |
||||
", height=" + height + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public IrMeteringAreaSetRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public Float getX() { |
||||
return x; |
||||
} |
||||
|
||||
public IrMeteringAreaSetRequest setX(Float x) { |
||||
this.x = x; |
||||
return this; |
||||
} |
||||
|
||||
public Float getY() { |
||||
return y; |
||||
} |
||||
|
||||
public IrMeteringAreaSetRequest setY(Float y) { |
||||
this.y = y; |
||||
return this; |
||||
} |
||||
|
||||
public Float getWidth() { |
||||
return width; |
||||
} |
||||
|
||||
public IrMeteringAreaSetRequest setWidth(Float width) { |
||||
this.width = width; |
||||
return this; |
||||
} |
||||
|
||||
public Float getHeight() { |
||||
return height; |
||||
} |
||||
|
||||
public IrMeteringAreaSetRequest setHeight(Float height) { |
||||
this.height = height; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class IrMeteringModeSetRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
@NotNull |
||||
private MeteringModeEnum mode; |
||||
|
||||
public IrMeteringModeSetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "IrMeteringModeSetRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", mode=" + mode + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public IrMeteringModeSetRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public MeteringModeEnum getMode() { |
||||
return mode; |
||||
} |
||||
|
||||
public IrMeteringModeSetRequest setMode(MeteringModeEnum mode) { |
||||
this.mode = mode; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,80 @@
@@ -0,0 +1,80 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class IrMeteringPointSetRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
/** |
||||
* The coordinate x of the temperature measurement point is the upper left corner of the lens as the coordinate center point, and the horizontal direction is x. |
||||
*/ |
||||
@NotNull |
||||
@Min(0) |
||||
@Max(1) |
||||
private Float x; |
||||
|
||||
/** |
||||
* The coordinate y of the temperature measurement point is the upper left corner of the lens as the coordinate center point, and the vertical direction is y. |
||||
*/ |
||||
@NotNull |
||||
@Min(0) |
||||
@Max(1) |
||||
private Float y; |
||||
|
||||
public IrMeteringPointSetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "IrMeteringPointSetRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", x=" + x + |
||||
", y=" + y + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public IrMeteringPointSetRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public Float getX() { |
||||
return x; |
||||
} |
||||
|
||||
public IrMeteringPointSetRequest setX(Float x) { |
||||
this.x = x; |
||||
return this; |
||||
} |
||||
|
||||
public Float getY() { |
||||
return y; |
||||
} |
||||
|
||||
public IrMeteringPointSetRequest setY(Float y) { |
||||
this.y = y; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/14 |
||||
*/ |
||||
public class JoystickInvalidNotify { |
||||
|
||||
private JoystickInvalidReasonEnum reason; |
||||
|
||||
public JoystickInvalidNotify() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "JoystickInvalidNotify{" + |
||||
"reason=" + reason + |
||||
'}'; |
||||
} |
||||
|
||||
public JoystickInvalidReasonEnum getReason() { |
||||
return reason; |
||||
} |
||||
|
||||
public JoystickInvalidNotify setReason(JoystickInvalidReasonEnum reason) { |
||||
this.reason = reason; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/14 |
||||
*/ |
||||
public enum JoystickInvalidReasonEnum { |
||||
|
||||
RC_LOST(0, "The remote controller is lost."), |
||||
|
||||
BATTERY_LOW_GO_HOME(1, "Due to low battery, the drone automatically returned home."), |
||||
|
||||
BATTERY_SUPER_LOW_LANDING(2, "Due to the serious low battery, the drone landed automatically."), |
||||
|
||||
NEAR_BOUNDARY(3, "The drone is near a not-fly zone."), |
||||
|
||||
RC_AUTHORITY(4, "The remote controller grabs control authority."); |
||||
|
||||
private final int reason; |
||||
|
||||
private final String message; |
||||
|
||||
JoystickInvalidReasonEnum(int reason, String message) { |
||||
this.reason = reason; |
||||
this.message = message; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getVal() { |
||||
return reason; |
||||
} |
||||
|
||||
public String getMessage() { |
||||
return message; |
||||
} |
||||
|
||||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING) |
||||
public static JoystickInvalidReasonEnum find(int reason) { |
||||
return Arrays.stream(values()).filter(reasonEnum -> reasonEnum.reason == reason).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(JoystickInvalidReasonEnum.class, reason)); |
||||
} |
||||
} |
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/12 |
||||
*/ |
||||
public enum LensStorageSettingsEnum { |
||||
|
||||
CURRENT("current"), |
||||
|
||||
ZOOM("zoom"), |
||||
|
||||
WIDE("wide"), |
||||
|
||||
VISION("vision"), |
||||
|
||||
INFRARED("ir"); |
||||
|
||||
private final String lens; |
||||
|
||||
LensStorageSettingsEnum(String lens) { |
||||
this.lens = lens; |
||||
} |
||||
|
||||
@JsonValue |
||||
public String getLens() { |
||||
return lens; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static LensStorageSettingsEnum find(String lens) { |
||||
return Arrays.stream(values()).filter(lensEnum -> lensEnum.lens.equals(lens)).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(LensStorageSettingsEnum.class, lens)); |
||||
} |
||||
} |
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.VideoId; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/29 |
||||
*/ |
||||
public class LiveviewDelay { |
||||
|
||||
private Integer liveviewDelayTime; |
||||
|
||||
private VideoId videoId; |
||||
|
||||
public LiveviewDelay() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "LiveviewDelay{" + |
||||
"liveviewDelayTime=" + liveviewDelayTime + |
||||
", videoId=" + videoId + |
||||
'}'; |
||||
} |
||||
|
||||
public Integer getLiveviewDelayTime() { |
||||
return liveviewDelayTime; |
||||
} |
||||
|
||||
public LiveviewDelay setLiveviewDelayTime(Integer liveviewDelayTime) { |
||||
this.liveviewDelayTime = liveviewDelayTime; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public enum MeteringModeEnum { |
||||
|
||||
DISABLE(0), |
||||
|
||||
SPOT(1), |
||||
|
||||
AREA(2), |
||||
|
||||
; |
||||
|
||||
private final int mode; |
||||
|
||||
MeteringModeEnum(int mode) { |
||||
this.mode = mode; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getMode() { |
||||
return mode; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static MeteringModeEnum find(int mode) { |
||||
return Arrays.stream(values()).filter(modeEnum -> modeEnum.mode == mode).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(MeteringModeEnum.class, mode)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,138 @@
@@ -0,0 +1,138 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/29 |
||||
*/ |
||||
public class OsdInfoPush { |
||||
|
||||
private Float attitudeHead; |
||||
|
||||
private Float latitude; |
||||
|
||||
private Float longitude; |
||||
|
||||
private Float height; |
||||
|
||||
private Float speedX; |
||||
|
||||
private Float speedY; |
||||
|
||||
private Float speedZ; |
||||
|
||||
private Float gimbalPitch; |
||||
|
||||
private Float gimbalRoll; |
||||
|
||||
private Float gimbalYaw; |
||||
|
||||
public OsdInfoPush() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "OsdInfoPush{" + |
||||
"attitudeHead=" + attitudeHead + |
||||
", latitude=" + latitude + |
||||
", longitude=" + longitude + |
||||
", height=" + height + |
||||
", speedX=" + speedX + |
||||
", speedY=" + speedY + |
||||
", speedZ=" + speedZ + |
||||
", gimbalPitch=" + gimbalPitch + |
||||
", gimbalRoll=" + gimbalRoll + |
||||
", gimbalYaw=" + gimbalYaw + |
||||
'}'; |
||||
} |
||||
|
||||
public Float getAttitudeHead() { |
||||
return attitudeHead; |
||||
} |
||||
|
||||
public OsdInfoPush setAttitudeHead(Float attitudeHead) { |
||||
this.attitudeHead = attitudeHead; |
||||
return this; |
||||
} |
||||
|
||||
public Float getLatitude() { |
||||
return latitude; |
||||
} |
||||
|
||||
public OsdInfoPush setLatitude(Float latitude) { |
||||
this.latitude = latitude; |
||||
return this; |
||||
} |
||||
|
||||
public Float getLongitude() { |
||||
return longitude; |
||||
} |
||||
|
||||
public OsdInfoPush setLongitude(Float longitude) { |
||||
this.longitude = longitude; |
||||
return this; |
||||
} |
||||
|
||||
public Float getHeight() { |
||||
return height; |
||||
} |
||||
|
||||
public OsdInfoPush setHeight(Float height) { |
||||
this.height = height; |
||||
return this; |
||||
} |
||||
|
||||
public Float getSpeedX() { |
||||
return speedX; |
||||
} |
||||
|
||||
public OsdInfoPush setSpeedX(Float speedX) { |
||||
this.speedX = speedX; |
||||
return this; |
||||
} |
||||
|
||||
public Float getSpeedY() { |
||||
return speedY; |
||||
} |
||||
|
||||
public OsdInfoPush setSpeedY(Float speedY) { |
||||
this.speedY = speedY; |
||||
return this; |
||||
} |
||||
|
||||
public Float getSpeedZ() { |
||||
return speedZ; |
||||
} |
||||
|
||||
public OsdInfoPush setSpeedZ(Float speedZ) { |
||||
this.speedZ = speedZ; |
||||
return this; |
||||
} |
||||
|
||||
public Float getGimbalPitch() { |
||||
return gimbalPitch; |
||||
} |
||||
|
||||
public OsdInfoPush setGimbalPitch(Float gimbalPitch) { |
||||
this.gimbalPitch = gimbalPitch; |
||||
return this; |
||||
} |
||||
|
||||
public Float getGimbalRoll() { |
||||
return gimbalRoll; |
||||
} |
||||
|
||||
public OsdInfoPush setGimbalRoll(Float gimbalRoll) { |
||||
this.gimbalRoll = gimbalRoll; |
||||
return this; |
||||
} |
||||
|
||||
public Float getGimbalYaw() { |
||||
return gimbalYaw; |
||||
} |
||||
|
||||
public OsdInfoPush setGimbalYaw(Float gimbalYaw) { |
||||
this.gimbalYaw = gimbalYaw; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/29 |
||||
*/ |
||||
public class PayloadAuthorityGrabRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
public PayloadAuthorityGrabRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "PayloadAuthorityGrabRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public PayloadAuthorityGrabRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,78 @@
@@ -0,0 +1,78 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/2 |
||||
*/ |
||||
public enum PayloadControlMethodEnum { |
||||
|
||||
CAMERA_MODE_SWITCH(ControlMethodEnum.CAMERA_MODE_SWITCH, CameraModeSwitchRequest.class), |
||||
|
||||
CAMERA_PHOTO_TAKE(ControlMethodEnum.CAMERA_PHOTO_TAKE, CameraPhotoTakeRequest.class), |
||||
|
||||
CAMERA_PHOTO_STOP(ControlMethodEnum.CAMERA_PHOTO_STOP, CameraPhotoStopRequest.class), |
||||
|
||||
CAMERA_RECORDING_START(ControlMethodEnum.CAMERA_RECORDING_START, CameraRecordingStartRequest.class), |
||||
|
||||
CAMERA_RECORDING_STOP(ControlMethodEnum.CAMERA_RECORDING_STOP, CameraRecordingStopRequest.class), |
||||
|
||||
CAMERA_AIM(ControlMethodEnum.CAMERA_AIM, CameraAimRequest.class), |
||||
|
||||
CAMERA_FOCAL_LENGTH_SET(ControlMethodEnum.CAMERA_FOCAL_LENGTH_SET, CameraFocalLengthSetRequest.class), |
||||
|
||||
GIMBAL_RESET(ControlMethodEnum.GIMBAL_RESET, GimbalResetRequest.class), |
||||
|
||||
CAMERA_LOOK_AT(ControlMethodEnum.CAMERA_LOOK_AT, CameraLookAtRequest.class), |
||||
|
||||
CAMERA_SCREEN_SPLIT(ControlMethodEnum.CAMERA_SCREEN_SPLIT, CameraScreenSplitRequest.class), |
||||
|
||||
PHOTO_STORAGE_SET(ControlMethodEnum.PHOTO_STORAGE_SET, PhotoStorageSetRequest.class), |
||||
|
||||
VIDEO_STORAGE_SET(ControlMethodEnum.VIDEO_STORAGE_SET, VideoStorageSetRequest.class), |
||||
|
||||
CAMERA_EXPOSURE_SET(ControlMethodEnum.CAMERA_EXPOSURE_SET, CameraExposureSetRequest.class), |
||||
|
||||
CAMERA_EXPOSURE_MODE_SET(ControlMethodEnum.CAMERA_EXPOSURE_MODE_SET, CameraExposureModeSetRequest.class), |
||||
|
||||
CAMERA_FOCUS_MODE_SET(ControlMethodEnum.CAMERA_FOCUS_MODE_SET, CameraFocusModeSetRequest.class), |
||||
|
||||
CAMERA_FOCUS_VALUE_SET(ControlMethodEnum.CAMERA_FOCUS_VALUE_SET, CameraFocusValueSetRequest.class), |
||||
|
||||
IR_METERING_MODE_SET(ControlMethodEnum.IR_METERING_MODE_SET, IrMeteringModeSetRequest.class), |
||||
|
||||
IR_METERING_POINT_SET(ControlMethodEnum.IR_METERING_POINT_SET, IrMeteringPointSetRequest.class), |
||||
|
||||
IR_METERING_AREA_SET(ControlMethodEnum.IR_METERING_AREA_SET, IrMeteringAreaSetRequest.class), |
||||
|
||||
CAMERA_POINT_FOCUS_ACTION(ControlMethodEnum.CAMERA_POINT_FOCUS_ACTION, CameraPointFocusActionRequest.class), |
||||
|
||||
; |
||||
|
||||
private final ControlMethodEnum payloadMethod; |
||||
|
||||
private final Class<? extends BaseModel> clazz; |
||||
|
||||
PayloadControlMethodEnum(ControlMethodEnum payloadMethod, Class<? extends BaseModel> clazz) { |
||||
this.payloadMethod = payloadMethod; |
||||
this.clazz = clazz; |
||||
} |
||||
|
||||
public ControlMethodEnum getPayloadMethod() { |
||||
return payloadMethod; |
||||
} |
||||
|
||||
public Class<? extends BaseModel> getClazz() { |
||||
return clazz; |
||||
} |
||||
|
||||
public static PayloadControlMethodEnum find(String method) { |
||||
return Arrays.stream(values()).filter(methodEnum -> methodEnum.payloadMethod.getMethod().equals(method)).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(PayloadControlMethodEnum.class, method)); |
||||
} |
||||
} |
@ -0,0 +1,61 @@
@@ -0,0 +1,61 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
import javax.validation.constraints.Size; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/12 |
||||
*/ |
||||
public class PhotoStorageSetRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
/** |
||||
* Photo storage type. Multi-selection. |
||||
*/ |
||||
@NotNull |
||||
@Size(min = 1) |
||||
private List<LensStorageSettingsEnum> photoStorageSettings; |
||||
|
||||
public PhotoStorageSetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "PhotoStorageSetRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", photoStorageSettings=" + photoStorageSettings + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public PhotoStorageSetRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public List<LensStorageSettingsEnum> getPhotoStorageSettings() { |
||||
return photoStorageSettings; |
||||
} |
||||
|
||||
public PhotoStorageSetRequest setPhotoStorageSettings(List<LensStorageSettingsEnum> photoStorageSettings) { |
||||
this.photoStorageSettings = photoStorageSettings; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class PhotoTakeProgressData { |
||||
|
||||
private PhotoTakeProgressStepEnum currentStep; |
||||
|
||||
private Integer percent; |
||||
|
||||
public PhotoTakeProgressData() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "PhotoTakeProgressData{" + |
||||
"currentStep=" + currentStep + |
||||
", percent=" + percent + |
||||
'}'; |
||||
} |
||||
|
||||
public PhotoTakeProgressStepEnum getCurrentStep() { |
||||
return currentStep; |
||||
} |
||||
|
||||
public PhotoTakeProgressData setCurrentStep(PhotoTakeProgressStepEnum currentStep) { |
||||
this.currentStep = currentStep; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getPercent() { |
||||
return percent; |
||||
} |
||||
|
||||
public PhotoTakeProgressData setPercent(Integer percent) { |
||||
this.percent = percent; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.CameraModeEnum; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class PhotoTakeProgressExt { |
||||
|
||||
private CameraModeEnum cameraMode; |
||||
|
||||
public PhotoTakeProgressExt() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "PhotoTakeProgressExt{" + |
||||
"cameraMode=" + cameraMode + |
||||
'}'; |
||||
} |
||||
|
||||
public CameraModeEnum getCameraMode() { |
||||
return cameraMode; |
||||
} |
||||
|
||||
public PhotoTakeProgressExt setCameraMode(CameraModeEnum cameraMode) { |
||||
this.cameraMode = cameraMode; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public enum PhotoTakeProgressStepEnum { |
||||
|
||||
NORMAL(0), |
||||
|
||||
PANORAMA_NOT_STARTED_OR_ENDED(3000), |
||||
|
||||
PANORAMA_TAKING(3002), |
||||
|
||||
PANORAMA_COMPOSITING(3005), |
||||
|
||||
; |
||||
|
||||
private final int step; |
||||
|
||||
PhotoTakeProgressStepEnum(int step) { |
||||
this.step = step; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getStep() { |
||||
return step; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static PhotoTakeProgressStepEnum find(int step) { |
||||
return Arrays.stream(values()).filter(stepEnum -> stepEnum.step == step).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(PhotoTakeProgressStepEnum.class, step)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class PoiCircleSpeedSetRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private Float circleSpeed; |
||||
|
||||
public PoiCircleSpeedSetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "PoiCircleSpeedSetRequest{" + |
||||
"circleSpeed=" + circleSpeed + |
||||
'}'; |
||||
} |
||||
|
||||
public Float getCircleSpeed() { |
||||
return circleSpeed; |
||||
} |
||||
|
||||
public PoiCircleSpeedSetRequest setCircleSpeed(Float circleSpeed) { |
||||
this.circleSpeed = circleSpeed; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,69 @@
@@ -0,0 +1,69 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class PoiModeEnterRequest extends BaseModel { |
||||
|
||||
@Min(-90) |
||||
@Max(90) |
||||
@NotNull |
||||
private Float latitude; |
||||
|
||||
@NotNull |
||||
@Min(-180) |
||||
@Max(180) |
||||
private Float longitude; |
||||
|
||||
@NotNull |
||||
@Min(2) |
||||
@Max(10000) |
||||
private Float height; |
||||
|
||||
public PoiModeEnterRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "PoiModeEnterRequest{" + |
||||
"latitude=" + latitude + |
||||
", longitude=" + longitude + |
||||
", height=" + height + |
||||
'}'; |
||||
} |
||||
|
||||
public Float getLatitude() { |
||||
return latitude; |
||||
} |
||||
|
||||
public PoiModeEnterRequest setLatitude(Float latitude) { |
||||
this.latitude = latitude; |
||||
return this; |
||||
} |
||||
|
||||
public Float getLongitude() { |
||||
return longitude; |
||||
} |
||||
|
||||
public PoiModeEnterRequest setLongitude(Float longitude) { |
||||
this.longitude = longitude; |
||||
return this; |
||||
} |
||||
|
||||
public Float getHeight() { |
||||
return height; |
||||
} |
||||
|
||||
public PoiModeEnterRequest setHeight(Float height) { |
||||
this.height = height; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,80 @@
@@ -0,0 +1,80 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.wayline.FlighttaskStatusEnum; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public class PoiStatusNotify { |
||||
|
||||
private FlighttaskStatusEnum status; |
||||
|
||||
private PoiStatusReasonEnum reason; |
||||
|
||||
private Float circleRadius; |
||||
|
||||
private Float circleSpeed; |
||||
|
||||
private Float maxCircleSpeed; |
||||
|
||||
public PoiStatusNotify() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "PoiStatusNotify{" + |
||||
"status=" + status + |
||||
", reason=" + reason + |
||||
", circleRadius=" + circleRadius + |
||||
", circleSpeed=" + circleSpeed + |
||||
", maxCircleSpeed=" + maxCircleSpeed + |
||||
'}'; |
||||
} |
||||
|
||||
public FlighttaskStatusEnum getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public PoiStatusNotify setStatus(FlighttaskStatusEnum status) { |
||||
this.status = status; |
||||
return this; |
||||
} |
||||
|
||||
public PoiStatusReasonEnum getReason() { |
||||
return reason; |
||||
} |
||||
|
||||
public PoiStatusNotify setReason(PoiStatusReasonEnum reason) { |
||||
this.reason = reason; |
||||
return this; |
||||
} |
||||
|
||||
public Float getCircleRadius() { |
||||
return circleRadius; |
||||
} |
||||
|
||||
public PoiStatusNotify setCircleRadius(Float circleRadius) { |
||||
this.circleRadius = circleRadius; |
||||
return this; |
||||
} |
||||
|
||||
public Float getCircleSpeed() { |
||||
return circleSpeed; |
||||
} |
||||
|
||||
public PoiStatusNotify setCircleSpeed(Float circleSpeed) { |
||||
this.circleSpeed = circleSpeed; |
||||
return this; |
||||
} |
||||
|
||||
public Float getMaxCircleSpeed() { |
||||
return maxCircleSpeed; |
||||
} |
||||
|
||||
public PoiStatusNotify setMaxCircleSpeed(Float maxCircleSpeed) { |
||||
this.maxCircleSpeed = maxCircleSpeed; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.9 |
||||
* @date 2023/12/12 |
||||
*/ |
||||
public enum PoiStatusReasonEnum { |
||||
|
||||
NORMAL(0), |
||||
|
||||
UNADAPTED_PAYLOAD(1), |
||||
|
||||
CAMERA_MODE_NOT_SUPPORTED(2), |
||||
|
||||
ILLEGAL_CMD(3), |
||||
|
||||
POSITIONING_FAILED(4), |
||||
|
||||
ON_THE_GROUND(5), |
||||
|
||||
DRONE_MODE_ERROR(6), |
||||
|
||||
NOT_AVAILABLE_MODE(7), |
||||
|
||||
RC_DISCONNECTED(8), |
||||
|
||||
; |
||||
|
||||
private final int reason; |
||||
|
||||
PoiStatusReasonEnum(int reason) { |
||||
this.reason = reason; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getReason() { |
||||
return reason; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static PoiStatusReasonEnum find(int reason) { |
||||
return Arrays.stream(values()).filter(reasonEnum -> reasonEnum.reason == reason).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(PoiStatusReasonEnum.class, reason)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,71 @@
@@ -0,0 +1,71 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2023/2/14 |
||||
*/ |
||||
public class Point { |
||||
|
||||
@Min(-90) |
||||
@Max(90) |
||||
@NotNull |
||||
private Float latitude; |
||||
|
||||
@NotNull |
||||
@Min(-180) |
||||
@Max(180) |
||||
private Float longitude; |
||||
|
||||
/** |
||||
* WGS84 |
||||
* The M30 series are ellipsoidal heights. |
||||
*/ |
||||
@NotNull |
||||
@Min(2) |
||||
@Max(10000) |
||||
private Float height; |
||||
|
||||
public Point() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "Point{" + |
||||
"latitude=" + latitude + |
||||
", longitude=" + longitude + |
||||
", height=" + height + |
||||
'}'; |
||||
} |
||||
|
||||
public Float getLatitude() { |
||||
return latitude; |
||||
} |
||||
|
||||
public Point setLatitude(Float latitude) { |
||||
this.latitude = latitude; |
||||
return this; |
||||
} |
||||
|
||||
public Float getLongitude() { |
||||
return longitude; |
||||
} |
||||
|
||||
public Point setLongitude(Float longitude) { |
||||
this.longitude = longitude; |
||||
return this; |
||||
} |
||||
|
||||
public Float getHeight() { |
||||
return height; |
||||
} |
||||
|
||||
public Point setHeight(Float height) { |
||||
this.height = height; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/17 |
||||
*/ |
||||
public enum TakeoffStatusEnum { |
||||
|
||||
TASK_READY("task_ready", "The drone is preparing to take off."), |
||||
|
||||
WAYLINE_PROGRESS("wayline_progress", "The drone is taking off."), |
||||
|
||||
WAYLINE_FAILED("wayline_failed", "The drone failed to take off."), |
||||
|
||||
WAYLINE_OK("wayline_ok", "The drone took off successfully."), |
||||
|
||||
WAYLINE_CANCEL("wayline_cancel", "The drone takeoff job has been cancelled."), |
||||
|
||||
TASK_FINISH("task_finish", "The drone takeoff job is completed."); |
||||
|
||||
private final String status; |
||||
|
||||
private final String message; |
||||
|
||||
TakeoffStatusEnum(String status, String message) { |
||||
this.status = status; |
||||
this.message = message; |
||||
} |
||||
|
||||
@JsonValue |
||||
public String getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public String getMessage() { |
||||
return message; |
||||
} |
||||
|
||||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING) |
||||
public static TakeoffStatusEnum find(String status) { |
||||
return Arrays.stream(values()).filter(statusEnum -> statusEnum.status.equals(status)).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(TakeoffStatusEnum.class, status)); |
||||
} |
||||
} |
@ -0,0 +1,135 @@
@@ -0,0 +1,135 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.annotations.CloudSDKVersion; |
||||
import com.dji.sdk.cloudapi.wayline.WaylineErrorCodeEnum; |
||||
import com.dji.sdk.config.version.CloudSDKVersionEnum; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/14 |
||||
*/ |
||||
public class TakeoffToPointProgress { |
||||
|
||||
private WaylineErrorCodeEnum result; |
||||
|
||||
private TakeoffStatusEnum status; |
||||
|
||||
private String flightId; |
||||
|
||||
private String trackId; |
||||
|
||||
private Integer wayPointIndex; |
||||
|
||||
/** |
||||
* Remaining mission distance |
||||
* unit: m |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0) |
||||
private Float remainingDistance; |
||||
|
||||
/** |
||||
* Remaining mission time |
||||
* unit: s |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0) |
||||
private Integer remainingTime; |
||||
|
||||
/** |
||||
* Planned trajectory point list |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0) |
||||
private List<Point> plannedPathPoints; |
||||
|
||||
|
||||
public TakeoffToPointProgress() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "TakeoffToPointProgress{" + |
||||
"result=" + result + |
||||
", status=" + status + |
||||
", flightId='" + flightId + '\'' + |
||||
", trackId='" + trackId + '\'' + |
||||
", wayPointIndex=" + wayPointIndex + |
||||
", remainingDistance=" + remainingDistance + |
||||
", remainingTime=" + remainingTime + |
||||
", plannedPathPoints=" + plannedPathPoints + |
||||
'}'; |
||||
} |
||||
|
||||
public WaylineErrorCodeEnum getResult() { |
||||
return result; |
||||
} |
||||
|
||||
public TakeoffToPointProgress setResult(WaylineErrorCodeEnum result) { |
||||
this.result = result; |
||||
return this; |
||||
} |
||||
|
||||
public TakeoffStatusEnum getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public TakeoffToPointProgress setStatus(TakeoffStatusEnum status) { |
||||
this.status = status; |
||||
return this; |
||||
} |
||||
|
||||
public String getFlightId() { |
||||
return flightId; |
||||
} |
||||
|
||||
public TakeoffToPointProgress setFlightId(String flightId) { |
||||
this.flightId = flightId; |
||||
return this; |
||||
} |
||||
|
||||
public String getTrackId() { |
||||
return trackId; |
||||
} |
||||
|
||||
public TakeoffToPointProgress setTrackId(String trackId) { |
||||
this.trackId = trackId; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getWayPointIndex() { |
||||
return wayPointIndex; |
||||
} |
||||
|
||||
public TakeoffToPointProgress setWayPointIndex(Integer wayPointIndex) { |
||||
this.wayPointIndex = wayPointIndex; |
||||
return this; |
||||
} |
||||
|
||||
public Float getRemainingDistance() { |
||||
return remainingDistance; |
||||
} |
||||
|
||||
public TakeoffToPointProgress setRemainingDistance(Float remainingDistance) { |
||||
this.remainingDistance = remainingDistance; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getRemainingTime() { |
||||
return remainingTime; |
||||
} |
||||
|
||||
public TakeoffToPointProgress setRemainingTime(Integer remainingTime) { |
||||
this.remainingTime = remainingTime; |
||||
return this; |
||||
} |
||||
|
||||
public List<Point> getPlannedPathPoints() { |
||||
return plannedPathPoints; |
||||
} |
||||
|
||||
public TakeoffToPointProgress setPlannedPathPoints(List<Point> plannedPathPoints) { |
||||
this.plannedPathPoints = plannedPathPoints; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,235 @@
@@ -0,0 +1,235 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.annotations.CloudSDKVersion; |
||||
import com.dji.sdk.cloudapi.device.ExitWaylineWhenRcLostEnum; |
||||
import com.dji.sdk.cloudapi.device.RcLostActionEnum; |
||||
import com.dji.sdk.cloudapi.wayline.RthModeEnum; |
||||
import com.dji.sdk.cloudapi.wayline.SimulateMission; |
||||
import com.dji.sdk.common.BaseModel; |
||||
import com.dji.sdk.config.version.CloudSDKVersionEnum; |
||||
|
||||
import javax.validation.Valid; |
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
import javax.validation.constraints.Pattern; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/1 |
||||
*/ |
||||
public class TakeoffToPointRequest extends BaseModel { |
||||
|
||||
@Pattern(regexp = "^[^<>:\"/|?*._\\\\]+$") |
||||
@NotNull |
||||
private String flightId; |
||||
|
||||
@Min(-180) |
||||
@Max(180) |
||||
@NotNull |
||||
private Float targetLongitude; |
||||
|
||||
@Min(-90) |
||||
@Max(90) |
||||
@NotNull |
||||
private Float targetLatitude; |
||||
|
||||
@Min(2) |
||||
@Max(10000) |
||||
@NotNull |
||||
private Float targetHeight; |
||||
|
||||
@Min(20) |
||||
@Max(1500) |
||||
@NotNull |
||||
private Float securityTakeoffHeight; |
||||
|
||||
@Min(2) |
||||
@Max(1500) |
||||
@NotNull |
||||
private Float rthAltitude; |
||||
|
||||
@NotNull |
||||
private RcLostActionEnum rcLostAction; |
||||
|
||||
@NotNull |
||||
@CloudSDKVersion(deprecated = CloudSDKVersionEnum.V1_0_0) |
||||
private ExitWaylineWhenRcLostEnum exitWaylineWhenRcLost; |
||||
|
||||
@Min(1) |
||||
@Max(15) |
||||
@NotNull |
||||
private Integer maxSpeed; |
||||
|
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0) |
||||
@NotNull |
||||
private RthModeEnum rthMode; |
||||
|
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0) |
||||
@NotNull |
||||
private CommanderModeLostActionEnum commanderModeLostAction; |
||||
|
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0) |
||||
@NotNull |
||||
private CommanderFlightModeEnum commanderFlightMode; |
||||
|
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0) |
||||
@NotNull |
||||
@Min(2) |
||||
@Max(3000) |
||||
private Float commanderFlightHeight; |
||||
|
||||
@Valid |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0) |
||||
private SimulateMission simulateMission; |
||||
|
||||
public TakeoffToPointRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "TakeoffToPointRequest{" + |
||||
"flightId='" + flightId + '\'' + |
||||
", targetLongitude=" + targetLongitude + |
||||
", targetLatitude=" + targetLatitude + |
||||
", targetHeight=" + targetHeight + |
||||
", securityTakeoffHeight=" + securityTakeoffHeight + |
||||
", rthAltitude=" + rthAltitude + |
||||
", rcLostAction=" + rcLostAction + |
||||
", exitWaylineWhenRcLost=" + exitWaylineWhenRcLost + |
||||
", maxSpeed=" + maxSpeed + |
||||
", rthMode=" + rthMode + |
||||
", commanderModeLostAction=" + commanderModeLostAction + |
||||
", commanderFlightMode=" + commanderFlightMode + |
||||
", commanderFlightHeight=" + commanderFlightHeight + |
||||
", simulateMission=" + simulateMission + |
||||
'}'; |
||||
} |
||||
|
||||
public String getFlightId() { |
||||
return flightId; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setFlightId(String flightId) { |
||||
this.flightId = flightId; |
||||
return this; |
||||
} |
||||
|
||||
public Float getTargetLongitude() { |
||||
return targetLongitude; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setTargetLongitude(Float targetLongitude) { |
||||
this.targetLongitude = targetLongitude; |
||||
return this; |
||||
} |
||||
|
||||
public Float getTargetLatitude() { |
||||
return targetLatitude; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setTargetLatitude(Float targetLatitude) { |
||||
this.targetLatitude = targetLatitude; |
||||
return this; |
||||
} |
||||
|
||||
public Float getTargetHeight() { |
||||
return targetHeight; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setTargetHeight(Float targetHeight) { |
||||
this.targetHeight = targetHeight; |
||||
return this; |
||||
} |
||||
|
||||
public Float getSecurityTakeoffHeight() { |
||||
return securityTakeoffHeight; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setSecurityTakeoffHeight(Float securityTakeoffHeight) { |
||||
this.securityTakeoffHeight = securityTakeoffHeight; |
||||
return this; |
||||
} |
||||
|
||||
public Float getRthAltitude() { |
||||
return rthAltitude; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setRthAltitude(Float rthAltitude) { |
||||
this.rthAltitude = rthAltitude; |
||||
return this; |
||||
} |
||||
|
||||
public RcLostActionEnum getRcLostAction() { |
||||
return rcLostAction; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setRcLostAction(RcLostActionEnum rcLostAction) { |
||||
this.rcLostAction = rcLostAction; |
||||
return this; |
||||
} |
||||
|
||||
public ExitWaylineWhenRcLostEnum getExitWaylineWhenRcLost() { |
||||
return exitWaylineWhenRcLost; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setExitWaylineWhenRcLost(ExitWaylineWhenRcLostEnum exitWaylineWhenRcLost) { |
||||
this.exitWaylineWhenRcLost = exitWaylineWhenRcLost; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getMaxSpeed() { |
||||
return maxSpeed; |
||||
} |
||||
|
||||
public RthModeEnum getRthMode() { |
||||
return rthMode; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setRthMode(RthModeEnum rthMode) { |
||||
this.rthMode = rthMode; |
||||
return this; |
||||
} |
||||
|
||||
public CommanderModeLostActionEnum getCommanderModeLostAction() { |
||||
return commanderModeLostAction; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setCommanderModeLostAction(CommanderModeLostActionEnum commanderModeLostAction) { |
||||
this.commanderModeLostAction = commanderModeLostAction; |
||||
return this; |
||||
} |
||||
|
||||
public CommanderFlightModeEnum getCommanderFlightMode() { |
||||
return commanderFlightMode; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setCommanderFlightMode(CommanderFlightModeEnum commanderFlightMode) { |
||||
this.commanderFlightMode = commanderFlightMode; |
||||
return this; |
||||
} |
||||
|
||||
public Float getCommanderFlightHeight() { |
||||
return commanderFlightHeight; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setCommanderFlightHeight(Float commanderFlightHeight) { |
||||
this.commanderFlightHeight = commanderFlightHeight; |
||||
return this; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setMaxSpeed(Integer maxSpeed) { |
||||
this.maxSpeed = maxSpeed; |
||||
return this; |
||||
} |
||||
|
||||
public SimulateMission getSimulateMission() { |
||||
return simulateMission; |
||||
} |
||||
|
||||
public TakeoffToPointRequest setSimulateMission(SimulateMission simulateMission) { |
||||
this.simulateMission = simulateMission; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,61 @@
@@ -0,0 +1,61 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.cloudapi.device.PayloadIndex; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
import javax.validation.constraints.Size; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/12 |
||||
*/ |
||||
public class VideoStorageSetRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Camera enumeration. |
||||
* It is unofficial device_mode_key. |
||||
* The format is *{type-subtype-gimbalindex}*. |
||||
* Please read [Product Supported](https://developer.dji.com/doc/cloud-api-tutorial/en/overview/product-support.html)
|
||||
*/ |
||||
@NotNull |
||||
private PayloadIndex payloadIndex; |
||||
|
||||
/** |
||||
* Video storage type. Multi-selection. |
||||
*/ |
||||
@NotNull |
||||
@Size(min = 1) |
||||
private List<LensStorageSettingsEnum> videoStorageSettings; |
||||
|
||||
public VideoStorageSetRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "VideoStorageSetRequest{" + |
||||
"payloadIndex=" + payloadIndex + |
||||
", videoStorageSettings=" + videoStorageSettings + |
||||
'}'; |
||||
} |
||||
|
||||
public PayloadIndex getPayloadIndex() { |
||||
return payloadIndex; |
||||
} |
||||
|
||||
public VideoStorageSetRequest setPayloadIndex(PayloadIndex payloadIndex) { |
||||
this.payloadIndex = payloadIndex; |
||||
return this; |
||||
} |
||||
|
||||
public List<LensStorageSettingsEnum> getVideoStorageSettings() { |
||||
return videoStorageSettings; |
||||
} |
||||
|
||||
public VideoStorageSetRequest setVideoStorageSettings(List<LensStorageSettingsEnum> videoStorageSettings) { |
||||
this.videoStorageSettings = videoStorageSettings; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.control; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.4 |
||||
* @date 2023/3/3 |
||||
*/ |
||||
public enum ZoomCameraTypeEnum { |
||||
|
||||
ZOOM("zoom"), |
||||
|
||||
IR("ir"); |
||||
|
||||
private final String type; |
||||
|
||||
ZoomCameraTypeEnum(String type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
@JsonValue |
||||
public String getType() { |
||||
return type; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static ZoomCameraTypeEnum find(String type) { |
||||
return Arrays.stream(values()).filter(typeEnum -> typeEnum.type.equals(type)).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(ZoomCameraTypeEnum.class, type)); |
||||
} |
||||
} |
@ -0,0 +1,665 @@
@@ -0,0 +1,665 @@
|
||||
package com.dji.sdk.cloudapi.control.api; |
||||
|
||||
import com.dji.sdk.annotations.CloudSDKVersion; |
||||
import com.dji.sdk.cloudapi.control.*; |
||||
import com.dji.sdk.common.BaseModel; |
||||
import com.dji.sdk.common.Common; |
||||
import com.dji.sdk.common.SpringBeanUtils; |
||||
import com.dji.sdk.config.version.CloudSDKVersionEnum; |
||||
import com.dji.sdk.config.version.GatewayManager; |
||||
import com.dji.sdk.config.version.GatewayTypeEnum; |
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.dji.sdk.mqtt.ChannelName; |
||||
import com.dji.sdk.mqtt.MqttReply; |
||||
import com.dji.sdk.mqtt.drc.DrcDownPublish; |
||||
import com.dji.sdk.mqtt.drc.DrcUpData; |
||||
import com.dji.sdk.mqtt.drc.TopicDrcRequest; |
||||
import com.dji.sdk.mqtt.events.EventsDataRequest; |
||||
import com.dji.sdk.mqtt.events.TopicEventsRequest; |
||||
import com.dji.sdk.mqtt.events.TopicEventsResponse; |
||||
import com.dji.sdk.mqtt.services.ServicesPublish; |
||||
import com.dji.sdk.mqtt.services.ServicesReplyData; |
||||
import com.dji.sdk.mqtt.services.TopicServicesResponse; |
||||
import org.springframework.integration.annotation.ServiceActivator; |
||||
import org.springframework.messaging.Message; |
||||
import org.springframework.messaging.MessageHeaders; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.lang.reflect.InvocationTargetException; |
||||
import java.lang.reflect.Method; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/29 |
||||
*/ |
||||
public abstract class AbstractControlService { |
||||
|
||||
@Resource |
||||
private ServicesPublish servicesPublish; |
||||
|
||||
@Resource |
||||
private DrcDownPublish drcDownPublish; |
||||
|
||||
/** |
||||
* Event notification of flyto result |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_EVENTS_FLY_TO_POINT_PROGRESS, outputChannel = ChannelName.OUTBOUND_EVENTS) |
||||
public TopicEventsResponse<MqttReply> flyToPointProgress(TopicEventsRequest<FlyToPointProgress> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("flyToPointProgress not implemented"); |
||||
} |
||||
|
||||
/** |
||||
* Event notification of one-key taking off result |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_EVENTS_TAKEOFF_TO_POINT_PROGRESS, outputChannel = ChannelName.OUTBOUND_EVENTS) |
||||
public TopicEventsResponse<MqttReply> takeoffToPointProgress(TopicEventsRequest<TakeoffToPointProgress> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("takeoffToPointProgress not implemented"); |
||||
} |
||||
|
||||
/** |
||||
* Notification of DRC link state |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_EVENTS_DRC_STATUS_NOTIFY, outputChannel = ChannelName.OUTBOUND_EVENTS) |
||||
public TopicEventsResponse<MqttReply> drcStatusNotify(TopicEventsRequest<DrcStatusNotify> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("drcStatusNotify not implemented"); |
||||
} |
||||
|
||||
/** |
||||
* Reason notification of invalid Joystick control |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_EVENTS_JOYSTICK_INVALID_NOTIFY, outputChannel = ChannelName.OUTBOUND_EVENTS) |
||||
public TopicEventsResponse<MqttReply> joystickInvalidNotify(TopicEventsRequest<JoystickInvalidNotify> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("joystickInvalidNotify not implemented"); |
||||
} |
||||
|
||||
/** |
||||
* Flight control authority grabbing |
||||
* @param gateway |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> flightAuthorityGrab(GatewayManager gateway) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.FLIGHT_AUTHORITY_GRAB.getMethod()); |
||||
} |
||||
|
||||
/** |
||||
* Payload control authority grabbing |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> payloadAuthorityGrab(GatewayManager gateway, PayloadAuthorityGrabRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.PAYLOAD_AUTHORITY_GRAB.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Enter the live flight controls mode |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> drcModeEnter(GatewayManager gateway, DrcModeEnterRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.DRC_MODE_ENTER.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Exit the live flight controls mode |
||||
* @param gateway |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> drcModeExit(GatewayManager gateway) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.DRC_MODE_EXIT.getMethod()); |
||||
} |
||||
|
||||
/** |
||||
* One-key taking off |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> takeoffToPoint(GatewayManager gateway, TakeoffToPointRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.TAKEOFF_TO_POINT.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* flyto target point |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> flyToPoint(GatewayManager gateway, FlyToPointRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.FLY_TO_POINT.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Quickly update target points |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, exclude = GatewayTypeEnum.RC, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> flyToPointUpdate(GatewayManager gateway, FlyToPointUpdateRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.FLY_TO_POINT_UPDATE.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* End the task of flying to target point |
||||
* @param gateway |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> flyToPointStop(GatewayManager gateway) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.FLY_TO_POINT_STOP.getMethod()); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - switch the camera mode |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> cameraModeSwitch(GatewayManager gateway, CameraModeSwitchRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_MODE_SWITCH.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - take single photo |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> cameraPhotoTake(GatewayManager gateway, CameraPhotoTakeRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_PHOTO_TAKE.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - stop taking photo |
||||
* Currently only panoramic photo mode is supported. |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, exclude = GatewayTypeEnum.RC, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> cameraPhotoStop(GatewayManager gateway, CameraPhotoStopRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_PHOTO_STOP.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Event notification of camera photo progress information |
||||
* Currently only panoramic photo mode is supported. |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_EVENTS_CAMERA_PHOTO_TAKE_PROGRESS, outputChannel = ChannelName.OUTBOUND_EVENTS) |
||||
public TopicEventsResponse<MqttReply> cameraPhotoTakeProgress(TopicEventsRequest<EventsDataRequest<CameraPhotoTakeProgress>> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("cameraPhotoTakeProgress not implemented"); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - start recording |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> cameraRecordingStart(GatewayManager gateway, CameraRecordingStartRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_RECORDING_START.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - stop recording |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> cameraRecordingStop(GatewayManager gateway, CameraRecordingStopRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_RECORDING_STOP.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - double tab to become AIM |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> cameraAim(GatewayManager gateway, CameraAimRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_AIM.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - zoom |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> cameraFocalLengthSet(GatewayManager gateway, CameraFocalLengthSetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_FOCAL_LENGTH_SET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - reset the gimbal |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> gimbalReset(GatewayManager gateway, GimbalResetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.GIMBAL_RESET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* The `lookat` function refers to the aircraft turning itself from its current heading to point at a specified location of actual latitude, longitude, and altitude. |
||||
* For M30/M30T models, it is recommended to use a method that locks the gimbal when using the `lookat` function. |
||||
* When the gimbal reaches its limits, the `lookat` function may behave abnormally. |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0, exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> cameraLookAt(GatewayManager gateway, CameraLookAtRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_LOOK_AT.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - screen split |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0, exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> cameraScreenSplit(GatewayManager gateway, CameraScreenSplitRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_SCREEN_SPLIT.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - photo storage setting |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0, exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> photoStorageSet(GatewayManager gateway, PhotoStorageSetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.PHOTO_STORAGE_SET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - video storage setting |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0, exclude = GatewayTypeEnum.RC) |
||||
public TopicServicesResponse<ServicesReplyData> videoStorageSet(GatewayManager gateway, VideoStorageSetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.VIDEO_STORAGE_SET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - camera exposure setting |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> cameraExposureSet(GatewayManager gateway, CameraExposureSetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_EXPOSURE_SET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - camera exposure mode setting |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> cameraExposureModeSet(GatewayManager gateway, CameraExposureModeSetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_EXPOSURE_MODE_SET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - camera focus mode setting |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> cameraFocusModeSet(GatewayManager gateway, CameraFocusModeSetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_FOCUS_MODE_SET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - camera focus value setting |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> cameraFocusValueSet(GatewayManager gateway, CameraFocusValueSetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_FOCUS_VALUE_SET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - ir metering mode setting |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> irMeteringModeSet(GatewayManager gateway, IrMeteringModeSetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.IR_METERING_MODE_SET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - ir metering point setting |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> irMeteringPointSet(GatewayManager gateway, IrMeteringPointSetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.IR_METERING_POINT_SET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - ir metering area setting |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> irMeteringAreaSet(GatewayManager gateway, IrMeteringAreaSetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.IR_METERING_AREA_SET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control - camera point focus |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> cameraPointFocusAction(GatewayManager gateway, CameraPointFocusActionRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.CAMERA_POINT_FOCUS_ACTION.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Payload control |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
public TopicServicesResponse<ServicesReplyData> payloadControl(GatewayManager gateway, PayloadControlMethodEnum methodEnum, BaseModel request) { |
||||
try { |
||||
AbstractControlService abstractControlService = SpringBeanUtils.getBean(this.getClass()); |
||||
Method method = abstractControlService.getClass().getDeclaredMethod( |
||||
Common.convertSnake(methodEnum.getPayloadMethod().getMethod()),GatewayManager.class, methodEnum.getClazz()); |
||||
return (TopicServicesResponse<ServicesReplyData>) method.invoke(abstractControlService, gateway, request); |
||||
} catch (NoSuchMethodException | IllegalAccessException e) { |
||||
throw new CloudSDKException(e); |
||||
} catch (InvocationTargetException e) { |
||||
throw new CloudSDKException(e.getTargetException()); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* Event notification of poi surround information |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_EVENTS_POI_STATUS_NOTIFY, outputChannel = ChannelName.OUTBOUND_EVENTS) |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, include = GatewayTypeEnum.DOCK) |
||||
public TopicEventsResponse<MqttReply> poiStatusNotify(TopicEventsRequest<PoiStatusNotify> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("poiStatusNotify not implemented"); |
||||
} |
||||
|
||||
/** |
||||
* Enter the poi surround mode |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, exclude = GatewayTypeEnum.RC, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> poiModeEnter(GatewayManager gateway, PoiModeEnterRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.POI_MODE_ENTER.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Exit the poi surround mode |
||||
* @param gateway |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, exclude = GatewayTypeEnum.RC, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> poiModeExit(GatewayManager gateway) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.POI_MODE_EXIT.getMethod()); |
||||
} |
||||
|
||||
/** |
||||
* poi speed setting |
||||
* @param gateway |
||||
* @param request data |
||||
* @return services_reply |
||||
*/ |
||||
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_2, exclude = GatewayTypeEnum.RC, include = GatewayTypeEnum.DOCK) |
||||
public TopicServicesResponse<ServicesReplyData> poiCircleSpeedSet(GatewayManager gateway, PoiCircleSpeedSetRequest request) { |
||||
return servicesPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.POI_CIRCLE_SPEED_SET.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* DRC-flight control |
||||
* @param gateway |
||||
* @param request data |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
protected void droneControlDown(GatewayManager gateway, DroneControlRequest request) { |
||||
drcDownPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.DRONE_CONTROL.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Drc up notification of drone control result |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_DRC_UP_DRONE_CONTROL) |
||||
public void droneControlUp(TopicDrcRequest<DrcUpData<DroneControlResponse>> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("droneControlUp not implemented"); |
||||
} |
||||
|
||||
/** |
||||
* DRC-drone emergency stop |
||||
* @param gateway |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public void droneEmergencyStopDown(GatewayManager gateway) { |
||||
drcDownPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.DRONE_EMERGENCY_STOP.getMethod()); |
||||
} |
||||
|
||||
/** |
||||
* Drc up notification of drone emergency stop result |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_DRC_UP_DRONE_EMERGENCY_STOP) |
||||
public void droneEmergencyStopUp(TopicDrcRequest<DrcUpData> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("droneEmergencyStopUp not implemented"); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* DRC-heart beat |
||||
* @param gateway |
||||
* @param request data |
||||
*/ |
||||
@CloudSDKVersion(exclude = GatewayTypeEnum.RC) |
||||
public void heartBeatDown(GatewayManager gateway, HeartBeatRequest request) { |
||||
drcDownPublish.publish( |
||||
gateway.getGatewaySn(), |
||||
ControlMethodEnum.HEART_BEAT.getMethod(), |
||||
request); |
||||
} |
||||
|
||||
/** |
||||
* Drc up notification of heart beat result |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_DRC_UP_HEART_BEAT) |
||||
public void heartBeatUp(TopicDrcRequest<HeartBeatRequest> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("heartBeatUp not implemented"); |
||||
} |
||||
|
||||
/** |
||||
* DRC-obstacle avoidance information pushing |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_DRC_UP_HSI_INFO_PUSH) |
||||
public void hsiInfoPush(TopicDrcRequest<HsiInfoPush> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("hsiInfoPush not implemented"); |
||||
} |
||||
|
||||
/** |
||||
* DRC-delay information pushing of image transmission link |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_DRC_UP_DELAY_INFO_PUSH) |
||||
public void delayInfoPush(TopicDrcRequest<DelayInfoPush> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("delayInfoPush not implemented"); |
||||
} |
||||
|
||||
/** |
||||
* DRC-high frequency osd information pushing |
||||
* @param request data |
||||
* @param headers The headers for a {@link Message}. |
||||
* @return events_reply |
||||
*/ |
||||
@ServiceActivator(inputChannel = ChannelName.INBOUND_DRC_UP_OSD_INFO_PUSH) |
||||
public void osdInfoPush(TopicDrcRequest<OsdInfoPush> request, MessageHeaders headers) { |
||||
throw new UnsupportedOperationException("osdInfoPush not implemented"); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2022/10/28 |
||||
*/ |
||||
public enum AirConditionerModeSwitchActionEnum { |
||||
|
||||
IDLE_MODE(0), |
||||
|
||||
COOLING_MODE(1), |
||||
|
||||
heating_mode(2), |
||||
|
||||
DEHUMIDIFICATION_MODE(3); |
||||
|
||||
private final int action; |
||||
|
||||
AirConditionerModeSwitchActionEnum(int action) { |
||||
this.action = action; |
||||
} |
||||
|
||||
@JsonValue |
||||
public int getAction() { |
||||
return action; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static AirConditionerModeSwitchActionEnum find(int action) { |
||||
return Arrays.stream(values()).filter(actionEnum -> actionEnum.action == action).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(AirConditionerModeSwitchActionEnum.class, action)); |
||||
} |
||||
} |
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2022/11/25 |
||||
*/ |
||||
public class AirConditionerModeSwitchRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private AirConditionerModeSwitchActionEnum action; |
||||
|
||||
public AirConditionerModeSwitchRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "AirConditionerModeSwitchRequest{" + |
||||
"action=" + action + |
||||
'}'; |
||||
} |
||||
|
||||
public AirConditionerModeSwitchActionEnum getAction() { |
||||
return action; |
||||
} |
||||
|
||||
public AirConditionerModeSwitchRequest setAction(AirConditionerModeSwitchActionEnum action) { |
||||
this.action = action; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
import com.dji.sdk.cloudapi.device.SwitchActionEnum; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2022/11/25 |
||||
*/ |
||||
public class AlarmStateSwitchRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private SwitchActionEnum action; |
||||
|
||||
public AlarmStateSwitchRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "AlarmStateSwitchRequest{" + |
||||
"action=" + action + |
||||
'}'; |
||||
} |
||||
|
||||
public SwitchActionEnum getAction() { |
||||
return action; |
||||
} |
||||
|
||||
public AlarmStateSwitchRequest setAction(SwitchActionEnum action) { |
||||
this.action = action; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
import com.dji.sdk.cloudapi.device.SwitchActionEnum; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2022/11/25 |
||||
*/ |
||||
public class BatteryMaintenanceSwitchRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private SwitchActionEnum action; |
||||
|
||||
public BatteryMaintenanceSwitchRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "BatteryMaintenanceSwitchRequest{" + |
||||
"action=" + action + |
||||
'}'; |
||||
} |
||||
|
||||
public SwitchActionEnum getAction() { |
||||
return action; |
||||
} |
||||
|
||||
public BatteryMaintenanceSwitchRequest setAction(SwitchActionEnum action) { |
||||
this.action = action; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
import com.dji.sdk.cloudapi.device.BatteryStoreModeEnum; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2022/11/25 |
||||
*/ |
||||
public class BatteryStoreModeSwitchRequest extends BaseModel { |
||||
|
||||
@NotNull |
||||
private BatteryStoreModeEnum action; |
||||
|
||||
public BatteryStoreModeSwitchRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "BatteryStoreModeSwitchRequest{" + |
||||
"action=" + action + |
||||
'}'; |
||||
} |
||||
|
||||
public BatteryStoreModeEnum getAction() { |
||||
return action; |
||||
} |
||||
|
||||
public BatteryStoreModeSwitchRequest setAction(BatteryStoreModeEnum action) { |
||||
this.action = action; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,168 @@
@@ -0,0 +1,168 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
import com.dji.sdk.common.IErrorInfo; |
||||
import com.dji.sdk.mqtt.events.IEventsErrorCode; |
||||
import com.dji.sdk.mqtt.services.IServicesErrorCode; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean.zhou |
||||
* @version 0.1 |
||||
* @date 2021/11/25 |
||||
*/ |
||||
public enum DebugErrorCodeEnum implements IServicesErrorCode, IEventsErrorCode, IErrorInfo { |
||||
|
||||
AIRCRAFT_NO_DONGLE(326002, "The DJI Cellular module is not installed on the aircraft."), |
||||
|
||||
AIRCRAFT_DONGLE_NO_SIM(326003, "There is no SIM card installed in the DJI Cellular module of the aircraft."), |
||||
|
||||
AIRCRAFT_DONGLE_NEED_UPGRADE(326004, "The DJI Cellular module of the aircraft needs to be upgraded, otherwise it cannot be used."), |
||||
|
||||
ESTABLISH_CONNECTION_FAILED(326005, "The 4G transmission of the aircraft fails to be enabled, and the 4G transmission cannot establish a connection. Please check the 4G signal strength, or consult the operator to check the package traffic and APN settings."), |
||||
|
||||
SDR_SWITCH_FAILED(326006, "The 4G transmission switch failed, please try again later."), |
||||
|
||||
WRONG_COMMAND_FORMAT(326007, "The command format is wrong."), |
||||
|
||||
DOCK_NO_DONGLE(326008, "The DJI Cellular module is not installed on the dock."), |
||||
|
||||
DOCK_DONGLE_NO_SIM(326009, "There is no SIM card installed in the DJI Cellular module of the dock."), |
||||
|
||||
DOCK_DONGLE_NEED_UPGRADE(326010, "The DJI Cellular module of the dock needs to be upgraded, otherwise it cannot be used."), |
||||
|
||||
COMMAND_NOT_SUPPORTED(514100, "Dock error. Restart dock and try again."), |
||||
|
||||
PUSH_DRIVING_RODS_FAILED(514101, "Failed to push driving rods into place."), |
||||
|
||||
PULL_DRIVING_RODS_FAILED(514102, "Failed to pull driving rods back."), |
||||
|
||||
LOW_POWER_1(514103, "Aircraft battery level low. Unable to perform task. Wait until aircraft is charged up to 50% and try again."), |
||||
|
||||
CHARGE_FAILED(514104, "Failed to charge battery."), |
||||
|
||||
STOP_CHARGING_FAILED(514105, "Failed to stop charging battery."), |
||||
|
||||
REBOOT_DRONE_FAILED(514106, "Failed to reboot drone."), |
||||
|
||||
OPEN_DOCK_COVER_FAILED(514107, "Failed to open dock cover."), |
||||
|
||||
CLOSE_DOCK_COVER_FAILED(514108, "Failed to close dock cover."), |
||||
|
||||
POWER_ON_AIRCRAFT_FAILED(514109, "Failed to power on aircraft."), |
||||
|
||||
POWER_OFF_AIRCRAFT_FAILED(514110, "Failed to power off aircraft."), |
||||
|
||||
OPEN_SLOW_MOTION_FAILED(514111, "Propeller error in opening slow motion mode"), |
||||
|
||||
CLOSE_SLOW_MOTION_FAILED(514112, "Propeller error in closing slow motion mode"), |
||||
|
||||
AIRCRAFT_NOT_FOUND_1(514113, "Connection error between driving rod and aircraft. Check if aircraft is inside dock, driving rods are stuck, or charging connector is stained or damaged."), |
||||
|
||||
OBTAIN_BATTERY_FAILED(514114, "Failed to obtain aircraft battery status. Restart dock and try again."), |
||||
|
||||
DOCK_BUSY(514116, "Unable to perform operation. Dock is executing other command. Try again later."), |
||||
|
||||
OBTAIN_DOCK_COVER_FAILED(514117, "Dock cover is open or not fully closed. Restart dock and try again"), |
||||
|
||||
OBTAIN_DRIVING_RODS_FAILED(514118, "Driving rods pulled back or not pushed into place. Restart dock and try again."), |
||||
|
||||
TRANSMISSION_ERROR(514120, "Dock and aircraft disconnected. Restart dock and try again or relink dock and aircraft."), |
||||
|
||||
EMERGENCY_BUTTON_PRESSED_DOWN(514121, "Emergency stop button pressed down. Release button."), |
||||
|
||||
OBTAIN_CHARGING_STATUS_FAILED(514122, "Failed to obtain aircraft charging status. Restart dock and try again."), |
||||
|
||||
LOW_POWER_2(514123, "Aircraft battery level too low. Unable to power on aircraft."), |
||||
|
||||
OBTAIN_BATTERY_STATUS_FAILED(514124, "Failed to obtain aircraft battery information."), |
||||
|
||||
BATTERY_FULL(514125, "Aircraft battery level almost full. Unable to start charging. Charge battery when battery level is lower than 95%."), |
||||
|
||||
HEAVY_RAINFALL(514134, "Heavy rainfall. Unable to perform task. Try again later."), |
||||
|
||||
HIGH_WIND(514135, "Wind speed too high (≥12 m/s). Unable to perform task. Try again later."), |
||||
|
||||
POWER_SUPPLY_ERROR(514136, "Dock power supply error. Unable to perform task. Resume power supply and try again."), |
||||
|
||||
LOW_ENVIRONMENT_TEMPERATURE(514137, "Environment temperature too low (lower than -20° C). Unable to perform task. Try again later."), |
||||
|
||||
BATTERY_MAINTAINING(514138, "Maintaining aircraft battery. Unable to perform task. Wait until maintenance is complete."), |
||||
|
||||
MAINTAIN_BATTERY_FAILED(514139, "Failed to maintain aircraft battery. No maintenance required."), |
||||
|
||||
SETTING_BATTERY_STORAGE_FAILED(514140, "Failed to set battery storage mode."), |
||||
|
||||
DOCK_SYSTEM_ERROR(514141, "Dock system error. Restart dock and try again."), |
||||
|
||||
AIRCRAFT_NOT_FOUND_2(514142, "Connection error between driving rod and aircraft before takeoff. Check if aircraft is inside dock, driving rods are stuck, or charging connector is stained or damaged."), |
||||
|
||||
DRIVING_RODS_ERROR(514143, "Driving rods pulled back or not pushed into place. Try again later or restart dock and try again."), |
||||
|
||||
DOCK_COVER_ERROR(514144, "Dock cover is open or not fully closed."), |
||||
|
||||
ONSITE_DEBUGGING_MODE(514145, "Dock in onsite debugging mode. Unable to perform current operation or task."), |
||||
|
||||
REMOTE_DEBUGGING_MODE(514146, "Dock in remote debugging mode. Unable to perform task."), |
||||
|
||||
FIRMWARE_UPDATING(514147, "Updating device firmware. Unable to perform task."), |
||||
|
||||
WORKING(514148, "Task in progress. Dock unable to enter remote debugging mode or perform task again. "), |
||||
|
||||
WRONG_STATUS(514149, "The airport is not in operation mode, but an operation mode-related command has been issued."), |
||||
|
||||
RESTARTING(514150, "Restarting device."), |
||||
|
||||
UPDATING(514151, "Updating device firmware."), |
||||
|
||||
NOT_REMOTE_DEBUGGING_MODE(514153, "Dock exited remote debugging mode. Unable to perform current operation."), |
||||
|
||||
INITIALIZING(514170, "Initializing dock. Unable to perform operation. Wait until initialization completes."), |
||||
|
||||
WRONG_PARAMETER(514171, "Cloud command parameter error. Dock unable to execute command."), |
||||
|
||||
DISABLE_AC_FAILED(514180, "Failed to disable AC cooling or heating."), |
||||
|
||||
ENABLE_AC_COOLING_FAILED(514181, "Failed to enable AC cooling."), |
||||
|
||||
ENABLE_AC_HEATING_FAILED(514182, "Failed to enable AC heating."), |
||||
|
||||
ENABLE_AC_DEHUMIDIFYING_FAILED(514183, "Failed to enable AC dehumidifying."), |
||||
|
||||
LOW_TEMPERATURE(514184, "Ambient temperature below 0° C. Unable to enable AC cooling."), |
||||
|
||||
HIGH_TEMPERATURE(514185, "Ambient temperature above 45° C. Unable to enable AC heating"), |
||||
|
||||
UNKNOWN(-1, "UNKNOWN"), |
||||
|
||||
; |
||||
|
||||
|
||||
private final String msg; |
||||
|
||||
private final int code; |
||||
|
||||
DebugErrorCodeEnum(int code, String msg) { |
||||
this.code = code; |
||||
this.msg = msg; |
||||
} |
||||
|
||||
@Override |
||||
public String getMessage() { |
||||
return this.msg; |
||||
} |
||||
|
||||
@Override |
||||
public Integer getCode() { |
||||
return this.code; |
||||
} |
||||
|
||||
/** |
||||
* @param code error code |
||||
* @return enumeration object |
||||
*/ |
||||
public static DebugErrorCodeEnum find(int code) { |
||||
return Arrays.stream(values()).filter(codeEnum -> codeEnum.code == code).findAny().orElse(UNKNOWN); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,84 @@
@@ -0,0 +1,84 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.3 |
||||
* @date 2022/11/14 |
||||
*/ |
||||
public enum DebugMethodEnum { |
||||
|
||||
DEBUG_MODE_OPEN("debug_mode_open", null), |
||||
|
||||
DEBUG_MODE_CLOSE("debug_mode_close", null), |
||||
|
||||
SUPPLEMENT_LIGHT_OPEN("supplement_light_open", null), |
||||
|
||||
SUPPLEMENT_LIGHT_CLOSE("supplement_light_close", null), |
||||
|
||||
DEVICE_REBOOT("device_reboot", null), |
||||
|
||||
DRONE_OPEN("drone_open", null), |
||||
|
||||
DRONE_CLOSE("drone_close", null), |
||||
|
||||
DRONE_FORMAT("drone_format", null), |
||||
|
||||
DEVICE_FORMAT("device_format", null), |
||||
|
||||
COVER_OPEN("cover_open", null), |
||||
|
||||
COVER_CLOSE("cover_close", null), |
||||
|
||||
PUTTER_OPEN("putter_open", null), |
||||
|
||||
PUTTER_CLOSE("putter_close", null), |
||||
|
||||
CHARGE_OPEN("charge_open", null), |
||||
|
||||
CHARGE_CLOSE("charge_close", null), |
||||
|
||||
BATTERY_MAINTENANCE_SWITCH("battery_maintenance_switch", BatteryMaintenanceSwitchRequest.class), |
||||
|
||||
ALARM_STATE_SWITCH("alarm_state_switch", AlarmStateSwitchRequest.class), |
||||
|
||||
BATTERY_STORE_MODE_SWITCH("battery_store_mode_switch", BatteryStoreModeSwitchRequest.class), |
||||
|
||||
SDR_WORKMODE_SWITCH("sdr_workmode_switch", SdrWorkmodeSwitchRequest.class), |
||||
|
||||
AIR_CONDITIONER_MODE_SWITCH("air_conditioner_mode_switch", AirConditionerModeSwitchRequest.class), |
||||
|
||||
ESIM_ACTIVATE("esim_activate", EsimActivateRequest.class), |
||||
|
||||
SIM_SLOT_SWITCH("sim_slot_switch", SimSlotSwitchRequest.class), |
||||
|
||||
ESIM_OPERATOR_SWITCH("esim_operator_switch", EsimOperatorSwitchRequest.class), |
||||
|
||||
; |
||||
|
||||
private final String method; |
||||
|
||||
private final Class<? extends BaseModel> clazz; |
||||
|
||||
DebugMethodEnum(String method, Class<? extends BaseModel> clazz) { |
||||
this.method = method; |
||||
this.clazz = clazz; |
||||
} |
||||
|
||||
public String getMethod() { |
||||
return method; |
||||
} |
||||
|
||||
public Class<? extends BaseModel> getClazz() { |
||||
return clazz; |
||||
} |
||||
|
||||
public static DebugMethodEnum find(String method) { |
||||
return Arrays.stream(values()).filter(methodEnum -> methodEnum.method.equals(method)).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(DebugMethodEnum.class, method)); |
||||
} |
||||
} |
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
import com.dji.sdk.exception.CloudSDKException; |
||||
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/20 |
||||
*/ |
||||
public enum DongleDeviceTypeEnum { |
||||
|
||||
DOCK("dock"), |
||||
|
||||
DRONE("drone"), |
||||
|
||||
; |
||||
|
||||
private final String type; |
||||
|
||||
DongleDeviceTypeEnum(String type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
@JsonValue |
||||
public String getType() { |
||||
return type; |
||||
} |
||||
|
||||
@JsonCreator |
||||
public static DongleDeviceTypeEnum find(String type) { |
||||
return Arrays.stream(values()).filter(typeEnum -> typeEnum.type.equals(type)).findAny() |
||||
.orElseThrow(() -> new CloudSDKException(DongleDeviceTypeEnum.class, type)); |
||||
} |
||||
} |
@ -0,0 +1,54 @@
@@ -0,0 +1,54 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/20 |
||||
*/ |
||||
public class EsimActivateRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Identifies the dongle to be operated on. |
||||
*/ |
||||
@NotNull |
||||
private String imei; |
||||
|
||||
/** |
||||
* Identifies the target device to operate on. |
||||
*/ |
||||
@NotNull |
||||
private DongleDeviceTypeEnum deviceType; |
||||
|
||||
public EsimActivateRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "EsimActivateRequest{" + |
||||
"imei='" + imei + '\'' + |
||||
", deviceType=" + deviceType + |
||||
'}'; |
||||
} |
||||
|
||||
public String getImei() { |
||||
return imei; |
||||
} |
||||
|
||||
public EsimActivateRequest setImei(String imei) { |
||||
this.imei = imei; |
||||
return this; |
||||
} |
||||
|
||||
public DongleDeviceTypeEnum getDeviceType() { |
||||
return deviceType; |
||||
} |
||||
|
||||
public EsimActivateRequest setDeviceType(DongleDeviceTypeEnum deviceType) { |
||||
this.deviceType = deviceType; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,71 @@
@@ -0,0 +1,71 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
import com.dji.sdk.cloudapi.device.TelecomOperatorEnum; |
||||
import com.dji.sdk.common.BaseModel; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/10/20 |
||||
*/ |
||||
public class EsimOperatorSwitchRequest extends BaseModel { |
||||
|
||||
/** |
||||
* Identifies the dongle to be operated on. |
||||
*/ |
||||
@NotNull |
||||
private String imei; |
||||
|
||||
/** |
||||
* Identifies the target device to operate on. |
||||
*/ |
||||
@NotNull |
||||
private DongleDeviceTypeEnum deviceType; |
||||
|
||||
/** |
||||
* Target carrier for switching. |
||||
*/ |
||||
@NotNull |
||||
private TelecomOperatorEnum telecomOperator; |
||||
|
||||
public EsimOperatorSwitchRequest() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "EsimOperatorSwitchRequest{" + |
||||
"imei='" + imei + '\'' + |
||||
", deviceType=" + deviceType + |
||||
", telecomOperator=" + telecomOperator + |
||||
'}'; |
||||
} |
||||
|
||||
public String getImei() { |
||||
return imei; |
||||
} |
||||
|
||||
public EsimOperatorSwitchRequest setImei(String imei) { |
||||
this.imei = imei; |
||||
return this; |
||||
} |
||||
|
||||
public DongleDeviceTypeEnum getDeviceType() { |
||||
return deviceType; |
||||
} |
||||
|
||||
public EsimOperatorSwitchRequest setDeviceType(DongleDeviceTypeEnum deviceType) { |
||||
this.deviceType = deviceType; |
||||
return this; |
||||
} |
||||
|
||||
public TelecomOperatorEnum getTelecomOperator() { |
||||
return telecomOperator; |
||||
} |
||||
|
||||
public EsimOperatorSwitchRequest setTelecomOperator(TelecomOperatorEnum telecomOperator) { |
||||
this.telecomOperator = telecomOperator; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.2 |
||||
* @date 2022/7/29 |
||||
*/ |
||||
public class RemoteDebugProgress { |
||||
|
||||
private RemoteDebugStatusEnum status; |
||||
|
||||
private RemoteDebugProgressData progress; |
||||
|
||||
public RemoteDebugProgress() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "RemoteDebugProgress{" + |
||||
"status=" + status + |
||||
", progress=" + progress + |
||||
'}'; |
||||
} |
||||
|
||||
public RemoteDebugStatusEnum getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public RemoteDebugProgress setStatus(RemoteDebugStatusEnum status) { |
||||
this.status = status; |
||||
return this; |
||||
} |
||||
|
||||
public RemoteDebugProgressData getProgress() { |
||||
return progress; |
||||
} |
||||
|
||||
public RemoteDebugProgress setProgress(RemoteDebugProgressData progress) { |
||||
this.progress = progress; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,78 @@
@@ -0,0 +1,78 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.2 |
||||
* @date 2022/7/29 |
||||
*/ |
||||
public class RemoteDebugProgressData { |
||||
|
||||
private Integer percent; |
||||
|
||||
private Integer currentStep; |
||||
|
||||
private Integer totalSteps; |
||||
|
||||
private RemoteDebugStepKeyEnum stepKey; |
||||
|
||||
private Integer stepResult; |
||||
|
||||
public RemoteDebugProgressData() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "RemoteDebugProgressData{" + |
||||
"percent=" + percent + |
||||
", currentStep=" + currentStep + |
||||
", totalSteps=" + totalSteps + |
||||
", stepKey='" + stepKey + '\'' + |
||||
", stepResult=" + stepResult + |
||||
'}'; |
||||
} |
||||
|
||||
public Integer getPercent() { |
||||
return percent; |
||||
} |
||||
|
||||
public RemoteDebugProgressData setPercent(Integer percent) { |
||||
this.percent = percent; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getCurrentStep() { |
||||
return currentStep; |
||||
} |
||||
|
||||
public RemoteDebugProgressData setCurrentStep(Integer currentStep) { |
||||
this.currentStep = currentStep; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getTotalSteps() { |
||||
return totalSteps; |
||||
} |
||||
|
||||
public RemoteDebugProgressData setTotalSteps(Integer totalSteps) { |
||||
this.totalSteps = totalSteps; |
||||
return this; |
||||
} |
||||
|
||||
public RemoteDebugStepKeyEnum getStepKey() { |
||||
return stepKey; |
||||
} |
||||
|
||||
public RemoteDebugProgressData setStepKey(RemoteDebugStepKeyEnum stepKey) { |
||||
this.stepKey = stepKey; |
||||
return this; |
||||
} |
||||
|
||||
public Integer getStepResult() { |
||||
return stepResult; |
||||
} |
||||
|
||||
public RemoteDebugProgressData setStepResult(Integer stepResult) { |
||||
this.stepResult = stepResult; |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
package com.dji.sdk.cloudapi.debug; |
||||
|
||||
/** |
||||
* @author sean |
||||
* @version 1.7 |
||||
* @date 2023/6/29 |
||||
*/ |
||||
public class RemoteDebugResponse { |
||||
|
||||
private RemoteDebugStatusEnum status; |
||||
|
||||
public RemoteDebugResponse() { |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "RemoteDebugResponse{" + |
||||
"status=" + status + |
||||
'}'; |
||||
} |
||||
|
||||
public RemoteDebugStatusEnum getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public RemoteDebugResponse setStatus(RemoteDebugStatusEnum status) { |
||||
this.status = status; |
||||
return this; |
||||
} |
||||
} |