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
431daf57
Commit
431daf57
authored
1 year ago
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.5.1
parent
eb88a9fd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
50 deletions
+68
-50
CHANGELOG.md
CHANGELOG.md
+50
-45
ademco.c
ademco.c
+13
-3
ademco.h
ademco.h
+3
-1
ademco_version.h
ademco_version.h
+1
-1
copy_from_hb.sh
tools/copy_from_hb.sh
+1
-0
No files found.
CHANGELOG.md
View file @
431daf57
# Ademco Change Log
## 1.5.0
-
`HbComResp_A2_Iter.com`
changed to pointer
-
update parser for
`timestamp`
-
add
`AdemcoControlSource`
defs
## 1.4.0
-
`hb_com reqeust, response`
update
## 1.3.1
-
compile with warning level 4
-
change
`static inline`
function to micro
## 1.3.0
-
add
`file`
for parse error
-
fix
`struct tm not initilized`
on parse
-
fix parsing pointer on parse timestamp failed
## 1.2.0
-
add config
-
add
`offset`
for parse error
-
refactor parser
## 1.1.0
-
ADEMCO_PACKET_ACCT_MAX_LEN changed from 64 to 18
-
add ADEMCO_PACKET_ACCT_MAX_LEN
-
hb_com 读写主机账号命令
## 1.0.0
-
initial version
# Ademco Change Log
## 1.5.1
-
account minimum length is 6
-
`ademcoIsValidAccount`
check length
## 1.5.0
-
`HbComResp_A2_Iter.com`
changed to pointer
-
update parser for
`timestamp`
-
add
`AdemcoControlSource`
defs
## 1.4.0
-
`hb_com reqeust, response`
update
## 1.3.1
-
compile with warning level 4
-
change
`static inline`
function to micro
## 1.3.0
-
add
`file`
for parse error
-
fix
`struct tm not initilized`
on parse
-
fix parsing pointer on parse timestamp failed
## 1.2.0
-
add config
-
add
`offset`
for parse error
-
refactor parser
## 1.1.0
-
ADEMCO_PACKET_ACCT_MAX_LEN changed from 64 to 18
-
add ADEMCO_PACKET_ACCT_MAX_LEN
-
hb_com 读写主机账号命令
## 1.0.0
-
initial version
This diff is collapsed.
Click to expand it.
ademco.c
View file @
431daf57
...
...
@@ -88,11 +88,21 @@ uint8_t ademcoDecodeSignalStrength(uint8_t code) {
}
int
ademcoIsValidAccount
(
const
char
*
acct
)
{
while
(
*
acct
)
{
if
(
!
isxdigit
(
*
acct
++
))
size_t
len
=
0
;
int
ishex
=
0
;
while
(
*
acct
&&
len
<
ADEMCO_PACKET_ACCT_MAX_LEN
)
{
if
(
isdigit
(
*
acct
))
{
len
++
;
}
else
if
(
isxdigit
(
*
acct
)
&&
len
<
ADEMCO_PACKET_ACCT_MAC_LEN
)
{
len
++
;
ishex
=
1
;
}
else
{
return
0
;
}
acct
++
;
}
return
1
;
return
*
acct
==
'\0'
&&
(
ishex
?
len
==
ADEMCO_PACKET_ACCT_MAC_LEN
:
(
len
>=
ADEMCO_PACKET_ACCT_MIN_LEN
));
}
int
ademcoIsMachineStatusEvent
(
AdemcoEvent
ademcoEvent
)
{
...
...
This diff is collapsed.
Click to expand it.
ademco.h
View file @
431daf57
...
...
@@ -16,6 +16,7 @@ extern "C" {
#define ADEMCO_OK 0
#define ADEMCO_ERR -1
#define ADEMCO_PACKET_ACCT_MIN_LEN 6 // #acct之acct最小长度
#define ADEMCO_PACKET_ACCT_MAX_LEN 18 // #acct之acct最大长度
#define ADEMCO_PACKET_ACCT_MAC_LEN 12 // WiFi主机账号使用MAC地址
#define ADEMCO_PACKET_DATA_SEGMENT_EMPTY_LEN 2 // 空data段[]长度
...
...
@@ -321,11 +322,12 @@ uint8_t ademcoEncodeSignalStrength(uint8_t strength);
ADEMCO_EXPORT_SYMBOL
uint8_t
ademcoDecodeSignalStrength
(
uint8_t
code
);
//////////////////////// AdemcoEvent functions ////////////////////////
// 是否合法主机账号
ADEMCO_EXPORT_SYMBOL
int
ademcoIsValidAccount
(
const
char
*
acct
);
//////////////////////// AdemcoEvent functions ////////////////////////
// 是否主机状态事件
ADEMCO_EXPORT_SYMBOL
int
ademcoIsMachineStatusEvent
(
AdemcoEvent
ademcoEvent
);
...
...
This diff is collapsed.
Click to expand it.
ademco_version.h
View file @
431daf57
...
...
@@ -8,7 +8,7 @@
#define ADEMCO_VERSION_MAJOR 1
#define ADEMCO_VERSION_MINOR 5
#define ADEMCO_VERSION_PATCH
0
#define ADEMCO_VERSION_PATCH
1
#define ADEMCO_VERSION_IS_RELEASE 1
#define ADEMCO_VERSION_SUFFIX ""
...
...
This diff is collapsed.
Click to expand it.
tools/copy_from_hb.sh
View file @
431daf57
...
...
@@ -12,3 +12,4 @@ cp -f /g/dev_libs/ademco/hb/hb_com.c ../
cp
-f
/g/dev_libs/ademco/hb/ademco_version.h ../
cp
-f
/g/dev_libs/ademco/hb/ademco_config.h ../
cp
-f
/g/dev_libs/ademco/hb/CHANGELOG.md ../
sed
-i
'/\[hb\]/d'
../CHANGELOG.md
This diff is collapsed.
Click to expand it.
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