package com.ruoyi.device.mqtt.enums;

/**
 * 消息类型枚举
 *
 * @author lwm
 */
public enum MsgTypeEnum
{
    /** 系统类 */
    UPGRADE_DOWN(0x01, 0x1001, "升级下行"),
    UPGRADE_STATUS_UP(0x01, 0x2001, "升级状态上行"),
    UNINSTALL_DEVICE_UPGRADE(0X01, 0X1004, "未安装升级"),
    COLLECTOR_INIT_CONFIG_DOWN(0x01, 0x1011, "采集器初始化配置下行"),
    REFRESH_TAX_SN_DOWN(0x01, 0x1012, "刷新税控序列号"),
    TAX_SN_GUN_CONFIG_UP(0x01, 0x2011, "税控口序列号、枪数上行"),
    DEVICE_REBOOT_DOWN(0x01, 0x1021, "设备重启下行"),
    ENCRYPTION_TAX_DATA_DOWN(0x01, 0x1034, "读取加密报税口数据"),
    SCREEN_CONFIG_DOWN(0x01, 0x1019, "安装步骤下行"),
    HEARTBEAT_DOWN(0x01, 0x1008, "安装步骤下行"),
    TIME_SYNC_UP(0x01, 0x2015, "时间同步上行"),
    TIME_SYNC_DOWN(0x01, 0x1015, "时间同步下行"),
    LORA_EXHANGE(0X01, 0X1016, "lora频率切换"),
    READ_LORA_DOWN(0X01, 0X1017, "读取lora下行"),
    READ_LORA_UP(0X01, 0X2017, "读取lora上行"),
    OPW_PARAM_UP(0x01, 0x2032, "液位仪配置上行"),
    OPW_PARAM_DOWN(0x01, 0x1032, "液位仪配置下行"),
    SENSOR_PARAM_DOWN(0x01, 0x1033, "探棒配置下行"),
    TAX_TIME_INTERVAL(0x01, 0x1013, "报税口轮训间隔下行"),
    GET_TAX_SN_DOWN(0x01, 0x1018, "获取税控序列号"),
    REPAIR_TAX_CONFIG(0x01, 0x1020, "报税口维修配置"),
    SYSTEM_SERVICE_CHANGE(0x01, 0x1003, "MQTT配置切换"),
    SYSTEM_SERVICE_CHANGE_WIRED_NETWORK(0x01, 0x1005, "MQTT配置切换有线网"),
    CODER_ROUTER_SEND(0x01, 0x1019, "编码器路由配置下发"),
    CODER_ROUTER_SWITCH(0x01, 0x1022, "编码器路由配置开关"),
    PROBE_ROUTER_DOWN(0x01, 0x1024, "路由表下发"),
    PROBE_ROUTER_INQUIRY(0x01, 0x1025, "路由表问询"),
    PROBE_ROUTER_UP(0x01, 0x2025, "路由表上报"),
    PROBE_PROFILE_COM_DOWN(0x01, 0x1026, "配置文件下发（com端）"),
    PROBE_PROFILE_STITCH_DOWN(0x01, 0x1027, "配置文件下发（针脚映射）"),
    PROBE_PROFILE_LAYING_DOWN(0x01, 0x1040, "配置文件下发（排线方式）"),
    OPEN_EIGHT_CODER(0X01, 0X1028, "开启8段码上报"),
    CLOSE_EIGHT_CODER(0X01, 0X1029, "完成8段码上报"),
    EIGHT_CODE_UP(0x01, 0x2030, "8段码数据上报"),
    PROBE_RELATION_UP(0x01, 0x2041, "探针板主从问询"),
    PROBE_RELATION_DOWN(0x01, 0x1041, "探针板主从应答"),
    TUOSHENG_CIPHERTEXT_REAL_READ(0x01, 0x1051, "拓盛密文实时读取"),
    TUOSHENG_CIPHERTEXT_REAL_REPLY(0x01, 0x2051, "拓盛密文实时读取应答"),
    PASS_THROUGH_INSTRUCTION_DOWN(0x01, 0x1052, "透传指令下行"),
    PASS_THROUGH_INSTRUCTION_UP(0x01, 0x2052, "透传指令上行"),
    CODER_ORDER_DOWN(0x01, 0x1053, "编码器抬枪下行"),
    CODER_ORDER_UP(0x01, 0x2053, "编码器抬枪上行"),
    USER_LOGIN_DOWN(0x01, 0x1111, "登录结果返回"),
    USER_LOGIN_UP(0x01, 0x2111, "登录账号上传"),
    TAX_RAISE_HANG_CONFIG_UP(0x01, 0x2009, "报税口抬挂枪配置上行"),
    TAX_RAISE_HANG_CONFIG_DOWN(0x01, 0x1009, "报税口抬挂枪配置下行"),
    SHANXI_CONFIG_UP(0x01, 0x2090, "山西省平台配置上行"),
    SHANXI_CONFIG_DOWN(0x01, 0x1090, "山西省平台配置下行"),
    BLOCKER_ROUTER_DOWN(0x01, 0x1070, "阻断器路由下行"),
    BLOCKER_STATUS_DOWN(0x01, 0x1072, "阻断器开关下行"),
    BLOCKER_STATUS_UP(0x01, 0x2072, "阻断器开关上行"),

