Browse Source

1.增加电信NB-Iot的平台对接(待完善)

2.升级库
tags/v2.3.3-dotnetty_v1.1.1-pipeline
SmallChi(Koike) 4 years ago
parent
commit
5ca9863756
35 changed files with 416 additions and 50 deletions
  1. +11
    -0
      NB-Iot/README.md
  2. +3
    -2
      README.md
  3. +3
    -3
      simples/JT808.DotNetty.SimpleQueueServer/JT808.DotNetty.SimpleQueueServer.csproj
  4. +1
    -1
      simples/JT808.DotNetty.SimpleQueueService/Impl/JT808DotNettyReplyMessageServiceInherited.cs
  5. +4
    -4
      simples/JT808.DotNetty.SimpleQueueService/JT808.DotNetty.SimpleQueueService.csproj
  6. +16
    -0
      simples/JT808.Gateway.NBIotSimpleClient/JT808.Gateway.NBIotSimpleClient.csproj
  7. +97
    -0
      simples/JT808.Gateway.NBIotSimpleClient/Jobs/Up2019Service.cs
  8. +24
    -0
      simples/JT808.Gateway.NBIotSimpleClient/Metadata/DeviceInfo.cs
  9. +40
    -0
      simples/JT808.Gateway.NBIotSimpleClient/Program.cs
  10. +20
    -0
      simples/JT808.Gateway.NBIotSimpleClient/Services/DeviceInfoService.cs
  11. +29
    -0
      simples/JT808.Gateway.NBIotSimpleClient/Services/JT808MessageProducerImpl.cs
  12. +93
    -0
      simples/JT808.Gateway.NBIotSimpleClient/Services/ProccessPackageService.cs
  13. +23
    -0
      simples/JT808.Gateway.NBIotSimpleClient/Services/ReceviePackageService.cs
  14. +3
    -3
      simples/JT808.Gateway.SimpleClient/JT808.Gateway.SimpleClient.csproj
  15. +2
    -1
      simples/JT808.Gateway.SimpleQueueNotification/Impl/JT808MsgIdHandlerImpl.cs
  16. +2
    -2
      simples/JT808.Gateway.SimpleQueueNotification/JT808.Gateway.SimpleQueueNotification.csproj
  17. +3
    -2
      simples/JT808.Gateway.SimpleQueueNotification/Startup.cs
  18. +2
    -2
      simples/JT808.Gateway.SimpleQueueServer/JT808.Gateway.SimpleQueueServer.csproj
  19. +3
    -1
      simples/JT808.Gateway.SimpleQueueService/Impl/JT808QueueReplyMessageHandlerImpl.cs
  20. +7
    -7
      simples/JT808.Gateway.SimpleQueueService/JT808.Gateway.SimpleQueueService.csproj
  21. +2
    -1
      simples/JT808.Gateway.SimpleQueueService/Program.cs
  22. +5
    -5
      simples/JT808.Gateway.SimpleServer/JT808.Gateway.SimpleServer.csproj
  23. +9
    -2
      simples/JT808.Simples.sln
  24. +1
    -1
      src/JT808.DotNetty.Abstractions/JT808.DotNetty.Abstractions.csproj
  25. +2
    -2
      src/JT808.DotNetty.Client/JT808.DotNetty.Client.csproj
  26. +1
    -1
      src/JT808.DotNetty.Core/JT808.DotNetty.Core.csproj
  27. +1
    -1
      src/JT808.DotNetty.Kafka/JT808.DotNetty.Kafka.csproj
  28. +1
    -1
      src/JT808.DotNetty.Services/JT808.DotNetty.Transmit/JT808.DotNetty.Transmit.csproj
  29. +1
    -1
      src/JT808.DotNetty.WebApiClientTool/JT808.DotNetty.WebApiClientTool.csproj
  30. +1
    -1
      src/JT808.Gateway.Abstractions/JT808.Gateway.Abstractions.csproj
  31. +1
    -1
      src/JT808.Gateway.Benchmark/JT808.Gateway.CleintBenchmark/JT808.Gateway.CleintBenchmark.csproj
  32. +1
    -1
      src/JT808.Gateway.Benchmark/JT808.Gateway.ServerBenchmark/JT808.Gateway.ServerBenchmark.csproj
  33. +1
    -1
      src/JT808.Gateway.Client/JT808.Gateway.Client.csproj
  34. +1
    -1
      src/JT808.Gateway.Kafka/JT808.Gateway.Kafka.csproj
  35. +2
    -2
      src/Version.props

