package com.hh.lib_base;

import com.hh.lib_base.BuildConfig;

/**
 * Description: $
 * @author xwh
 * time 2024/8/19
 **/
public class Constants {


    /**
     * 是否正式版本
     * true 非release版本
     * false release版本
     */
    public static final Boolean IS_DEBUG = !BuildConfig.BUILD_TYPE.equals("release");

    /**
     * 是否开启心跳、日志请求
     * true 开启
     * false 关闭
     * 防止调试时过多的请求日志
     * 注意：上线时改为true
     */
    public static final Boolean IS_OPEN_LOG_URL = true;

    public static class Url {

        public static final String BASE_URL = BuildConfig.BASE_URL;

        // api
        public static final String BASE_API_URL = BuildConfig.BASE_API_URL;

        // 具体接口
        public static final String API_CONFIG_QUERY = "api/v1/iot/device/config/sn/config";
        public static final String API_CONFIG_UPDATE = "api/v1/iot/device/config/sn/updateConfig";
        public static final String API_LOGCAT_ADD = "api/v1/app/log/add";

        // 默认三要素url，在线配置
        public static final String USER_INFO_THREE_ELEMENTS = "https://ldb-permit.hz-hanghui.com:8088/hanghui/outapi/alipayApi/faceAuth/getAlipayUserInfo";
        // 默认日志url，在线配置
//        public static final String LOG_URL_DEFAULT = "https://tx.hz-hanghui.com:8088/hanghui-server-platform/api/v1/app/log/add";
        public static final String LOG_URL_DEFAULT = "https://hhomc.hz-hanghui.com:8096/middle-management/api/v1/app/log/push";



    }


    public static class Value {

        public static final String TOKEN = "edcf7741161b70c0813a05a5e4391fdb";


        public static final String CAMERA_BRAND = "Mario";

        // 设置进入
        public static final String PWD = "HH117521";


        // 业务app心跳
        public static final int TIME_HEARTBEAT = 15 * 1000;


        // 麦克风持续录音输出间隔
        public static final int TIME_RECORD_INTERVAL = 1000;


        // 启动红外感应的指令
        public static final String INDUCTION_INSTRUCT = "O(00,26,1)E";

        // 红外感应——有人
        public static final String INDUCTION_PEOPLE_YES = "I(00,26,1)E";

        // 红外感应——无人
        public static final String INDUCTION_PEOPLE_NO = "I(00,26,0)E";

        // 红外感应——勿动key，对外的文档key
        public static final String INDUCTION_CODE = "inductionCode";

        // 麦克风持续录音输出间隔
        public static final int TIME_INDUCTION_INTERVAL = 3000;


    }


    public static class LogcatValue {

        // 日志各节点
        public static final String LOG_NODE_NET = "网络请求---";
        public static final String LOG_NODE_NET_CONFIG_QUERY = LOG_NODE_NET + "在线配置--获取--";
        public static final String LOG_NODE_NET_CONFIG_UPDATE = LOG_NODE_NET + "在线配置--更新--";
        public static final String LOG_NODE_NET_HEARTBEAT = LOG_NODE_NET + "设备心跳--";
        public static final String LOG_NODE_QR = "二维码";
        public static final String LOG_NODE_FACE = "BPaaSApi--刷脸---";
        public static final String LOG_NODE_IDCARD = "身份证";
        public static final String LOG_NODE_DEVICE = "设备信息---";
        public static final String LOG_NODE_APPLET = "小程序---";
        public static final String LOG_NODE_SPEECH = "设备信息---";
        public static final String LOG_NODE_MICROPHONE = "麦克风";
        public static final String LOG_NODE_AIDL = "aidl---";
        public static final String LOG_NODE_INFRARED_INDUCTION = "红外感应";
        public static final String LOG_PRINT = "打印";
        public static final String LOG_SPEECH = "语音---";

        public static final String LOG_SECONDARY_SCREEN_PAGE = "副屏";

        public static final String LOG_SOCIAL_SECURITY_CARD = "社保卡";

        public static  final String LOG_NFC_CPU="NFC_CPU卡";

        public static final String LOG_STORAGE_FACE = "BPaaSApi--刷脸入库---";

        public static final String LOG_FLOATINGEXITBUTTON = "悬浮返回按钮";

        public static final String LOG_M1CARD = "NFC_M1卡";

        public static final String LOG_ASR = "ASR-语音识别";

        public static final String LOG_DOWNLOADFILE = "文件下载";

        // 对应web的日志类型
        public static final String NET_LOGCAT = "Logcat";
        public static final String NET_ERROR = "Error";
        public static final String NET_CRASH = "Crash";


