Commit 730aedcf authored by captainwong's avatar captainwong

update

parent 51b0ff33
...@@ -156,6 +156,7 @@ ...@@ -156,6 +156,7 @@
|1737--我是网线主机|6 网线主机|1~99|||wzq|<ul><li>HB-4040R <img alt="HB-4040R" src="./主机类型/smartresize/HB-4040R-web.png" style="max-height:80px" /></li><li>HB-5050R <img alt="HB-5050R" src="./主机类型/smartresize/HB-5050R-web.png" style="max-height:80px" /></li></ul>| |1737--我是网线主机|6 网线主机|1~99|||wzq|<ul><li>HB-4040R <img alt="HB-4040R" src="./主机类型/smartresize/HB-4040R-web.png" style="max-height:80px" /></li><li>HB-5050R <img alt="HB-5050R" src="./主机类型/smartresize/HB-5050R-web.png" style="max-height:80px" /></li></ul>|
|1757--我是三区段主机|8 三区段主机|1~191|1~8|Yes|jjf|<ul><li>HB-G1000 <img alt="HB-G1000" src="./主机类型/smartresize/HB-G1000-web.png" style="max-height:80px" /></li><li>HB-G1000-4G <img alt="HB-G1000-4G" src="./主机类型/smartresize/HB-G1000-4G-web.png" style="max-height:80px" /></li></ul>| |1757--我是三区段主机|8 三区段主机|1~191|1~8|Yes|jjf|<ul><li>HB-G1000 <img alt="HB-G1000" src="./主机类型/smartresize/HB-G1000-web.png" style="max-height:80px" /></li><li>HB-G1000-4G <img alt="HB-G1000-4G" src="./主机类型/smartresize/HB-G1000-4G-web.png" style="max-height:80px" /></li></ul>|
|1767--我是物联卡主机|9 物联卡主机|1~99|||jjf|<ul><li>HB-5050G-4GW <img alt="HB-5050G-4GW" src="./主机类型/smartresize/HB-5050G-4GW-web.png" style="max-height:80px" /></li></ul>| |1767--我是物联卡主机|9 物联卡主机|1~99|||jjf|<ul><li>HB-5050G-4GW <img alt="HB-5050G-4GW" src="./主机类型/smartresize/HB-5050G-4GW-web.png" style="max-height:80px" /></li></ul>|
|1777--我是真彩主机|7 真彩主机|1~68|1~8|Yes|jjf|<ul><li>HB-G1000 <img alt="HB-G1000" src="./主机类型/smartresize/HB-G1000-web.png" style="max-height:80px" /></li><li>HB-G1000-4G <img alt="HB-G1000-4G" src="./主机类型/smartresize/HB-G1000-4G-web.png" style="max-height:80px" /></li></ul>|
|1787--我是简化版物联卡主机|2 物联卡主机|1~68|||wzq|<ul><li>HB-5050G <img alt="HB-5050G" src="./主机类型/smartresize/HB-5050G-web.png" style="max-height:80px" /></li><li>HB-5050G-4G <img alt="HB-5050G-4G" src="./主机类型/smartresize/HB-5050G-4G-web.png" style="max-height:80px" /></li></ul>| |1787--我是简化版物联卡主机|2 物联卡主机|1~68|||wzq|<ul><li>HB-5050G <img alt="HB-5050G" src="./主机类型/smartresize/HB-5050G-web.png" style="max-height:80px" /></li><li>HB-5050G-4G <img alt="HB-5050G-4G" src="./主机类型/smartresize/HB-5050G-4G-web.png" style="max-height:80px" /></li></ul>|
|1797--我是能打电话的GPRS主机|10 GPRS主机能打电话|1~60||Yes|jjf|<ul><li>HB-2050 <img alt="HB-2050" src="./主机类型/smartresize/HB-2050-web.png" style="max-height:80px" /></li></ul>| |1797--我是能打电话的GPRS主机|10 GPRS主机能打电话|1~60||Yes|jjf|<ul><li>HB-2050 <img alt="HB-2050" src="./主机类型/smartresize/HB-2050-web.png" style="max-height:80px" /></li></ul>|
......
...@@ -90,6 +90,8 @@ ADEMCO_EVENT privateEvents[] = { ...@@ -90,6 +90,8 @@ ADEMCO_EVENT privateEvents[] = {
EVENT_I_AM_WIFI_MACHINE, EVENT_I_AM_WIFI_MACHINE,
EVENT_I_AM_3_SECTION_MACHINE, EVENT_I_AM_3_SECTION_MACHINE,
EVENT_I_AM_IOT_MACHINE, EVENT_I_AM_IOT_MACHINE,
EVENT_I_AM_TRUE_COLOR,
EVENT_I_AM_GPRS_IOT,
EVENT_I_AM_GPRS_PHONE, EVENT_I_AM_GPRS_PHONE,
EVENT_PHONE_USER_SOS, EVENT_PHONE_USER_SOS,
...@@ -120,7 +122,8 @@ void printEvents(const ADEMCO_EVENT* events, size_t len) ...@@ -120,7 +122,8 @@ void printEvents(const ADEMCO_EVENT* events, size_t len)
printf("\n"); printf("\n");
} }
const char* get_core_authoer(MachineType t)
const char* get_core_author(MachineType t)
{ {
switch (t) { switch (t) {
case hb::common::WiFi: case hb::common::WiFi:
...@@ -128,7 +131,6 @@ const char* get_core_authoer(MachineType t) ...@@ -128,7 +131,6 @@ const char* get_core_authoer(MachineType t)
case hb::common::Gprs: case hb::common::Gprs:
case hb::common::Wired: case hb::common::Wired:
return "wzq"; return "wzq";
break;
case hb::common::NetMod: case hb::common::NetMod:
case hb::common::Lcd: case hb::common::Lcd:
...@@ -137,11 +139,27 @@ const char* get_core_authoer(MachineType t) ...@@ -137,11 +139,27 @@ const char* get_core_authoer(MachineType t)
case hb::common::IoT: case hb::common::IoT:
case hb::common::Gprs_Phone: case hb::common::Gprs_Phone:
return "jjf"; return "jjf";
break; }
return "";
}
default: const char* get_net_author(MachineType t)
break; {
switch (t) {
case hb::common::WiFi:
case hb::common::Wired:
case hb::common::NetMod:
return "wzq";
case hb::common::Gprs_IoT:
case hb::common::Gprs:
case hb::common::Lcd:
case hb::common::TrueColor:
case hb::common::ThreeSection:
case hb::common::IoT:
case hb::common::Gprs_Phone:
return "qfm";
} }
return ""; return "";
...@@ -205,8 +223,8 @@ void print_machineTypes() ...@@ -205,8 +223,8 @@ void print_machineTypes()
{ {
printf("### 主机类型详解\n\n"); printf("### 主机类型详解\n\n");
printf("|事件码类型|主机类型|防区|有线防区|电话报警|内核负责人|在售主机型号与图标|\n" printf("|事件码类型|主机类型|防区|有线防区|电话报警|内核|网络|在售型号|\n"
"|---------|-------|----|-------|-------|---------|----------------|\n"); "|---------|-------|----|-------|-------|----|----|-------|\n");
for (auto e : AdemcoEvents) { for (auto e : AdemcoEvents) {
if (isMachineTypeEvent(e)) { if (isMachineTypeEvent(e)) {
...@@ -222,7 +240,8 @@ void print_machineTypes() ...@@ -222,7 +240,8 @@ void print_machineTypes()
printf("|"); printf("|");
} }
printf("|%s", machineCanReportBySMS(t) ? "Yes" : ""); printf("|%s", machineCanReportBySMS(t) ? "Yes" : "");
printf("|%s", get_core_authoer(t)); printf("|%s", get_core_author(t));
printf("|%s", get_net_author(t));
_print_machine_img(t); _print_machine_img(t);
printf("|\n"); printf("|\n");
} }
......
...@@ -93,6 +93,7 @@ enum ADEMCO_EVENT : uint32_t { ...@@ -93,6 +93,7 @@ enum ADEMCO_EVENT : uint32_t {
EVENT_I_AM_WIFI_MACHINE = 1747, // 主机类型--WiFi主机 EVENT_I_AM_WIFI_MACHINE = 1747, // 主机类型--WiFi主机
EVENT_I_AM_3_SECTION_MACHINE = 1757, // 主机类型--三区段主机 EVENT_I_AM_3_SECTION_MACHINE = 1757, // 主机类型--三区段主机
EVENT_I_AM_IOT_MACHINE = 1767, // 主机类型--物联卡主机 EVENT_I_AM_IOT_MACHINE = 1767, // 主机类型--物联卡主机
EVENT_I_AM_TRUE_COLOR = 1777, // 主机类型--真彩主机
EVENT_I_AM_GPRS_IOT = 1787, // 主机类型--物联卡主机 EVENT_I_AM_GPRS_IOT = 1787, // 主机类型--物联卡主机
EVENT_I_AM_GPRS_PHONE = 1797, // 主机类型--GRPS主机带电话功能 EVENT_I_AM_GPRS_PHONE = 1797, // 主机类型--GRPS主机带电话功能
...@@ -187,6 +188,7 @@ static constexpr ADEMCO_EVENT AdemcoEvents[] = { ...@@ -187,6 +188,7 @@ static constexpr ADEMCO_EVENT AdemcoEvents[] = {
EVENT_I_AM_WIFI_MACHINE, EVENT_I_AM_WIFI_MACHINE,
EVENT_I_AM_3_SECTION_MACHINE, EVENT_I_AM_3_SECTION_MACHINE,
EVENT_I_AM_IOT_MACHINE, EVENT_I_AM_IOT_MACHINE,
EVENT_I_AM_TRUE_COLOR,
EVENT_I_AM_GPRS_IOT, EVENT_I_AM_GPRS_IOT,
EVENT_I_AM_GPRS_PHONE, EVENT_I_AM_GPRS_PHONE,
...@@ -265,7 +267,8 @@ inline std::string ademcoEventToStringEnglish(ADEMCO_EVENT ademco_event, bool wi ...@@ -265,7 +267,8 @@ inline std::string ademcoEventToStringEnglish(ADEMCO_EVENT ademco_event, bool wi
case EVENT_I_AM_WIRE_MACHINE: return n_to_s(ademco_event) + "I_AM_WIRE_MACHINE"; case EVENT_I_AM_WIRE_MACHINE: return n_to_s(ademco_event) + "I_AM_WIRE_MACHINE";
case EVENT_I_AM_WIFI_MACHINE: return n_to_s(ademco_event) + "I_AM_WIFI_MACHINE"; case EVENT_I_AM_WIFI_MACHINE: return n_to_s(ademco_event) + "I_AM_WIFI_MACHINE";
case EVENT_I_AM_3_SECTION_MACHINE: return n_to_s(ademco_event) + "I_AM_3_SECTION_MACHINE"; case EVENT_I_AM_3_SECTION_MACHINE: return n_to_s(ademco_event) + "I_AM_3_SECTION_MACHINE";
case EVENT_I_AM_IOT_MACHINE: return n_to_s(ademco_event) + "I_AM_IOT_MACHINE"; case EVENT_I_AM_IOT_MACHINE: return n_to_s(ademco_event) + "I_AM_IOT_MACHINE";
case EVENT_I_AM_TRUE_COLOR: return n_to_s(ademco_event) + "I_AM_TRUE_COLOR";
case EVENT_I_AM_GPRS_IOT: return n_to_s(ademco_event) + "I_AM_GPRS_IOT"; case EVENT_I_AM_GPRS_IOT: return n_to_s(ademco_event) + "I_AM_GPRS_IOT";
case EVENT_I_AM_GPRS_PHONE: return n_to_s(ademco_event) + "I_AM_GPRS_PHONE"; case EVENT_I_AM_GPRS_PHONE: return n_to_s(ademco_event) + "I_AM_GPRS_PHONE";
case EVENT_SIM_IS_IOT_CARD: return n_to_s(ademco_event) + "SIM card is IOT"; case EVENT_SIM_IS_IOT_CARD: return n_to_s(ademco_event) + "SIM card is IOT";
...@@ -346,7 +349,8 @@ inline const std::wstring ademcoEventToStringChinese(ADEMCO_EVENT ademco_event, ...@@ -346,7 +349,8 @@ inline const std::wstring ademcoEventToStringChinese(ADEMCO_EVENT ademco_event,
case EVENT_I_AM_WIRE_MACHINE: return n_to_s(ademco_event) + L"我是网线主机"; case EVENT_I_AM_WIRE_MACHINE: return n_to_s(ademco_event) + L"我是网线主机";
case EVENT_I_AM_WIFI_MACHINE: return n_to_s(ademco_event) + L"我是WiFi主机"; case EVENT_I_AM_WIFI_MACHINE: return n_to_s(ademco_event) + L"我是WiFi主机";
case EVENT_I_AM_3_SECTION_MACHINE: return n_to_s(ademco_event) + L"我是三区段主机"; case EVENT_I_AM_3_SECTION_MACHINE: return n_to_s(ademco_event) + L"我是三区段主机";
case EVENT_I_AM_IOT_MACHINE: return n_to_s(ademco_event) + L"我是物联卡主机"; case EVENT_I_AM_IOT_MACHINE: return n_to_s(ademco_event) + L"我是物联卡主机";
case EVENT_I_AM_TRUE_COLOR: return n_to_s(ademco_event) + L"我是真彩主机";
case EVENT_I_AM_GPRS_IOT: return n_to_s(ademco_event) + L"我是简化版物联卡主机"; case EVENT_I_AM_GPRS_IOT: return n_to_s(ademco_event) + L"我是简化版物联卡主机";
case EVENT_I_AM_GPRS_PHONE: return n_to_s(ademco_event) + L"我是能打电话的GPRS主机"; case EVENT_I_AM_GPRS_PHONE: return n_to_s(ademco_event) + L"我是能打电话的GPRS主机";
case EVENT_SIM_IS_IOT_CARD: return n_to_s(ademco_event) + L"SIM卡为物联卡"; case EVENT_SIM_IS_IOT_CARD: return n_to_s(ademco_event) + L"SIM卡为物联卡";
...@@ -382,6 +386,7 @@ static inline bool isMachineTypeEvent(ADEMCO_EVENT ademco_event) ...@@ -382,6 +386,7 @@ static inline bool isMachineTypeEvent(ADEMCO_EVENT ademco_event)
|| ademco_event == EVENT_I_AM_WIFI_MACHINE || ademco_event == EVENT_I_AM_WIFI_MACHINE
|| ademco_event == EVENT_I_AM_3_SECTION_MACHINE || ademco_event == EVENT_I_AM_3_SECTION_MACHINE
|| ademco_event == EVENT_I_AM_IOT_MACHINE || ademco_event == EVENT_I_AM_IOT_MACHINE
|| ademco_event == EVENT_I_AM_TRUE_COLOR
|| ademco_event == EVENT_I_AM_GPRS_IOT || ademco_event == EVENT_I_AM_GPRS_IOT
|| ademco_event == EVENT_I_AM_GPRS_PHONE; || ademco_event == EVENT_I_AM_GPRS_PHONE;
} }
......
...@@ -316,35 +316,35 @@ static bool machineCanLinkSubMachine(MachineType type) { ...@@ -316,35 +316,35 @@ static bool machineCanLinkSubMachine(MachineType type) {
#ifdef ENABLE_COMMON_MACHINE_TYPE_TO_STRING #ifdef ENABLE_COMMON_MACHINE_TYPE_TO_STRING
static const char* machineTypeToString(MachineType type) { static const char* machineTypeToString(MachineType type) {
switch (type) { switch (type) {
case MachineType::WiFi: return "0 WiFi"; case MachineType::WiFi: return "0 WiFi";
case MachineType::Camera: return "1 Camera"; case MachineType::Camera: return "1 Camera";
case MachineType::Gprs_IoT: return "2 Gprs_IoT"; case MachineType::Gprs_IoT: return "2 Gprs_IoT";
case MachineType::NetMod: return "3 NetMod"; case MachineType::NetMod: return "3 NetMod";
case MachineType::Gprs: return "4 GPRS"; case MachineType::Gprs: return "4 GPRS";
case MachineType::Lcd: return "5 LCD"; case MachineType::Lcd: return "5 LCD";
case MachineType::Wired: return "6 Wired"; case MachineType::Wired: return "6 Wired";
case MachineType::TrueColor:return "7 TrueColor"; case MachineType::TrueColor: return "7 TrueColor";
case MachineType::ThreeSection:return "8 ThreeSection"; case MachineType::ThreeSection: return "8 ThreeSection";
case MachineType::IoT: return "9 IoT"; case MachineType::IoT: return "9 IoT";
case MachineType::Gprs_Phone: return "10 Gprs_Phone"; case MachineType::Gprs_Phone: return "10 Gprs_Phone";
default: return "Unknown MachineType"; default: return "Unknown MachineType";
} }
} }
static const wchar_t* machineTypeToWString(MachineType type) { static const wchar_t* machineTypeToWString(MachineType type) {
switch (type) { switch (type) {
case MachineType::WiFi: return L"0 WiFi主机"; case MachineType::WiFi: return L"0 WiFi主机";
case MachineType::Camera: return L"1 摄像头主机"; case MachineType::Camera: return L"1 摄像头主机";
case MachineType::Gprs_IoT: return L"2 物联卡主机"; case MachineType::Gprs_IoT: return L"2 简化的物联卡主机";
case MachineType::NetMod: return L"3 网络模块+工程主机"; case MachineType::NetMod: return L"3 网络模块+工程主机";
case MachineType::Gprs: return L"4 GPRS主机"; case MachineType::Gprs: return L"4 GPRS主机";
case MachineType::Lcd: return L"5 液晶主机"; case MachineType::Lcd: return L"5 液晶主机";
case MachineType::Wired: return L"6 网线主机"; case MachineType::Wired: return L"6 网线主机";
case MachineType::TrueColor:return L"7 真彩主机"; case MachineType::TrueColor: return L"7 真彩主机";
case MachineType::ThreeSection:return L"8 三区段主机"; case MachineType::ThreeSection: return L"8 三区段主机";
case MachineType::IoT: return L"9 物联卡主机"; case MachineType::IoT: return L"9 物联卡主机";
case MachineType::Gprs_Phone: return L"10 GPRS主机能打电话"; case MachineType::Gprs_Phone: return L"10 GPRS主机能打电话";
default: return L"未知主机"; default: return L"未知主机";
} }
} }
#endif // ENABLE_COMMON_MACHINE_TYPE_TO_STRING #endif // ENABLE_COMMON_MACHINE_TYPE_TO_STRING
......
...@@ -17,6 +17,7 @@ static common::MachineType machineTypeFromAdemcoEvent(ademco::ADEMCO_EVENT e) { ...@@ -17,6 +17,7 @@ static common::MachineType machineTypeFromAdemcoEvent(ademco::ADEMCO_EVENT e) {
case ademco::EVENT_I_AM_WIFI_MACHINE: return common::MachineType::WiFi; case ademco::EVENT_I_AM_WIFI_MACHINE: return common::MachineType::WiFi;
case ademco::EVENT_I_AM_3_SECTION_MACHINE: return common::MachineType::ThreeSection; case ademco::EVENT_I_AM_3_SECTION_MACHINE: return common::MachineType::ThreeSection;
case ademco::EVENT_I_AM_IOT_MACHINE: return common::MachineType::IoT; case ademco::EVENT_I_AM_IOT_MACHINE: return common::MachineType::IoT;
case ademco::EVENT_I_AM_TRUE_COLOR: return common::MachineType::TrueColor;
case ademco::EVENT_I_AM_GPRS_IOT: return common::MachineType::Gprs_IoT; case ademco::EVENT_I_AM_GPRS_IOT: return common::MachineType::Gprs_IoT;
case ademco::EVENT_I_AM_GPRS_PHONE: return common::MachineType::Gprs_Phone; case ademco::EVENT_I_AM_GPRS_PHONE: return common::MachineType::Gprs_Phone;
default: return common::MachineType::InvalidMachineType; default: return common::MachineType::InvalidMachineType;
...@@ -28,14 +29,14 @@ static ademco::ADEMCO_EVENT ademcoEventFromMachineType(common::MachineType type) ...@@ -28,14 +29,14 @@ static ademco::ADEMCO_EVENT ademcoEventFromMachineType(common::MachineType type)
{ {
switch (type) { switch (type) {
case common::MachineType::WiFi: return ademco::EVENT_I_AM_WIFI_MACHINE; case common::MachineType::WiFi: return ademco::EVENT_I_AM_WIFI_MACHINE;
case common::MachineType::Gprs_IoT: return ademco::EVENT_I_AM_GPRS_IOT;
case common::MachineType::NetMod: return ademco::EVENT_I_AM_NET_MODULE; case common::MachineType::NetMod: return ademco::EVENT_I_AM_NET_MODULE;
case common::MachineType::TrueColor:
case common::MachineType::Gprs: return ademco::EVENT_I_AM_GPRS; case common::MachineType::Gprs: return ademco::EVENT_I_AM_GPRS;
case common::MachineType::Lcd: return ademco::EVENT_I_AM_LCD_MACHINE; case common::MachineType::Lcd: return ademco::EVENT_I_AM_LCD_MACHINE;
case common::MachineType::Wired: return ademco::EVENT_I_AM_WIRE_MACHINE; case common::MachineType::Wired: return ademco::EVENT_I_AM_WIRE_MACHINE;
case common::MachineType::TrueColor: return ademco::EVENT_I_AM_TRUE_COLOR;
case common::MachineType::ThreeSection: return ademco::EVENT_I_AM_3_SECTION_MACHINE; case common::MachineType::ThreeSection: return ademco::EVENT_I_AM_3_SECTION_MACHINE;
case common::MachineType::IoT: return ademco::EVENT_I_AM_IOT_MACHINE; case common::MachineType::IoT: return ademco::EVENT_I_AM_IOT_MACHINE;
case common::MachineType::Gprs_IoT: return ademco::EVENT_I_AM_GPRS_IOT;
case common::MachineType::Gprs_Phone: return ademco::EVENT_I_AM_GPRS_PHONE; case common::MachineType::Gprs_Phone: return ademco::EVENT_I_AM_GPRS_PHONE;
default: return ademco::EVENT_INVALID_EVENT; default: return ademco::EVENT_INVALID_EVENT;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment