package com.ruoyi.mqtt.enums; /** * GNSS/RTK定位状态枚举 */ public enum RtkStatus { LASER_ONLY(-1, "纯激光定位"), INIT(0, "初始化"), SINGLE(1, "单点定位"), DGPS(2, "码差分"), INVALID_PPS(3, "无效PPS"), RTK_FIXED(4, "固定解"), RTK_FLOAT(5, "浮点解"), ESTIMATING(6, "正在估算"), MANUAL_INPUT(7, "人工输入固定值"), SIMULATION(8, "模拟模式"), WAAS(9, "WAAS差分"); private final int code; private final String description; RtkStatus(int code, String description) { this.code = code; this.description = description; } public int getCode() { return code; } public String getDescription() { return description; } public static RtkStatus fromCode(int code) { for (RtkStatus status : values()) { if (status.code == code) { return status; } } return null; } }