//
// Created by WJG on 2020-5-7.
//

#ifndef NEWCOSS_COSS_COMM_H
#define NEWCOSS_COSS_COMM_H

//#define USE_MONGOOSE 1
//#define DEVICE_TEST
#define DEVICE_DB

#define SPACE_CHAR 32

#define HTTP_NAME "http"
#define COSS_NAME "coss"
#define VDAL_NAME "vdal-mesh"
#define VDAL_ZIG_NAME "vdal-zig"
#define MUFIS_NAME "mufis"
#define GAFFIC_NAME "gaffic"
#define CPAD_NAME "cpad"
#define UNKNOWN "unknown"
#define COMMAND_SOURCE "cmd_source"
#define MSG_SRC "mg_src"
#define COSS_CFG_NAME "coss_cache.json"

#define APP_SOURCE "app"
#define CPAD_SOURCE "cpad"
#define VOICE_SOURCE "voice"
#define AUTO_SCENE_SOURCE "auto"
#define MANUAL_SCENE_SOURCE "manual"
#define CONFIG_CMD_SOURCE "cfg"

#define DEFAULT_FROUP_FILE "default_group.json"
#define LIGHTJIA_TYPE_FILE "lightjia_type.json"
#define GROUP_ID_MAP_FILE "group_id_map.json"

#define DEVICE_UUID "device_uuid"
#define DEVICE_ADDRESS "device_address"
#define DEVICE_NAME "device_name"
#define DEVICE_GENTYPE "genType"
#define DEVICE_HIDE "device_hide"   //不显示设备，已分组，且不是保留显示状态
#define DEVICE_ID "device_id"
#define DEVICE_MAC "device_mac"
#define DEVICE_CLASS "device_class"
#define DEVICE_TYPE "device_type"
#define DEVICE_LOCATION "device_location"
#define NICK_NAME "nick_name"
#define CONNECT_TYPE "connect_type"
#define ONLINE_STATE "online_state"
#define RUNNING_STATE "running_state"
#define DEVICE_BRAND "device_brand"
#define DEVICE_GROUP_ADDR "group_addr"
#define GROUP_DEVICE_LIST "group_dev_list"
#define GROUP_DEVICE_CLASS "GroupDevice"
#define STATUS_TYPE "status_type"
#define DEVICE_LIST "device_list"
#define FACTORY_NAME "factory_name"
#define SOFT_VERSION "soft_ver"

#define GAFFIC_SRC_SITE "$site"

#define QIJIAN_COMPANY "qijian"

#define ON_LINE "online"
#define OFF_LINE "offline"
#define DEVICE_ON "on"
#define DEVICE_OFF "off"

#define DEFAULT_GROUP "default_group"

#define BASIC_PROPERTIES "basic_properties"

#define LOCATION_LIST "location_list"
#define DEFAULT_LOCATION "default_location"
#define USER_LOCATION "user_location"
#define LOCATION_NAME "location_name"

#define REQUEST_PARAM "param"
#define APP_TOKEN "accessToken"
#define CALL_ID "cid"
#define URI_KEY "uri"
#define CMD_PARAM "param"

#define URI_SPLIT "/"

//#define RULE_NAME "rule_name"

#define USRE_PASSWORD "password"
#define GATE_NAME "ChanghongIoTEdge"
#define DEFAULT_PWD "123456"

#define JD_CMD "jdcmd"
#define REQUEST "JDRequest"
#define RESPONSE "JDResponse"
#define SSESSION_KEY "session_key"
#define REQUEST_2_SYSTEM "system"
#define REQUEST_2_DEV "device"
#define REQUEST_LIGHTJIA "lightjia"

#define DEV_NAME_SPLIT "_"

#define WELCOME "Welcome"
#define UNSUPPORT "unSupport"

#define CMD_GATE_LOGIN "gateLogin"

#define DEVICE_CONTROL_URI "/device/controlDevice"
#define DEVICE_RESPONSE_URI "/device/response"

#define PATH_SPLIT "/"
#define COSS_CONFIG_DIR "coss_config"
#define DEVICE_FILE_DIR "device_info"
#define DEV_TEST_FILE "device_test.json"
#define USER_DEFINE_LOCATION_FILE "user_define_location.json"
#define HOME_DEVICE_FILE "home_device.json"
#define SHORTCUT_DEVICE_FILE "shortcut_device.json"
#define HOME_DEVICE_LIST "home_device_list"
#define SHORTCUT_DEVICE_LIST "shortcut_device_list"
#define LOCATION_DEVICE_LIST "device_list"

#define CONTROL_COMMAND "command"
#define DEVICE_RESPONSE "response"
#define RESPONSE_PARAM "param"
#define SCAN_INFO "scan_info"
#define SCAN_END "terminate"
#define SCAN_DEVICE "scanDevice"
#define ADD_DEVICE "addDevice"
#define STOP_SCAN_DEVICE "stopScanDevice"
#define RESET_GATE "reset"
#define SCAN_RESULT "scanResult"
#define ADD_RESULT "addResult"
#define ADD_BEGIN "addBegin"
#define ADD_RESULT_STRIP "addResultStrip"
#define STATUS_REPORT "statusValue"
#define SUBSCRIBE_RESULT "subscribeLightResult"
#define CANCEL_SUBSCRIBE_RESULT "cancelSubscribeLightResult"
#define SENSOR_REPORT "sensorValue"
#define SENSOR_TYPE "sensor_type"
#define SENSOR_PROPERTY "sensor_property"
#define SUCCESS "success"
#define FAIL "fail"
#define OPEN_COMMAND "open"
#define CLOSE_COMMAND "close"
#define TURN_ON_ALL_COMMAND "turnOnAll"
#define TURN_OFF_ALL_COMMAND "turnOffAll"
#define TURN_ON_COMMAND "turnOn"
#define TURN_OFF_COMMAND "turnOff"

#define DEFAULT_ROOM_CN "默认房间"
#define BRIGHTNESS "brightness_value"
#define COLORTEMPERATURE "colortemperature_value"
#define SATURATION "saturation_value"
#define MODE_VALUE "mode_value"
#define FLOW_SPEED "flow_speed"
#define COLOR_HUE "hue_value"

#define CPAD_CONNECT_TYPE "cpad"
#define LIGHTER_CLASS "灯"
#define SWITCH_CLASS "开关"
#define PLUG_CLASS "插座"
#define SENSOR_CLASS  "传感器"
#define CURTAIN_CLASS "窗帘"

#define STRING_DEVICE "device"
#define STRING_PANEL "SmartPanel"
#define STRING_PANEL_CN "智能面板"

#define VOICE_SCENE_NOT_FOUND "对不起,你好像还没有编辑此场景"
#define VOICE_DEVICE_NOT_FOUND "对不起,未能匹配到设备,请换个说法"

#define SCENE_ACC_RESPONSE "/scene/regroupResult"
#define SCENE_UNACC_RESPONSE "/scene/clearGroupResult"

#define PAYLOAD "payload"
#define CODE "code"
#define MESSAGE "msg"
#define MSG_SUCCESS "successs"
#define MSG_FAIL "fail"
#define RESPON_FAIL_MSG "Request return failed,please check url,token and param."
#define CODE_SUCCESS 200
#define CODE_FAIL 201
#define CODE_UNSUPPORT 202
#define CODE_PARAM_ERR 203
#define CODE_DEVICE_NOTFOUND 204

#endif //NEWCOSS_COSS_COMM_H
