设备日志

This commit is contained in:
2025-08-01 15:19:41 +08:00
parent 8ae15dcd9a
commit 8770c217ae
9 changed files with 403 additions and 6 deletions

View File

@ -0,0 +1,42 @@
package com.fuyuanshen.web.enums;
/**
* @author: 默苍璃
* @date: 2025-08-0114:14
*/
public enum InstructType6170 {
EQUIPMENT_REPORTING(0, "设备上报"),
LIGHT_MODE(1, "灯光模式"),
UNIT_INFO(2, "单位/姓名/职位"),
BOOT_IMAGE(3, "开机图片"),
LASER_LIGHT(4, "激光灯"),
BRIGHTNESS(5, "亮度调节"),
LOCATION_DATA(11, "定位数据");
private final int code;
private final String description;
InstructType6170(int code, String description) {
this.code = code;
this.description = description;
}
public int getCode() {
return code;
}
public String getDescription() {
return description;
}
public static InstructType6170 fromCode(int code) {
for (InstructType6170 type : values()) {
if (type.getCode() == code) {
return type;
}
}
throw new IllegalArgumentException("未知的指令类型代码: " + code);
}
}

View File

@ -0,0 +1,45 @@
package com.fuyuanshen.web.enums;
/**
* @author: 默苍璃
* @date: 2025-08-0114:30
*/
public enum LightModeEnum6170 {
OFF(0, "关灯"),
HIGH_BEAM(1, "强光模式"),
LOW_BEAM(2, "弱光模式"),
STROBE(3, "爆闪模式"),
FLOOD(4, "泛光模式"),
UNKNOWN(-1, "未知的灯光模式");
private final int code;
private final String description;
LightModeEnum6170(int code, String description) {
this.code = code;
this.description = description;
}
public int getCode() {
return code;
}
public String getDescription() {
return description;
}
public static LightModeEnum6170 fromCode(int code) {
for (LightModeEnum6170 mode : values()) {
if (mode.getCode() == code) {
return mode;
}
}
// throw new IllegalArgumentException("未知的灯光模式代码: " + code);
return UNKNOWN;
}
}