package com.dji.sample.wayline.model.param;
|
|
import com.dji.sdk.annotations.CloudSDKVersion;
|
import com.dji.sdk.cloudapi.device.ExitWaylineWhenRcLostEnum;
|
import com.dji.sdk.cloudapi.wayline.*;
|
import com.dji.sdk.config.version.CloudSDKVersionEnum;
|
import com.dji.sdk.config.version.GatewayTypeEnum;
|
import lombok.Data;
|
|
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 wmm
|
* @version 0.1
|
* @date 2024/5/8
|
*/
|
@Data
|
public class FlighttaskPrepareParam {
|
/**
|
* Task ID
|
*/
|
// @NotNull
|
// @Pattern(regexp = "^[^<>:\"/|?*._\\\\]+$")
|
private String flightId;
|
private String bid;
|
|
/**
|
* Time to execute
|
* Millisecond timestamp of task execution time. Optional field.
|
* When the `task_type` is 0 or 1, it is required. When the `task_type` is 2, it is not required.
|
*/
|
@Min(123456789012L)
|
private Long executeTime;
|
|
/**
|
* Task type
|
* The execution time of immediate task and timed task are defined by `execute_time`.
|
* The conditional task supports the task readiness condition defined by `ready_conditions`.
|
* The task can be executed if conditions are satisfied within a specified period.
|
* Immediate task has the highest priority. Timed task and conditional task have the same priority.
|
*/
|
@NotNull
|
private TaskTypeEnum taskType;
|
|
/**
|
* Wayline type
|
*/
|
// @NotNull
|
// private WaylineTypeEnum waylineType;
|
|
/**
|
* Wayline file object
|
*/
|
@NotNull
|
@Valid
|
private String fileId;
|
|
|
private String workspaceId;
|
/**
|
* Task readiness condition
|
*/
|
@Valid
|
private ReadyConditions readyConditions;
|
|
/**
|
* Task executable condition
|
*/
|
@Valid
|
private ExecutableConditions executableConditions;
|
|
/**
|
* Wayline breakpoint information
|
*/
|
@Valid
|
private FlighttaskBreakPoint breakPoint;
|
|
/**
|
* Height for RTH
|
*/
|
@NotNull
|
@Min(20)
|
@Max(1500)
|
private Integer rthAltitude;
|
|
/**
|
* Remote controller out of control action
|
* Out of control action: the current fixed transmitted value is 0, meaning Return-to-Home (RTH).
|
* Note that this enumeration value definition is inconsistent with the flight control and dock definitions,
|
* and a conversion exists at the dock end.
|
*/
|
@NotNull
|
private OutOfControlActionEnum outOfControlAction;
|
|
/**
|
* wayline out of control action
|
* consistent with the KMZ file
|
*/
|
@NotNull
|
private ExitWaylineWhenRcLostEnum exitWaylineWhenRcLost;
|
|
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0)
|
private RthModeEnum rthMode = RthModeEnum.PRESET_HEIGHT;
|
|
@Valid
|
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_0)
|
private SimulateMission simulateMission;
|
|
@NotNull
|
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_1, include = GatewayTypeEnum.DOCK2)
|
private WaylinePrecisionTypeEnum waylinePrecisionType;
|
|
@NotNull
|
@CloudSDKVersion(since = CloudSDKVersionEnum.V1_0_1, include = GatewayTypeEnum.DOCK2)
|
private String waylineName;
|
}
|