    /** 状态类 */
    FIRMWARE_INFO_UP(0x02, 0x2001, "固件信息上行"),
    STATUS_INFO_UP(0x02, 0x2002, "设备状态上行"),
    DECRYPT_DEVICE_UP(0x02, 0x2003, "解密板设备状态上行"),
    PROBE_STATUS_INFO_UP(0x02, 0x2004, "探针版设备状态上行"),
    GUN_BLOCKER_STATUS_INFO_UP(0x02, 0x2005, "加油枪阻断器设备状态上行"),
    FIRMWARE_INFO_DOWN(0x02, 0x1001, "固件信息下行"),

    /** 数据类 */
    TAX_DATA_UP(0x03, 0x2001, "报税口数据上行"),
    RAISE_HANG_TAX_DATA_UP(0x03, 0x2003, "报税口数据上行"),
    TAX_ERROR_DATA_UP(0x03, 0x2002, "税控口错误数据上行"),
    OPW_DATA_UP(0x03, 0x2021, "液位仪数据上行"),
    SENSOR_DATA_UP(0x03, 0x2022, "液位仪数据上行"),
    OPW_DATA_DOWN(0x03, 0x1021, "液位仪数据下行"),
    SCREEN_DATA_DOWN(0x03, 0x1041, "显示屏数据下行"),
    SCREEN_DATA_UP(0x03, 0x2041, "显示屏数据上行"),
    CODER_DATA_UP(0x03, 0x2051, "编码器数据上行"),
    CODER_TIME_DATA_UP(0x03, 0x2053, "编码器时间差数据上行"),
    CODER_DATA_UP_CAMERA(0x03, 0x2052, "编码器数据上行"),
    PROBE_DATA_UP(0x03, 0x2061, "探针板数据上行"),
    PROBE_DATA_DOWN(0x03, 0x1061, "探针板数据下行"),
    OPW_DAY_REPORT_DATA_UP(0x03, 0x3061, "探针板数据上行"),
    OPW_DAY_REPORT_DATA_DOWN(0x03, 0x4061, "探针板数据下行"),
    PROBE_SAMPLING_RATE_UP(0x10, 0x2063, "探针版采样率上行"),
    PROBE_SAMPLING_RATE_DOWN(0x10, 0x1063, "探针版采样率下行"),
    CIPHERTEXT_DATA_UP(0x03, 0x2071, "报税口密文数据"),
    CIPHERTEXT_RAISE_HANG_DATA_UP(0x03, 0x2073, "报税口密文数据-带抬挂枪"),
    CIPHERTEXT_DATA_DECRYPT_DOWN(0x03, 0x1072, "报税口密文数据"),
    CIPHERTEXT_DATA_DECRYPT_UP(0x03, 0x2072, "报税口密文数据"),
    CIPHERTEXT_DATA_DECRYPT_RETURN_DOWN(0x03, 0x1065, "报税口密文数据返回测试板"),
    PUSH_DATA_DOWN(0x03, 0x1090, "山西省平台数据透传下行"),
    PUSH_DATA_UP(0x03, 0x2090, "山西省平台数据透传上行"),

    CMD_DATA_DOWN(0x03, 0x1004, "操作指令下行"),
    CMD_DATA_UP(0x03, 0x2004, "操作指令上行"),

    /** 升级类 */
    UNINSTALL_DEVICE_UPGRADE_2(0X04, 0X1004, "未安装升级"),
    UPGRADE_DOWN_2(0x04, 0x1002, "升级下行"),
    UPGRADE_DOWN_3(0x04, 0x1001, "升级下行"),
    UPGRADE_UP_2(0x04, 0x2002, "升级上行"),
    UPGRADE_UP_3(0x04, 0x2001, "升级上行"),
    UPGRADE_DOWN_4(0x04, 0x1030, "升级包下载下行"),
    UPGRADE_UP_4(0x04, 0x2030, "升级包下载上行"),
    GET_APK_UP(0x04, 0x2101, "固件查询"),
    GET_APK_DOWN(0x04, 0x1101, "固件返回"),
    GET_APK_URL_UP(0x04, 0x2102, "固件URL查询"),
    GET_APK_URL_DOWN(0x04, 0x1102, "固件URL返回"),
    VERSION_SYNC(0x04, 0x1011, "版本同步"),

    /** 日志类 */
    LOG_DOWN(0x10, 0x1001, "日志开关下行"),
    LOG_SOURCE_DOWN(0x10, 0x1002, "日志开关下行（原始数据）"),
    LOG_UP(0x10, 0x2001, "日志明细"),
    PROBE_ERROR_DATA_UP(0x10, 0x2062, "探针板错误数据上行"),

    /**
     * TSB调试宝 一级类型=0x4A 指定JSON （实际的功能 在body中指定）
     */
    JSON_BODY(0x4A, 0x0000, "调试宝JSON报文体");

    private final int firstType;
    private final int secondType;
    private final String message;

    MsgTypeEnum(int firstType, int secondType, String message)
    {
        this.firstType = firstType;
        this.secondType = secondType;
        this.message = message;
    }

    public int getFirstType()
    {
        return firstType;
    }

    public int getSecondType()
    {
        return secondType;
    }

    public String getMessage()
    {
        return message;
    }
}
