mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-20 10:50:48 +08:00
build: 添加nuget.config,自定义nuget源,方便本地调试自行编译
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PluginVersion>10.9.14</PluginVersion>
|
<PluginVersion>10.9.15</PluginVersion>
|
||||||
<ProPluginVersion>10.9.14</ProPluginVersion>
|
<ProPluginVersion>10.9.14</ProPluginVersion>
|
||||||
<AuthenticationVersion>2.9.5</AuthenticationVersion>
|
<AuthenticationVersion>2.9.5</AuthenticationVersion>
|
||||||
<SourceGeneratorVersion>10.9.5</SourceGeneratorVersion>
|
<SourceGeneratorVersion>10.9.5</SourceGeneratorVersion>
|
||||||
|
6
src/NuGet.Config
Normal file
6
src/NuGet.Config
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<packageSources>
|
||||||
|
<add key="ThingsGateway" value="..\..\nupkgs" />
|
||||||
|
</packageSources>
|
||||||
|
</configuration>
|
@@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
using ThingsGateway.Foundation.Extension.String;
|
using ThingsGateway.Foundation.Extension.String;
|
||||||
using ThingsGateway.Foundation.SiemensS7;
|
using ThingsGateway.Foundation.SiemensS7;
|
||||||
|
using ThingsGateway.NewLife.Extension;
|
||||||
|
using ThingsGateway.NewLife.Reflection;
|
||||||
|
|
||||||
using TouchSocket.Core;
|
using TouchSocket.Core;
|
||||||
|
|
||||||
@@ -20,7 +22,7 @@ public class SiemensS7Test
|
|||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("M100", true, "03 00 00 1B 02 F0 80 32 03 00 00 00 03 00 02 00 06 00 00 04 01 FF 04 00 10 00 00")]
|
[InlineData("M100", true, "03 00 00 1B 02 F0 80 32 03 00 00 00 03 00 02 00 06 00 00 04 01 FF 04 00 10 00 00")]
|
||||||
[InlineData("M100", false, "03 00 00 16 02 F0 80 32 03 00 00 00 04 00 02 00 01 00 00 05 01 FF", "1", DataTypeEnum.UInt16)]
|
[InlineData("M100", false, "03 00 00 16 02 F0 80 32 03 00 00 00 03 00 02 00 01 00 00 05 01 FF", "1", DataTypeEnum.UInt16)]
|
||||||
public async Task SiemensS7_ReadWrite_OK(string address, bool read, string data, string writeData = null, DataTypeEnum dataTypeEnum = DataTypeEnum.UInt16)
|
public async Task SiemensS7_ReadWrite_OK(string address, bool read, string data, string writeData = null, DataTypeEnum dataTypeEnum = DataTypeEnum.UInt16)
|
||||||
{
|
{
|
||||||
byte[] bytes = data.HexStringToBytes();
|
byte[] bytes = data.HexStringToBytes();
|
||||||
@@ -32,7 +34,7 @@ public class SiemensS7Test
|
|||||||
siemensS7Master.InitChannel(siemensS7Channel);
|
siemensS7Master.InitChannel(siemensS7Channel);
|
||||||
await siemensS7Channel.SetupAsync(siemensS7Channel.Config);
|
await siemensS7Channel.SetupAsync(siemensS7Channel.Config);
|
||||||
var adapter = siemensS7Channel.ReadOnlyDataHandlingAdapter as SingleStreamDataHandlingAdapter;
|
var adapter = siemensS7Channel.ReadOnlyDataHandlingAdapter as SingleStreamDataHandlingAdapter;
|
||||||
|
await siemensS7Master.ConnectAsync(CancellationToken.None);
|
||||||
var task1 = Task.Run(async () =>
|
var task1 = Task.Run(async () =>
|
||||||
{
|
{
|
||||||
if (read)
|
if (read)
|
||||||
@@ -47,9 +49,11 @@ public class SiemensS7Test
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
await Task.Delay(500);
|
await Task.Delay(100);
|
||||||
|
bytes[12] = (byte)(((IClientChannel)(siemensS7Master.Channel)).WaitHandlePool.GetValue("m_currentSign").ToInt()-1);
|
||||||
var task2 = Task.Run(async () =>
|
var task2 = Task.Run(async () =>
|
||||||
{
|
{
|
||||||
|
await Task.Delay(100).ConfigureAwait(false);
|
||||||
foreach (var item in bytes)
|
foreach (var item in bytes)
|
||||||
{
|
{
|
||||||
var data = new ByteBlock([item]);
|
var data = new ByteBlock([item]);
|
||||||
|
@@ -118,11 +118,22 @@ public partial class MqttClient : BusinessBaseWithCacheIntervalScript<VariableBa
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mqttClientSubscribeOptionsBuilder = mqttClientSubscribeOptionsBuilder.WithTopicFilter(
|
if(!_driverPropertys.BigTextScriptRpc.IsNullOrEmpty())
|
||||||
f =>
|
{
|
||||||
{
|
mqttClientSubscribeOptionsBuilder = mqttClientSubscribeOptionsBuilder.WithTopicFilter(
|
||||||
f.WithTopic(string.Format(null, RpcTopic, _driverPropertys.RpcWriteTopic));
|
f =>
|
||||||
});
|
{
|
||||||
|
f.WithTopic(_driverPropertys.RpcWriteTopic);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mqttClientSubscribeOptionsBuilder = mqttClientSubscribeOptionsBuilder.WithTopicFilter(
|
||||||
|
f =>
|
||||||
|
{
|
||||||
|
f.WithTopic(string.Format(null, RpcTopic, _driverPropertys.RpcWriteTopic));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!_driverPropertys.RpcQuestTopic.IsNullOrWhiteSpace())
|
if (!_driverPropertys.RpcQuestTopic.IsNullOrWhiteSpace())
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>10.9.14</Version>
|
<Version>10.9.15</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Reference in New Issue
Block a user