        public static final String NODE = "日志节点---";
        public static final String LINE = "日志位置---";
        public static final String WARP = " ---\n";
    }


    public static class Ampe {

        // 通道名字
        public static final String AMPE_NAME = "HHCommunication";
        //ampe event start
        public static final String EVENT_START = "start";
        //ampe event stop
        public static final String EVENT_STOP = "stop";
        //ampe event init
        public static final String EVENT_INIT = "init";


        // 二维码
        public static final String ACTION_QR = "getQRCode";
        // 二维码监听，app有消息，就推给小程序
        public static final String EVENT_QR_LISTENER = "initQRListener";
        // 身份证
        public static final String ACTION_IDCARD = "getIDCardInfo";
        // 关闭身份证
        public static final String ACTION_IDCARD_CLOSE = "closeIDCardInfo";
        // 身份证监听，app有消息，就推给小程序
        public static final String EVENT_IDCard_LISTENER = "initIDCardListener";
        // 刷脸——初始化startBPass
        public static final String ACTION_INIT_FACE = "initFace";
        // 刷脸1：N
        public static final String ACTION_FACE = "getFaceInfo";
        // 刷脸1：1人证比对
        public static final String ACTION_FACE_PERSONCARD = "getFaceInfoPersonCard";

        //人脸入库
        public static final String ACTION_STORAGE_FACE_INFO = "doStorageFaceInfo";

        // 刷脸——江西（仅他一家的处理）
        public static final String ACTION_SCAN_FACE = "scanFace";
        // 设备信息
        public static final String ACTION_DEVICE = "getDeviceInfo";
        // 保存文件
        public static final String ACTION_STORAGE = "storage";

        // 语音播报
        public static final String ACTION_SPEECH = "speech";
        // 语音播报停止
        public static final String ACTION_SPEECH_STOP = "speechStop";
        // 手输证件号
        public static final String ACTION_ENTERIDNUMBER  = "enterIDNumber";
        //小票打印
        public static final String ACTION_PRINT = "receiptPrinting";

        // 开启麦克风——录完一整个返回
        public static final String ACTION_START_MICROPHONE = "startMicrophone";
        // 结束麦克风——录完一整个返回
        public static final String ACTION_STOP_MICROPHONE = "stopMicrophone";

        // 麦克风监听
        public static final String EVENT_MICROPHONE_LISTENER = "initMicrophoneListener";
        // 开启麦克风——持续返回
        public static final String ACTION_START_MICROPHONE_LISTENER = "startMicrophoneListener";
        // 结束麦克风——持续返回
        public static final String ACTION_STOP_MICROPHONE_LISTENER = "stopMicrophoneListener";
        // 获取麦克风录音状态
        public static final String ACTION_MICROPHONE_STATE = "getMicrophoneState";

        // 语音识别ASR
        public static final String ACTION_DOASR = "doASR";
        // 语音识别ASR 监听
        public static final String ACTION_LISTENER_INIT_ASR = "initASR";

        // 红外感应监听，app有消息，就推给小程序
        public static final String EVENT_INFRARED_INDUCTION_LISTENER = "initInfraredInductionListener";
        // 开启红外感应——持续返回
        public static final String ACTION_START_INFRARED_INDUCTION_LISTENER = "startInfraredInductionListener";
        // 结束红外感应——持续返回
        public static final String ACTION_STOP_INFRARED_INDUCTION_LISTENER = "stopInfraredInductionListener";

        //开启副屏
        public static final String ACTION_OPENSECONDARYSCREEN = "openSecondaryScreen";
        //关闭副屏
        public static final String ACTION_CLOSESECONDARYSCREEN = "closeSecondaryScreen";
        //获取副屏显示状态
        public static final String ACTION_SECONDARYSCREENSTATE = "getSecondaryScreenState";

        //社保卡读卡器配置
        public static final String ACTION_SOCIALSECURITYCARDCONFIG = "socialSecurityCardConfig";
        //获取社保卡信息
        public static final String ACTION_SOCIALSECURITYCARDINFO = "getSocialSecurityCardInfo";
        //社保卡读卡器信息监听
        public static final String EVENT_SOCIALSECURITYCARD_LISTENER = "socialSecurityCardListener";

