Browse Source

1.完善webapi接口文档

2.修改readme文档
3.发布1.0.2-pre1(服务功能未实现)
tags/pipeline-1.1.0
SmallChi(Koike) 4 years ago
parent
commit
70b8b623cf
13 changed files with 770 additions and 888 deletions
  1. +15
    -15
      README.md
  2. +3
    -232
      api/README.md
  3. +294
    -0
      api/README_DotNetty.md
  4. +301
    -0
      api/README_Pipeline.md
  5. +1
    -1
      publish.gateway.bat
  6. +119
    -607
      src/JT808.Gateway.Abstractions/JT808.Gateway.Abstractions.xml
  7. +19
    -16
      src/JT808.Gateway.Tests/JT808.Gateway.NormalHosting/Impl/JT808CustomMessageHandlerImpl.cs
  8. +0
    -1
      src/JT808.Gateway.Tests/JT808.Gateway.NormalHosting/JT808.Gateway.NormalHosting.csproj
  9. +3
    -8
      src/JT808.Gateway.Tests/JT808.Gateway.NormalHosting/Program.cs
  10. +1
    -0
      src/JT808.Gateway.Tests/JT808.Gateway.NormalHosting/appsettings.json
  11. +3
    -0
      src/JT808.Gateway.Tests/JT808.Gateway.NormalHosting/startup.ini
  12. +10
    -7
      src/JT808.Gateway/JT808GatewayExtensions.cs
  13. +1
    -1
      src/Version.props

+ 15
- 15
README.md View File

@@ -55,9 +55,9 @@


通过继承JT808.DotNetty.Core.Handlers.JT808MsgIdHttpHandlerBase去实现自定义的WebApi接口服务。 通过继承JT808.DotNetty.Core.Handlers.JT808MsgIdHttpHandlerBase去实现自定义的WebApi接口服务。


## 基于GRPC的消息业务处理程序
通过继承JT808.Gateway.Handlers.JT808MsgIdDefaultWebApiHandler去实现自定义的WebApi接口服务。


