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>
|
||||
|
||||
<PropertyGroup>
|
||||
<PluginVersion>10.9.14</PluginVersion>
|
||||
<PluginVersion>10.9.15</PluginVersion>
|
||||
<ProPluginVersion>10.9.14</ProPluginVersion>
|
||||
<AuthenticationVersion>2.9.5</AuthenticationVersion>
|
||||
<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.SiemensS7;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
using ThingsGateway.NewLife.Reflection;
|
||||
|
||||
using TouchSocket.Core;
|
||||
|
||||
@@ -20,7 +22,7 @@ public class SiemensS7Test
|
||||
|
||||
[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", 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)
|
||||
{
|
||||
byte[] bytes = data.HexStringToBytes();
|
||||
@@ -32,7 +34,7 @@ public class SiemensS7Test
|
||||
siemensS7Master.InitChannel(siemensS7Channel);
|
||||
await siemensS7Channel.SetupAsync(siemensS7Channel.Config);
|
||||
var adapter = siemensS7Channel.ReadOnlyDataHandlingAdapter as SingleStreamDataHandlingAdapter;
|
||||
|
||||
await siemensS7Master.ConnectAsync(CancellationToken.None);
|
||||
var task1 = Task.Run(async () =>
|
||||
{
|
||||
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 () =>
|
||||
{
|
||||
await Task.Delay(100).ConfigureAwait(false);
|
||||
foreach (var item in bytes)
|
||||
{
|
||||
var data = new ByteBlock([item]);
|
||||
|
@@ -117,6 +117,16 @@ public partial class MqttClient : BusinessBaseWithCacheIntervalScript<VariableBa
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!_driverPropertys.BigTextScriptRpc.IsNullOrEmpty())
|
||||
{
|
||||
mqttClientSubscribeOptionsBuilder = mqttClientSubscribeOptionsBuilder.WithTopicFilter(
|
||||
f =>
|
||||
{
|
||||
f.WithTopic(_driverPropertys.RpcWriteTopic);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
mqttClientSubscribeOptionsBuilder = mqttClientSubscribeOptionsBuilder.WithTopicFilter(
|
||||
f =>
|
||||
@@ -125,6 +135,7 @@ public partial class MqttClient : BusinessBaseWithCacheIntervalScript<VariableBa
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!_driverPropertys.RpcQuestTopic.IsNullOrWhiteSpace())
|
||||
{
|
||||
mqttClientSubscribeOptionsBuilder = mqttClientSubscribeOptionsBuilder.WithTopicFilter(
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>10.9.14</Version>
|
||||
<Version>10.9.15</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
Reference in New Issue
Block a user