Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ademco_hb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
ademco_hb
Commits
425624e1
Commit
425624e1
authored
Sep 16, 2020
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Tamper & Lost
parent
e0afa059
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
README.md
docs/README.md
+3
-3
gen_event_md.cpp
examples/gen_event_md/gen_event_md.cpp
+3
-3
hb_detail.h
include/hb_detail.h
+4
-3
No files found.
docs/README.md
View file @
425624e1
...
@@ -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>
|√|√|√|√|√|√| |√| | | | |
...
...
examples/gen_event_md/gen_event_md.cpp
View file @
425624e1
...
@@ -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
(
zonePropCanReport
Tamper
(
zp
)));
printf
(
"|%s"
,
print_bool
(
zonePropCanReport
Lost
(
zp
)));
}
}
printf
(
"|
\n\n
"
);
printf
(
"|
\n\n
"
);
...
...
include/hb_detail.h
View file @
425624e1
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment