Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
IoTSharp
IoTSharp
提交
cf872a0b
IoTSharp
项目概览
IoTSharp
/
IoTSharp
大约 1 年 前同步成功
通知
15
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
IoTSharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cf872a0b
编写于
2月 07, 2022
作者:
麦壳饼
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
使用mqttnet 4.0
上级
f8660edc
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
31 addition
and
29 deletion
+31
-29
IoTSharp.Data.MySQL/IoTSharp.Data.MySQL.csproj
IoTSharp.Data.MySQL/IoTSharp.Data.MySQL.csproj
+1
-1
IoTSharp.Data.Oracle/IoTSharp.Data.Oracle.csproj
IoTSharp.Data.Oracle/IoTSharp.Data.Oracle.csproj
+1
-1
IoTSharp.Data.PostgreSQL/IoTSharp.Data.PostgreSQL.csproj
IoTSharp.Data.PostgreSQL/IoTSharp.Data.PostgreSQL.csproj
+6
-6
IoTSharp.Data.SqlServer/IoTSharp.Data.SqlServer.csproj
IoTSharp.Data.SqlServer/IoTSharp.Data.SqlServer.csproj
+1
-1
IoTSharp.Data.Sqlite/IoTSharp.Data.Sqlite.csproj
IoTSharp.Data.Sqlite/IoTSharp.Data.Sqlite.csproj
+1
-1
IoTSharp.Data/IoTSharp.Data.csproj
IoTSharp.Data/IoTSharp.Data.csproj
+1
-1
IoTSharp.SDKs/IoTSharp.Sdk.MQTT/IoTSharp.Sdk.MQTT.csproj
IoTSharp.SDKs/IoTSharp.Sdk.MQTT/IoTSharp.Sdk.MQTT.csproj
+1
-1
IoTSharp/Dtos/DeviceDetailDto.cs
IoTSharp/Dtos/DeviceDetailDto.cs
+2
-2
IoTSharp/Extensions/MqttExtension.cs
IoTSharp/Extensions/MqttExtension.cs
+1
-0
IoTSharp/Handlers/MQTTServerHandler.cs
IoTSharp/Handlers/MQTTServerHandler.cs
+2
-2
IoTSharp/IoTSharp.csproj
IoTSharp/IoTSharp.csproj
+10
-10
IoTSharp/Models/Graph/DeviceProp.cs
IoTSharp/Models/Graph/DeviceProp.cs
+2
-1
IoTSharp/Models/Graph/Shape.cs
IoTSharp/Models/Graph/Shape.cs
+2
-2
未找到文件。
IoTSharp.Data.MySQL/IoTSharp.Data.MySQL.csproj
浏览文件 @
cf872a0b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.1" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1" />
<PackageReference Include="EFCore.Sharding.MySql" Version="6.0.
0
" />
<PackageReference Include="EFCore.Sharding.MySql" Version="6.0.
2
" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.NetTopologySuite" Version="6.0.1" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.NetTopologySuite" Version="6.0.1" />
</ItemGroup>
</ItemGroup>
...
...
IoTSharp.Data.Oracle/IoTSharp.Data.Oracle.csproj
浏览文件 @
cf872a0b
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<PackageReference Include="AspNetCore.HealthChecks.Oracle" Version="6.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.Oracle" Version="6.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Core" Version="6.0.2" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Core" Version="6.0.2" />
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="6.0.2" />
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="6.0.2" />
<PackageReference Include="EFCore.Sharding.Oracle" Version="6.0.
0
" />
<PackageReference Include="EFCore.Sharding.Oracle" Version="6.0.
2
" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.1" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="6.21.5" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="6.21.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1">
...
...
IoTSharp.Data.PostgreSQL/IoTSharp.Data.PostgreSQL.csproj
浏览文件 @
cf872a0b
...
@@ -14,12 +14,12 @@
...
@@ -14,12 +14,12 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.1" />
<PackageReference Include="Npgsql" Version="6.0.
2
" />
<PackageReference Include="Npgsql" Version="6.0.
3
" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.
2
" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.
3
" />
<PackageReference Include="EFCore.Sharding.PostgreSql" Version="6.0.
0
" />
<PackageReference Include="EFCore.Sharding.PostgreSql" Version="6.0.
2
" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="6.0.
2
" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="6.0.
3
" />
<PackageReference Include="Npgsql.Json.NET" Version="6.0.
2
" />
<PackageReference Include="Npgsql.Json.NET" Version="6.0.
3
" />
<PackageReference Include="Npgsql.NodaTime" Version="6.0.
2
" />
<PackageReference Include="Npgsql.NodaTime" Version="6.0.
3
" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
...
...
IoTSharp.Data.SqlServer/IoTSharp.Data.SqlServer.csproj
浏览文件 @
cf872a0b
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="6.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="6.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Core" Version="6.0.2" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Core" Version="6.0.2" />
<PackageReference Include="AspNetCore.HealthChecks.UI.SqlServer.Storage" Version="6.0.2" />
<PackageReference Include="AspNetCore.HealthChecks.UI.SqlServer.Storage" Version="6.0.2" />
<PackageReference Include="EFCore.Sharding.SqlServer" Version="6.0.
0
" />
<PackageReference Include="EFCore.Sharding.SqlServer" Version="6.0.
2
" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
</ItemGroup>
</ItemGroup>
...
...
IoTSharp.Data.Sqlite/IoTSharp.Data.Sqlite.csproj
浏览文件 @
cf872a0b
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</PackageReference>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.1" />
<PackageReference Include="EFCore.Sharding.SQLite" Version="6.0.
0
" />
<PackageReference Include="EFCore.Sharding.SQLite" Version="6.0.
2
" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IoTSharp.Data\IoTSharp.Data.csproj" />
<ProjectReference Include="..\IoTSharp.Data\IoTSharp.Data.csproj" />
...
...
IoTSharp.Data/IoTSharp.Data.csproj
浏览文件 @
cf872a0b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="EFCore.Sharding" Version="6.0.
0
" />
<PackageReference Include="EFCore.Sharding" Version="6.0.
2
" />
</ItemGroup>
</ItemGroup>
...
...
IoTSharp.SDKs/IoTSharp.Sdk.MQTT/IoTSharp.Sdk.MQTT.csproj
浏览文件 @
cf872a0b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<PackageReference Include="MQTTnet" Version="
3.1.1
" />
<PackageReference Include="MQTTnet" Version="
4.0.0-preview3
" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
</ItemGroup>
...
...
IoTSharp/Dtos/DeviceDetailDto.cs
浏览文件 @
cf872a0b
...
@@ -48,9 +48,9 @@ namespace IoTSharp.Dtos
...
@@ -48,9 +48,9 @@ namespace IoTSharp.Dtos
public
string
IdentityValue
{
get
;
set
;
}
public
string
IdentityValue
{
get
;
set
;
}
public
string
IdentityId
{
get
;
set
;
}
public
string
IdentityId
{
get
;
set
;
}
#
nullable
enable
public
DeviceModel
?
Model
{
get
;
set
;
}
public
DeviceModel
?
Model
{
get
;
set
;
}
#
nullable
disable
}
}
}
}
IoTSharp/Extensions/MqttExtension.cs
浏览文件 @
cf872a0b
...
@@ -46,6 +46,7 @@ namespace IoTSharp
...
@@ -46,6 +46,7 @@ namespace IoTSharp
{
{
options
.
WithoutEncryptedEndpoint
();
options
.
WithoutEncryptedEndpoint
();
}
}
options
.
WithDefaultCommunicationTimeout
(
TimeSpan
.
FromSeconds
(
5
));
options
.
WithPersistentSessions
();
options
.
WithPersistentSessions
();
options
.
Build
();
options
.
Build
();
}).
AddMqttConnectionHandler
()
}).
AddMqttConnectionHandler
()
...
...
IoTSharp/Handlers/MQTTServerHandler.cs
浏览文件 @
cf872a0b
...
@@ -52,7 +52,7 @@ namespace IoTSharp.Handlers
...
@@ -52,7 +52,7 @@ namespace IoTSharp.Handlers
static
long
clients
=
0
;
static
long
clients
=
0
;
internal
Task
Server_ClientConnectedAsync
(
ClientConnectedEventArgs
e
)
internal
Task
Server_ClientConnectedAsync
(
ClientConnectedEventArgs
e
)
{
{
_logger
.
LogInformation
(
$"Client [
{
e
.
ClientId
}
] connected"
);
_logger
.
LogInformation
(
$"Client [
{
e
.
ClientId
}
]
{
e
.
Endpoint
}
{
e
.
UserName
}
connected"
);
clients
++;
clients
++;
return
Task
.
CompletedTask
;
return
Task
.
CompletedTask
;
}
}
...
@@ -366,7 +366,7 @@ namespace IoTSharp.Handlers
...
@@ -366,7 +366,7 @@ namespace IoTSharp.Handlers
var
devtmp
=
_dbContext
.
Device
.
FirstOrDefault
(
d
=>
d
.
Id
==
dev
.
Id
);
var
devtmp
=
_dbContext
.
Device
.
FirstOrDefault
(
d
=>
d
.
Id
==
dev
.
Id
);
devtmp
.
LastActive
=
DateTime
.
Now
;
devtmp
.
LastActive
=
DateTime
.
Now
;
devtmp
.
Online
=
false
;
devtmp
.
Online
=
false
;
_dbContext
.
SaveChanges
();
await
_dbContext
.
SaveChangesAsync
();
_logger
.
LogInformation
(
$"Server_ClientDisconnected ClientId:
{
args
.
ClientId
}
DisconnectType:
{
args
.
DisconnectType
}
Device is
{
devtmp
.
Name
}
(
{
devtmp
.
Id
}
) "
);
_logger
.
LogInformation
(
$"Server_ClientDisconnected ClientId:
{
args
.
ClientId
}
DisconnectType:
{
args
.
DisconnectType
}
Device is
{
devtmp
.
Name
}
(
{
devtmp
.
Id
}
) "
);
}
}
}
}
...
...
IoTSharp/IoTSharp.csproj
浏览文件 @
cf872a0b
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
<PackageReference Include="EasyCaching.LiteDB" Version="1.5.0" />
<PackageReference Include="EasyCaching.LiteDB" Version="1.5.0" />
<PackageReference Include="EasyCaching.Redis" Version="1.5.0" />
<PackageReference Include="EasyCaching.Redis" Version="1.5.0" />
<PackageReference Include="hyjiacan.pinyin4net" Version="4.1.0" />
<PackageReference Include="hyjiacan.pinyin4net" Version="4.1.0" />
<PackageReference Include="InfluxDB.Client" Version="3.
2
.0" />
<PackageReference Include="InfluxDB.Client" Version="3.
3
.0" />
<PackageReference Include="IoTSharp.CoAP.NET" Version="2.0.8" />
<PackageReference Include="IoTSharp.CoAP.NET" Version="2.0.8" />
<PackageReference Include="IoTSharp.X509Extensions" Version="1.4.27" />
<PackageReference Include="IoTSharp.X509Extensions" Version="1.4.27" />
<PackageReference Include="Jdenticon-net" Version="3.1.2" />
<PackageReference Include="Jdenticon-net" Version="3.1.2" />
...
@@ -89,14 +89,14 @@
...
@@ -89,14 +89,14 @@
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.1" />
<PackageReference Include="MQTTnet" Version="4.0.0-preview
1
" />
<PackageReference Include="MQTTnet" Version="4.0.0-preview
3
" />
<PackageReference Include="MQTTnet.AspNetCore" Version="4.0.0-preview
1
" />
<PackageReference Include="MQTTnet.AspNetCore" Version="4.0.0-preview
3
" />
<PackageReference Include="MQTTnet.Extensions.Rpc" Version="4.0.0-preview
1
" />
<PackageReference Include="MQTTnet.Extensions.Rpc" Version="4.0.0-preview
3
" />
<PackageReference Include="NetMQ" Version="4.0.1.
6
" />
<PackageReference Include="NetMQ" Version="4.0.1.
8
" />
<PackageReference Include="Npgsql" Version="6.0.
2
" />
<PackageReference Include="Npgsql" Version="6.0.
3
" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.
2
" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.
3
" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="6.0.
2
" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="6.0.
3
" />
<PackageReference Include="NSwag.AspNetCore" Version="13.15.
5
" />
<PackageReference Include="NSwag.AspNetCore" Version="13.15.
7
" />
<PackageReference Include="PinusDB" Version="1.0.10" />
<PackageReference Include="PinusDB" Version="1.0.10" />
<PackageReference Include="PinusDB.HealthChecks" Version="1.0.10" />
<PackageReference Include="PinusDB.HealthChecks" Version="1.0.10" />
<PackageReference Include="ProxyKit" Version="2.3.4" />
<PackageReference Include="ProxyKit" Version="2.3.4" />
...
@@ -123,7 +123,7 @@
...
@@ -123,7 +123,7 @@
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.0" />
<PackageReference Include="MQTTnet.Extensions.ManagedClient" Version="4.0.0-preview
1
" />
<PackageReference Include="MQTTnet.Extensions.ManagedClient" Version="4.0.0-preview
3
" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.1" />
...
...
IoTSharp/Models/Graph/DeviceProp.cs
浏览文件 @
cf872a0b
...
@@ -2,10 +2,11 @@
...
@@ -2,10 +2,11 @@
{
{
public
class
DeviceProp
public
class
DeviceProp
{
{
#
nullable
enable
public
Body
?
body
{
get
;
set
;
}
public
Body
?
body
{
get
;
set
;
}
public
Position
?
position
{
get
;
set
;
}
public
Position
?
position
{
get
;
set
;
}
public
Size
?
size
{
get
;
set
;
}
public
Size
?
size
{
get
;
set
;
}
public
Text
?
text
{
get
;
set
;
}
public
Text
?
text
{
get
;
set
;
}
#
nullable
disable
}
}
}
}
\ No newline at end of file
IoTSharp/Models/Graph/Shape.cs
浏览文件 @
cf872a0b
...
@@ -8,10 +8,10 @@
...
@@ -8,10 +8,10 @@
public
long
[]
incomes
{
get
;
set
;
}
public
long
[]
incomes
{
get
;
set
;
}
public
long
[]
outgoings
{
get
;
set
;
}
public
long
[]
outgoings
{
get
;
set
;
}
#
nullable
enable
public
DeviceProp
?
prop
{
get
;
set
;
}
public
DeviceProp
?
prop
{
get
;
set
;
}
#
nullable
disable
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录