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
b890c80a
Commit
b890c80a
authored
Sep 15, 2020
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zone props
parent
a35c4b52
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
0 deletions
+45
-0
README.md
docs/README.md
+8
-0
gen_event_md.cpp
examples/gen_event_md/gen_event_md.cpp
+23
-0
hb_detail.h
include/hb_detail.h
+14
-0
No files found.
docs/README.md
View file @
b890c80a
...
@@ -185,6 +185,14 @@
...
@@ -185,6 +185,14 @@
### *恒博主机类型与支持的防区属性对照表*
### *恒博主机类型与支持的防区属性对照表*
*
防区属性是否支持防拆
||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 网络模块+工程主机|√|√|√|√|√|√|√|√|√|√|√|√|
|1707 我是网络模块|3 网络模块+工程主机|√|√|√|√|√|√|√|√|√|√|√|√|
...
...
examples/gen_event_md/gen_event_md.cpp
View file @
b890c80a
...
@@ -298,6 +298,28 @@ void print_available_zone_props()
...
@@ -298,6 +298,28 @@ void print_available_zone_props()
printf
(
"%02X %s"
,
(
Char
)
zp
,
jlib
::
win32
::
utf16_to_mbcs
(
zonePropertyToStringChinese
(
zp
)).
data
());
printf
(
"%02X %s"
,
(
Char
)
zp
,
jlib
::
win32
::
utf16_to_mbcs
(
zonePropertyToStringChinese
(
zp
)).
data
());
};
};
printf
(
"* 防区属性是否支持防拆
\n\n
"
);
printf
(
"|"
);
for
(
auto
zp
:
all_props
)
{
printf
(
"|"
);
print_prop
(
zp
);
}
printf
(
"|
\n
"
);
printf
(
"|----"
);
for
(
size_t
i
=
0
;
i
<
all_props
.
size
();
i
++
)
{
printf
(
"|----"
);
}
printf
(
"|
\n
"
);
printf
(
"|防拆支持"
);
for
(
auto
zp
:
all_props
)
{
printf
(
"|%s"
,
print_bool
(
zonePropCanReportTamper
(
zp
)));
}
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
);
...
@@ -310,6 +332,7 @@ void print_available_zone_props()
...
@@ -310,6 +332,7 @@ void print_available_zone_props()
}
}
printf
(
"|
\n
"
);
printf
(
"|
\n
"
);
for
(
auto
e
:
AdemcoEvents
)
{
for
(
auto
e
:
AdemcoEvents
)
{
if
(
isMachineTypeEvent
(
e
))
{
if
(
isMachineTypeEvent
(
e
))
{
auto
t
=
hb
::
machineTypeFromAdemcoEvent
(
e
);
auto
t
=
hb
::
machineTypeFromAdemcoEvent
(
e
);
...
...
include/hb_detail.h
View file @
b890c80a
...
@@ -397,6 +397,20 @@ static ZoneProperty zonePropertyFromChar(Char zp) {
...
@@ -397,6 +397,20 @@ static ZoneProperty zonePropertyFromChar(Char zp) {
return
ZoneProperty
::
InvalidZoneProperty
;
return
ZoneProperty
::
InvalidZoneProperty
;
}
}
//! 根据防区属性判断是否支持报告防拆报警
static
bool
zonePropCanReportTamper
(
ZoneProperty
zp
)
{
switch
(
zp
)
{
case
hb
:
:
common
::
Buglar
:
case
hb
:
:
common
::
Emergency
:
case
hb
:
:
common
::
Duress
:
case
hb
:
:
common
::
BuglarHalf
:
case
hb
:
:
common
::
Bypass
:
return
true
;
default:
return
false
;
}
}
static
std
::
vector
<
ZoneProperty
>
getAvailableZoneProperties
()
{
static
std
::
vector
<
ZoneProperty
>
getAvailableZoneProperties
()
{
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
};
}
}
...
...
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