This commit is contained in:
2026-07-29 13:08:49 +08:00
parent 29ecbf321f
commit 6be6d5d333
59 changed files with 1396 additions and 304 deletions

View File

@@ -0,0 +1,20 @@
package com.maibu.constant;
public class CommandConstant {
public static byte remoteControl = (byte) 0x00;
public static byte heartbeat = (byte) 0xff;
public static byte path = (byte) 0x01;
public static byte status = (byte) 0x02;
public static byte connect = (byte) 0x03;
public static byte interaction = (byte) 0x12; //主要用于推送状态消息等
public static byte readConfig = (byte) 0x05; //读取配置的参数
public static byte writeConfig = (byte) 0x06; //写配置参数
}

View File

@@ -0,0 +1,25 @@
package com.maibu.constant;
import com.maibu.core.business.DeviceRunParam;
import com.maibu.core.enums.ConnectionCloseReason;
import io.netty.util.AttributeKey;
import lombok.Data;
import java.util.concurrent.CompletableFuture;
@Data
public class Constant {
public static final AttributeKey<String> ATT_DEVICE_ID = AttributeKey.valueOf("deviceId");
public static final AttributeKey<CompletableFuture<DeviceRunParam>> READ_CONFIG_KEY =
AttributeKey.valueOf("READ_CONFIG");
public static final AttributeKey<ConnectionCloseReason> ATT_CLOSE_REASON = AttributeKey.valueOf("closeReason");
public static final AttributeKey<String> ATT_ORG_ID = AttributeKey.valueOf("orgId");
public static final AttributeKey<String> ATT_SITE_ID = AttributeKey.valueOf("siteId");
public static final String WheelGainCoefficients = "WheelGainCoefficients";
}