package com.multictrl.modules.business.q20.service;

import cn.hutool.json.JSONObject;
import com.multictrl.modules.business.q20.dto.*;

/**
 * Q20控制指令服务接口
 *
 * @author 938693313@qq.com
 * @since 1.0.0 2026/5/20
 */
public interface Q20CommandService {

    // ==================== 飞行控制 ====================

    String takeoff(String deviceSn, Q20TakeoffDTO dto);

    String land(String deviceSn, Q20LandDTO dto);

    String stop(String deviceSn);

    String goHome(String deviceSn, Q20GoHomeDTO dto);

    String setHome(String deviceSn, Q20SetHomeDTO dto);

    String navigate(String deviceSn, Q20NavigateDTO dto);

    // ==================== 云台相机 ====================

    String gimbalControl(String deviceSn, Q20GimbalControlDTO dto);

    String mountTda(String deviceSn, Q20MountTdaDTO dto);

    String cameraPhotoTake(String deviceSn, Q20CameraDTO dto);

String cameraRecordingStart(String deviceSn, Q20CameraDTO dto);

    String cameraRecordingStop(String deviceSn, Q20CameraDTO dto);

    String cameraFocalLengthSet(String deviceSn, Q20CameraFocalLengthDTO dto);

    // ==================== 直播 ====================

    String liveStartPush(String deviceSn, Q20LiveStartDTO dto);

    String liveStopPush(String deviceSn, int payloadIndex, int video);

    String imageSwitch(String deviceSn, Q20ImageSwitchDTO dto);

    // ==================== 设备控制 ====================

    String deviceCharge(String deviceSn, int value, int version);

    String deviceBoot(String deviceSn, int value);

    String safetySwitch(String deviceSn, int value);

    // ==================== 负载 ====================

    String throwingLock(String deviceSn, Q20ThrowingDTO dto);

    String throwingExecution(String deviceSn, long deviceId);

    String halyarding(String deviceSn, Q20HalyardingDTO dto);

    String logistics(String deviceSn, int value, boolean force);

    // ==================== 虚拟摇杆（高频，不等回复） ====================

    void drc(String deviceSn, Q20DrcDTO dto);

    // ==================== 安全/降落伞 ====================

    String setAutoParachute(String deviceSn, int value);

    JSONObject getEmergencyStopOtp(String deviceSn);

    String emergencyStop(String deviceSn, Q20EmergencyStopDTO dto);

    JSONObject getParachuteOtp(String deviceSn);

    String openParachute(String deviceSn, Q20OpenParachuteDTO dto);

    String confirmParachuteSafety(String deviceSn, int value);

    // ==================== 状态/信息 ====================

    JSONObject queryStatus(String deviceSn, Q20QueryStatusDTO dto);

    JSONObject getConfig(String deviceSn);

    String stereoImage(String deviceSn, int value);

    JSONObject version(String deviceSn);

    // ==================== 日志 ====================

    JSONObject logCount(String deviceSn);

    JSONObject logList(String deviceSn, Q20LogListDTO dto);

    String logData(String deviceSn, Q20LogDataDTO dto);

    // ==================== OTA ====================

    String otaUpgrade(String deviceSn, Q20OtaUpgradeDTO dto);
}
