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
dc916d08
Commit
dc916d08
authored
Jul 13, 2021
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix congwin 3b0 3b2
parent
db1cf79b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
7 deletions
+37
-7
Program.cs
examples/csharp_dll_demo/Program.cs
+5
-5
FolderProfile.pubxml
..._dll_demo/Properties/PublishProfiles/FolderProfile.pubxml
+15
-0
FolderProfile.pubxml.user
...demo/Properties/PublishProfiles/FolderProfile.pubxml.user
+9
-0
csharp_dll_demo.csproj.user
examples/csharp_dll_demo/csharp_dll_demo.csproj.user
+6
-0
ademco_packet.h
include/ademco_packet.h
+2
-2
No files found.
examples/csharp_dll_demo/Program.cs
View file @
dc916d08
...
...
@@ -11,29 +11,29 @@ namespace csharp_dll_demo
{
class
Program
{
[
DllImport
(
@"
G:\dev_libs\ademco_hb\examples\x64\Release\
ademco_hb.dll"
,
[
DllImport
(
@"ademco_hb.dll"
,
EntryPoint
=
"parse"
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
public
static
extern
Int32
parse
(
string
buf
,
Int32
buf_len
,
ref
Int32
commited
);
[
DllImport
(
@"
G:\dev_libs\ademco_hb\examples\x64\Release\
ademco_hb.dll"
,
[
DllImport
(
@"ademco_hb.dll"
,
EntryPoint
=
"pack"
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
public
static
extern
Int32
pack
(
ref
byte
buf
,
Int32
buf_len
,
Int32
seq
,
Int32
ademco_id
,
Int32
ademco_event
,
Int32
zone
,
Int32
gg
);
[
DllImport
(
@"
G:\dev_libs\ademco_hb\examples\x64\Release\
ademco_hb.dll"
,
[
DllImport
(
@"ademco_hb.dll"
,
EntryPoint
=
"pack"
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
public
static
extern
Int32
pack2
(
ref
byte
buf
,
Int32
buf_len
,
Int32
seq
,
string
acct
,
Int32
ademco_id
,
Int32
ademco_event
,
Int32
zone
,
Int32
gg
);
[
DllImport
(
@"
G:\dev_libs\ademco_hb\examples\x64\Release\
ademco_hb.dll"
,
[
DllImport
(
@"ademco_hb.dll"
,
EntryPoint
=
"pack_ack"
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
public
static
extern
Int32
pack_ack
(
ref
byte
buf
,
Int32
buf_len
,
Int32
seq
,
Int32
ademco_id
);
[
DllImport
(
@"
G:\dev_libs\ademco_hb\examples\x64\Release\
ademco_hb.dll"
,
[
DllImport
(
@"ademco_hb.dll"
,
EntryPoint
=
"pack_ack"
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
public
static
extern
Int32
pack_ack2
(
ref
byte
buf
,
Int32
buf_len
,
Int32
seq
,
string
acct
);
...
...
examples/csharp_dll_demo/Properties/PublishProfiles/FolderProfile.pubxml
0 → 100644
View file @
dc916d08
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<Configuration>
Release
</Configuration>
<Platform>
x64
</Platform>
<PublishDir>
bin\Release\netcoreapp2.1\publish\
</PublishDir>
<PublishProtocol>
FileSystem
</PublishProtocol>
<TargetFramework>
netcoreapp2.1
</TargetFramework>
<RuntimeIdentifier>
win-x64
</RuntimeIdentifier>
<SelfContained>
true
</SelfContained>
</PropertyGroup>
</Project>
\ No newline at end of file
examples/csharp_dll_demo/Properties/PublishProfiles/FolderProfile.pubxml.user
0 → 100644
View file @
dc916d08
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<History>
True|2021-06-28T11:04:09.4517217Z;True|2021-06-28T18:50:02.8566256+08:00;True|2021-06-28T18:45:00.6601786+08:00;True|2021-06-28T18:34:28.7493593+08:00;True|2021-06-28T18:30:14.2065837+08:00;
</History>
</PropertyGroup>
</Project>
\ No newline at end of file
examples/csharp_dll_demo/csharp_dll_demo.csproj.user
0 → 100644
View file @
dc916d08
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<_LastSelectedProfileId>
G:\dev_libs\ademco_hb\examples\csharp_dll_demo\Properties\PublishProfiles\FolderProfile.pubxml
</_LastSelectedProfileId>
</PropertyGroup>
</Project>
\ No newline at end of file
include/ademco_packet.h
View file @
dc916d08
...
...
@@ -263,11 +263,11 @@ struct CongwinFe100Packet
if
(
evnt
==
ADEMCO_EVENT
::
EVENT_OFFLINE
)
{
data_
[
ndx
++
]
=
'3'
;
data_
[
ndx
++
]
=
'B'
;
data_
[
ndx
++
]
=
'
0
'
;
data_
[
ndx
++
]
=
'
2
'
;
}
else
if
(
evnt
==
ADEMCO_EVENT
::
EVENT_ONLINE
)
{
data_
[
ndx
++
]
=
'3'
;
data_
[
ndx
++
]
=
'B'
;
data_
[
ndx
++
]
=
'
2
'
;
data_
[
ndx
++
]
=
'
0
'
;
}
else
{
ndx
+=
snprintf
(
data_
+
ndx
,
sizeof
(
data_
)
-
ndx
,
"%03d"
,
static_cast
<
int
>
(
evnt
%
1000
));
// event
}
...
...
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