From af1584a2bd0b5acea85d3a0465986bd42f972b87 Mon Sep 17 00:00:00 2001 From: "SmallChi(Koike)" <564952747@qq.com> Date: Sat, 21 Dec 2019 09:36:37 +0800 Subject: [PATCH] =?UTF-8?q?v2.3.1=201.=E8=A7=A3=E5=86=B3=E5=A4=9A=E5=8F=B0?= =?UTF-8?q?=E6=9C=BA=E5=99=A8=E5=90=8C=E6=97=B6=E8=AE=BF=E9=97=AE=E6=97=B6?= =?UTF-8?q?=E7=BB=88=E7=AB=AF=E5=8F=B7=E5=86=B2=E7=AA=81=202.=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AE=A2=E6=88=B7=E7=AB=AF=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E5=B0=86=E5=90=8C=E6=AD=A5=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=203.=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96sess?= =?UTF-8?q?ion=E9=9B=86=E5=90=88=E6=8A=A5=E9=94=99=204.=E5=8D=87=E7=BA=A78?= =?UTF-8?q?08=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Up2019Service.cs | 1 + .../Services/UpService.cs | 1 + .../JT808.DotNetty.Abstractions.csproj | 2 +- .../JT808.DotNetty.Client.csproj | 2 +- .../JT808ClientMsgSNDistributedImpl.cs | 16 ---------------- src/JT808.DotNetty.Client/JT808DeviceConfig.cs | 1 - .../JT808TcpClientExtensions.cs | 1 - .../JT808.DotNetty.Traffic.csproj | 2 +- src/Version.props | 2 +- 9 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 src/JT808.DotNetty.Client/JT808ClientMsgSNDistributedImpl.cs diff --git a/simples/JT808.DotNetty.SimpleClient/Services/Up2019Service.cs b/simples/JT808.DotNetty.SimpleClient/Services/Up2019Service.cs index cfac566..1f4a9ce 100644 --- a/simples/JT808.DotNetty.SimpleClient/Services/Up2019Service.cs +++ b/simples/JT808.DotNetty.SimpleClient/Services/Up2019Service.cs @@ -24,6 +24,7 @@ namespace JT808.DotNetty.SimpleClient.Services { string sim = "22222222222"; JT808TcpClient client1 = jT808TcpClientFactory.Create(new JT808DeviceConfig(sim, "127.0.0.1", 808, JT808Version.JTT2019)); + Thread.Sleep(5000); //1.终端注册 client1.Send(JT808MsgId.终端注册.Create2019(sim, new JT808_0x0100() { diff --git a/simples/JT808.DotNetty.SimpleClient/Services/UpService.cs b/simples/JT808.DotNetty.SimpleClient/Services/UpService.cs index c7ff718..6138a5a 100644 --- a/simples/JT808.DotNetty.SimpleClient/Services/UpService.cs +++ b/simples/JT808.DotNetty.SimpleClient/Services/UpService.cs @@ -24,6 +24,7 @@ namespace JT808.DotNetty.SimpleClient.Services { string sim = "11111111111"; JT808TcpClient client1 = jT808TcpClientFactory.Create(new JT808DeviceConfig(sim, "127.0.0.1", 808)); + Thread.Sleep(5000); //1.终端注册 client1.Send(JT808MsgId.终端注册.Create(sim, new JT808_0x0100() { diff --git a/src/JT808.DotNetty.Abstractions/JT808.DotNetty.Abstractions.csproj b/src/JT808.DotNetty.Abstractions/JT808.DotNetty.Abstractions.csproj index bed7d8f..9051146 100644 --- a/src/JT808.DotNetty.Abstractions/JT808.DotNetty.Abstractions.csproj +++ b/src/JT808.DotNetty.Abstractions/JT808.DotNetty.Abstractions.csproj @@ -20,7 +20,7 @@ 基于DotNetty实现的JT808DotNetty的抽象库 - + diff --git a/src/JT808.DotNetty.Client/JT808.DotNetty.Client.csproj b/src/JT808.DotNetty.Client/JT808.DotNetty.Client.csproj index 40d4089..0bfb406 100644 --- a/src/JT808.DotNetty.Client/JT808.DotNetty.Client.csproj +++ b/src/JT808.DotNetty.Client/JT808.DotNetty.Client.csproj @@ -24,7 +24,7 @@ - + diff --git a/src/JT808.DotNetty.Client/JT808ClientMsgSNDistributedImpl.cs b/src/JT808.DotNetty.Client/JT808ClientMsgSNDistributedImpl.cs deleted file mode 100644 index e15d703..0000000 --- a/src/JT808.DotNetty.Client/JT808ClientMsgSNDistributedImpl.cs +++ /dev/null @@ -1,16 +0,0 @@ -using JT808.Protocol; -using JT808.Protocol.Interfaces; -using System.Threading; - -namespace JT808.DotNetty.Client -{ - internal class JT808ClientMsgSNDistributedImpl : IJT808MsgSNDistributed - { - int _counter = 0; - - public ushort Increment() - { - return (ushort)Interlocked.Increment(ref _counter); - } - } -} diff --git a/src/JT808.DotNetty.Client/JT808DeviceConfig.cs b/src/JT808.DotNetty.Client/JT808DeviceConfig.cs index 1fc2530..63cd606 100644 --- a/src/JT808.DotNetty.Client/JT808DeviceConfig.cs +++ b/src/JT808.DotNetty.Client/JT808DeviceConfig.cs @@ -14,7 +14,6 @@ namespace JT808.DotNetty.Client TerminalPhoneNo = terminalPhoneNo; TcpHost = tcpHost; TcpPort = tcpPort; - MsgSNDistributed = new JT808ClientMsgSNDistributedImpl(); Version = version; } public JT808Version Version { get; private set; } diff --git a/src/JT808.DotNetty.Client/JT808TcpClientExtensions.cs b/src/JT808.DotNetty.Client/JT808TcpClientExtensions.cs index 97e266d..b0d230a 100644 --- a/src/JT808.DotNetty.Client/JT808TcpClientExtensions.cs +++ b/src/JT808.DotNetty.Client/JT808TcpClientExtensions.cs @@ -14,7 +14,6 @@ namespace JT808.DotNetty.Client public static void Send(this JT808TcpClient client, JT808Package package, int minBufferSize = 4096) { package.Header.TerminalPhoneNo = client.DeviceConfig.TerminalPhoneNo; - package.Header.MsgNum = client.DeviceConfig.MsgSNDistributed.Increment(); JT808ClientRequest request = new JT808ClientRequest(package, minBufferSize); client.Send(request); } diff --git a/src/JT808.DotNetty.Services/JT808.DotNetty.Traffic/JT808.DotNetty.Traffic.csproj b/src/JT808.DotNetty.Services/JT808.DotNetty.Traffic/JT808.DotNetty.Traffic.csproj index 90acf2a..ee1e567 100644 --- a/src/JT808.DotNetty.Services/JT808.DotNetty.Traffic/JT808.DotNetty.Traffic.csproj +++ b/src/JT808.DotNetty.Services/JT808.DotNetty.Traffic/JT808.DotNetty.Traffic.csproj @@ -24,7 +24,7 @@ - + diff --git a/src/Version.props b/src/Version.props index 3ca3866..8f15eb1 100644 --- a/src/Version.props +++ b/src/Version.props @@ -1,5 +1,5 @@  - 2.3.0 + 2.3.1 \ No newline at end of file