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

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

/**
 * Q20参数指令服务
 * 通过 thing/device/{sn}/services 主题下发，设备回复 services_reply
 *
 * @author 938693313@qq.com
 * @since 1.0.0 2026/5/20
 */
public interface Q20ParamService {

    // ==================== 高度/距离限制 ====================

    String setHeightLimit(String deviceSn, float value);
    Object getHeightLimit(String deviceSn);

    String setDistanceLimit(String deviceSn, float value);
    Object getDistanceLimit(String deviceSn);

    // ==================== 围栏 ====================

    String setGeofenceAction(String deviceSn, String value);
    Object getGeofenceAction(String deviceSn);

    // ==================== 返航 ====================

    String setReturnHeight(String deviceSn, float value);
    Object getReturnHeight(String deviceSn);

    String setReturnType(String deviceSn, String value);
    Object getReturnType(String deviceSn);

    // ==================== 电池阈值 ====================

    String setBatteryLowThreshold(String deviceSn, float value);
    Object getBatteryLowThreshold(String deviceSn);

    String setBatteryCriticalThreshold(String deviceSn, float value);
    Object getBatteryCriticalThreshold(String deviceSn);

    String setBatteryEmergencyThreshold(String deviceSn, float value);
    Object getBatteryEmergencyThreshold(String deviceSn);

    String setLowBatteryAction(String deviceSn, String value);
    Object getLowBatteryAction(String deviceSn);

    // ==================== 降落 ====================

    String setAprilTagId(String deviceSn, int value);
    Object getAprilTagId(String deviceSn);

    String setPrecisionLandMode(String deviceSn, String value);
    Object getPrecisionLandMode(String deviceSn);

    // ==================== 避障/传感器 ====================

    String setObstacleAvoidanceEnable(String deviceSn, int value);
    Object getObstacleAvoidanceEnable(String deviceSn);

    String setObstacleAvoidanceDistance(String deviceSn, float value);
    Object getObstacleAvoidanceDistance(String deviceSn);

    String setVisualSensorEnable(String deviceSn, int value);
    Object getVisualSensorEnable(String deviceSn);

    // ==================== 其他开关 ====================

    String setRtkEnable(String deviceSn, int value);
    Object getRtkEnable(String deviceSn);

    String setUatMultCtrlEnable(String deviceSn, int value);
    Object getUatMultCtrlEnable(String deviceSn);

    String setParachuteSafetyEnable(String deviceSn, int value);
    Object getParachuteSafetyEnable(String deviceSn);

    // ==================== 批量 ====================

    String setParams(String deviceSn, Q20ParamsDTO dto);
    JSONObject getParams(String deviceSn);
}