+ 11
- 0
NB-Iot/README.md View File

@@ -0,0 +1,11 @@
# 中国电信物联网开发平台

这几天对接NB-Iot的设备发现了既然还支持JT/T808的,索性就抱着玩玩的心态搞一搞。

[中国电信物联网开放平台AEP](https://www.ctwing.cn/)

[中国电信官方JT/T808协议规范参考文档](https://help.ctwing.cn/%E8%AE%BE%E5%A4%87%E6%8E%A5%E5%85%A5%E8%A7%84%E8%8C%83/jtt808%E5%8D%8F%E8%AE%AE%E6%8E%A5%E5%85%A5/jtt808%E5%8D%8F%E8%AE%AE%E8%A7%84%E8%8C%83.html)

注意事项:

todo:

+ 3
- 2
README.md View File

@@ -84,7 +84,6 @@ Pipeline分为两种方式使用,一种是使用队列的方式,一种是网
| Install-Package JT808.Gateway.ReplyMessage | ![JT808.Gateway.ReplyMessage](https://img.shields.io/nuget/v/JT808.Gateway.ReplyMessage.svg) | ![JT808.Gateway.ReplyMessage](https://img.shields.io/nuget/vpre/JT808.Gateway.ReplyMessage.svg) | ![JT808.Gateway.ReplyMessage](https://img.shields.io/nuget/dt/JT808.Gateway.ReplyMessage.svg) |
| Install-Package JT808.Gateway.MsgLogging | ![JT808.Gateway.MsgLogging](https://img.shields.io/nuget/v/JT808.Gateway.MsgLogging.svg) | ![JT808.Gateway.MsgLogging](https://img.shields.io/nuget/vpre/JT808.Gateway.MsgLogging.svg) | ![JT808.Gateway.MsgLogging](https://img.shields.io/nuget/dt/JT808.Gateway.MsgLogging.svg) |
| Install-Package JT808.Gateway.MsgIdHandler | ![JT808.Gateway.MsgIdHandler](https://img.shields.io/nuget/v/JT808.Gateway.MsgIdHandler.svg) | ![JT808.Gateway.MsgIdHandler](https://img.shields.io/nuget/vpre/JT808.Gateway.MsgIdHandler.svg) | ![JT808.Gateway.MsgIdHandler](https://img.shields.io/nuget/dt/JT808.Gateway.MsgIdHandler.svg) |
| Install-Package JT808.Gateway.Traffic (v1.1.0新版已移出) | ![JT808.Gateway.Traffic](https://img.shields.io/nuget/v/JT808.Gateway.Traffic.svg) | ![JT808.Gateway.Traffic](https://img.shields.io/nuget/vpre/JT808.Gateway.Traffic.svg) | ![JT808.Gateway.Traffic](https://img.shields.io/nuget/dt/JT808.Gateway.Traffic.svg) |

## 基于DotNetty

@@ -151,6 +150,8 @@ Pipeline分为两种方式使用,一种是使用队列的方式,一种是网
如图所示:
![demo2](https://github.com/SmallChi/JT808Gateway/blob/master/doc/img/demo2.png)

# 常见问题:
## 常见问题

- 多协议兼容实现思路[点我查看](https://github.com/SmallChi/JT808Gateway/issues/11#issuecomment-727687417)

> 单端口兼容多协议虽然可以实现,但是还是不建议这么做,建议最好是用端口分开,避免不必要的麻烦

+ 3
- 3
simples/JT808.DotNetty.SimpleQueueServer/JT808.DotNetty.SimpleQueueServer.csproj View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
@@ -11,8 +11,8 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="JT808.DotNetty.Kafka" Version="2.3.2" />
<PackageReference Include="JT808.DotNetty.Tcp" Version="2.3.2" />
<PackageReference Include="JT808.DotNetty.Kafka" Version="2.3.3-preview3" />
<PackageReference Include="JT808.DotNetty.Tcp" Version="2.3.3-preview3" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="3.1.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.4" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.4" />


+ 1
- 1
simples/JT808.DotNetty.SimpleQueueService/Impl/JT808DotNettyReplyMessageServiceInherited.cs View File

@@ -33,7 +33,7 @@ namespace JT808.DotNetty.SimpleQueueService.Impl
public override byte[] Msg0x0200(JT808HeaderPackage request)
{
logger.LogWarning("===========================================");
logger.LogWarning($"{request.Header.TerminalPhoneNo}---{request.OriginalData.ToArray().ToHexString()}");
logger.LogWarning($"{request.Header.TerminalPhoneNo}---{request.OriginalData.ToHexString()}");
logger.LogWarning("===========================================");
return base.Msg0x0200(request);
}


+ 4
- 4
simples/JT808.DotNetty.SimpleQueueService/JT808.DotNetty.SimpleQueueService.csproj View File

@@ -11,10 +11,10 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="JT808.DotNetty.Kafka" Version="2.3.2" />
<PackageReference Include="JT808.DotNetty.MsgIdHandler" Version="2.3.2" />
<PackageReference Include="JT808.DotNetty.ReplyMessage" Version="2.3.2" />
<PackageReference Include="JT808.DotNetty.Tcp" Version="2.3.2" />
<PackageReference Include="JT808.DotNetty.Kafka" Version="2.3.3-preview3" />
<PackageReference Include="JT808.DotNetty.MsgIdHandler" Version="2.3.3-preview3" />
<PackageReference Include="JT808.DotNetty.ReplyMessage" Version="2.3.3-preview3" />
<PackageReference Include="JT808.DotNetty.Tcp" Version="2.3.3-preview3" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="3.1.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.4" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.4" />


+ 16
- 0
simples/JT808.Gateway.NBIotSimpleClient/JT808.Gateway.NBIotSimpleClient.csproj View File

@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JT808.Gateway.Abstractions" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.Client" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.WebApiClientTool" Version="1.1.1-preview2" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
</ItemGroup>
</Project>

+ 97
- 0
simples/JT808.Gateway.NBIotSimpleClient/Jobs/Up2019Service.cs View File

@@ -0,0 +1,97 @@
using JT808.Gateway.Client;
using JT808.Protocol.MessageBody;
using JT808.Protocol;
using JT808.Protocol.Enums;
using JT808.Protocol.Extensions;
using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Net;
using JT808.Gateway.NBIotSimpleClient.Services;

namespace JT808.Gateway.NBIotSimpleClient.Jobs
{
public class Up2019Service : IHostedService
{
IJT808TcpClientFactory jT808TcpClientFactory;
JT808Serializer Serializer;
DeviceInfoService DeviceInfoService;
public Up2019Service(
DeviceInfoService deviceInfoService,
IJT808Config jT808Config,
IJT808TcpClientFactory jT808TcpClientFactory)
{
this.jT808TcpClientFactory = jT808TcpClientFactory;
Serializer = jT808Config.GetSerializer();
DeviceInfoService = deviceInfoService;
}

public async Task StartAsync(CancellationToken cancellationToken)
{
string sim = "22222222222";
var address = Dns.GetHostAddresses("jtt808.ctwing.cn");
JT808TcpClient client1 = await jT808TcpClientFactory.Create(new JT808DeviceConfig(sim, address[0].ToString(), 6001, version:JT808Version.JTT2019), cancellationToken);
await Task.Delay(1000);
var p1 = JT808MsgId.终端注册.Create(sim, new JT808_0x0100()
{
PlateNo = "粤A12346",
PlateColor = 0,
AreaID = 0,
CityOrCountyId = 0,
MakerId = "12345",
TerminalModel = "123456", //设备型号
TerminalId = "1234567", //设备编号
});
var p1_1 = Serializer.Serialize(p1).ToHexString();
//1.终端注册
await client1.SendAsync(p1);

//2.终端鉴权
await client1.SendAsync(JT808MsgId.终端鉴权.Create(sim, new JT808_0x0100()
{
PlateNo = "粤A12346",
PlateColor = 0,
AreaID = 0,
CityOrCountyId = 0,
MakerId = "12345",
TerminalModel = "123456",//设备型号
TerminalId = "1234567", //设备编号
}));
_ = Task.Run(async() =>
{
while (!cancellationToken.IsCancellationRequested)
{
var i = 0;
//3.每5秒发一次
if(DeviceInfoService.DeviceInfos.TryGetValue(sim,out var deviceInfo))
{
if (deviceInfo.Successed)
{
await client1.SendAsync(JT808MsgId.位置信息汇报.Create(sim, new JT808_0x0200()
{
Lat = 110000 + i,
Lng = 100000 + i,
GPSTime = DateTime.Now,
Speed = 50,
Direction = 30,
AlarmFlag = 5,
Altitude = 50,
StatusFlag = 10
}));
}
}
i++;
await Task.Delay(5000);
}
}, cancellationToken);
}

public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
}

+ 24
- 0
simples/JT808.Gateway.NBIotSimpleClient/Metadata/DeviceInfo.cs View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JT808.Gateway.NBIotSimpleClient.Metadata
{
public class DeviceInfo
{
/// <summary>
/// 终端手机号
/// </summary>
public string TerminalPhoneNo { get; set; }
/// <summary>
/// 鉴权码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 是否登录成功
/// </summary>
public bool Successed { get; set; }
}
}

+ 40
- 0
simples/JT808.Gateway.NBIotSimpleClient/Program.cs View File

@@ -0,0 +1,40 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
using JT808.Protocol;
using JT808.Protocol.MessageBody;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using Microsoft.Extensions.Hosting;
using JT808.Gateway.Client;
using JT808.Gateway.WebApiClientTool;
using JT808.Gateway.NBIotSimpleClient.Jobs;
using JT808.Gateway.NBIotSimpleClient.Services;

namespace JT808.Gateway.NBIotSimpleClient
{
class Program
{
static async Task Main(string[] args)
{
var serverHostBuilder = new HostBuilder()
.ConfigureLogging((context, logging) =>
{
logging.AddConsole();
logging.SetMinimumLevel(LogLevel.Trace);
})
.ConfigureServices((hostContext, services) =>
{
services.AddSingleton<ReceviePackageService>();
services.AddSingleton<DeviceInfoService>();
services.AddJT808Configure()
.AddClient()
.AddMessageProducer<JT808MessageProducerImpl>();
services.AddHostedService<Up2019Service>();
services.AddHostedService<ProccessPackageService>();
});
await serverHostBuilder.RunConsoleAsync();
}
}
}

+ 20
- 0
simples/JT808.Gateway.NBIotSimpleClient/Services/DeviceInfoService.cs View File

@@ -0,0 +1,20 @@
using JT808.Gateway.NBIotSimpleClient.Metadata;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JT808.Gateway.NBIotSimpleClient.Services
{
public class DeviceInfoService
{
public ConcurrentDictionary<string,DeviceInfo> DeviceInfos { get; set; }

public DeviceInfoService()
{
DeviceInfos = new ConcurrentDictionary<string, DeviceInfo>();
}
}
}

+ 29
- 0
simples/JT808.Gateway.NBIotSimpleClient/Services/JT808MessageProducerImpl.cs View File

@@ -0,0 +1,29 @@
using JT808.Gateway.Client;
using JT808.Protocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JT808.Gateway.NBIotSimpleClient.Services
{
public class JT808MessageProducerImpl : IJT808MessageProducer
{
ReceviePackageService ReceviePackageService;
public JT808MessageProducerImpl(
ReceviePackageService receviePackageService)
{
ReceviePackageService = receviePackageService;
}
public ValueTask ProduceAsync(JT808Package package)
{
ReceviePackageService.BlockingCollection.Add(package);
return default;
}
public void Dispose()
{

}
}
}

+ 93
- 0
simples/JT808.Gateway.NBIotSimpleClient/Services/ProccessPackageService.cs View File

@@ -0,0 +1,93 @@
using JT808.Gateway.Client;
using JT808.Protocol;
using JT808.Protocol.Enums;
using JT808.Protocol.Extensions;
using JT808.Protocol.MessageBody;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace JT808.Gateway.NBIotSimpleClient.Services
{
/// <summary>
/// 处理平台下发的数据包
/// </summary>
public class ProccessPackageService : IHostedService
{
ReceviePackageService ReceviePackageService;
IJT808TcpClientFactory TcpClientFactory;
JT808Serializer Serializer;
DeviceInfoService DeviceInfoService;
ILogger Logger;
public ProccessPackageService(
ILoggerFactory loggerFactory,
IJT808Config jT808Config,
IJT808TcpClientFactory tcpClientFactory,
DeviceInfoService deviceInfoService,
ReceviePackageService receviePackageService)
{
ReceviePackageService = receviePackageService;
TcpClientFactory = tcpClientFactory;
Serializer = jT808Config.GetSerializer();
DeviceInfoService = deviceInfoService;
Logger = loggerFactory.CreateLogger<ProccessPackageService>();
}

public Task StartAsync(CancellationToken cancellationToken)
{
Task.Run(() =>
{
try
{
foreach(var package in ReceviePackageService.BlockingCollection.GetConsumingEnumerable(cancellationToken))
{
if(package.Header.MsgId == JT808MsgId.终端注册应答.ToUInt16Value())
{
if (package.Bodies is JT808_0x8100 body)
{
DeviceInfoService.DeviceInfos.TryAdd(package.Header.TerminalPhoneNo, new Metadata.DeviceInfo {
TerminalPhoneNo = package.Header.TerminalPhoneNo,
Code = body.Code
});
Logger.LogInformation($"{package.Header.TerminalPhoneNo}-{body.Code}-success");
}
}
else if (package.Header.MsgId == JT808MsgId.平台通用应答.ToValue())
{
if(package.Bodies is JT808_0x8001 body)
{
if(body.AckMsgId== JT808MsgId.终端鉴权.ToUInt16Value())
{
if(body.JT808PlatformResult== JT808PlatformResult.成功)
{
if (DeviceInfoService.DeviceInfos.TryGetValue(package.Header.TerminalPhoneNo, out var deviceInfo))
{
deviceInfo.Successed = true;
DeviceInfoService.DeviceInfos.TryUpdate(package.Header.TerminalPhoneNo, deviceInfo, deviceInfo);
}
}
Logger.LogInformation($"{package.Header.TerminalPhoneNo}-{body.JT808PlatformResult.ToString()}");
}
}
}
}
}
catch (Exception ex)
{

}
}, cancellationToken);
return Task.CompletedTask;
}

public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
}

+ 23
- 0
simples/JT808.Gateway.NBIotSimpleClient/Services/ReceviePackageService.cs View File

@@ -0,0 +1,23 @@
using JT808.Protocol;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JT808.Gateway.NBIotSimpleClient.Services
{
/// <summary>
/// 接收平台下发的数据包
/// </summary>
public class ReceviePackageService
{
public BlockingCollection<JT808Package> BlockingCollection { get; }

public ReceviePackageService()
{
BlockingCollection = new BlockingCollection<JT808Package>(999999);
}
}
}

+ 3
- 3
simples/JT808.Gateway.SimpleClient/JT808.Gateway.SimpleClient.csproj View File

@@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JT808.Gateway.Abstractions" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.Client" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.WebApiClientTool" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.Abstractions" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.Client" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.WebApiClientTool" Version="1.1.1-preview2" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />


+ 2
- 1
simples/JT808.Gateway.SimpleQueueNotification/Impl/JT808MsgIdHandlerImpl.cs View File

@@ -11,7 +11,8 @@ using System.Threading.Tasks;

namespace JT808.Gateway.SimpleQueueNotification.Impl
{
public class JT808MsgIdHandlerImpl : IJT808MsgIdHandler
//todo: public class JT808MsgIdHandlerImpl : IJT808MsgIdHandler
public class JT808MsgIdHandlerImpl
{
private readonly ILogger<JT808MsgIdHandlerImpl> logger;



+ 2
- 2
simples/JT808.Gateway.SimpleQueueNotification/JT808.Gateway.SimpleQueueNotification.csproj View File

@@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="JT808.Gateway.Kafka" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.MsgIdHandler" Version="1.0.2-preview1" />
<PackageReference Include="JT808.Gateway.Kafka" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.MsgIdHandler" Version="1.1.1-preview2" />
</ItemGroup>
</Project>

+ 3
- 2
simples/JT808.Gateway.SimpleQueueNotification/Startup.cs View File

@@ -57,8 +57,9 @@ namespace JT808.Gateway.SimpleQueueNotification
services.Configure<AuthOptions>(Configuration.GetSection("AuthOptions"));
services.AddJT808Configure()
.AddClientKafka()
.AddMsgConsumer(Configuration)
.AddMsgIdHandler<JT808MsgIdHandlerImpl>();
.AddMsgConsumer(Configuration);
//todo:JT808MsgIdHandlerImpl
//.AddMsgIdHandler<JT808MsgIdHandlerImpl>();
}




+ 2
- 2
simples/JT808.Gateway.SimpleQueueServer/JT808.Gateway.SimpleQueueServer.csproj View File

@@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JT808.Gateway" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.Kafka" Version="1.1.0" />
<PackageReference Include="JT808.Gateway" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.Kafka" Version="1.1.1-preview2" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />


+ 3
- 1
simples/JT808.Gateway.SimpleQueueService/Impl/JT808QueueReplyMessageHandlerImpl.cs View File

@@ -10,7 +10,9 @@ using System.Text;

namespace JT808.Gateway.SimpleQueueService.Impl
{
public class JT808QueueReplyMessageHandlerImpl : IJT808ReplyMessageHandler
//todo:
//public class JT808QueueReplyMessageHandlerImpl : IJT808ReplyMessageHandler
public class JT808QueueReplyMessageHandlerImpl
{
private ILogger logger;



+ 7
- 7
simples/JT808.Gateway.SimpleQueueService/JT808.Gateway.SimpleQueueService.csproj View File

@@ -6,14 +6,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JT808.Gateway" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.Kafka" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.MsgIdHandler" Version="1.0.2-preview1" />
<PackageReference Include="JT808.Gateway.MsgLogging" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.ReplyMessage" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.SessionNotice" Version="1.1.0" />
<PackageReference Include="JT808.Gateway" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.Kafka" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.MsgIdHandler" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.MsgLogging" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.ReplyMessage" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.SessionNotice" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.Traffic" Version="1.0.2-preview1" />
<PackageReference Include="JT808.Gateway.Transmit" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.Transmit" Version="1.1.1-preview2" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />


+ 2
- 1
simples/JT808.Gateway.SimpleQueueService/Program.cs View File

@@ -33,7 +33,8 @@ namespace JT808.Gateway.SimpleQueueService
.AddMsgConsumer(hostContext.Configuration)
.AddMsgReplyProducer(hostContext.Configuration)
.AddSessionConsumer(hostContext.Configuration)
.AddReplyMessage<JT808QueueReplyMessageHandlerImpl>()
//todo:JT808QueueReplyMessageHandlerImpl
//.AddReplyMessage<JT808QueueReplyMessageHandlerImpl>()
.AddSessionNotice<JT808SessionNoticeServiceImpl>();
});



+ 5
- 5
simples/JT808.Gateway.SimpleServer/JT808.Gateway.SimpleServer.csproj View File

@@ -5,11 +5,11 @@
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JT808.Gateway" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.MsgLogging" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.ReplyMessage" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.SessionNotice" Version="1.1.0" />
<PackageReference Include="JT808.Gateway.Transmit" Version="1.1.0" />
<PackageReference Include="JT808.Gateway" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.MsgLogging" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.ReplyMessage" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.SessionNotice" Version="1.1.1-preview2" />
<PackageReference Include="JT808.Gateway.Transmit" Version="1.1.1-preview2" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />


+ 9
- 2
simples/JT808.Simples.sln View File

@@ -19,9 +19,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Gateway.SimpleQueueSe
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Gateway.SimpleQueueNotification", "JT808.Gateway.SimpleQueueNotification\JT808.Gateway.SimpleQueueNotification.csproj", "{163D2EE2-9A62-4E8A-B203-BF147909E89A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JT808.DotNetty.SimpleQueueServer", "JT808.DotNetty.SimpleQueueServer\JT808.DotNetty.SimpleQueueServer.csproj", "{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.SimpleQueueServer", "JT808.DotNetty.SimpleQueueServer\JT808.DotNetty.SimpleQueueServer.csproj", "{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JT808.DotNetty.SimpleQueueService", "JT808.DotNetty.SimpleQueueService\JT808.DotNetty.SimpleQueueService.csproj", "{90E1F1C9-A953-4341-9792-9E2AF4471B68}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.SimpleQueueService", "JT808.DotNetty.SimpleQueueService\JT808.DotNetty.SimpleQueueService.csproj", "{90E1F1C9-A953-4341-9792-9E2AF4471B68}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JT808.Gateway.NBIotSimpleClient", "JT808.Gateway.NBIotSimpleClient\JT808.Gateway.NBIotSimpleClient.csproj", "{95F159E4-07A3-4736-9D05-2D88EE43FD5E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -65,6 +67,10 @@ Global
{90E1F1C9-A953-4341-9792-9E2AF4471B68}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90E1F1C9-A953-4341-9792-9E2AF4471B68}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90E1F1C9-A953-4341-9792-9E2AF4471B68}.Release|Any CPU.Build.0 = Release|Any CPU
{95F159E4-07A3-4736-9D05-2D88EE43FD5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95F159E4-07A3-4736-9D05-2D88EE43FD5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95F159E4-07A3-4736-9D05-2D88EE43FD5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95F159E4-07A3-4736-9D05-2D88EE43FD5E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -79,6 +85,7 @@ Global
{163D2EE2-9A62-4E8A-B203-BF147909E89A} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6}
{1DEAC7EA-D662-420B-A1A7-A6E840568F7B} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6}
{90E1F1C9-A953-4341-9792-9E2AF4471B68} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6}
{95F159E4-07A3-4736-9D05-2D88EE43FD5E} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FC0FFCEA-E1EF-4C97-A1C5-F89418B6834B}


+ 1
- 1
src/JT808.DotNetty.Abstractions/JT808.DotNetty.Abstractions.csproj View File

@@ -20,7 +20,7 @@
<PackageReleaseNotes>基于DotNetty实现的JT808DotNetty的抽象库</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JT808" Version="2.3.6" />
<PackageReference Include="JT808" Version="2.3.7" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />


+ 2
- 2
src/JT808.DotNetty.Client/JT808.DotNetty.Client.csproj View File

@@ -24,10 +24,10 @@
<PackageReference Include="DotNetty.Handlers" Version="0.6.0" />
<PackageReference Include="DotNetty.Transport.Libuv" Version="0.6.0" />
<PackageReference Include="DotNetty.Codecs" Version="0.6.0" />
<PackageReference Include="JT808" Version="2.3.6" />
<PackageReference Include="JT808" Version="2.3.7" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />
</ItemGroup>


+ 1
- 1
src/JT808.DotNetty.Core/JT808.DotNetty.Core.csproj View File

@@ -28,7 +28,7 @@
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

<ItemGroup>


+ 1
- 1
src/JT808.DotNetty.Kafka/JT808.DotNetty.Kafka.csproj View File

@@ -20,7 +20,7 @@
<PackageReleaseNotes>基于Kafka的JT808消息发布与订阅</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Confluent.Kafka" Version="1.6.2" />
<PackageReference Include="Confluent.Kafka" Version="1.6.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />


+ 1
- 1
src/JT808.DotNetty.Services/JT808.DotNetty.Transmit/JT808.DotNetty.Transmit.csproj View File

@@ -25,7 +25,7 @@
<PackageReference Include="DotNetty.Buffers" Version="0.6.0" />
<PackageReference Include="DotNetty.Handlers" Version="0.6.0" />
<PackageReference Include="DotNetty.Transport" Version="0.6.0" />
<PackageReference Include="Polly" Version="7.2.1" />
<PackageReference Include="Polly" Version="7.2.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\JT808.DotNetty.Abstractions\JT808.DotNetty.Abstractions.csproj" />


+ 1
- 1
src/JT808.DotNetty.WebApiClientTool/JT808.DotNetty.WebApiClientTool.csproj View File

@@ -24,7 +24,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="5.0.1" />
<PackageReference Include="System.Text.Json" Version="5.0.2" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath="" />


+ 1
- 1
src/JT808.Gateway.Abstractions/JT808.Gateway.Abstractions.csproj View File

@@ -28,7 +28,7 @@
<Compile Remove="JT808QueueReplyMessageHandler.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JT808" Version="2.3.6" />
<PackageReference Include="JT808" Version="2.3.7" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />


+ 1
- 1
src/JT808.Gateway.Benchmark/JT808.Gateway.CleintBenchmark/JT808.Gateway.CleintBenchmark.csproj View File

@@ -20,7 +20,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.1" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.2" />
</ItemGroup>

<ItemGroup>


+ 1
- 1
src/JT808.Gateway.Benchmark/JT808.Gateway.ServerBenchmark/JT808.Gateway.ServerBenchmark.csproj View File

@@ -9,7 +9,7 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.1" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.2" />
</ItemGroup>

<ItemGroup>


+ 1
- 1
src/JT808.Gateway.Client/JT808.Gateway.Client.csproj View File

@@ -23,7 +23,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JT808" Version="2.3.6" />
<PackageReference Include="JT808" Version="2.3.7" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
<PackageReference Include="System.IO.Pipelines" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />


+ 1
- 1
src/JT808.Gateway.Kafka/JT808.Gateway.Kafka.csproj View File

@@ -21,7 +21,7 @@
<Version>$(JT808GatewayPackageVersion)</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Confluent.Kafka" Version="1.6.2" />
<PackageReference Include="Confluent.Kafka" Version="1.6.3" />
</ItemGroup>

<ItemGroup>


+ 2
- 2
src/Version.props View File

@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<JT808DotNettyPackageVersion>2.3.3-preview2</JT808DotNettyPackageVersion>
<JT808GatewayPackageVersion>1.1.1-preview1</JT808GatewayPackageVersion>
<JT808DotNettyPackageVersion>2.3.3-preview3</JT808DotNettyPackageVersion>
<JT808GatewayPackageVersion>1.1.1-preview2</JT808GatewayPackageVersion>
</PropertyGroup>
</Project>

||||||
x
 
000:0
Loading…
Cancel
Save