        //东信NFC读卡器监听
        public static final String EVENT_NFC_CPUCARDLISTENER = "CPUCardListener";
        //东信NFC 单次上电读取nfc卡信息
        public static final String ACTION_NFC_READONCECPUCARDINFO = "readOnceCPUCardInfo";
        //启动东信读卡器轮询
        public static final String ACTION_NFC_STARTCPUCARDLOOPREAD = "startCPUCardLoopRead";
        //停止东信读卡器轮询
        public static final String ACTION_NFC_STOPCPUCARDLOOPREAD = "stopCPUCardLoopRead";
        //东信NFC 冷复位 发送PSAM卡需要先调用
        public static  final String ACTION_NFC_PSAMCARDCOLDRESET = "psamCardColdReset";
        //东信NFC 发送apdu命令
        public static  final String ACTION_NFC_SENDCPUCARDCOMMAND = "sendCPUCardCommand";
        //东信NFC 发送apdu命令集
        public static  final String ACTION_NFC_SENDCPUCARDAPDUCOMMANDS = "sendCPUCardApduCommands";
        //东信NFC  蜂鸣器
        public static  final String ACTION_DX_NFC_BUZZER = "startBuzzer";
        // 设备配置
        public static final String ACTION_DEVICE_CONFIG = "deviceConfig";
        //悬浮返回按钮
        public static final String ACTION_FLOATINGEXITBUTTON = "floatingExitButton";
        //M1卡轮询 启动/关闭
        public static final String ACTION_DOM1LISTENER = "doM1Listener";
        //M1卡轮询监听
        public static final String ACTION_INITM1LISTENER = "initM1Listener";
        //M1卡写
        public static final String ACTION_DOM1WRITE = "doM1Write";
        //M1卡初始化
        public static final String ACTION_DOM1CLEAR = "doM1Clear";



        public static final String AMPE_EVENT = "";

        public static final String AMPE_EVENT_CLOSE = "close";

        // 支付宝小程序硬件引擎——包名
        public static final String AMPE_ZFB_ENGINE_PKG = "com.alipay.arome.app";

        // 支付宝小程序硬件引擎——版本号
        public static final String AMPE_ZFB_ENGINE_VERSION_NAME = "10.3.34.679";

    }


    public static class SERVER_ACTION {

        // 设备状态上报
        public static final String REPORT_STATUS = "REPORT_STATUS";

        // 日志拉取
        public static final String FETCH_LOG = "FETCH_LOG";

        // ⽇志下载
        public static final String DOWNLOAD_LOG = "DOWNLOAD_LOG";

        // 应⽤关闭
        public static final String CLOSE_APP = "CLOSE_APP";

        // 设备重启
        public static final String REBOOT = "REBOOT";

        // apk安装升级
        public static final String INSTALL_UPGRADE = "INSTALL_UPGRADE";

        // apk升级进度
        public static final String UPGRADE_PROCESSING = "UPGRADE_PROCESSING";

        // apk停⽌下载
        public static final String STOP_DOWNLOAD = "STOP_DOWNLOAD";

    }

    public static class DeviceModel {

        // YX08
        public static final String K8 = "K8";

        public static final String F10 = "F10";

        // 紫鹏
        public static final String ZP = "HYIP1000-EI";

        // 访客机d2——YX02
        public static final String D2 = "D2";

        public static final String ZP_A10 = "A10";

        // 紫鹏-X5 有的是A50R3
        public static final String ZP_A50 = "A50";

        // 马里奥-Y9
        public static final String T1YB01 = "T1YB01";

        // 马里奥-Y9——蚂蚁OS
        public static final String T1YB01A = "T1YB01A";

        public static final String P55 = "P55";

    }


    public static class Status {



        // 任务状态，最后两位
        // 初始化
        private final int STATUS_TASK_INIT = 0x00000001;// 1
        // 进行中
        private final int STATUS_TASK_DOING = 0x00000002;// 2
        // 等待
        private final int STATUS_TASK_WAIT = 0x00000004;// 4
        // 完成，成功
        private final int STATUS_TASK_COMPLETE = 0x00000008;// 8
        // 错误
        private final int STATUS_TASK_ERROR = 0x00000010;// 16

        // 刷脸任务类型，最后三四位
        // 刷脸初始化
        private final int STATUS_FACE_INIT = 0x00000100;
        // 刷脸1：N
        private final int STATUS_FACE = 0x00000200;
        // 人证1:1
        private final int STATUS_PersonCard = 0x00000400;
        // 初始化和刷脸1：N——天正思维的，江西。先初始化然后直接刷脸
        private final int STATUS_FACE_TZSW = 0x00000800;

        // 其他任务类型，最后五六位
        // 身份证
        private final int STATUS_IDcard = 0x00010000;
        // 二维码
        private final int STATUS_Qr = 0x00020000;
        // 护照机
//        private final int STATUS_Qr = 0x0020000;


    }




}
