# 设备默认连接配置
DEFAULT_DEVICE_IP = "192.168.1.216"
DEFAULT_DEVICE_PORT = 10050

# 协议常量
PKT_HEAD = 0x55AA
PKT_TAIL = 0x5AA5
FILE_NAME_LEN = 128

# 命令定义
class Cmd:
    DEVICE_INFO_GET = 0x01
    DEVICE_INFO_SET = 0x02
    GLOBAL_PARAM_GET = 0x03
    GLOBAL_PARAM_SET = 0x04
    PORT_PARAM_GET = 0x05
    PORT_PARAM_SET = 0x06
    UPGRADE_DATA = 0x07
    STATE_GET = 0x08  # 获取状态命令
    TIME_SYNC = 0x09  # 对时命令
    REBOOT_DEVICE = 0x0A  # 重启命令
    SET_WAVE_ADDRESS = 0x0B # 设置波形接收地址