@ -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 |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 195 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 223 KiB After Width: | Height: | Size: 223 KiB |
Before Width: | Height: | Size: 181 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,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,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,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,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,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,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,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,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,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,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,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,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.7 |
||||
* @date 2023/10/12 |
||||
*/ |
||||
public enum LensStorageSettingsEnum { |
||||
|
||||
CURRENT("current"), |
||||
|
||||
ZOOM("zoom"), |
||||
|
||||
WIDE("wide"), |
||||
|
||||
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,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,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,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,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,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; |
||||
} |
||||
} |