Commit 425624e1 authored by captainwong's avatar captainwong

fix Tamper & Lost

parent e0afa059
...@@ -185,17 +185,17 @@ ...@@ -185,17 +185,17 @@
### *恒博主机类型与支持的防区属性对照表* ### *恒博主机类型与支持的防区属性对照表*
* 防区属性是否支持防拆 * 防区属性是否支持失联报告
||00 匪警全局|01 匪警紧急|02 火警防区|03 胁迫防区|04 燃气防区|05 淹水防区|06 分机|07 遥控器|08 匪警半局|09 屏蔽防区|0A 门铃防区|0F 旁路防区| ||00 匪警全局|01 匪警紧急|02 火警防区|03 胁迫防区|04 燃气防区|05 淹水防区|06 分机|07 遥控器|08 匪警半局|09 屏蔽防区|0A 门铃防区|0F 旁路防区|
|----|----|----|----|----|----|----|----|----|----|----|----|----| |----|----|----|----|----|----|----|----|----|----|----|----|----|
|防拆支持|√|√| |√| | |√| |√| | |√| |失联支持|√|√| |√| | |√| |√| | |√|
* 主机类型与支持的防区属性对照表 * 主机类型与支持的防区属性对照表
|事件码|类型|型号|00|01|02|03|04|05|06|07|08|09|0A|0F| |事件码|类型|型号|00|01|02|03|04|05|06|07|08|09|0A|0F|
|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----| |----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
|1707|3|<ul><li>G250</li></ul>|√|√|√|√|√|√|√|√|√|√|√|| |1707|3|<ul><li>G250</li></ul>|√|√|√|√|√|√|√|√|√|√|√| |
|1717|4|<ul><li>4040G</li><li>5050G</li><li>5050G-4G</li></ul>|√|√|√|√|√|√| |√| | | | | |1717|4|<ul><li>4040G</li><li>5050G</li><li>5050G-4G</li></ul>|√|√|√|√|√|√| |√| | | | |
|1727|5|<ul><li>BJQ560</li><li>BJQ560B</li></ul>|√|√|√|√|√|√|√|√|√|√|√|√| |1727|5|<ul><li>BJQ560</li><li>BJQ560B</li></ul>|√|√|√|√|√|√|√|√|√|√|√|√|
|1737|6|<ul><li>4040R</li><li>5050R</li></ul>|√|√|√|√|√|√| |√| | | | | |1737|6|<ul><li>4040R</li><li>5050R</li></ul>|√|√|√|√|√|√| |√| | | | |
......
...@@ -301,7 +301,7 @@ void print_available_zone_props() ...@@ -301,7 +301,7 @@ void print_available_zone_props()
printf("* 防区属性是否支持防拆\n\n"); printf("* 防区属性是否支持失联报告\n\n");
printf("|"); printf("|");
for (auto zp : all_props) { for (auto zp : all_props) {
printf("|"); print_prop(zp); printf("|"); print_prop(zp);
...@@ -314,9 +314,9 @@ void print_available_zone_props() ...@@ -314,9 +314,9 @@ void print_available_zone_props()
} }
printf("|\n"); printf("|\n");
printf("|防拆支持"); printf("|失联支持");
for (auto zp : all_props) { for (auto zp : all_props) {
printf("|%s", print_bool(zonePropCanReportTamper(zp))); printf("|%s", print_bool(zonePropCanReportLost(zp)));
} }
printf("|\n\n"); printf("|\n\n");
......
...@@ -397,8 +397,9 @@ static ZoneProperty zonePropertyFromChar(Char zp) { ...@@ -397,8 +397,9 @@ static ZoneProperty zonePropertyFromChar(Char zp) {
return ZoneProperty::InvalidZoneProperty; return ZoneProperty::InvalidZoneProperty;
} }
//! 根据防区属性判断是否支持报告防拆报警 //! 根据防区属性判断是否支持失联报告
static bool zonePropCanReportTamper(ZoneProperty zp) { //! 失联报告是主机侧实现的跟防区属性没关系,但是人为限制了只有以下属性的才可以设置
static bool zonePropCanReportLost(ZoneProperty zp) {
switch (zp) { switch (zp) {
case hb::common::Buglar: case hb::common::Buglar:
case hb::common::Emergency: case hb::common::Emergency:
...@@ -426,7 +427,7 @@ static std::vector<ZoneProperty> getAvailableZoneProperties(MachineType type) { ...@@ -426,7 +427,7 @@ static std::vector<ZoneProperty> getAvailableZoneProperties(MachineType type) {
case hb::common::Gprs: case hb::common::Gprs:
return { Buglar, Emergency, Fire, Duress, Gas, Water, RemoteControl, }; return { Buglar, Emergency, Fire, Duress, Gas, Water, RemoteControl, };
case hb::common::NetMod: case hb::common::NetMod:
return { Buglar, Emergency, Fire, Duress, Gas, Water, SubMachine, RemoteControl, BuglarHalf, Shield, DoorRing, Bypass }; return { Buglar, Emergency, Fire, Duress, Gas, Water, SubMachine, RemoteControl, BuglarHalf, Shield, DoorRing, };
case hb::common::Lcd: case hb::common::Lcd:
return { Buglar, Emergency, Fire, Duress, Gas, Water, SubMachine, RemoteControl, BuglarHalf, Shield, DoorRing, Bypass }; return { Buglar, Emergency, Fire, Duress, Gas, Water, SubMachine, RemoteControl, BuglarHalf, Shield, DoorRing, Bypass };
case hb::common::Wired: case hb::common::Wired:
......
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