Commit dc916d08 authored by captainwong's avatar captainwong

fix congwin 3b0 3b2

parent db1cf79b
...@@ -11,29 +11,29 @@ namespace csharp_dll_demo ...@@ -11,29 +11,29 @@ namespace csharp_dll_demo
{ {
class Program class Program
{ {
[DllImport(@"G:\dev_libs\ademco_hb\examples\x64\Release\ademco_hb.dll", [DllImport(@"ademco_hb.dll",
EntryPoint = "parse", EntryPoint = "parse",
CallingConvention = CallingConvention.Cdecl)] CallingConvention = CallingConvention.Cdecl)]
public static extern Int32 parse(string buf, Int32 buf_len, ref Int32 commited); 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", EntryPoint = "pack",
CallingConvention = CallingConvention.Cdecl)] 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); 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", EntryPoint = "pack",
CallingConvention = CallingConvention.Cdecl)] 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); 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", EntryPoint = "pack_ack",
CallingConvention = CallingConvention.Cdecl)] CallingConvention = CallingConvention.Cdecl)]
public static extern Int32 pack_ack(ref byte buf, Int32 buf_len, Int32 seq, Int32 ademco_id); 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", EntryPoint = "pack_ack",
CallingConvention = CallingConvention.Cdecl)] CallingConvention = CallingConvention.Cdecl)]
public static extern Int32 pack_ack2(ref byte buf, Int32 buf_len, Int32 seq, string acct); public static extern Int32 pack_ack2(ref byte buf, Int32 buf_len, Int32 seq, string acct);
......
<?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
<?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
<?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
...@@ -263,11 +263,11 @@ struct CongwinFe100Packet ...@@ -263,11 +263,11 @@ struct CongwinFe100Packet
if (evnt == ADEMCO_EVENT::EVENT_OFFLINE) { if (evnt == ADEMCO_EVENT::EVENT_OFFLINE) {
data_[ndx++] = '3'; data_[ndx++] = '3';
data_[ndx++] = 'B'; data_[ndx++] = 'B';
data_[ndx++] = '0'; data_[ndx++] = '2';
} else if (evnt == ADEMCO_EVENT::EVENT_ONLINE) { } else if (evnt == ADEMCO_EVENT::EVENT_ONLINE) {
data_[ndx++] = '3'; data_[ndx++] = '3';
data_[ndx++] = 'B'; data_[ndx++] = 'B';
data_[ndx++] = '2'; data_[ndx++] = '0';
} else { } else {
ndx += snprintf(data_ + ndx, sizeof(data_) - ndx, "%03d", static_cast<int>(evnt % 1000)); // event ndx += snprintf(data_ + ndx, sizeof(data_) - ndx, "%03d", static_cast<int>(evnt % 1000)); // event
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment