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
dad84844
Commit
dad84844
authored
Oct 09, 2021
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工程主机串口通信协议.md working...
parent
7a53b981
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
工程主机串口通信协议.md
docs/工程主机串口通信协议.md
+2
-2
gen_event_md.cpp
examples/gen_event_md/gen_event_md.cpp
+3
-5
No files found.
docs/工程主机串口通信协议.md
View file @
dad84844
...
@@ -7,7 +7,7 @@ SUM = DATA(N) = DATA(0) + DATA(1) + ... + DATA(N-1)
...
@@ -7,7 +7,7 @@ SUM = DATA(N) = DATA(0) + DATA(1) + ... + DATA(N-1)
## EB AB addr data sum
## EB AB addr data sum
*
PC到主机,按键
PC到主机,按键
*
addr: PC模拟键盘地址,1~4,暂时固定为3
*
addr: PC模拟键盘地址,1~4,暂时固定为3
*
data: 按键码
*
data: 按键码
...
@@ -36,12 +36,12 @@ SUM = DATA(N) = DATA(0) + DATA(1) + ... + DATA(N-1)
...
@@ -36,12 +36,12 @@ SUM = DATA(N) = DATA(0) + DATA(1) + ... + DATA(N-1)
## EB B1 data0 data1 data2 code data4 sum
## EB B1 data0 data1 data2 code data4 sum
主机到PC事件报告
*
data0: 命令字总字长,固定为8
*
data0: 命令字总字长,固定为8
*
data1: 防区号高位
*
data1: 防区号高位
*
data2: 防区号低位
*
data2: 防区号低位
*
data4: 00 表示data1与data2为主机直属防区号,01~F0 表示data1与data2为分机防区号(已废弃),EE 表示分机自身状态(已废弃 )
*
data4: 00 表示data1与data2为主机直属防区号,01~F0 表示data1与data2为分机防区号(已废弃),EE 表示分机自身状态(已废弃 )
*
code: 报警码
*
code: 报警码
*
报警码与安定宝事件码对照表
|报警码|安定宝事件码|含义|
|报警码|安定宝事件码|含义|
|------|----------|----|
|------|----------|----|
...
...
examples/gen_event_md/gen_event_md.cpp
View file @
dad84844
...
@@ -380,7 +380,7 @@ void print_g250_alarm_codes()
...
@@ -380,7 +380,7 @@ void print_g250_alarm_codes()
// 按键码
// 按键码
printf
(
"
\n\n
## EB AB addr data sum
\n
"
);
printf
(
"
\n\n
## EB AB addr data sum
\n
"
);
printf
(
"
*
PC到主机,按键
\n
"
);
printf
(
"PC到主机,按键
\n
"
);
printf
(
"* addr: PC模拟键盘地址,1~4,暂时固定为3
\n
"
);
printf
(
"* addr: PC模拟键盘地址,1~4,暂时固定为3
\n
"
);
printf
(
"* data: 按键码
\n\n
"
);
printf
(
"* data: 按键码
\n\n
"
);
printf
(
"|按键码|按键|
\n
"
);
printf
(
"|按键码|按键|
\n
"
);
...
@@ -395,17 +395,15 @@ void print_g250_alarm_codes()
...
@@ -395,17 +395,15 @@ void print_g250_alarm_codes()
// EB B1 报警码
// EB B1 报警码
printf
(
"
\n\n
## EB B1 data0 data1 data2 code data4 sum
\n
"
);
printf
(
"
\n\n
## EB B1 data0 data1 data2 code data4 sum
\n
"
);
printf
(
"主机到PC事件报告
\n
"
);
printf
(
"* data0: 命令字总字长,固定为8
\n
"
);
printf
(
"* data0: 命令字总字长,固定为8
\n
"
);
printf
(
"* data1: 防区号高位
\n
"
);
printf
(
"* data1: 防区号高位
\n
"
);
printf
(
"* data2: 防区号低位
\n
"
);
printf
(
"* data2: 防区号低位
\n
"
);
printf
(
"* data4: 00 表示data1与data2为主机直属防区号,01~F0 表示data1与data2为分机防区号(已废弃),EE 表示分机自身状态(已废弃)
\n
"
);
printf
(
"* data4: 00 表示data1与data2为主机直属防区号,01~F0 表示data1与data2为分机防区号(已废弃),EE 表示分机自身状态(已废弃)
\n
"
);
printf
(
"* code: 报警码
\n
"
);
printf
(
"* code: 报警码
\n\n
"
);
printf
(
"* 报警码与安定宝事件码对照表
\n\n
"
);
printf
(
"|报警码|安定宝事件码|含义|
\n
"
);
printf
(
"|报警码|安定宝事件码|含义|
\n
"
);
printf
(
"|------|----------|----|
\n
"
);
printf
(
"|------|----------|----|
\n
"
);
static
Char
codes
[]
=
{
static
Char
codes
[]
=
{
g250
::
MachineStatus
::
Arm
,
g250
::
MachineStatus
::
Arm
,
g250
::
MachineStatus
::
Disarm
,
g250
::
MachineStatus
::
Disarm
,
...
...
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