无人机项目后端代码
sean.zhou
2023-04-25 694b9483c7a551626244cbc222c602ea9ff74094
src/main/java/com/dji/sample/control/service/IControlService.java
@@ -2,7 +2,8 @@
import com.dji.sample.common.model.ResponseResult;
import com.dji.sample.component.mqtt.model.CommonTopicReceiver;
import com.dji.sample.control.model.param.RemoteDebugParam;
import com.dji.sample.control.model.enums.DroneAuthorityEnum;
import com.dji.sample.control.model.param.*;
import org.springframework.messaging.MessageHeaders;
/**
@@ -19,13 +20,60 @@
     * @param param
     * @return
     */
    ResponseResult controlDock(String sn, String serviceIdentifier, RemoteDebugParam param);
    ResponseResult controlDockDebug(String sn, String serviceIdentifier, RemoteDebugParam param);
    /**
     * Handles multi-state command progress information.
     * Make the drone fly to the target point.
     * @param sn
     * @param param
     * @return
     */
    ResponseResult flyToPoint(String sn, FlyToPointParam param);
    /**
     * End the mission of flying the drone to the target point.
     * @param sn
     * @return
     */
    ResponseResult flyToPointStop(String sn);
    /**
     * Handle progress result notifications for fly to target point.
     * @param receiver
     * @param headers
     * @return
     */
    void handleControlProgress(CommonTopicReceiver receiver, MessageHeaders headers);
    CommonTopicReceiver handleFlyToPointProgress(CommonTopicReceiver receiver, MessageHeaders headers);
    /**
     * Control the drone to take off.
     * @param sn
     * @param param
     * @return
     */
    ResponseResult takeoffToPoint(String sn, TakeoffToPointParam param);
    /**
     * Handle progress result notifications for takeoff to target point.
     * @param receiver
     * @param headers
     * @return
     */
    CommonTopicReceiver handleTakeoffToPointProgress(CommonTopicReceiver receiver, MessageHeaders headers);
    /**
     * Seize the control authority of the drone or the payload control authority.
     * @param sn
     * @param authority
     * @param param
     * @return
     */
    ResponseResult seizeAuthority(String sn, DroneAuthorityEnum authority, DronePayloadParam param);
    /**
     * Control the payload of the drone.
     * @param param
     * @return
     */
    ResponseResult payloadCommands(PayloadCommandsParam param) throws Exception;
}