[GRPC消息业务处理协议](https://github.com/SmallChi/JT808Gateway/blob/master/src/JT808.Gateway.Abstractions/Protos/JT808Gateway.proto)
[接口文档](https://github.com/SmallChi/JT808Gateway/tree/master/api)


## 基于core 3.1 Pipeline ## 基于core 3.1 Pipeline


@@ -70,18 +70,19 @@ Pipeline分为两种方式使用,一种是使用队列的方式,一种是网


### Pipeline的NuGet安装 ### Pipeline的NuGet安装


| Package Name | Version | Downloads |
| --------------------- | -------------------------------------------------- | --------------------------------------------------- |
| Install-Package JT808.Gateway.Abstractions| ![JT808.Gateway.Abstractions](https://img.shields.io/nuget/v/JT808.Gateway.Abstractions.svg) | ![JT808.Gateway.Abstractions](https://img.shields.io/nuget/dt/JT808.Gateway.Abstractions.svg) |
| Install-Package JT808.Gateway | ![JT808.Gateway](https://img.shields.io/nuget/v/JT808.Gateway.svg) | ![JT808.Gateway](https://img.shields.io/nuget/dt/JT808.Gateway.svg) |
| Install-Package JT808.Gateway.Client| ![JT808.Gateway.Client](https://img.shields.io/nuget/v/JT808.Gateway.Client.svg) | ![JT808.Gateway.Client](https://img.shields.io/nuget/dt/JT808.Gateway.Client.svg) |
| Install-Package JT808.Gateway.Kafka| ![JT808.Gateway.Kafka](https://img.shields.io/nuget/v/JT808.Gateway.Kafka.svg) | ![JT808.Gateway.Kafka](https://img.shields.io/nuget/dt/JT808.Gateway.Kafka.svg) |
| Install-Package JT808.Gateway.Transmit | ![JT808.Gateway.Transmit](https://img.shields.io/nuget/v/JT808.Gateway.Transmit.svg) | ![JT808.Gateway.Transmit](https://img.shields.io/nuget/dt/JT808.Gateway.Transmit.svg) |
| Install-Package JT808.Gateway.Traffic | ![JT808.Gateway.Traffic](https://img.shields.io/nuget/v/JT808.Gateway.Traffic.svg) | ![JT808.Gateway.Traffic](https://img.shields.io/nuget/dt/JT808.Gateway.Traffic.svg)|
| Install-Package JT808.Gateway.SessionNotice | ![JT808.Gateway.SessionNotice](https://img.shields.io/nuget/v/JT808.Gateway.SessionNotice.svg) | ![JT808.Gateway.SessionNotice](https://img.shields.io/nuget/dt/JT808.Gateway.SessionNotice.svg)|
| 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/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/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/dt/JT808.Gateway.MsgIdHandler.svg)|
| Package Name | Version| Preview Version| Downloads |
| --- | --- | --- | --- |
| Install-Package JT808.Gateway.Abstractions| ![JT808.Gateway.Abstractions](https://img.shields.io/nuget/v/JT808.Gateway.Abstractions.svg) | ![JT808.Gateway.Abstractions](https://img.shields.io/nuget/vpre/JT808.Gateway.Abstractions.svg) | ![JT808.Gateway.Abstractions](https://img.shields.io/nuget/dt/JT808.Gateway.Abstractions.svg)|![JT808.Gateway.Abstractions](https://img.shields.io/nuget/dt/JT808.Gateway.Abstractions.svg) |
| Install-Package JT808.Gateway | ![JT808.Gateway](https://img.shields.io/nuget/v/JT808.Gateway.svg) | ![JT808.Gateway](https://img.shields.io/nuget/vpre/JT808.Gateway.svg)|![JT808.Gateway](https://img.shields.io/nuget/dt/JT808.Gateway.svg) |
| Install-Package JT808.Gateway.WebApiClientTool | ![JT808.Gateway.WebApiClientTool](https://img.shields.io/nuget/v/JT808.Gateway.WebApiClientTool.svg) | ![JT808.Gateway.WebApiClientTool](https://img.shields.io/nuget/vpre/JT808.Gateway.WebApiClientTool.svg)|![JT808.Gateway.WebApiClientTool](https://img.shields.io/nuget/dt/JT808.Gateway.WebApiClientTool.svg) |
| Install-Package JT808.Gateway.Client| ![JT808.Gateway.Client](https://img.shields.io/nuget/v/JT808.Gateway.Client.svg) |![JT808.Gateway.Client](https://img.shields.io/nuget/vpre/JT808.Gateway.Client.svg) |![JT808.Gateway.Client](https://img.shields.io/nuget/dt/JT808.Gateway.Client.svg) |
| Install-Package JT808.Gateway.Kafka| ![JT808.Gateway.Kafka](https://img.shields.io/nuget/v/JT808.Gateway.Kafka.svg) |![JT808.Gateway.Kafka](https://img.shields.io/nuget/vpre/JT808.Gateway.Kafka.svg)| ![JT808.Gateway.Kafka](https://img.shields.io/nuget/dt/JT808.Gateway.Kafka.svg) |
| Install-Package JT808.Gateway.Transmit | ![JT808.Gateway.Transmit](https://img.shields.io/nuget/v/JT808.Gateway.Transmit.svg) |![JT808.Gateway.Transmit](https://img.shields.io/nuget/vpre/JT808.Gateway.Transmit.svg)| ![JT808.Gateway.Transmit](https://img.shields.io/nuget/dt/JT808.Gateway.Transmit.svg) |
| Install-Package JT808.Gateway.Traffic | ![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)|
| Install-Package JT808.Gateway.SessionNotice | ![JT808.Gateway.SessionNotice](https://img.shields.io/nuget/v/JT808.Gateway.SessionNotice.svg) |![JT808.Gateway.SessionNotice](https://img.shields.io/nuget/vpre/JT808.Gateway.SessionNotice.svg)| ![JT808.Gateway.SessionNotice](https://img.shields.io/nuget/dt/JT808.Gateway.SessionNotice.svg)|
| 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)|


## 基于DotNetty ## 基于DotNetty


@@ -103,7 +104,6 @@ Pipeline分为两种方式使用,一种是使用队列的方式,一种是网
| Install-Package JT808.DotNetty.MsgLogging | ![JT808.DotNetty.MsgLogging](https://img.shields.io/nuget/v/JT808.DotNetty.MsgLogging.svg) | ![JT808.DotNetty.MsgLogging](https://img.shields.io/nuget/dt/JT808.DotNetty.MsgLogging.svg)| | Install-Package JT808.DotNetty.MsgLogging | ![JT808.DotNetty.MsgLogging](https://img.shields.io/nuget/v/JT808.DotNetty.MsgLogging.svg) | ![JT808.DotNetty.MsgLogging](https://img.shields.io/nuget/dt/JT808.DotNetty.MsgLogging.svg)|
| Install-Package JT808.DotNetty.MsgIdHandler | ![JT808.DotNetty.MsgIdHandler](https://img.shields.io/nuget/v/JT808.DotNetty.MsgIdHandler.svg) | ![JT808.DotNetty.MsgIdHandler](https://img.shields.io/nuget/dt/JT808.DotNetty.MsgIdHandler.svg)| | Install-Package JT808.DotNetty.MsgIdHandler | ![JT808.DotNetty.MsgIdHandler](https://img.shields.io/nuget/v/JT808.DotNetty.MsgIdHandler.svg) | ![JT808.DotNetty.MsgIdHandler](https://img.shields.io/nuget/dt/JT808.DotNetty.MsgIdHandler.svg)|
| Install-Package JT808.DotNetty.Kafka | ![JT808.DotNetty.Kafka](https://img.shields.io/nuget/v/JT808.DotNetty.Kafka.svg) | ![JT808.DotNetty.Kafka](https://img.shields.io/nuget/dt/JT808.DotNetty.Kafka.svg) | | Install-Package JT808.DotNetty.Kafka | ![JT808.DotNetty.Kafka](https://img.shields.io/nuget/v/JT808.DotNetty.Kafka.svg) | ![JT808.DotNetty.Kafka](https://img.shields.io/nuget/dt/JT808.DotNetty.Kafka.svg) |
| Install-Package JT808.DotNetty.RabbitMQ | ![JT808.DotNetty.RabbitMQ](https://img.shields.io/nuget/v/JT808.DotNetty.RabbitMQ.svg) | ![JT808.DotNetty.RabbitMQ](https://img.shields.io/nuget/dt/JT808.DotNetty.RabbitMQ.svg) |


## 举个栗子 ## 举个栗子




+ 3
- 232
api/README.md View File

@@ -1,234 +1,5 @@
# JT808 WebApi服务
# JT808 WebApi 接口文档


基地址:127.0.0.1:828/jt808api/
[基于JT808Gateway WebApi接口文档](https://github.com/SmallChi/JT808Gateway/tree/master/api/README_Pipeline.md)


> 注意url格式

数据格式:只支持Json格式

默认端口:828

## 1.统一下发设备消息服务

[统一下发设备消息服务](#send)

## 2.管理会话服务

[基于Tcp管理会话服务](#tcp_session)

[基于Udp管理会话服务](#udp_session)

## 接口请求对照表

### 公共接口请求

|请求Url|请求方式|说明|
|:------|:------|:------|
| 127.0.0.1:828/jt808api/UnificationSend| POST| 统一下发设备消息服务|

### 基于Tcp接口请求

|请求Url|请求方式|说明|
|:------|:------|:------|
| 127.0.0.1:828/jt808api/Tcp/Session/GetAll| GET| 基于Tcp管理会话服务-获取会话集合|
| 127.0.0.1:828/jt808api/Tcp/Session/QueryTcpSessionByTerminalPhoneNo| POST| 基于Tcp管理会话服务-通过设备终端号查询对应会话|
| 127.0.0.1:828/jt808api/Tcp/Session/RemoveByTerminalPhoneNo| POST| 基于Tcp管理会话服务-通过设备终端号移除对应会话|

### 基于Udp接口请求

|请求Url|请求方式|说明|
|:------|:------|:------|
| 127.0.0.1:828/jt808api/Udp/Session/GetAll| GET| 基于Udp管理会话服务-获取会话集合|
| 127.0.0.1:828/jt808api/Udp/Session/RemoveByTerminalPhoneNo| POST| 基于Udp管理会话服务-通过设备终端号移除对应会话|

### 统一对象返回 JT808ResultDto\<T>

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Message| string| 消息描述|
| Code| int| 状态码|
| Data| T(泛型)| 数据|

返回Code[状态码]说明:

|状态码|说明|
|:------:|:------:|
| 200 | 返回成功 |
| 201 | 内容为空 |
| 404 | 没有该服务 |
| 500 | 服务内部错误 |

### <span id="send">基于Tcp统一下发设备消息服务</span>

请求地址:/UnificationSend

请求方式:POST

请求参数:

|属性|数据类型|参数说明|
|------|:------:|:------|
| TerminalPhoneNo| string| 设备终端号|
| Data| byte[]| JT808 byte[]数组|

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| bool| 是否成功|

返回结果:

``` result1
{
"Message":"",
"Code":200,
"Data":true
}
```

### <span id="tcp_session">基于Tcp管理会话服务</span>

#### 统一会话信息对象返回 JT808TcpSessionInfoDto

|属性|数据类型|参数说明|
|------|------|------|
| LastActiveTime| DateTime| 最后上线时间|
| StartTime| DateTime| 上线时间|
| TerminalPhoneNo|string| 终端手机号|
| RemoteAddressIP| string| 远程ip地址|

#### 1.获取会话集合

请求地址:Tcp/Session/GetAll

请求方式:GET

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| List\<JT808TcpSessionInfoDto> | 实际会话信息集合 |

返回结果:

``` session1
{
"Message":"",
"Code":200,
"Data":[
{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789012",
"RemoteAddressIP":"127.0.0.1:11808"
},{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789013",
"RemoteAddressIP":"127.0.0.1:11808"
}
]
}
```

#### 2.通过设备终端号移除对应会话

请求地址:Tcp/Session/RemoveByTerminalPhoneNo

请求方式:POST

请求参数:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| terminalPhoneNo| string| 设备终端号|

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| bool | 是否成功

返回结果:

``` session3
{
"Message":"",
"Code":200,
"Data":true
}
```

### <span id="udp_session">基于Udp管理会话服务</span>

#### 统一会话信息对象返回 JT808UdpSessionInfoDto

|属性|数据类型|参数说明|
|------|------|------|
| LastActiveTime| DateTime| 最后上线时间|
| StartTime| DateTime| 上线时间|
| TerminalPhoneNo|string| 终端手机号|
| RemoteAddressIP| string| 远程ip地址|

#### 1.获取会话集合

请求地址:Udp/Session/GetAll

请求方式:GET

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| List\<JT808UdpSessionInfoDto> | 实际会话信息集合 |

返回结果:

``` session1
{
"Message":"",
"Code":200,
"Data":[
{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789012",
"RemoteAddressIP":"127.0.0.1:11808"
},{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789013",
"RemoteAddressIP":"127.0.0.1:11808"
}
]
}
```

#### 2.通过设备终端号移除对应会话

请求地址:Udp/Session/RemoveByTerminalPhoneNo

请求方式:POST

请求参数:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| terminalPhoneNo| string| 设备终端号|

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| bool | 是否成功

返回结果:

``` session3
{
"Message":"",
"Code":200,
"Data":true
}
```
[基于JT808DotNetty WebApi接口文档](https://github.com/SmallChi/JT808Gateway/tree/master/api/README_DotNetty.md)

+ 294
- 0
api/README_DotNetty.md View File

@@ -0,0 +1,294 @@
# 基于JT808DotNetty WebApi 接口文档

基地址:127.0.0.1:828/jt808api/

> 注意url格式

数据格式:只支持Json格式

默认端口:828

## 1.统一下发设备消息服务

[统一下发设备消息服务](#send)

## 2.管理会话服务

[基于Tcp管理会话服务](#tcp_session)

[基于Udp管理会话服务](#udp_session)

## 4.消息包计数服务

[基于Tcp消息包计数服务](#tcp_counter)

[基于Udp消息包计数服务](#udp_counter)

## 接口请求对照表

### 公共接口请求

|请求Url|请求方式|说明|
|:------|:------|:------|
| 127.0.0.1:828/jt808api/UnificationSend| POST| 统一下发设备消息服务|

### 基于Tcp接口请求

|请求Url|请求方式|说明|
|:------|:------|:------|
| 127.0.0.1:828/jt808api/Tcp/Session/GetAll| GET| 基于Tcp管理会话服务-获取会话集合|
| 127.0.0.1:828/jt808api/Tcp/Session/QueryTcpSessionByTerminalPhoneNo| POST| 基于Tcp管理会话服务-通过设备终端号查询对应会话|
| 127.0.0.1:828/jt808api/Tcp/Session/RemoveByTerminalPhoneNo| POST| 基于Tcp管理会话服务-通过设备终端号移除对应会话|
| 127.0.0.1:828/jt808api/Tcp/GetAtomicCounter| GET| 基于Tcp消息包计数服务|

### 基于Udp接口请求

|请求Url|请求方式|说明|
|:------|:------|:------|
| 127.0.0.1:828/jt808api/Udp/Session/GetAll| GET| 基于Udp管理会话服务-获取会话集合|
| 127.0.0.1:828/jt808api/Udp/Session/RemoveByTerminalPhoneNo| POST| 基于Udp管理会话服务-通过设备终端号移除对应会话|
| 127.0.0.1:828/jt808api/Udp/GetAtomicCounter| GET| 基于Udp消息包计数服务|

### 统一对象返回 JT808ResultDto\<T>

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Message| string| 消息描述|
| Code| int| 状态码|
| Data| T(泛型)| 数据|

返回Code[状态码]说明:

|状态码|说明|
|:------:|:------:|
| 200 | 返回成功 |
| 201 | 内容为空 |
| 404 | 没有该服务 |
| 500 | 服务内部错误 |

### <span id="send">基于Tcp统一下发设备消息服务</span>

请求地址:/UnificationSend

请求方式:POST

请求参数:

|属性|数据类型|参数说明|
|------|:------:|:------|
| TerminalPhoneNo| string| 设备终端号|
| Data| byte[]| JT808 byte[]数组|

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| bool| 是否成功|

返回结果:

``` result1
{
"Message":"",
"Code":200,
"Data":true
}
```

### <span id="tcp_session">基于Tcp管理会话服务</span>

#### 统一会话信息对象返回 JT808TcpSessionInfoDto

|属性|数据类型|参数说明|
|------|------|------|
| LastActiveTime| DateTime| 最后上线时间|
| StartTime| DateTime| 上线时间|
| TerminalPhoneNo|string| 终端手机号|
| RemoteAddressIP| string| 远程ip地址|

#### 1.获取会话集合

请求地址:Tcp/Session/GetAll

请求方式:GET

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| List\<JT808TcpSessionInfoDto> | 实际会话信息集合 |

返回结果:

``` session1
{
"Message":"",
"Code":200,
"Data":[
{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789012",
"RemoteAddressIP":"127.0.0.1:11808"
},{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789013",
"RemoteAddressIP":"127.0.0.1:11808"
}
]
}
```

#### 2.通过设备终端号移除对应会话

请求地址:Tcp/Session/RemoveByTerminalPhoneNo

请求方式:POST

请求参数:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| terminalPhoneNo| string| 设备终端号|

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| bool | 是否成功

返回结果:

``` session3
{
"Message":"",
"Code":200,
"Data":true
}
```

### <span id="udp_session">基于Udp管理会话服务</span>

#### 统一会话信息对象返回 JT808UdpSessionInfoDto

|属性|数据类型|参数说明|
|------|------|------|
| LastActiveTime| DateTime| 最后上线时间|
| StartTime| DateTime| 上线时间|
| TerminalPhoneNo|string| 终端手机号|
| RemoteAddressIP| string| 远程ip地址|

#### 1.获取会话集合

请求地址:Udp/Session/GetAll

请求方式:GET

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| List\<JT808UdpSessionInfoDto> | 实际会话信息集合 |

返回结果:

``` session1
{
"Message":"",
"Code":200,
"Data":[
{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789012",
"RemoteAddressIP":"127.0.0.1:11808"
},{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789013",
"RemoteAddressIP":"127.0.0.1:11808"
}
]
}
```

#### 2.通过设备终端号移除对应会话

请求地址:Udp/Session/RemoveByTerminalPhoneNo

请求方式:POST

请求参数:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| terminalPhoneNo| string| 设备终端号|

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| bool | 是否成功

返回结果:

``` session3
{
"Message":"",
"Code":200,
"Data":true
}
```

### <span id="tcp_counter">基于Tcp消息包计数服务</span>

请求地址:Tcp/GetAtomicCounter

请求方式:GET

返回数据:

|属性|数据类型|参数说明|
|------|:------:|:------|
| MsgSuccessCount| long| 消息包成功数|
| MsgFailCount| long| 消息包失败数|

返回结果:

``` counter
{
"Message":"",
"Code":200,
"Data":{
"MsgSuccessCount":10000,
"MsgFailCount":0
}
}
```

### <span id="udp_counter">基于Udp消息包计数服务</span>

请求地址:Udp/GetAtomicCounter

请求方式:GET

返回数据:

|属性|数据类型|参数说明|
|------|:------:|:------|
| MsgSuccessCount| long| 消息包成功数|
| MsgFailCount| long| 消息包失败数|

返回结果:

``` counter
{
"Message":"",
"Code":200,
"Data":{
"MsgSuccessCount":1000,
"MsgFailCount":0
}
}
```

+ 301
- 0
api/README_Pipeline.md View File

@@ -0,0 +1,301 @@
# 基于JT808Gateway WebApi 接口文档

基地址:127.0.0.1:828/jt808api/

> 注意url格式

数据格式:只支持Json格式

默认端口:828

## 1.统一下发设备消息服务

[统一下发设备消息服务](#send)

## 2.管理会话服务

[基于Tcp管理会话服务](#tcp_session)

[基于Udp管理会话服务](#udp_session)

## 接口请求对照表

### 公共接口请求

|请求Url|请求方式|说明|
|:------|:------|:------|
| 127.0.0.1:828/jt808api/UnificationSend| POST| 统一下发设备消息服务|

### 基于Tcp接口请求

|请求Url|请求方式|说明|
|:------|:------|:------|
| 127.0.0.1:828/jt808api/Tcp/Session/GetAll| GET| 基于Tcp管理会话服务-获取会话集合|
| 127.0.0.1:828/jt808api/Tcp/Session/QueryTcpSessionByTerminalPhoneNo| POST| 基于Tcp管理会话服务-通过设备终端号查询对应会话|
| 127.0.0.1:828/jt808api/Tcp/Session/RemoveByTerminalPhoneNo| POST| 基于Tcp管理会话服务-通过设备终端号移除对应会话|

### 基于Udp接口请求

|请求Url|请求方式|说明|
|:------|:------|:------|
| 127.0.0.1:828/jt808api/Udp/Session/GetAll| GET| 基于Udp管理会话服务-获取会话集合|
| 127.0.0.1:828/jt808api/Udp/Session/QueryUdpSessionByTerminalPhoneNo| POST| 基于Udp管理会话服务-通过设备终端号查询对应会话|
| 127.0.0.1:828/jt808api/Udp/Session/RemoveUdpByTerminalPhoneNo| POST| 基于Udp管理会话服务-通过设备终端号移除对应会话|

### 统一对象返回 JT808ResultDto\<T>

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Message| string| 消息描述|
| Code| int| 状态码|
| Data| T(泛型)| 数据|

返回Code[状态码]说明:

|状态码|说明|
|:------:|:------:|
| 200 | 返回成功 |
| 201 | 内容为空 |
| 404 | 没有该服务 |
| 500 | 服务内部错误 |

### <span id="send">基于Tcp统一下发设备消息服务</span>

请求地址:/UnificationSend

请求方式:POST

请求参数:

|属性|数据类型|参数说明|
|------|:------:|:------|
| TerminalPhoneNo| string| 设备终端号|
| HexData| string| JT808 Hex String JT808数据包字符串|

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| bool| 是否成功|

返回结果:

``` result1
{
"Message":"",
"Code":200,
"Data":true
}
```

### <span id="tcp_session">基于Tcp管理会话服务</span>

#### 统一会话信息对象返回 JT808TcpSessionInfoDto

|属性|数据类型|参数说明|
|------|------|------|
| LastActiveTime| DateTime| 最后上线时间|
| StartTime| DateTime| 上线时间|
| TerminalPhoneNo|string| 终端手机号|
| RemoteAddressIP| string| 远程ip地址|

#### 1.获取会话集合

请求地址:Tcp/Session/GetAll

请求方式:GET

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| List\<JT808TcpSessionInfoDto> | 实际会话信息集合 |

返回结果:

``` session1
{
"Message":"",
"Code":200,
"Data":[
{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789012",
"RemoteAddressIP":"127.0.0.1:11808"
},{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789013",
"RemoteAddressIP":"127.0.0.1:11808"
}
]
}
```

#### 2.通过设备终端号查询对应会话

请求地址:Tcp/Session/QueryTcpSessionByTerminalPhoneNo

请求方式:POST

请求参数:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| terminalPhoneNo| string| 设备终端号|

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| JT808TcpSessionInfoDto对象 | 统一会话信息对象返回 |

返回结果:

``` session2
{
"Message":"",
"Code":200,
"Data": {
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789012",
"RemoteAddressIP":"127.0.0.1:11808"
}
}
```

#### 3.通过设备终端号移除对应会话

请求地址:Tcp/Session/RemoveByTerminalPhoneNo

请求方式:POST

请求参数:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| terminalPhoneNo| string| 设备终端号|

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| bool | 是否成功

返回结果:

``` session3
{
"Message":"",
"Code":200,
"Data":true
}
```

### <span id="udp_session">基于Udp管理会话服务</span>

#### 统一会话信息对象返回 JT808UdpSessionInfoDto

|属性|数据类型|参数说明|
|------|------|------|
| LastActiveTime| DateTime| 最后上线时间|
| StartTime| DateTime| 上线时间|
| TerminalPhoneNo|string| 终端手机号|
| RemoteAddressIP| string| 远程ip地址|

#### 1.获取会话集合

请求地址:Udp/Session/GetAll

请求方式:GET

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| List\<JT808UdpSessionInfoDto> | 实际会话信息集合 |

返回结果:

``` session1
{
"Message":"",
"Code":200,
"Data":[
{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789012",
"RemoteAddressIP":"127.0.0.1:11808"
},{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789013",
"RemoteAddressIP":"127.0.0.1:11808"
}
]
}
```

#### 2.通过设备终端号查询对应会话

请求地址:Udp/Session/QueryUdpSessionByTerminalPhoneNo

请求方式:POST

请求参数:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| terminalPhoneNo| string| 设备终端号|

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| JT808UdpSessionInfoDto对象 | 统一会话信息对象返回 |

返回结果:

``` session2
{
"Message":"",
"Code":200,
"Data":{
"LastActiveTime":"2018-11-27 20:00:00",
"StartTime":"2018-11-25 20:00:00",
"TerminalPhoneNo":"123456789012",
"RemoteAddressIP":"127.0.0.1:11808"
}
}
```

#### 3.通过设备终端号移除对应会话

请求地址:Udp/Session/RemoveByTerminalPhoneNo

请求方式:POST

请求参数:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| terminalPhoneNo| string| 设备终端号|

返回数据:

|属性|数据类型|参数说明|
|:------:|:------:|:------|
| Data| bool | 是否成功

返回结果:

``` session3
{
"Message":"",
"Code":200,
"Data":true
}
```

+ 1
- 1
publish.gateway.bat View File

@@ -2,6 +2,7 @@ dotnet pack .\src\JT808.Gateway\JT808.Gateway.csproj -c Release --output nupkgs
dotnet pack .\src\JT808.Gateway.Kafka\JT808.Gateway.Kafka.csproj -c Release --output nupkgs dotnet pack .\src\JT808.Gateway.Kafka\JT808.Gateway.Kafka.csproj -c Release --output nupkgs
dotnet pack .\src\JT808.Gateway.Abstractions\JT808.Gateway.Abstractions.csproj -c Release --output nupkgs dotnet pack .\src\JT808.Gateway.Abstractions\JT808.Gateway.Abstractions.csproj -c Release --output nupkgs
dotnet pack .\src\JT808.Gateway.Client\JT808.Gateway.Client.csproj -c Release --output nupkgs dotnet pack .\src\JT808.Gateway.Client\JT808.Gateway.Client.csproj -c Release --output nupkgs
dotnet pack .\src\JT808.Gateway.WebApiClientTool\JT808.Gateway.WebApiClientTool.csproj -c Release --output nupkgs


echo 'push service pacakge...' echo 'push service pacakge...'
dotnet pack .\src\JT808.Gateway.Services\JT808.Gateway.MsgIdHandler\JT808.Gateway.MsgIdHandler.csproj -c Release --output nupkgs dotnet pack .\src\JT808.Gateway.Services\JT808.Gateway.MsgIdHandler\JT808.Gateway.MsgIdHandler.csproj -c Release --output nupkgs
@@ -10,5 +11,4 @@ dotnet pack .\src\JT808.Gateway.Services\JT808.Gateway.ReplyMessage\JT808.Gatewa
dotnet pack .\src\JT808.Gateway.Services\JT808.Gateway.SessionNotice\JT808.Gateway.SessionNotice.csproj -c Release --output nupkgs dotnet pack .\src\JT808.Gateway.Services\JT808.Gateway.SessionNotice\JT808.Gateway.SessionNotice.csproj -c Release --output nupkgs
dotnet pack .\src\JT808.Gateway.Services\JT808.Gateway.Traffic\JT808.Gateway.Traffic.csproj -c Release --output nupkgs dotnet pack .\src\JT808.Gateway.Services\JT808.Gateway.Traffic\JT808.Gateway.Traffic.csproj -c Release --output nupkgs
dotnet pack .\src\JT808.Gateway.Services\JT808.Gateway.Transmit\JT808.Gateway.Transmit.csproj -c Release --output nupkgs dotnet pack .\src\JT808.Gateway.Services\JT808.Gateway.Transmit\JT808.Gateway.Transmit.csproj -c Release --output nupkgs

pause pause

+ 119
- 607
src/JT808.Gateway.Abstractions/JT808.Gateway.Abstractions.xml View File

@@ -4,226 +4,172 @@
<name>JT808.Gateway.Abstractions</name> <name>JT808.Gateway.Abstractions</name>
</assembly> </assembly>
<members> <members>
<member name="T:JT808.Gateway.Abstractions.Enums.JT808TransportProtocolType">
<member name="P:JT808.Gateway.Abstractions.Configurations.JT808Configuration.WebApiToken">
<summary> <summary>
传输协议类型
WebApi 默认token 123456
</summary> </summary>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.IJT808MsgProducer.ProduceAsync(System.String,System.Byte[])">
<member name="P:JT808.Gateway.Abstractions.Configurations.JT808Configuration.TcpReaderIdleTimeSeconds">
<summary> <summary>
Tcp读超时
默认10分钟检查一次
</summary> </summary>
<param name="terminalNo">设备终端号</param>
<param name="data">808 hex data</param>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.IJT808MsgReplyProducer.ProduceAsync(System.String,System.Byte[])">
<member name="P:JT808.Gateway.Abstractions.Configurations.JT808Configuration.TcpReceiveTimeoutCheckTimeSeconds">
<summary> <summary>
Tcp 60s检查一次
</summary> </summary>
<param name="terminalNo">设备终端号</param>
<param name="data">808 hex data</param>
</member> </member>
<member name="P:JT808.Gateway.Abstractions.IJT808Session.TerminalPhoneNo">
<member name="P:JT808.Gateway.Abstractions.Configurations.JT808Configuration.UdpReaderIdleTimeSeconds">
<summary> <summary>
终端手机号
Udp读超时
</summary> </summary>
</member> </member>
<member name="T:JT808.Gateway.Abstractions.IJT808SessionConsumer">
<member name="P:JT808.Gateway.Abstractions.Configurations.JT808Configuration.UdpReceiveTimeoutCheckTimeSeconds">
<summary> <summary>
会话通知(在线/离线)
Udp 60s检查一次
</summary> </summary>
</member> </member>
<member name="T:JT808.Gateway.Abstractions.IJT808SessionProducer">
<member name="P:JT808.Gateway.Abstractions.Configurations.JT808Configuration.FilterMsgIdHandlerForQueue">
<summary> <summary>
会话通知(在线/离线)
网关不做消息业务处理,往队列发送
</summary> </summary>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Processor(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="P:JT808.Gateway.Abstractions.Dtos.JT808TcpSessionInfoDto.LastActiveTime">
<summary> <summary>
最后上线时间
</summary> </summary>
<param name="request">请求数据</param>
<param name="session">当前会话</param>
<returns>应答消息数据</returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0001(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="P:JT808.Gateway.Abstractions.Dtos.JT808TcpSessionInfoDto.StartTime">
<summary> <summary>
终端通用应答
平台无需回复
实现自己的业务
上线时间
</summary> </summary>
<param name="request"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.CommonReply(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="P:JT808.Gateway.Abstractions.Dtos.JT808TcpSessionInfoDto.TerminalPhoneNo">
<summary> <summary>
平台通用应答
终端手机号
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0002(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="P:JT808.Gateway.Abstractions.Dtos.JT808TcpSessionInfoDto.RemoteAddressIP">
<summary> <summary>
终端心跳
远程ip地址
</summary> </summary>
<param name="request"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0004(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="P:JT808.Gateway.Abstractions.Dtos.JT808UdpSessionInfoDto.LastActiveTime">
<summary> <summary>
查询服务器时间
2019版本
最后上线时间
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x8003(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="P:JT808.Gateway.Abstractions.Dtos.JT808UdpSessionInfoDto.StartTime">
<summary> <summary>
服务器补传分包请求
上线时间
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0005(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="P:JT808.Gateway.Abstractions.Dtos.JT808UdpSessionInfoDto.TerminalPhoneNo">
<summary> <summary>
终端补传分包请求
终端手机号
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0100(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="P:JT808.Gateway.Abstractions.Dtos.JT808UdpSessionInfoDto.RemoteAddressIP">
<summary> <summary>
终端注册
远程ip地址
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0003(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="T:JT808.Gateway.Abstractions.Dtos.JT808UnificationSendRequestDto">
<summary> <summary>
终端注销
统一下发请求参数
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0102(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="T:JT808.Gateway.Abstractions.Enums.JT808TransportProtocolType">
<summary> <summary>
终端鉴权
传输协议类型
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0104(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="M:JT808.Gateway.Abstractions.IJT808MsgProducer.ProduceAsync(System.String,System.Byte[])">
<summary> <summary>
查询终端参数应答
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
<param name="terminalNo">设备终端号</param>
<param name="data">808 hex data</param>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0107(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="M:JT808.Gateway.Abstractions.IJT808MsgReplyLoggingProducer.ProduceAsync(System.String,System.Byte[])">
<summary> <summary>
查询终端属性应答
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
<param name="terminalNo">设备终端号</param>
<param name="data">808 hex data</param>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0108(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="M:JT808.Gateway.Abstractions.IJT808MsgReplyProducer.ProduceAsync(System.String,System.Byte[])">
<summary> <summary>
终端升级结果应答
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
<param name="terminalNo">设备终端号</param>
<param name="data">808 hex data</param>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0200(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="P:JT808.Gateway.Abstractions.IJT808Session.TerminalPhoneNo">
<summary> <summary>
位置信息汇报
终端手机号
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0201(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="T:JT808.Gateway.Abstractions.IJT808SessionConsumer">
<summary> <summary>
位置信息查询应答
会话通知(在线/离线)
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x8204(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="T:JT808.Gateway.Abstractions.IJT808SessionProducer">
<summary> <summary>
链路检测
2019版本
会话通知(在线/离线)
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0500(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="F:JT808.Gateway.Abstractions.JT808GatewayConstants.JT808WebApiRouteTable.SessionTcpGetAll">
<summary> <summary>
车辆控制应答
基于Tcp的会话服务集合
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0704(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="F:JT808.Gateway.Abstractions.JT808GatewayConstants.JT808WebApiRouteTable.SessionRemoveByTerminalPhoneNo">
<summary> <summary>
定位数据批量上传
会话服务-通过设备终端号移除对应会话
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0705(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="F:JT808.Gateway.Abstractions.JT808GatewayConstants.JT808WebApiRouteTable.QueryTcpSessionByTerminalPhoneNo">
<summary> <summary>
CAN总线数据上传
会话服务-通过设备终端号查询对应会话
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0800(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="F:JT808.Gateway.Abstractions.JT808GatewayConstants.JT808WebApiRouteTable.UnificationSend">
<summary> <summary>
多媒体事件信息上传
统一下发信息
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0801(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="F:JT808.Gateway.Abstractions.JT808GatewayConstants.JT808WebApiRouteTable.SessionUdpGetAll">
<summary> <summary>
多媒体数据上传
基于Udp的虚拟会话服务集合
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x8801(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="F:JT808.Gateway.Abstractions.JT808GatewayConstants.JT808WebApiRouteTable.RemoveUdpByTerminalPhoneNo">
<summary> <summary>
摄像头立即拍摄命令
会话服务-通过设备终端号移除对应会话
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808NormalReplyMessageHandler.Msg0x0900(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<member name="F:JT808.Gateway.Abstractions.JT808GatewayConstants.JT808WebApiRouteTable.QueryUdpSessionByTerminalPhoneNo">
<summary> <summary>
数据上行透传
会话服务-通过设备终端号查询对应会话
</summary> </summary>
<param name="request"></param>
<param name="session"></param>
<returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0001(JT808.Protocol.JT808HeaderPackage)">
<member name="T:JT808.Gateway.Abstractions.JT808MessageHandler">
<summary>
通用消息处理程序
</summary>
</member>
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Processor(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary>
消息处理
</summary>
<param name="request">请求数据</param>
<param name="session">当前会话</param>
<returns>应答消息数据</returns>
</member>
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0001(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
终端通用应答 终端通用应答
平台无需回复 平台无需回复
@@ -232,29 +178,30 @@
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.CommonReply(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.CommonReply(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
平台通用应答 平台通用应答
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param> <param name="session"></param>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0002(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0002(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
终端心跳 终端心跳
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0004(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0004(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
查询服务器时间 查询服务器时间
2019版本 2019版本
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x8003(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x8003(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
服务器补传分包请求 服务器补传分包请求
</summary> </summary>
@@ -262,56 +209,63 @@
<param name="session"></param> <param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0005(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0005(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
终端补传分包请求 终端补传分包请求
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0100(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0100(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
终端注册 终端注册
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0003(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0003(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
终端注销 终端注销
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0102(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0102(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
终端鉴权 终端鉴权
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0104(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0104(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
查询终端参数应答 查询终端参数应答
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0107(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0107(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
查询终端属性应答 查询终端属性应答
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0108(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0108(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
终端升级结果应答 终端升级结果应答
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0200(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0200(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
位置信息汇报 位置信息汇报
</summary> </summary>
@@ -319,525 +273,83 @@
<param name="session"></param> <param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0201(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0201(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
位置信息查询应答 位置信息查询应答
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x8204(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x8204(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
链路检测 链路检测
2019版本 2019版本
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0500(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0500(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
车辆控制应答 车辆控制应答
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0704(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0704(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
定位数据批量上传 定位数据批量上传
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0705(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0705(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
CAN总线数据上传 CAN总线数据上传
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0800(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0800(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
多媒体事件信息上传 多媒体事件信息上传
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0801(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0801(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
多媒体数据上传 多媒体数据上传
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x8801(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x8801(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
摄像头立即拍摄命令 摄像头立即拍摄命令
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:JT808.Gateway.Abstractions.JT808QueueReplyMessageHandler.Msg0x0900(JT808.Protocol.JT808HeaderPackage)">
<member name="M:JT808.Gateway.Abstractions.JT808MessageHandler.Msg0x0900(JT808.Protocol.JT808HeaderPackage,JT808.Gateway.Abstractions.IJT808Session)">
<summary> <summary>
数据上行透传 数据上行透传
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<param name="session"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="F:JT808.Gateway.Enums.JT808UseType.Normal">
<member name="M:JT808.Gateway.Abstractions.JT808MsgIdHttpHandlerBase.#ctor">
<summary> <summary>
使用正常方式
初始化消息处理业务
</summary> </summary>
</member> </member>
<member name="F:JT808.Gateway.Enums.JT808UseType.Queue">
<summary>
使用队列方式
</summary>
</member>
<member name="T:JT808.Gateway.GrpcService.JT808GatewayReflection">
<summary>Holder for reflection information generated from Protos/JT808Gateway.proto</summary>
</member>
<member name="P:JT808.Gateway.GrpcService.JT808GatewayReflection.Descriptor">
<summary>File descriptor for Protos/JT808Gateway.proto</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.TcpSessionInfoReply.TcpSessionsFieldNumber">
<summary>Field number for the "TcpSessions" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.SessionRequest.TerminalPhoneNoFieldNumber">
<summary>Field number for the "TerminalPhoneNo" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.SessionCountReply.CountFieldNumber">
<summary>Field number for the "Count" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.UdpSessionInfoReply.UdpSessionsFieldNumber">
<summary>Field number for the "UdpSessions" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.SessionInfo.StartTimeFieldNumber">
<summary>Field number for the "StartTime" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.SessionInfo.LastActiveTimeFieldNumber">
<summary>Field number for the "LastActiveTime" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.SessionInfo.TerminalPhoneNoFieldNumber">
<summary>Field number for the "TerminalPhoneNo" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.SessionInfo.RemoteAddressIPFieldNumber">
<summary>Field number for the "RemoteAddressIP" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.SessionRemoveRequest.TerminalPhoneNoFieldNumber">
<summary>Field number for the "TerminalPhoneNo" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.SessionRemoveReply.SuccessFieldNumber">
<summary>Field number for the "Success" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.UnificationSendRequest.TerminalPhoneNoFieldNumber">
<summary>Field number for the "TerminalPhoneNo" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.UnificationSendRequest.DataFieldNumber">
<summary>Field number for the "Data" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.UnificationSendReply.SuccessFieldNumber">
<summary>Field number for the "Success" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.TcpAtomicCounterReply.MsgSuccessCountFieldNumber">
<summary>Field number for the "MsgSuccessCount" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.TcpAtomicCounterReply.MsgFailCountFieldNumber">
<summary>Field number for the "MsgFailCount" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.UdpAtomicCounterReply.MsgSuccessCountFieldNumber">
<summary>Field number for the "MsgSuccessCount" field.</summary>
</member>
<member name="F:JT808.Gateway.GrpcService.UdpAtomicCounterReply.MsgFailCountFieldNumber">
<summary>Field number for the "MsgFailCount" field.</summary>
</member>
<member name="P:JT808.Gateway.GrpcService.JT808Gateway.Descriptor">
<summary>Service descriptor</summary>
</member>
<member name="T:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayBase">
<summary>Base class for server-side implementations of JT808Gateway</summary>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayBase.GetTcpSessionAll(JT808.Gateway.GrpcService.Empty,Grpc.Core.ServerCallContext)">
<summary>
会话服务-获取会话服务集合
</summary>
<param name="request">The request received from the client.</param>
<param name="context">The context of the server-side call handler being invoked.</param>
<returns>The response to send back to the client (wrapped by a task).</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayBase.GetTcpSessionCount(JT808.Gateway.GrpcService.Empty,Grpc.Core.ServerCallContext)">
<summary>
会话服务-获取会话总数
</summary>
<param name="request">The request received from the client.</param>
<param name="context">The context of the server-side call handler being invoked.</param>
<returns>The response to send back to the client (wrapped by a task).</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayBase.GetTcpSessionByTerminalPhoneNo(JT808.Gateway.GrpcService.SessionRequest,Grpc.Core.ServerCallContext)">
<summary>
会话服务-通过设备终端号获取当前会话信息
</summary>
<param name="request">The request received from the client.</param>
<param name="context">The context of the server-side call handler being invoked.</param>
<returns>The response to send back to the client (wrapped by a task).</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayBase.RemoveSessionByTerminalPhoneNo(JT808.Gateway.GrpcService.SessionRemoveRequest,Grpc.Core.ServerCallContext)">
<summary>
会话服务-通过设备终端号移除对应会话
</summary>
<param name="request">The request received from the client.</param>
<param name="context">The context of the server-side call handler being invoked.</param>
<returns>The response to send back to the client (wrapped by a task).</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayBase.UnificationSend(JT808.Gateway.GrpcService.UnificationSendRequest,Grpc.Core.ServerCallContext)">
<summary>
统一下发信息
</summary>
<param name="request">The request received from the client.</param>
<param name="context">The context of the server-side call handler being invoked.</param>
<returns>The response to send back to the client (wrapped by a task).</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayBase.GetTcpAtomicCounter(JT808.Gateway.GrpcService.Empty,Grpc.Core.ServerCallContext)">
<summary>
获取Tcp包计数器
</summary>
<param name="request">The request received from the client.</param>
<param name="context">The context of the server-side call handler being invoked.</param>
<returns>The response to send back to the client (wrapped by a task).</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayBase.GetUdpSessionAll(JT808.Gateway.GrpcService.Empty,Grpc.Core.ServerCallContext)">
<summary>
会话服务-获取会话服务集合
</summary>
<param name="request">The request received from the client.</param>
<param name="context">The context of the server-side call handler being invoked.</param>
<returns>The response to send back to the client (wrapped by a task).</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayBase.GetUdpAtomicCounter(JT808.Gateway.GrpcService.Empty,Grpc.Core.ServerCallContext)">
<summary>
获取Udp包计数器
</summary>
<param name="request">The request received from the client.</param>
<param name="context">The context of the server-side call handler being invoked.</param>
<returns>The response to send back to the client (wrapped by a task).</returns>
</member>
<member name="T:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient">
<summary>Client for JT808Gateway</summary>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.#ctor(Grpc.Core.ChannelBase)">
<summary>Creates a new client for JT808Gateway</summary>
<param name="channel">The channel to use to make remote calls.</param>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.#ctor(Grpc.Core.CallInvoker)">
<summary>Creates a new client for JT808Gateway that uses a custom <c>CallInvoker</c>.</summary>
<param name="callInvoker">The callInvoker to use to make remote calls.</param>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.#ctor">
<summary>Protected parameterless constructor to allow creation of test doubles.</summary>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.#ctor(Grpc.Core.ClientBase.ClientBaseConfiguration)">
<summary>Protected constructor to allow creation of configured clients.</summary>
<param name="configuration">The client configuration.</param>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionAll(JT808.Gateway.GrpcService.Empty,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
会话服务-获取会话服务集合
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionAll(JT808.Gateway.GrpcService.Empty,Grpc.Core.CallOptions)">
<summary>
会话服务-获取会话服务集合
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionAllAsync(JT808.Gateway.GrpcService.Empty,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
会话服务-获取会话服务集合
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionAllAsync(JT808.Gateway.GrpcService.Empty,Grpc.Core.CallOptions)">
<summary>
会话服务-获取会话服务集合
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionCount(JT808.Gateway.GrpcService.Empty,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
会话服务-获取会话总数
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionCount(JT808.Gateway.GrpcService.Empty,Grpc.Core.CallOptions)">
<summary>
会话服务-获取会话总数
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionCountAsync(JT808.Gateway.GrpcService.Empty,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
会话服务-获取会话总数
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionCountAsync(JT808.Gateway.GrpcService.Empty,Grpc.Core.CallOptions)">
<summary>
会话服务-获取会话总数
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionByTerminalPhoneNo(JT808.Gateway.GrpcService.SessionRequest,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
会话服务-通过设备终端号获取当前会话信息
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionByTerminalPhoneNo(JT808.Gateway.GrpcService.SessionRequest,Grpc.Core.CallOptions)">
<summary>
会话服务-通过设备终端号获取当前会话信息
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionByTerminalPhoneNoAsync(JT808.Gateway.GrpcService.SessionRequest,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
会话服务-通过设备终端号获取当前会话信息
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpSessionByTerminalPhoneNoAsync(JT808.Gateway.GrpcService.SessionRequest,Grpc.Core.CallOptions)">
<summary>
会话服务-通过设备终端号获取当前会话信息
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.RemoveSessionByTerminalPhoneNo(JT808.Gateway.GrpcService.SessionRemoveRequest,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
会话服务-通过设备终端号移除对应会话
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.RemoveSessionByTerminalPhoneNo(JT808.Gateway.GrpcService.SessionRemoveRequest,Grpc.Core.CallOptions)">
<summary>
会话服务-通过设备终端号移除对应会话
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.RemoveSessionByTerminalPhoneNoAsync(JT808.Gateway.GrpcService.SessionRemoveRequest,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
会话服务-通过设备终端号移除对应会话
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.RemoveSessionByTerminalPhoneNoAsync(JT808.Gateway.GrpcService.SessionRemoveRequest,Grpc.Core.CallOptions)">
<summary>
会话服务-通过设备终端号移除对应会话
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.UnificationSend(JT808.Gateway.GrpcService.UnificationSendRequest,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
统一下发信息
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.UnificationSend(JT808.Gateway.GrpcService.UnificationSendRequest,Grpc.Core.CallOptions)">
<summary>
统一下发信息
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.UnificationSendAsync(JT808.Gateway.GrpcService.UnificationSendRequest,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
统一下发信息
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.UnificationSendAsync(JT808.Gateway.GrpcService.UnificationSendRequest,Grpc.Core.CallOptions)">
<summary>
统一下发信息
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpAtomicCounter(JT808.Gateway.GrpcService.Empty,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
获取Tcp包计数器
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpAtomicCounter(JT808.Gateway.GrpcService.Empty,Grpc.Core.CallOptions)">
<summary>
获取Tcp包计数器
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpAtomicCounterAsync(JT808.Gateway.GrpcService.Empty,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
获取Tcp包计数器
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetTcpAtomicCounterAsync(JT808.Gateway.GrpcService.Empty,Grpc.Core.CallOptions)">
<summary>
获取Tcp包计数器
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetUdpSessionAll(JT808.Gateway.GrpcService.Empty,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
会话服务-获取会话服务集合
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetUdpSessionAll(JT808.Gateway.GrpcService.Empty,Grpc.Core.CallOptions)">
<summary>
会话服务-获取会话服务集合
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetUdpSessionAllAsync(JT808.Gateway.GrpcService.Empty,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
会话服务-获取会话服务集合
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetUdpSessionAllAsync(JT808.Gateway.GrpcService.Empty,Grpc.Core.CallOptions)">
<summary>
会话服务-获取会话服务集合
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetUdpAtomicCounter(JT808.Gateway.GrpcService.Empty,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
获取Udp包计数器
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetUdpAtomicCounter(JT808.Gateway.GrpcService.Empty,Grpc.Core.CallOptions)">
<summary>
获取Udp包计数器
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The response received from the server.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetUdpAtomicCounterAsync(JT808.Gateway.GrpcService.Empty,Grpc.Core.Metadata,System.Nullable{System.DateTime},System.Threading.CancellationToken)">
<summary>
获取Udp包计数器
</summary>
<param name="request">The request to send to the server.</param>
<param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
<param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
<param name="cancellationToken">An optional token for canceling the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.GetUdpAtomicCounterAsync(JT808.Gateway.GrpcService.Empty,Grpc.Core.CallOptions)">
<summary>
获取Udp包计数器
</summary>
<param name="request">The request to send to the server.</param>
<param name="options">The options for the call.</param>
<returns>The call object.</returns>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayClient.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)">
<summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.BindService(JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayBase)">
<summary>Creates service definition that can be registered with a server</summary>
<param name="serviceImpl">An object implementing the server-side handling logic.</param>
</member>
<member name="M:JT808.Gateway.GrpcService.JT808Gateway.BindService(Grpc.Core.ServiceBinderBase,JT808.Gateway.GrpcService.JT808Gateway.JT808GatewayBase)">
<summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
<param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
<param name="serviceImpl">An object implementing the server-side handling logic.</param>
</member>
</members> </members>
</doc> </doc>

src/JT808.Gateway.Tests/JT808.Gateway.NormalHosting/Impl/JT808NormalReplyMessageHandlerImpl.cs → src/JT808.Gateway.Tests/JT808.Gateway.NormalHosting/Impl/JT808CustomMessageHandlerImpl.cs View File

@@ -1,32 +1,35 @@
using JT808.Gateway.Abstractions; using JT808.Gateway.Abstractions;
using JT808.Gateway.Abstractions.Configurations;
using JT808.Gateway.MsgLogging; using JT808.Gateway.MsgLogging;
using JT808.Gateway.Traffic; using JT808.Gateway.Traffic;
using JT808.Gateway.Transmit; using JT808.Gateway.Transmit;
using JT808.Protocol; using JT808.Protocol;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


namespace JT808.Gateway.NormalHosting.Impl namespace JT808.Gateway.NormalHosting.Impl
{ {
public class JT808NormalReplyMessageHandlerImpl : JT808NormalReplyMessageHandler
public class JT808CustomMessageHandlerImpl : JT808MessageHandler
{ {
private readonly ILogger logger; private readonly ILogger logger;
private readonly IJT808Traffic jT808Traffic;
//private readonly IJT808Traffic jT808Traffic;
private readonly IJT808MsgLogging jT808MsgLogging; private readonly IJT808MsgLogging jT808MsgLogging;
private readonly JT808TransmitService jT808TransmitService;
public JT808NormalReplyMessageHandlerImpl(
JT808TransmitService jT808TransmitService,
//private readonly JT808TransmitService jT808TransmitService;
public JT808CustomMessageHandlerImpl(
IOptionsMonitor<JT808Configuration> jT808ConfigurationOptionsMonitor,
//JT808TransmitService jT808TransmitService,
IJT808MsgLogging jT808MsgLogging, IJT808MsgLogging jT808MsgLogging,
IJT808Traffic jT808Traffic,
//IJT808Traffic jT808Traffic,
ILoggerFactory loggerFactory, ILoggerFactory loggerFactory,
IJT808Config jT808Config) : base(jT808Config)
IJT808Config jT808Config) : base(jT808ConfigurationOptionsMonitor, jT808Config)
{ {
this.jT808TransmitService = jT808TransmitService;
this.jT808Traffic = jT808Traffic;
//this.jT808TransmitService = jT808TransmitService;
//this.jT808Traffic = jT808Traffic;
this.jT808MsgLogging = jT808MsgLogging; this.jT808MsgLogging = jT808MsgLogging;
logger =loggerFactory.CreateLogger("JT808NormalReplyMessageHandlerImpl");
logger =loggerFactory.CreateLogger<JT808CustomMessageHandlerImpl>();
//添加自定义消息 //添加自定义消息
HandlerDict.Add(0x9999, Msg0x9999); HandlerDict.Add(0x9999, Msg0x9999);
} }
@@ -45,14 +48,14 @@ namespace JT808.Gateway.NormalHosting.Impl
//AOP 可以自定义添加一些东西:上下行日志、 //AOP 可以自定义添加一些东西:上下行日志、
logger.LogDebug("可以自定义添加一些东西:上下行日志、数据转发"); logger.LogDebug("可以自定义添加一些东西:上下行日志、数据转发");
//流量 //流量
jT808Traffic.Increment(request.Header.TerminalPhoneNo, DateTime.Now.ToString("yyyyMMdd"), request.OriginalData.Length);
//jT808Traffic.Increment(request.Header.TerminalPhoneNo, DateTime.Now.ToString("yyyyMMdd"), request.OriginalData.Length);
var parameter = (request.Header.TerminalPhoneNo, request.OriginalData.ToArray()); var parameter = (request.Header.TerminalPhoneNo, request.OriginalData.ToArray());
//上行日志(可同步也可以使用队列进行异步)
jT808MsgLogging.Processor(parameter, JT808MsgLoggingType.up);
//下行日志(可同步也可以使用队列进行异步)
////上行日志(可同步也可以使用队列进行异步)
//jT808MsgLogging.Processor(parameter, JT808MsgLoggingType.up);
////下行日志(可同步也可以使用队列进行异步)
jT808MsgLogging.Processor((request.Header.TerminalPhoneNo, down), JT808MsgLoggingType.down); jT808MsgLogging.Processor((request.Header.TerminalPhoneNo, down), JT808MsgLoggingType.down);
//转发数据(可同步也可以使用队列进行异步)
jT808TransmitService.SendAsync(parameter);
////转发数据(可同步也可以使用队列进行异步)
//jT808TransmitService.SendAsync(parameter);
} }
catch (Exception) catch (Exception)
{ {

+ 0
- 1
src/JT808.Gateway.Tests/JT808.Gateway.NormalHosting/JT808.Gateway.NormalHosting.csproj View File

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


<ItemGroup> <ItemGroup>
<Compile Remove="Impl\JT808NormalReplyMessageHandlerImpl.cs" />
<Compile Remove="Jobs\CallGrpcClientJob.cs" /> <Compile Remove="Jobs\CallGrpcClientJob.cs" />
</ItemGroup> </ItemGroup>




+ 3
- 8
src/JT808.Gateway.Tests/JT808.Gateway.NormalHosting/Program.cs View File

@@ -46,15 +46,10 @@ namespace JT808.Gateway.NormalHosting
services.AddSingleton<IJT808SessionConsumer, JT808SessionConsumer>(); services.AddSingleton<IJT808SessionConsumer, JT808SessionConsumer>();
services.AddJT808Configure() services.AddJT808Configure()
//添加客户端工具 //添加客户端工具
.AddClient()
//.AddNormalGateway(options =>
////{
//// options.TcpPort = 808;
//// options.UdpPort = 808;
////})
//.AddClient()
.AddGateway(hostContext.Configuration) .AddGateway(hostContext.Configuration)
//.ReplaceNormalReplyMessageHandler<JT808NormalReplyMessageHandlerImpl>()
//.AddMsgLogging<JT808MsgLogging>()
.ReplaceMessageHandler<JT808CustomMessageHandlerImpl>()
.AddMsgLogging<JT808MsgLogging>()
//.AddTraffic() //.AddTraffic()
//.AddSessionNotice() //.AddSessionNotice()
//.AddTransmit(hostContext.Configuration) //.AddTransmit(hostContext.Configuration)


+ 1
- 0
src/JT808.Gateway.Tests/JT808.Gateway.NormalHosting/appsettings.json View File

@@ -2,6 +2,7 @@
"JT808Configuration": { "JT808Configuration": {
"TcpPort": 808, "TcpPort": 808,
"UdpPort": 808, "UdpPort": 808,
"WebApiPort": 828,
"MiniNumBufferSize": 51200, "MiniNumBufferSize": 51200,
"SoBacklog": 65535 "SoBacklog": 65535
}, },


+ 3
- 0
src/JT808.Gateway.Tests/JT808.Gateway.NormalHosting/startup.ini View File

@@ -0,0 +1,3 @@
pm2 start "dotnet JT808.Gateway.NormalHosting.dll ASPNETCORE_ENVIRONMENT=Production" --max-restarts=1 -n "JT808.Gateway.NormalHosting" -o "/data/pm2Logs/JT808.Gateway.NormalHosting/out.log" -e "/data/pm2Logs/JT808.Gateway.NormalHosting/error.log"

pm2 start "dotnet JT808.Gateway.NormalHosting.dll ASPNETCORE_ENVIRONMENT=Development" --max-restarts=1 -n "JT808.Gateway.NormalHosting.Dev" -o "/data/pm2Logs/JT808.Gateway.NormalHosting.Dev/out.log" -e "/data/pm2Logs/JT808.Gateway.NormalHosting.Dev/error.log"

+ 10
- 7
src/JT808.Gateway/JT808GatewayExtensions.cs View File

@@ -54,12 +54,7 @@ namespace JT808.Gateway
// return server; // return server;
//} //}


//public static IJT808NormalGatewayBuilder ReplaceNormalReplyMessageHandler<TJT808NormalReplyMessageHandler>(this IJT808NormalGatewayBuilder config)
// where TJT808NormalReplyMessageHandler : JT808NormalReplyMessageHandler
//{
// config.JT808Builder.Services.Replace(new ServiceDescriptor(typeof(JT808NormalReplyMessageHandler),typeof(TJT808NormalReplyMessageHandler), ServiceLifetime.Singleton));
// return config;
//}



public static IJT808GatewayBuilder AddGateway(this IJT808Builder jT808Builder, Action<JT808Configuration> config) public static IJT808GatewayBuilder AddGateway(this IJT808Builder jT808Builder, Action<JT808Configuration> config)
{ {
@@ -77,6 +72,13 @@ namespace JT808.Gateway
return jT808GatewayBuilderDefault; return jT808GatewayBuilderDefault;
} }


public static IJT808GatewayBuilder ReplaceMessageHandler<TJT808MessageHandler>(this IJT808GatewayBuilder config)
where TJT808MessageHandler : JT808MessageHandler
{
config.JT808Builder.Services.Replace(new ServiceDescriptor(typeof(JT808MessageHandler), typeof(TJT808MessageHandler), ServiceLifetime.Singleton));
return config;
}

public static IJT808GatewayBuilder AddTcp(this IJT808GatewayBuilder config) public static IJT808GatewayBuilder AddTcp(this IJT808GatewayBuilder config)
{ {
config.JT808Builder.Services.AddHostedService<JT808TcpServer>(); config.JT808Builder.Services.AddHostedService<JT808TcpServer>();
@@ -110,7 +112,8 @@ namespace JT808.Gateway


private static IJT808GatewayBuilder AddJT808Core(this IJT808GatewayBuilder config) private static IJT808GatewayBuilder AddJT808Core(this IJT808GatewayBuilder config)
{ {
config.JT808Builder.Services.TryAddSingleton<JT808SessionManager>();
config.JT808Builder.Services.AddSingleton<JT808MessageHandler>();
config.JT808Builder.Services.AddSingleton<JT808SessionManager>();
return config; return config;
} }
} }

+ 1
- 1
src/Version.props View File

@@ -1,6 +1,6 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<JT808DotNettyPackageVersion>2.3.2</JT808DotNettyPackageVersion> <JT808DotNettyPackageVersion>2.3.2</JT808DotNettyPackageVersion>
<JT808GatewayPackageVersion>1.0.1</JT808GatewayPackageVersion>
<JT808GatewayPackageVersion>1.0.2-preview1</JT808GatewayPackageVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

Loading…
Cancel
Save