package constant const ( RoleAdmin = 1 RoleNormal = 0 DefaultPassword = "e10adc3949ba59abbe56e057f20f883e" //系统默认密码123456 FilterNameECG = "BW-ECG*" FilterNameEEG = "MIND*" FilterNameALL = "BW-ECG*,MIND*" BindUserInfoCmdPrefix = "e841aa" //绑定用户信息指令头 SetTimeCmdPrefix = "e840" StartCollectCmdPrefix = "e823" StartTransCmd = "e82001363380" StopTransCmd = "0xe826" StopCollectCmd = "0xe822" // EcgDefaultAge ECG默认用户信息 EcgDefaultAge = 20 //年龄默认值20 EcgDefaultHeight = 170 EcgDefaultWeight = 65 MaxNameByteLength = 12 DefaultPlaceHolder = "00" // MessageTypeDeviceScanned websocket 消息类型 扫描到设备 MessageTypePayload = "payload" MessageTypeDeviceScanned = "device" MessageTypeEEGData = "eegData" MessageTypeECGData = "ecgData" MessageTypeCloseScan = "closeScan" MessageTypeStartScan = "startScan" MessageTypeFilter = "filter" MessageTypeSUUID = "suuid" MessageTypeConnect = "connect" MessageTypeDisConnect = "disConnect" MessageTypeConnectList = "connectedList" MessageTypeWNP = "wnp" // DefaultKey 3des DefaultKey = "240262447423713749922240" DefaultIv = "12345678" TopicConnectSub = "/connect_packet/connect1_subscribe" /*V2指令*/ CmdStopScan = "[{\"cmd\":\"AT+SCAN=\",\"s\":\"0\"}]" CmdStartScan = "[{\"cmd\":\"AT+SCAN=\",\"s\":\"1\"}]" CmdSetUUID = "[{\"cmd\":\"AT+SUUID=\",\"total\":\"1\"},{\"a\":\"FFF0\"}]" Success = "SUCCESS" //v2 payload case PayloadScan = "SCAN" //扫描|关闭扫描响应 PayloadFLT = "FLT" //设置过滤 PayloadSUUID = "SUUID" //设置服务UUID PayloadConnect = "CONNECT" //连接设备 PayloadDisConnect = "DISSCONNECT" //断开连接设备 PayloadQuenue = "QUENUE" //已连接设备 PayloadCNB = "CNB" //连接个数 PayloadNotify = "NOTIFY" PayloadWNP = "WNP" )