# Conflicts:
#	IoTGateway/IoTGateway.csproj
#	IoTGateway/IoTGateway.csproj.user
#	IoTGateway/Properties/PublishProfiles/FolderProfile.pubxml.user
#	IoTGateway/iotgateway.db
#	Plugins/Drivers/DriverModbusMaster/ModbusMaster.cs
#	Plugins/Plugin/DeviceThread.cs
This commit is contained in:
liushoushan_notebook 2022-07-23 08:25:21 +08:00
commit 51d1fb0589
76 changed files with 1325 additions and 456 deletions

View File

@ -39,7 +39,7 @@ namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs
AllMethods = deviceService.GetDriverMethods(Entity.DeviceId); AllMethods = deviceService.GetDriverMethods(Entity.DeviceId);
} }
if (AllMethods.Count() > 0) if (AllMethods?.Count() > 0)
AllMethods[0].Selected = true; AllMethods[0].Selected = true;
} }

View File

@ -47,6 +47,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverFanucHsl", "Plugins\D
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverFanuc", "Plugins\Drivers\DriverFanuc\DriverFanuc.csproj", "{41F81606-1728-4A03-AE64-FA2CCF49BE5A}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverFanuc", "Plugins\Drivers\DriverFanuc\DriverFanuc.csproj", "{41F81606-1728-4A03-AE64-FA2CCF49BE5A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DriverOPCDaClient", "Plugins\Drivers\DriverOPCDaClient\DriverOPCDaClient.csproj", "{00FDB860-1A25-40D0-B29E-BAF2253713D6}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -207,6 +209,14 @@ Global
{41F81606-1728-4A03-AE64-FA2CCF49BE5A}.Release|Any CPU.Build.0 = Release|Any CPU {41F81606-1728-4A03-AE64-FA2CCF49BE5A}.Release|Any CPU.Build.0 = Release|Any CPU
{41F81606-1728-4A03-AE64-FA2CCF49BE5A}.Release|x86.ActiveCfg = Release|Any CPU {41F81606-1728-4A03-AE64-FA2CCF49BE5A}.Release|x86.ActiveCfg = Release|Any CPU
{41F81606-1728-4A03-AE64-FA2CCF49BE5A}.Release|x86.Build.0 = Release|Any CPU {41F81606-1728-4A03-AE64-FA2CCF49BE5A}.Release|x86.Build.0 = Release|Any CPU
{00FDB860-1A25-40D0-B29E-BAF2253713D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00FDB860-1A25-40D0-B29E-BAF2253713D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00FDB860-1A25-40D0-B29E-BAF2253713D6}.Debug|x86.ActiveCfg = Debug|Any CPU
{00FDB860-1A25-40D0-B29E-BAF2253713D6}.Debug|x86.Build.0 = Debug|Any CPU
{00FDB860-1A25-40D0-B29E-BAF2253713D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00FDB860-1A25-40D0-B29E-BAF2253713D6}.Release|Any CPU.Build.0 = Release|Any CPU
{00FDB860-1A25-40D0-B29E-BAF2253713D6}.Release|x86.ActiveCfg = Release|Any CPU
{00FDB860-1A25-40D0-B29E-BAF2253713D6}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -228,6 +238,7 @@ Global
{F8EC5EDE-9A2C-443B-B125-E39C748EBB2F} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1} {F8EC5EDE-9A2C-443B-B125-E39C748EBB2F} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1}
{10D22B6E-DE30-4F11-A005-8188DF549F72} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1} {10D22B6E-DE30-4F11-A005-8188DF549F72} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1}
{41F81606-1728-4A03-AE64-FA2CCF49BE5A} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1} {41F81606-1728-4A03-AE64-FA2CCF49BE5A} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1}
{00FDB860-1A25-40D0-B29E-BAF2253713D6} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1F219808-E6E8-4C1D-B846-41F2F7CF20FA} SolutionGuid = {1F219808-E6E8-4C1D-B846-41F2F7CF20FA}

View File

@ -7,6 +7,7 @@
<SatelliteResourceLanguages>zh-Hans,en</SatelliteResourceLanguages> <SatelliteResourceLanguages>zh-Hans,en</SatelliteResourceLanguages>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<!--<PlatformTarget>x86</PlatformTarget>-->
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -16,26 +17,12 @@
<None Remove="ClientApp\**" /> <None Remove="ClientApp\**" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Remove="iotgateway.db" />
<None Remove="Quickstarts.ReferenceServer.Config.xml" />
</ItemGroup>
<ItemGroup>
<Content Include="iotgateway.db">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Quickstarts.ReferenceServer.Config.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup> <ItemGroup>
<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="MQTTnet" Version="3.1.1" /> <PackageReference Include="MQTTnet" Version="3.1.2" />
<PackageReference Include="MQTTnet.AspNetCore" Version="3.1.1" /> <PackageReference Include="MQTTnet.AspNetCore" Version="3.1.2" />
<PackageReference Include="MQTTnet.Extensions.ManagedClient" Version="3.1.1" /> <PackageReference Include="MQTTnet.Extensions.ManagedClient" Version="3.1.2" />
<PackageReference Include="MQTTnet.Extensions.Rpc" Version="3.1.1" /> <PackageReference Include="MQTTnet.Extensions.Rpc" Version="3.1.2" />
<PackageReference Include="System.IO.Ports" Version="6.0.0" /> <PackageReference Include="System.IO.Ports" Version="6.0.0" />
</ItemGroup> </ItemGroup>

View File

@ -2,7 +2,7 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ActiveDebugProfile>IoTGateway</ActiveDebugProfile> <ActiveDebugProfile>IoTGateway</ActiveDebugProfile>
<NameOfLastUsedPublishProfile>D:\code\opensource\iotgateway\IoTGateway\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>D:\000000-IIoTGateway\00000-iotgateway\IoTGateway\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<View_SelectedScaffolderID>RazorViewEmptyScaffolder</View_SelectedScaffolderID> <View_SelectedScaffolderID>RazorViewEmptyScaffolder</View_SelectedScaffolderID>
<View_SelectedScaffolderCategoryPath>root/Common/MVC/View</View_SelectedScaffolderCategoryPath> <View_SelectedScaffolderCategoryPath>root/Common/MVC/View</View_SelectedScaffolderCategoryPath>
</PropertyGroup> </PropertyGroup>

View File

@ -17,5 +17,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<SelfContained>true</SelfContained> <SelfContained>true</SelfContained>
<RuntimeIdentifier>linux-arm</RuntimeIdentifier> <RuntimeIdentifier>linux-arm</RuntimeIdentifier>
<PublishTrimmed>false</PublishTrimmed> <PublishTrimmed>false</PublishTrimmed>
<PublishSingleFile>true</PublishSingleFile>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<_PublishTargetUrl>D:\code\opensource\iotgateway\IoTGateway\bin\Release\net6.0\publish\</_PublishTargetUrl> <_PublishTargetUrl>D:\000000-IIoTGateway\00000-iotgateway\IoTGateway\bin\Release\net6.0\publish\</_PublishTargetUrl>
<History>True|2022-06-30T07:35:29.7126867Z;True|2022-06-30T15:32:45.8610939+08:00;False|2022-06-30T15:30:14.0343935+08:00;False|2022-06-30T15:28:25.0634513+08:00;False|2022-06-30T15:26:26.8167165+08:00;False|2022-06-30T15:25:35.7549181+08:00;False|2022-06-30T15:24:08.4570706+08:00;True|2022-06-09T15:43:47.6180879+08:00;True|2022-06-09T15:42:06.6021355+08:00;False|2022-06-09T15:41:10.3444145+08:00;False|2022-06-09T15:39:22.0048230+08:00;False|2022-06-09T15:37:35.5049088+08:00;True|2022-06-09T15:34:27.8095097+08:00;True|2022-06-09T15:33:30.9577399+08:00;False|2022-06-09T15:29:58.9432537+08:00;False|2022-06-09T15:29:15.9735490+08:00;True|2022-06-09T15:27:02.3333134+08:00;True|2022-06-09T15:18:02.0623963+08:00;True|2022-01-24T23:31:28.3620602+08:00;True|2022-01-24T23:30:03.8991942+08:00;True|2022-01-24T23:23:16.4288882+08:00;True|2021-12-24T19:18:19.0736393+08:00;True|2021-12-24T16:46:49.1192015+08:00;True|2021-12-24T16:23:28.9214784+08:00;True|2021-12-24T15:20:08.6401847+08:00;True|2021-12-17T19:11:07.1655146+08:00;True|2021-12-12T14:11:08.8380502+08:00;</History> <History>True|2022-07-15T14:49:16.0563176Z;True|2022-07-15T22:48:07.3189129+08:00;True|2022-07-15T22:44:35.7670375+08:00;True|2022-07-15T22:40:17.0184184+08:00;True|2022-06-09T15:43:47.6180879+08:00;True|2022-06-09T15:42:06.6021355+08:00;False|2022-06-09T15:41:10.3444145+08:00;False|2022-06-09T15:39:22.0048230+08:00;False|2022-06-09T15:37:35.5049088+08:00;True|2022-06-09T15:34:27.8095097+08:00;True|2022-06-09T15:33:30.9577399+08:00;False|2022-06-09T15:29:58.9432537+08:00;False|2022-06-09T15:29:15.9735490+08:00;True|2022-06-09T15:27:02.3333134+08:00;True|2022-06-09T15:18:02.0623963+08:00;True|2022-01-24T23:31:28.3620602+08:00;True|2022-01-24T23:30:03.8991942+08:00;True|2022-01-24T23:23:16.4288882+08:00;True|2021-12-24T19:18:19.0736393+08:00;True|2021-12-24T16:46:49.1192015+08:00;True|2021-12-24T16:23:28.9214784+08:00;True|2021-12-24T15:20:08.6401847+08:00;True|2021-12-17T19:11:07.1655146+08:00;True|2021-12-12T14:11:08.8380502+08:00;</History>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

Binary file not shown.

View File

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="IoTClient" Version="1.0.22" /> <PackageReference Include="IoTClient" Version="1.0.28" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="HslCommunication" Version="11.0.0" /> <PackageReference Include="HslCommunication" Version="11.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup> </ItemGroup>

View File

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="IoTClient" Version="1.0.22" /> <PackageReference Include="IoTClient" Version="1.0.28" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.IO.Ports; using System.IO.Ports;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Text;
namespace DriverModbusMaster namespace DriverModbusMaster
{ {
@ -331,70 +332,54 @@ namespace DriverModbusMaster
{ {
DriverReturnValueModel ret = new() { StatusType = VaribaleStatusTypeEnum.Good }; DriverReturnValueModel ret = new() { StatusType = VaribaleStatusTypeEnum.Good };
if (!IsConnected) if (!IsConnected)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad; ret.StatusType = VaribaleStatusTypeEnum.Bad;
return ret; else
}
var userSetAddrArray = ioarg.Address.Trim().Split(',');
ushort startAddress = 0;
if (!ushort.TryParse(ioarg.Address.Trim(), out startAddress))
{ {
if (userSetAddrArray.Length >1 && !ushort.TryParse(userSetAddrArray[0].Trim(), out startAddress)) ushort startAddress, count;
{ ret = AnalyseAddress(ioarg, out startAddress, out count);
ret.StatusType = VaribaleStatusTypeEnum.AddressError; if(ret.StatusType!= VaribaleStatusTypeEnum.Good)
return ret; return ret;
} try
}
var count = GetModbusReadCount(3, ioarg.ValueType);
if (ioarg.ValueType == DataTypeEnum.Any)
{
count = 125;
if (userSetAddrArray.Length>1)
{ {
if(!ushort.TryParse(userSetAddrArray[1], out count)) var rawBuffers = new ushort[] { };
if (FunCode == 3)
rawBuffers = master.ReadHoldingRegisters(SlaveAddress, startAddress, count);
else if (FunCode == 4)
rawBuffers = master.ReadInputRegisters(SlaveAddress, startAddress, count);
var retBuffers = ChangeBuffersOrder(rawBuffers, ioarg.ValueType);
if (ioarg.ValueType == DataTypeEnum.AsciiString)
retBuffers = rawBuffers;
if (ioarg.ValueType.ToString().Contains("Uint16"))
ret.Value = retBuffers[0];
else if (ioarg.ValueType.ToString().Contains("Int16"))
ret.Value = (short)retBuffers[0];
else if (ioarg.ValueType.ToString().Contains("Uint32"))
ret.Value = (UInt32)(retBuffers[0] << 16) + retBuffers[1];
else if (ioarg.ValueType.ToString().Contains("Int32"))
ret.Value = (Int32)(retBuffers[0] << 16) + retBuffers[1];
else if (ioarg.ValueType.ToString().Contains("Float"))
{ {
//转换失败! var bytes = new byte[] { (byte)(retBuffers[1] & 0xff), (byte)((retBuffers[1] >> 8) & 0xff), (byte)(retBuffers[0] & 0xff), (byte)((retBuffers[0] >> 8) & 0xff) };
count = 125; ret.Value = BitConverter.ToSingle(bytes, 0);
} }
else if (ioarg.ValueType.ToString().Contains("AsciiString"))
{
var str= Encoding.ASCII.GetString(GetBytes(retBuffers).ToArray());
if (str.Contains('\0'))
str = str.Split('\0')[0];
ret.Value = str;
}
} }
} catch (Exception ex)
try
{
var rawBuffers = new ushort[] { };
if (FunCode == 3)
rawBuffers = master.ReadHoldingRegisters(SlaveAddress, startAddress, count);
else if (FunCode == 4)
rawBuffers = master.ReadInputRegisters(SlaveAddress, startAddress, count);
var retBuffers = ChangeBuffersOrder(rawBuffers, ioarg.ValueType);
if (ioarg.ValueType.ToString().Contains("Uint16"))
ret.Value = retBuffers[0];
else if (ioarg.ValueType.ToString().Contains("Int16"))
ret.Value = (short)retBuffers[0];
else if (ioarg.ValueType.ToString().Contains("Uint32"))
ret.Value = (UInt32)(retBuffers[0] << 16) + retBuffers[1];
else if (ioarg.ValueType.ToString().Contains("Int32"))
ret.Value = (Int32)(retBuffers[0] << 16) + retBuffers[1];
else if (ioarg.ValueType.ToString().Contains("Float"))
{ {
var bytes = new byte[] { (byte)(retBuffers[1] & 0xff), (byte)((retBuffers[1] >> 8) & 0xff), (byte)(retBuffers[0] & 0xff), (byte)((retBuffers[0] >> 8) & 0xff) }; ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Value = BitConverter.ToSingle(bytes, 0); ret.Message = ex.Message;
}
else if (ioarg.ValueType.ToString().Contains("Any"))
{
ret.Value = retBuffers;
} }
} }
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = ex.Message;
}
return ret; return ret;
} }
@ -411,9 +396,6 @@ namespace DriverModbusMaster
//预留了大小端转换的 //预留了大小端转换的
private ushort[] ChangeBuffersOrder(ushort[] buffers, DataTypeEnum dataType) private ushort[] ChangeBuffersOrder(ushort[] buffers, DataTypeEnum dataType)
{ {
if (dataType == DataTypeEnum.Any)
return buffers;
var newBuffers = new ushort[buffers.Length]; var newBuffers = new ushort[buffers.Length];
if (dataType.ToString().Contains("32") || dataType.ToString().Contains("Float")) if (dataType.ToString().Contains("32") || dataType.ToString().Contains("Float"))
{ {
@ -470,6 +452,47 @@ namespace DriverModbusMaster
return newBuffers; return newBuffers;
} }
private List<byte> GetBytes(ushort[] retBuffers)
{
List<byte> vs = new();
for (int i = 0; i < retBuffers.Length; i++)
{
vs.Add((byte)(retBuffers[i] & 0xFF));
vs.Add((byte)((retBuffers[i] & 0xFF00) >> 8));
}
return vs;
}
private DriverReturnValueModel AnalyseAddress(DriverAddressIoArgModel ioarg, out ushort StartAddress, out ushort ReadCount)
{
DriverReturnValueModel ret = new() { StatusType = VaribaleStatusTypeEnum.Good };
try
{
if (ioarg.ValueType == DataTypeEnum.AsciiString)
{
StartAddress = ushort.Parse(ioarg.Address.Split(',')[0]);
ReadCount = ushort.Parse(ioarg.Address.Split(',')[1]);
}
else
{
StartAddress = ushort.Parse(ioarg.Address);
ReadCount = GetModbusReadCount(3, ioarg.ValueType);
}
return ret;
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.AddressError;
ret.Message = ex.Message;
StartAddress = 0;
ReadCount = 0;
return ret;
}
}
public async Task<RpcResponse> WriteAsync(string RequestId, string Method, DriverAddressIoArgModel Ioarg) public async Task<RpcResponse> WriteAsync(string RequestId, string Method, DriverAddressIoArgModel Ioarg)
{ {
RpcResponse rpcResponse = new() { IsSuccess = false }; RpcResponse rpcResponse = new() { IsSuccess = false };
@ -501,7 +524,7 @@ namespace DriverModbusMaster
} }
catch (Exception ex) catch (Exception ex)
{ {
rpcResponse.Description = $"写入失败:{Method},{Ioarg}"; rpcResponse.Description = $"写入失败,[Method]:{Method},[Ioarg]:{Ioarg},[ex]:{ex}";
} }
return rpcResponse; return rpcResponse;
} }

View File

@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>../../../IoTGateway/bin/Debug/net6.0/drivers</OutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\PluginInterface\PluginInterface.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Interop.OPCAutomation">
<HintPath>OPCClient\Interop.OPCAutomation.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

View File

@ -0,0 +1,37 @@
using System;
namespace Automation.OPCClient
{
public class OPCChangeModel
{
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
private object value;
public object Value
{
get { return this.value; }
set { this.value = value; }
}
private TagQuality quality;
public TagQuality Quality
{
get { return quality; }
set { quality = value; }
}
private DateTime timeStamp;
public DateTime TimeStamp
{
get { return timeStamp; }
set { timeStamp = value; }
}
}
}

View File

@ -0,0 +1,365 @@
using System;
using System.Collections.Generic;
using OPCAutomation;
namespace Automation.OPCClient
{
public class OPCClientWrapper
{
private OPCAutomation.OPCServer opcServer;
private OPCGroups opcGroups;
private OPCGroup opcAGroup;
private OPCBrowser opcBrowser;
private bool isConnect;
private bool isDefaultGroupActive;
private int defaultGroupUpdateRate;
private int defaultGroupDeadband;
private string opcServerName;
private string serverIP;
private Dictionary<string, TagItem> clientHandleDict = new Dictionary<string, TagItem>();
private List<string> clientNameList = new List<string>();
private object lockObj = new object();
public event OPCDataChangedHandler OpcDataChangedEvent;
/// <summary>
/// OPCServer object
/// </summary>
public OPCAutomation.OPCServer OPCServer
{
get { return opcServer; }
set { opcServer = value; }
}
/// <summary>
/// OPCGroups object
/// </summary>
public OPCGroups OPCGroups
{
get { return opcGroups; }
set { opcGroups = value; }
}
public OPCGroup OPCGroup
{
get { return opcAGroup; }
set { opcAGroup = value; }
}
/// <summary>
/// ServerIP
/// </summary>
public string ServerIP
{
get { return serverIP; }
set { serverIP = value; }
}
/// <summary>
/// OPCServerName
/// </summary>
public string OPCServerName
{
get { return opcServerName; }
set { opcServerName = value; }
}
/// <summary>
/// OPCGroup object 默认活动状态
/// </summary>
public bool IsDefaultGroupActive
{
get { return isDefaultGroupActive; }
set { isDefaultGroupActive = value; }
}
/// <summary>
/// OPCGroup object 默认更新频率
/// </summary>
public int DefaultGroupUpdateRate
{
get { return defaultGroupUpdateRate; }
set { defaultGroupUpdateRate = value; }
}
public int DefaultGroupDeadband
{
get { return defaultGroupDeadband; }
set { defaultGroupDeadband = value; }
}
public OPCClientWrapper()
{
opcServer = new OPCAutomation.OPCServer();
}
/// <summary>
/// 连接远程机上的OPCServer服务器
/// </summary>
/// <param name="serverIP"></param>
/// <param name="OPCServerName"></param>
/// <returns></returns>
private bool ConnectRemote()
{
try
{
this.opcServer.Connect( opcServerName, serverIP );
this.opcServer.ServerShutDown += new DIOPCServerEvent_ServerShutDownEventHandler(opcServer_ServerShutDown);
}
catch (Exception ex)
{
return false;
}
isConnect = true;
return true;
}
void opcServer_ServerShutDown(string Reason)
{
throw new NotImplementedException();
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public void Init(string serverIP, string opcServerName )
{
this.opcServerName = opcServerName;
this.serverIP = serverIP;
try
{
if (ConnectRemote())
{
opcGroups = opcServer.OPCGroups;
opcBrowser = opcServer.CreateBrowser();
opcAGroup = opcGroups.Add("Group");
opcAGroup.IsActive = true;
opcAGroup.IsSubscribed = true;
//opcAGroup.DataChange += new DIOPCGroupEvent_DataChangeEventHandler( OnGroup_DataChange );
}
}
catch (Exception ex)
{
}
}
/// <summary>
/// 当监视的标签发生改变时激活
/// </summary>
private void OnGroup_DataChange( int TransactionID, int NumItems, ref Array ClientHandles, ref Array ItemValues, ref Array Qualities, ref Array TimeStamps )
{
lock (lockObj)
{
List<OPCChangeModel> list = new List<OPCChangeModel>();
for (int i = 1; i <= NumItems; i++)
{
list.Add(new OPCChangeModel()
{
Name = this.clientNameList[(int)ClientHandles.GetValue(i)],
Value = ItemValues.GetValue(i),
Quality = (TagQuality)Qualities.GetValue(i),
TimeStamp = (DateTime)TimeStamps.GetValue(i),
});
}
if (this.OpcDataChangedEvent != null)
{
this.OpcDataChangedEvent(list);
}
}
}
/// <summary>
/// 释放连接
/// </summary>
public void Disconnect()
{
try
{
if (isConnect == true)
{
clientHandleDict.Clear();
opcServer.Disconnect();
isConnect = false;
}
}
catch (Exception)
{
//SCLog.Instance.LogError( "断开OPCServer连接时错误:" + err.Message );
}
}
/// <summary>
/// 显示节点树 不包含叶子节点
/// </summary>
/// <param name="node"></param>
/// <returns></returns>
public TagTreeNode GetTree(TagTreeNode node)
{
TagTreeNode subNode = null;
opcBrowser.ShowBranches();
foreach (var branch in opcBrowser)
{
if (node == null)
{
node = new TagTreeNode(opcServer.ServerName);
}
//Console.WriteLine(branch);
subNode = node.AddNode(branch.ToString());
try
{
opcBrowser.MoveDown(branch.ToString());
GetTree(subNode);
opcBrowser.MoveUp();
}
catch { }
}
return node;
}
public List<String> GetLeaf(string path)
{
List<string> list = new List<string>();
Array branches = path.Substring(path.IndexOf("/") + 1, path.Length - path.IndexOf("/") - 1).Split('/');
opcBrowser.MoveTo(branches);
opcBrowser.ShowLeafs(false);
foreach (var branch in opcBrowser)
{
list.Add(branch.ToString());
}
opcBrowser.MoveToRoot();
return list;
}
public List<string> GetRootNodes()
{
opcBrowser.MoveToRoot();
List<string> list = new List<string>();
opcBrowser.ShowBranches();
foreach (var branch in opcBrowser)
{
list.Add(branch.ToString());
}
return list;
}
public List<string> GetChildNodes(string path)
{
List<string> list = new List<string>();
Array branches = path.Substring(path.IndexOf("/") + 1, path.Length - path.IndexOf("/") - 1).Split('/');
opcBrowser.MoveTo(branches);
opcBrowser.ShowBranches();
foreach (var branch in opcBrowser)
{
list.Add(branch.ToString());
}
opcBrowser.MoveToRoot();
return list;
}
public bool IsOPCServerConnected()
{
try
{
if (opcServer.ServerState == (int)OPCServerState.OPCRunning)
{
return true;
}
return false;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// 监视标签
/// </summary>
/// <param name="itemName"></param>
public void MonitorOPCItem(string itemName)
{
try
{
if (!this.clientHandleDict.ContainsKey(itemName))
{
//var bro = this.opcServer.CreateBrowser();
//bro.ShowBranches();
//foreach (var branch in bro)
//{
// Console.WriteLine(branch.ToString());
//}
var index = this.clientNameList.Count;
OPCAutomation.OPCItem tempItem = opcAGroup.OPCItems.AddItem(itemName, index);
TagItem item = new TagItem()
{
Name = itemName,
ClientHandler = index,
ServerHandler = tempItem.ServerHandle,
};
this.clientNameList.Add(itemName);
this.clientHandleDict.Add(itemName, item);
object value, timeStamp, quality;
tempItem.Read(1, out value, out quality, out timeStamp);
}
}
catch
{
}
}
public OPCChangeModel ReadValue(string name)
{
if (this.clientHandleDict.ContainsKey(name))
{
OPCAutomation.OPCItem item = opcAGroup.OPCItems.GetOPCItem(this.clientHandleDict[name].ServerHandler);
object value,quality,timestamp;
item.Read(2, out value, out quality, out timestamp);
return new OPCChangeModel()
{
Name = name,
Quality = (TagQuality)((short)quality),
Value = item.Value,
TimeStamp = (DateTime)timestamp,
};
}
return null;
}
public string ReadNodeLabel(string name)
{
MonitorOPCItem(name);
if (clientHandleDict.ContainsKey(name))
{
OPCItem item = opcAGroup.OPCItems.GetOPCItem(clientHandleDict[name].ServerHandler);
if (item.Value != null)
{
return item.Value.ToString();
}
else
{
object value, quality, timestamp;
item.Read(1, out value, out quality, out timestamp);
return value.ToString();
}
}
return string.Empty;
}
public void Write(string name, object value)
{
if (this.clientHandleDict.ContainsKey(name))
{
OPCAutomation.OPCItem item = opcAGroup.OPCItems.GetOPCItem(this.clientHandleDict[name].ServerHandler);
item.Write(value);
}
}
}
}

View File

@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Automation.OPCClient
{
public delegate void OPCDataChangedHandler(List<OPCChangeModel> arg);
}

View File

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Automation.OPCClient
{
class TagItem
{
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
private int serverHandler;
public int ServerHandler
{
get { return serverHandler; }
set { serverHandler = value; }
}
private int clientHandler;
public int ClientHandler
{
get { return clientHandler; }
set { clientHandler = value; }
}
}
}

View File

@ -0,0 +1,75 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Automation.OPCClient
{
public enum TagQuality
{
Bad = 0,
BadLowLimited = 1,
BadHighLimited = 2,
BadConstant = 3,
BadConfigurationError = 4,
BadConfigurationErrorLowLimited = 5,
BadConfigurationErrorHighLimited = 6,
BadConfigurationErrorConstant = 7,
BadNotConnected = 8,
BadNotConnectedLowLimited = 9,
BadNotConnectedHighLimited = 10,
BadNotConnectedConstant = 11,
BadDeviceFailure = 12,
BadDeviceFailureLowLimited = 13,
BadDeviceFailureHighLimited = 14,
BadDeviceFailureConstant = 15,
BadSensorFailure = 16,
BadSensorFailureLowLimited = 17,
BadSensorFailureHighLimited = 18,
BadSensorFailureConstant = 19,
BadLastKnownValue = 20,
BadLastKnownValueLowLimited = 21,
BadLastKnownValueHighLimited = 22,
BadLastKnownValueConstant = 23,
BadCommFailure = 24,
BadCommFailureLowLimited = 25,
BadCommFailureHighLimited = 26,
BadCommFailureConstant = 27,
BadOutofService = 28,
BadOutofServiceLowLimited = 29,
BadOutofServiceHighLimited = 30,
BadOutofServiceConstant = 31,
BadWaitingforInitialData = 32,
BadWaitingforInitialDataLowLimited = 33,
BadWaitingforInitialDataHighLimited = 34,
BadWaitingforInitialDataConstant = 35,
Uncertain = 64,
UncertainLowLimited = 65,
UncertainHighLimited = 66,
UncertainConstant = 67,
UncertainLastUsableValue = 68,
UncertainLastUsableValueLowLimited = 69,
UncertainLastUsableValueHighLimited = 70,
UncertainLastUsableValueConstant = 71,
UncertainSensorNotAccurate = 80,
UncertainSensorNotAccurateLowLimited = 81,
UncertainSensorNotAccurateHighLimited = 82,
UncertainSensorNotAccurateConstant = 83,
UncertainEngineeringUnitsExceeded = 84,
UncertainEngineeringUnitsExceededLowLimited = 85,
UncertainEngineeringUnitsExceededHighLimited = 86,
UncertainEngineeringUnitsExceededConstant = 87,
UncertainSubNormal = 88,
UncertainSubNormalLowLimited = 89,
UncertainSubNormalHighLimited = 90,
UncertainSubNormalConstant = 91,
Good = 192,
GoodLowLimited = 193,
GoodHighLimited = 194,
GoodConstant = 195,
GoodLocalOverride = 216,
GoodLocalOverrideLowLimited = 217,
GoodLocalOverrideHighLimited = 218,
GoodLocalOverrideConstant = 219
}
}

View File

@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Automation.OPCClient
{
public class TagTreeNode
{
public string Name
{
get;
set;
}
private List<TagTreeNode> nodes = new List<TagTreeNode>();
public List<TagTreeNode> Nodes
{
get { return nodes; }
set { nodes = value; }
}
public TagTreeNode Parent
{
get;
private set;
}
public bool IsLeaf { get; set; }
public string FullPath
{
get
{
string res = Name;
TagTreeNode parent = this.Parent;
while (parent != null)
{
res = string.Format("{0}/{1}", parent.Name, res);
parent = parent.Parent;
}
return res;
}
}
public TagTreeNode()
{ }
public TagTreeNode(string name)
{
this.Name = name;
}
public TagTreeNode AddNode(string name)
{
TagTreeNode node = new TagTreeNode(name);
node.Parent = this;
this.nodes.Add(node);
return node;
}
}
}

View File

@ -0,0 +1,170 @@
using PluginInterface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Automation.OPCClient;
namespace DriverOPCDaClient
{
internal class OPCDaClient : IDriver
{
OPCClientWrapper opcDaClient = null;
#region
[ConfigParameter("设备Id")] public Guid DeviceId { get; set; }
[ConfigParameter("IP")]
public string IP{ get; set; } = "127.0.0.1";
[ConfigParameter("OpcServerName")]
public string OpcServerName { get; set; } = "ICONICS.SimulatorOPCDA.2";
[ConfigParameter("超时时间ms")] public int Timeout { get; set; } = 3000;
[ConfigParameter("最小通讯周期ms")] public uint MinPeriod { get; set; } = 3000;
#endregion
public OPCDaClient(Guid deviceId)
{
DeviceId = deviceId;
}
public bool IsConnected
{
get { return opcDaClient != null && opcDaClient.IsOPCServerConnected(); }
}
public bool Connect()
{
try
{
opcDaClient = new OPCClientWrapper();
opcDaClient.Init(IP, OpcServerName);
}
catch (Exception)
{
return false;
}
return IsConnected;
}
public bool Close()
{
try
{
opcDaClient?.Disconnect();
return !IsConnected;
}
catch (Exception)
{
return false;
}
}
public void Dispose()
{
try
{
opcDaClient = null;
}
catch (Exception)
{
}
}
[Method("读OPCDa", description: "读OPCDa节点")]
public DriverReturnValueModel ReadNode(DriverAddressIoArgModel ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
var dataValue = opcDaClient.ReadNodeLabel(ioarg.Address);
switch (ioarg.ValueType)
{
case DataTypeEnum.Bit:
ret.Value = dataValue == "On" ? 1 : 0;
break;
case DataTypeEnum.Bool:
ret.Value = dataValue == "On";
break;
case DataTypeEnum.Byte:
ret.Value = byte.Parse(dataValue);
break;
case DataTypeEnum.UByte:
ret.Value = sbyte.Parse(dataValue);
break;
case DataTypeEnum.Int16:
ret.Value = short.Parse(dataValue);
break;
case DataTypeEnum.Uint16:
ret.Value = ushort.Parse(dataValue);
break;
case DataTypeEnum.Int32:
ret.Value = int.Parse(dataValue);
break;
case DataTypeEnum.Uint32:
ret.Value = uint.Parse(dataValue);
break;
case DataTypeEnum.Float:
ret.Value = float.Parse(dataValue);
break;
case DataTypeEnum.Double:
ret.Value = double.Parse(dataValue);
break;
case DataTypeEnum.AsciiString:
case DataTypeEnum.Utf8String:
ret.Value = dataValue;
break;
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("测试方法", description: "测试方法,返回当前时间")]
public DriverReturnValueModel Read(DriverAddressIoArgModel ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
ret.Value = DateTime.Now;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
public async Task<RpcResponse> WriteAsync(string RequestId, string Method, DriverAddressIoArgModel Ioarg)
{
RpcResponse rpcResponse = new() { IsSuccess = false, Description = "设备驱动内未实现写入功能" };
return rpcResponse;
}
}
}

View File

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client" Version="1.4.367.75" /> <PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client" Version="1.4.369.30" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="IoTClient" Version="1.0.22" /> <PackageReference Include="IoTClient" Version="1.0.28" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -148,7 +148,10 @@ namespace DriverSiemensS7
int startAdr = int.Parse(ioarg.Address.Trim().Split(',')[1]); int startAdr = int.Parse(ioarg.Address.Trim().Split(',')[1]);
int count = int.Parse(ioarg.Address.Trim().Split(',')[2]); int count = int.Parse(ioarg.Address.Trim().Split(',')[2]);
var buffers = plc.ReadBytes(DataType.DataBlock, db, startAdr, count); var buffers = plc.ReadBytes(DataType.DataBlock, db, startAdr, count);
ret.Value = Encoding.ASCII.GetString(buffers); var str = Encoding.ASCII.GetString(buffers);
if (str.Contains('\0'))
str = str.Split('\0')[0];
ret.Value = str;
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -226,7 +229,81 @@ namespace DriverSiemensS7
public async Task<RpcResponse> WriteAsync(string RequestId, string Method, DriverAddressIoArgModel Ioarg) public async Task<RpcResponse> WriteAsync(string RequestId, string Method, DriverAddressIoArgModel Ioarg)
{ {
RpcResponse rpcResponse = new() { IsSuccess = false, Description = "设备驱动内未实现写入功能" }; RpcResponse rpcResponse = new() { IsSuccess = false };
try
{
if (!IsConnected)
rpcResponse.Description = "设备连接已断开";
else
{
object toWrite = null;
switch (Ioarg.ValueType)
{
case DataTypeEnum.Bit:
case DataTypeEnum.Bool:
toWrite = Ioarg.Value.ToString().ToLower() == "true" || Ioarg.Value.ToString().ToLower() == "1";
break;
case DataTypeEnum.UByte:
toWrite = byte.Parse(Ioarg.Value.ToString());
break;
case DataTypeEnum.Byte:
toWrite = sbyte.Parse(Ioarg.Value.ToString());
break;
case DataTypeEnum.Uint16:
toWrite = ushort.Parse(Ioarg.Value.ToString());
break;
case DataTypeEnum.Int16:
toWrite = short.Parse(Ioarg.Value.ToString());
break;
case DataTypeEnum.Uint32:
toWrite = uint.Parse(Ioarg.Value.ToString());
break;
case DataTypeEnum.Int32:
toWrite = int.Parse(Ioarg.Value.ToString());
break;
case DataTypeEnum.Float:
toWrite = float.Parse(Ioarg.Value.ToString());
break;
case DataTypeEnum.AsciiString:
toWrite = Encoding.ASCII.GetBytes(Ioarg.Value.ToString());
break;
default:
rpcResponse.Description = $"类型{DataTypeEnum.Float}不支持写入";
break;
}
if (toWrite == null)
return rpcResponse;
//通用方法
if (Method == nameof(Read))
{
plc.Write(Ioarg.Address, toWrite);
rpcResponse.IsSuccess = true;
return rpcResponse;
}
//字符串
else if (Method == nameof(ReadString))
{
int db = int.Parse(Ioarg.Address.Trim().Split(',')[0]);
int startAdr = int.Parse(Ioarg.Address.Trim().Split(',')[1]);
int count = int.Parse(Ioarg.Address.Trim().Split(',')[2]);
//防止写入到其他地址 进行截断
if (((byte[])toWrite).Length > count)
toWrite = ((byte[])toWrite).Take(count);
plc.Write(DataType.DataBlock, db, startAdr, toWrite);
rpcResponse.IsSuccess = true;
return rpcResponse;
}
else
rpcResponse.Description = $"不支持写入:{Method}";
}
}
catch (Exception ex)
{
rpcResponse.Description = $"写入失败,[Method]:{Method},[Ioarg]:{Ioarg},[ex]:{ex}";
}
return rpcResponse; return rpcResponse;
} }
} }

View File

@ -274,7 +274,7 @@ namespace Plugin
//mysql会把一些符号转义没找到原因先临时处理下 //mysql会把一些符号转义没找到原因先临时处理下
private string DealMysqlStr(string Expression) private string DealMysqlStr(string Expression)
{ {
return Expression.Replace("&lt;", "<").Replace("&gt;", ">").Replace("&amp;", "&"); return Expression.Replace("&lt;", "<").Replace("&gt;", ">").Replace("&amp;", "&").Replace("&quot;", "\"");
} }
} }

View File

@ -7,10 +7,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DynamicExpresso.Core" Version="2.10.0" /> <PackageReference Include="DynamicExpresso.Core" Version="2.13.0" />
<PackageReference Include="Mono.Options" Version="6.12.0.148" /> <PackageReference Include="Mono.Options" Version="6.12.0.148" />
<PackageReference Include="MQTTnet" Version="3.1.1" /> <PackageReference Include="MQTTnet" Version="3.1.2" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server" Version="1.4.367.75" /> <PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server" Version="1.4.369.30" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,300 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ApplicationConfiguration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ua="http://opcfoundation.org/UA/2008/02/Types.xsd"
xmlns="http://opcfoundation.org/UA/SDK/Configuration.xsd"
>
<ApplicationName>Quickstart Reference Server</ApplicationName>
<ApplicationUri>urn:localhost:UA:Quickstarts:ReferenceServer</ApplicationUri>
<ProductUri>uri:opcfoundation.org:Quickstarts:ReferenceServer</ProductUri>
<ApplicationType>Server_0</ApplicationType>
<SecurityConfiguration>
<!-- Where the application instance certificate is stored (MachineDefault) -->
<ApplicationCertificate>
<StoreType>Directory</StoreType>
<StorePath>%LocalApplicationData%/OPC Foundation/pki/own</StorePath>
<SubjectName>CN=Quickstart Reference Server, C=US, S=Arizona, O=OPC Foundation, DC=localhost</SubjectName>
</ApplicationCertificate>
<!-- Where the issuer certificate are stored (certificate authorities) -->
<TrustedIssuerCertificates>
<StoreType>Directory</StoreType>
<StorePath>%LocalApplicationData%/OPC Foundation/pki/issuer</StorePath>
</TrustedIssuerCertificates>
<!-- Where the trust list is stored -->
<TrustedPeerCertificates>
<StoreType>Directory</StoreType>
<StorePath>%LocalApplicationData%/OPC Foundation/pki/trusted</StorePath>
</TrustedPeerCertificates>
<!-- The directory used to store invalid certficates for later review by the administrator. -->
<RejectedCertificateStore>
<StoreType>Directory</StoreType>
<StorePath>%LocalApplicationData%/OPC Foundation/pki/rejected</StorePath>
</RejectedCertificateStore>
<!-- WARNING: The following setting (to automatically accept untrusted certificates) should be used
for easy debugging purposes ONLY and turned off for production deployments! -->
<AutoAcceptUntrustedCertificates>false</AutoAcceptUntrustedCertificates>
<!-- WARNING: SHA1 signed certficates are by default rejected and should be phased out.
The setting below to allow them is only required for UACTT (1.02.336.244) which uses SHA-1 signed certs. -->
<RejectSHA1SignedCertificates>false</RejectSHA1SignedCertificates>
<RejectUnknownRevocationStatus>true</RejectUnknownRevocationStatus>
<MinimumCertificateKeySize>2048</MinimumCertificateKeySize>
<AddAppCertToTrustedStore>false</AddAppCertToTrustedStore>
<SendCertificateChain>true</SendCertificateChain>
<!-- Where the User issuer certificates are stored -->
<UserIssuerCertificates>
<StoreType>Directory</StoreType>
<StorePath>%LocalApplicationData%/OPC Foundation/pki/issuerUser</StorePath>
</UserIssuerCertificates>
<!-- Where the User trust list is stored-->
<TrustedUserCertificates>
<StoreType>Directory</StoreType>
<StorePath>%LocalApplicationData%/OPC Foundation/pki/trustedUser</StorePath>
</TrustedUserCertificates>
</SecurityConfiguration>
<TransportConfigurations></TransportConfigurations>
<TransportQuotas>
<OperationTimeout>600000</OperationTimeout>
<MaxStringLength>1048576</MaxStringLength>
<MaxByteStringLength>1048576</MaxByteStringLength>
<MaxArrayLength>65535</MaxArrayLength>
<MaxMessageSize>4194304</MaxMessageSize>
<MaxBufferSize>65535</MaxBufferSize>
<ChannelLifetime>300000</ChannelLifetime>
<SecurityTokenLifetime>3600000</SecurityTokenLifetime>
</TransportQuotas>
<ServerConfiguration>
<BaseAddresses>
<ua:String>https://localhost:62540/Quickstarts/ReferenceServer</ua:String>
<ua:String>opc.tcp://localhost:62541/Quickstarts/ReferenceServer</ua:String>
</BaseAddresses>
<!--
These list the alternate addresses (via firewalls, multiple NICs etc.) that can be
used to communicate with the server. The URL used by the client when calling
FindServers/GetEndpoints or CreateSession will be used to filter the list of
endpoints returned by checking for alternate base addresses that have a domain
that matches the domain in the url provided by the client.
Note that any additional domains should be listed in the server's certificate. If they
are left out the client make refuse to connect because it has no way to know if the
alternate domain was authorized by the server administrator.
-->
<!--
<AlternateBaseAddresses>
<ua:String>http://AlternateHostName/Quickstarts/ReferenceServer</ua:String>
<ua:String>http://10.10.103.150/Quickstarts/ReferenceServer</ua:String>
<ua:String>http://[2a01::626d]/Quickstarts/ReferenceServer</ua:String>
</AlternateBaseAddresses>
-->
<SecurityPolicies>
<ServerSecurityPolicy>
<SecurityMode>SignAndEncrypt_3</SecurityMode>
<SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256</SecurityPolicyUri>
</ServerSecurityPolicy>
<ServerSecurityPolicy>
<SecurityMode>None_1</SecurityMode>
<SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#None</SecurityPolicyUri>
</ServerSecurityPolicy>
<ServerSecurityPolicy>
<SecurityMode>Sign_2</SecurityMode>
<SecurityPolicyUri></SecurityPolicyUri>
</ServerSecurityPolicy>
<ServerSecurityPolicy>
<SecurityMode>SignAndEncrypt_3</SecurityMode>
<SecurityPolicyUri></SecurityPolicyUri>
</ServerSecurityPolicy>
<!-- deprecated security policies for reference only
<ServerSecurityPolicy>
<SecurityMode>Sign_2</SecurityMode>
<SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#Basic256</SecurityPolicyUri>
</ServerSecurityPolicy>
<ServerSecurityPolicy>
<SecurityMode>SignAndEncrypt_3</SecurityMode>
<SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#Basic256</SecurityPolicyUri>
</ServerSecurityPolicy>
<ServerSecurityPolicy>
<SecurityMode>Sign_2</SecurityMode>
<SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15</SecurityPolicyUri>
</ServerSecurityPolicy>
<ServerSecurityPolicy>
<SecurityMode>SignAndEncrypt_3</SecurityMode>
<SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15</SecurityPolicyUri>
</ServerSecurityPolicy>
-->
</SecurityPolicies>
<MinRequestThreadCount>5</MinRequestThreadCount>
<MaxRequestThreadCount>100</MaxRequestThreadCount>
<MaxQueuedRequestCount>2000</MaxQueuedRequestCount>
<!-- The SDK expects the server to support the same set of user tokens for every endpoint. -->
<UserTokenPolicies>
<!-- Allows anonymous users -->
<ua:UserTokenPolicy>
<ua:TokenType>Anonymous_0</ua:TokenType>
<ua:SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#None</ua:SecurityPolicyUri>
</ua:UserTokenPolicy>
<!-- Allows username/password -->
<ua:UserTokenPolicy>
<ua:TokenType>UserName_1</ua:TokenType>
<!-- passwords must be encrypted - this specifies what algorithm to use -->
<ua:SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256</ua:SecurityPolicyUri>
</ua:UserTokenPolicy>
<!-- Allows user certificates -->
<ua:UserTokenPolicy>
<ua:TokenType>Certificate_2</ua:TokenType>
<!-- certificate possession must be proven with a digital signature - this specifies what algorithm to use -->
<ua:SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256</ua:SecurityPolicyUri>
</ua:UserTokenPolicy>
</UserTokenPolicies>
<DiagnosticsEnabled>true</DiagnosticsEnabled>
<MaxSessionCount>100</MaxSessionCount>
<MinSessionTimeout>10000</MinSessionTimeout>
<MaxSessionTimeout>3600000</MaxSessionTimeout>
<MaxBrowseContinuationPoints>10</MaxBrowseContinuationPoints>
<MaxQueryContinuationPoints>10</MaxQueryContinuationPoints>
<MaxHistoryContinuationPoints>100</MaxHistoryContinuationPoints>
<MaxRequestAge>600000</MaxRequestAge>
<MinPublishingInterval>100</MinPublishingInterval>
<MaxPublishingInterval>3600000</MaxPublishingInterval>
<PublishingResolution>50</PublishingResolution>
<MaxSubscriptionLifetime>3600000</MaxSubscriptionLifetime>
<MaxMessageQueueSize>100</MaxMessageQueueSize>
<MaxNotificationQueueSize>100</MaxNotificationQueueSize>
<MaxNotificationsPerPublish>1000</MaxNotificationsPerPublish>
<MinMetadataSamplingInterval>1000</MinMetadataSamplingInterval>
<AvailableSamplingRates>
<SamplingRateGroup>
<Start>5</Start>
<Increment>5</Increment>
<Count>20</Count>
</SamplingRateGroup>
<SamplingRateGroup>
<Start>100</Start>
<Increment>100</Increment>
<Count>4</Count>
</SamplingRateGroup>
<SamplingRateGroup>
<Start>500</Start>
<Increment>250</Increment>
<Count>2</Count>
</SamplingRateGroup>
<SamplingRateGroup>
<Start>1000</Start>
<Increment>500</Increment>
<Count>20</Count>
</SamplingRateGroup>
</AvailableSamplingRates>
<RegistrationEndpoint>
<ua:EndpointUrl>opc.tcp://localhost:4840</ua:EndpointUrl>
<ua:Server>
<ua:ApplicationUri>opc.tcp://localhost:4840</ua:ApplicationUri>
<ua:ApplicationType>DiscoveryServer_3</ua:ApplicationType>
<ua:DiscoveryUrls>
<ua:String>opc.tcp://localhost:4840</ua:String>
</ua:DiscoveryUrls>
</ua:Server>
<ua:SecurityMode>SignAndEncrypt_3</ua:SecurityMode>
<ua:SecurityPolicyUri />
<ua:UserIdentityTokens />
</RegistrationEndpoint>
<MaxRegistrationInterval>0</MaxRegistrationInterval>
<NodeManagerSaveFile>Quickstarts.ReferenceServer.nodes.xml</NodeManagerSaveFile>
<MinSubscriptionLifetime>10000</MinSubscriptionLifetime>
<MaxPublishRequestCount>20</MaxPublishRequestCount>
<MaxSubscriptionCount>100</MaxSubscriptionCount>
<MaxEventQueueSize>10000</MaxEventQueueSize>
<!-- see https://opcfoundation-onlineapplications.org/profilereporting/ for list of available profiles -->
<ServerProfileArray>
<ua:String>http://opcfoundation.org/UA-Profile/Server/StandardUA2017</ua:String>
<ua:String>http://opcfoundation.org/UA-Profile/Server/DataAccess</ua:String>
<ua:String>http://opcfoundation.org/UA-Profile/Server/Methods</ua:String>
<ua:String>http://opcfoundation.org/UA-Profile/Server/ReverseConnect</ua:String>
</ServerProfileArray>
<ShutdownDelay>5</ShutdownDelay>
<ServerCapabilities>
<ua:String>DA</ua:String>
</ServerCapabilities>
<SupportedPrivateKeyFormats>
<ua:String>PFX</ua:String>
<ua:String>PEM</ua:String>
</SupportedPrivateKeyFormats>
<MaxTrustListSize>0</MaxTrustListSize>
<MultiCastDnsEnabled>false</MultiCastDnsEnabled>
<!-- Reverse connection parameters for aggregation server sample -->
<!--
<ReverseConnect>
<Clients>
<ReverseConnectClient>
<EndpointUrl>opc.tcp://localhost:65300</EndpointUrl>
<MaxSessionCount>0</MaxSessionCount>
<Enabled>true</Enabled>
</ReverseConnectClient>
</Clients>
<ConnectInterval>15000</ConnectInterval>
<ConnectTimeout>30000</ConnectTimeout>
<RejectTimeout>60000</RejectTimeout>
</ReverseConnect>
-->
<OperationLimits>
<MaxNodesPerRead>1000</MaxNodesPerRead>
<MaxNodesPerWrite>1000</MaxNodesPerWrite>
<MaxNodesPerMethodCall>250</MaxNodesPerMethodCall>
<MaxNodesPerBrowse>2500</MaxNodesPerBrowse>
<MaxNodesPerTranslateBrowsePathsToNodeIds>1000</MaxNodesPerTranslateBrowsePathsToNodeIds>
<MaxMonitoredItemsPerCall>1000</MaxMonitoredItemsPerCall>
</OperationLimits>
</ServerConfiguration>
<Extensions>
<ua:XmlElement>
<MemoryBufferConfiguration xmlns="http://samples.org/UA/MemoryBuffer">
<Buffers>
<MemoryBufferInstance>
<Name>UInt32</Name>
<TagCount>100</TagCount>
<DataType>UInt32</DataType>
</MemoryBufferInstance>
<MemoryBufferInstance>
<Name>Double</Name>
<TagCount>100</TagCount>
<DataType>Double</DataType>
</MemoryBufferInstance>
</Buffers>
</MemoryBufferConfiguration>
</ua:XmlElement>
</Extensions>
<TraceConfiguration>
<OutputFilePath>%LocalApplicationData%/OPC Foundation/Logs/Quickstarts.ReferenceServer.log.txt</OutputFilePath>
<DeleteOnLoad>true</DeleteOnLoad>
<!-- Show Only Errors -->
<!-- <TraceMasks>1</TraceMasks> -->
<!-- Show Only Security and Errors -->
<!-- <TraceMasks>513</TraceMasks> -->
<!-- Show Only Security, Errors and Trace -->
<!-- <TraceMasks>515</TraceMasks> -->
<!-- Show Only Security, COM Calls, Errors and Trace -->
<!-- <TraceMasks>771</TraceMasks> -->
<!-- Show Only Security, Service Calls, Errors and Trace -->
<!-- <TraceMasks>523</TraceMasks> -->
<!-- Show Only Security, ServiceResultExceptions, Errors and Trace -->
<!-- <TraceMasks>519</TraceMasks> -->
</TraceConfiguration>
</ApplicationConfiguration>

View File

@ -64,7 +64,7 @@
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.1" /> <PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.1" />
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.4" /> <PackageReference Include="SixLabors.ImageSharp" Version="1.0.4" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta13" /> <PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta13" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.2" />
<PackageReference Include="VueCliMiddleware" Version="6.0.0" /> <PackageReference Include="VueCliMiddleware" Version="6.0.0" />
</ItemGroup> </ItemGroup>

15
auto-build-arm.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
echo start
docker build -t iotgateway .
docker stop iotgateway
docker rm iotgateway
docker run -d --restart always --name iotgateway -p 518:518 -p 1888:1888 -p 62541:62541 -p 503:503 iotgateway
docker cp 3d iotgateway:app/wwwroot/
docker cp drivers iotgateway:app/
docker cp IoTGateway/iotgateway.db iotgateway:app/
docker cp IoTGateway/Quickstarts.ReferenceServer.Config.xml iotgateway:app/
docker restart iotgateway
docker commit iotgateway registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway:arm
docker push registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway:arm
docker tag registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway:arm 15261671110/iotgateway:arm
docker push 15261671110/iotgateway:arm

15
auto-build.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
echo start
docker build -t iotgateway .
docker stop iotgateway
docker rm iotgateway
docker run -d --restart always --name iotgateway -p 518:518 -p 1888:1888 -p 62541:62541 -p 503:503 iotgateway
docker cp 3d iotgateway:app/wwwroot/
docker cp drivers iotgateway:app/
docker cp IoTGateway/iotgateway.db iotgateway:app/
docker cp IoTGateway/Quickstarts.ReferenceServer.Config.xml iotgateway:app/
docker restart iotgateway
docker commit iotgateway registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway
docker push registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway
docker tag registry.cn-hangzhou.aliyuncs.com/wanghaidong/iotgateway 15261671110/iotgateway
docker push 15261671110/iotgateway

View File

@ -0,0 +1,183 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"DriverModbusMaster/1.0.0": {
"dependencies": {
"PluginInterface": "1.0.0",
"System.IO.Ports": "6.0.0"
},
"runtime": {
"DriverModbusMaster.dll": {}
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"runtime.linux-arm.runtime.native.System.IO.Ports/6.0.0": {
"runtimeTargets": {
"runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
"rid": "linux-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/6.0.0": {
"runtimeTargets": {
"runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
"rid": "linux-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-x64.runtime.native.System.IO.Ports/6.0.0": {
"runtimeTargets": {
"runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
"rid": "linux-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.native.System.IO.Ports/6.0.0": {
"dependencies": {
"runtime.linux-arm.runtime.native.System.IO.Ports": "6.0.0",
"runtime.linux-arm64.runtime.native.System.IO.Ports": "6.0.0",
"runtime.linux-x64.runtime.native.System.IO.Ports": "6.0.0",
"runtime.osx-arm64.runtime.native.System.IO.Ports": "6.0.0",
"runtime.osx-x64.runtime.native.System.IO.Ports": "6.0.0"
}
},
"runtime.osx-arm64.runtime.native.System.IO.Ports/6.0.0": {
"runtimeTargets": {
"runtimes/osx-arm64/native/libSystem.IO.Ports.Native.dylib": {
"rid": "osx-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.osx-x64.runtime.native.System.IO.Ports/6.0.0": {
"runtimeTargets": {
"runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
"rid": "osx-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"System.IO.Ports/6.0.0": {
"dependencies": {
"runtime.native.System.IO.Ports": "6.0.0"
},
"runtime": {
"lib/net6.0/System.IO.Ports.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
},
"runtimeTargets": {
"runtimes/unix/lib/net6.0/System.IO.Ports.dll": {
"rid": "unix",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
},
"runtimes/win/lib/net6.0/System.IO.Ports.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
},
"PluginInterface/1.0.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1"
},
"runtime": {
"PluginInterface.dll": {}
}
}
}
},
"libraries": {
"DriverModbusMaster/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
},
"runtime.linux-arm.runtime.native.System.IO.Ports/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-75q52H7CSpgIoIDwXb9o833EvBZIXJ0mdPhz1E6jSisEXUBlSCPalC29cj3EXsjpuDwr0dj1LRXZepIQH/oL4Q==",
"path": "runtime.linux-arm.runtime.native.system.io.ports/6.0.0",
"hashPath": "runtime.linux-arm.runtime.native.system.io.ports.6.0.0.nupkg.sha512"
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-xn2bMThmXr3CsvOYmS8ex2Yz1xo+kcnhVg2iVhS9PlmqjZPAkrEo/I40wjrBZH/tU4kvH0s1AE8opAvQ3KIS8g==",
"path": "runtime.linux-arm64.runtime.native.system.io.ports/6.0.0",
"hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.6.0.0.nupkg.sha512"
},
"runtime.linux-x64.runtime.native.System.IO.Ports/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-16nbNXwv0sC+gLGIuecri0skjuh6R1maIJggsaNP7MQBcbVcEfWFUOkEnsnvoLEjy0XerfibuRptfQ8AmdIcWA==",
"path": "runtime.linux-x64.runtime.native.system.io.ports/6.0.0",
"hashPath": "runtime.linux-x64.runtime.native.system.io.ports.6.0.0.nupkg.sha512"
},
"runtime.native.System.IO.Ports/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KaaXlpOcuZjMdmyF5wzzx3b+PRKIzt6A5Ax9dKenPDQbVJAFpev+casD0BIig1pBcbs3zx7CqWemzUJKAeHdSQ==",
"path": "runtime.native.system.io.ports/6.0.0",
"hashPath": "runtime.native.system.io.ports.6.0.0.nupkg.sha512"
},
"runtime.osx-arm64.runtime.native.System.IO.Ports/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-fXG12NodG1QrCdoaeSQ1gVnk/koi4WYY4jZtarMkZeQMyReBm1nZlSRoPnUjLr2ZR36TiMjpcGnQfxymieUe7w==",
"path": "runtime.osx-arm64.runtime.native.system.io.ports/6.0.0",
"hashPath": "runtime.osx-arm64.runtime.native.system.io.ports.6.0.0.nupkg.sha512"
},
"runtime.osx-x64.runtime.native.System.IO.Ports/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/As+zPY49+dSUXkh+fTUbyPhqrdGN//evLxo4Vue88pfh1BHZgF7q4kMblTkxYvwR6Vi03zSYxysSFktO8/SDQ==",
"path": "runtime.osx-x64.runtime.native.system.io.ports/6.0.0",
"hashPath": "runtime.osx-x64.runtime.native.system.io.ports.6.0.0.nupkg.sha512"
},
"System.IO.Ports/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-dRyGI7fUESar5ZLIpiBOaaNLW7YyOBGftjj5Of+xcduC/Rjl7RjhEnWDvvNBmHuF3d0tdXoqdVI/yrVA8f00XA==",
"path": "system.io.ports/6.0.0",
"hashPath": "system.io.ports.6.0.0.nupkg.sha512"
},
"PluginInterface/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -8,21 +8,21 @@
".NETCoreApp,Version=v6.0": { ".NETCoreApp,Version=v6.0": {
"DriverAllenBradley/1.0.0": { "DriverAllenBradley/1.0.0": {
"dependencies": { "dependencies": {
"IoTClient": "1.0.22", "IoTClient": "1.0.28",
"PluginInterface": "1.0.0" "PluginInterface": "1.0.0"
}, },
"runtime": { "runtime": {
"DriverAllenBradley.dll": {} "DriverAllenBradley.dll": {}
} }
}, },
"IoTClient/1.0.22": { "IoTClient/1.0.28": {
"dependencies": { "dependencies": {
"System.IO.Ports": "4.6.0" "System.IO.Ports": "4.6.0"
}, },
"runtime": { "runtime": {
"lib/netstandard2.0/IoTClient.dll": { "lib/netstandard2.0/IoTClient.dll": {
"assemblyVersion": "1.0.22.0", "assemblyVersion": "1.0.28.0",
"fileVersion": "1.0.22.0" "fileVersion": "1.0.28.0"
} }
} }
}, },
@ -140,12 +140,12 @@
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
}, },
"IoTClient/1.0.22": { "IoTClient/1.0.28": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
"sha512": "sha512-UqkeoTFWpDiskvtuPiwdk7XLkvb2no1iJSE0sJusjccapbs6J5GPCf/0eGqu4ftlrHxG8E4fd7lgTA1R5Ztbgw==", "sha512": "sha512-C9H2L6dkYE2zk3XPNhYIQgPzu+vfaDUHWao3xt4kR0/PxHO7LP94i2hnJqh+tmB/+k2wULKkdy+g1RbJEIxOvQ==",
"path": "iotclient/1.0.22", "path": "iotclient/1.0.28",
"hashPath": "iotclient.1.0.22.nupkg.sha512" "hashPath": "iotclient.1.0.28.nupkg.sha512"
}, },
"Microsoft.NETCore.Platforms/3.0.0": { "Microsoft.NETCore.Platforms/3.0.0": {
"type": "package", "type": "package",

Binary file not shown.

Binary file not shown.

View File

@ -8,7 +8,7 @@
".NETCoreApp,Version=v6.0": { ".NETCoreApp,Version=v6.0": {
"DriverFanucHsl/1.0.0": { "DriverFanucHsl/1.0.0": {
"dependencies": { "dependencies": {
"HslCommunication": "11.0.0", "HslCommunication": "11.0.2",
"Newtonsoft.Json": "13.0.1", "Newtonsoft.Json": "13.0.1",
"PluginInterface": "1.0.0" "PluginInterface": "1.0.0"
}, },
@ -16,15 +16,15 @@
"DriverFanucHsl.dll": {} "DriverFanucHsl.dll": {}
} }
}, },
"HslCommunication/11.0.0": { "HslCommunication/11.0.2": {
"dependencies": { "dependencies": {
"Newtonsoft.Json": "13.0.1", "Newtonsoft.Json": "13.0.1",
"System.IO.Ports": "4.7.0" "System.IO.Ports": "4.7.0"
}, },
"runtime": { "runtime": {
"lib/netstandard2.1/HslCommunication.dll": { "lib/netstandard2.1/HslCommunication.dll": {
"assemblyVersion": "11.0.0.0", "assemblyVersion": "11.0.2.0",
"fileVersion": "11.0.0.0" "fileVersion": "11.0.2.0"
} }
} }
}, },
@ -142,12 +142,12 @@
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
}, },
"HslCommunication/11.0.0": { "HslCommunication/11.0.2": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
"sha512": "sha512-9JcbMka4dQ8251DCXIP9JExrIqmnt6b6/pX1ZFsdQ7/GQsPtfGMshvQDFUuSx8xf9+gADw3sFu5CDcpbFSQpZg==", "sha512": "sha512-5nZiUlp9yoZXjV0M+qGbIlyp2Zoyo8wHL2BY7BXe0PW4J7CdCxnJt+my0K/T5+AyXreM+MO+HvC1K0HIKVH42A==",
"path": "hslcommunication/11.0.0", "path": "hslcommunication/11.0.2",
"hashPath": "hslcommunication.11.0.0.nupkg.sha512" "hashPath": "hslcommunication.11.0.2.nupkg.sha512"
}, },
"Microsoft.NETCore.Platforms/3.1.0": { "Microsoft.NETCore.Platforms/3.1.0": {
"type": "package", "type": "package",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -8,21 +8,21 @@
".NETCoreApp,Version=v6.0": { ".NETCoreApp,Version=v6.0": {
"DriverMitsubishi/1.0.0": { "DriverMitsubishi/1.0.0": {
"dependencies": { "dependencies": {
"IoTClient": "1.0.22", "IoTClient": "1.0.28",
"PluginInterface": "1.0.0" "PluginInterface": "1.0.0"
}, },
"runtime": { "runtime": {
"DriverMitsubishi.dll": {} "DriverMitsubishi.dll": {}
} }
}, },
"IoTClient/1.0.22": { "IoTClient/1.0.28": {
"dependencies": { "dependencies": {
"System.IO.Ports": "4.6.0" "System.IO.Ports": "4.6.0"
}, },
"runtime": { "runtime": {
"lib/netstandard2.0/IoTClient.dll": { "lib/netstandard2.0/IoTClient.dll": {
"assemblyVersion": "1.0.22.0", "assemblyVersion": "1.0.28.0",
"fileVersion": "1.0.22.0" "fileVersion": "1.0.28.0"
} }
} }
}, },
@ -140,12 +140,12 @@
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
}, },
"IoTClient/1.0.22": { "IoTClient/1.0.28": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
"sha512": "sha512-UqkeoTFWpDiskvtuPiwdk7XLkvb2no1iJSE0sJusjccapbs6J5GPCf/0eGqu4ftlrHxG8E4fd7lgTA1R5Ztbgw==", "sha512": "sha512-C9H2L6dkYE2zk3XPNhYIQgPzu+vfaDUHWao3xt4kR0/PxHO7LP94i2hnJqh+tmB/+k2wULKkdy+g1RbJEIxOvQ==",
"path": "iotclient/1.0.22", "path": "iotclient/1.0.28",
"hashPath": "iotclient.1.0.22.nupkg.sha512" "hashPath": "iotclient.1.0.28.nupkg.sha512"
}, },
"Microsoft.NETCore.Platforms/3.0.0": { "Microsoft.NETCore.Platforms/3.0.0": {
"type": "package", "type": "package",

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,68 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"DriverOPCDaClient/1.0.0": {
"dependencies": {
"PluginInterface": "1.0.0",
"Interop.OPCAutomation": "1.0.0.0"
},
"runtime": {
"DriverOPCDaClient.dll": {}
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"PluginInterface/1.0.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1"
},
"runtime": {
"PluginInterface.dll": {}
}
},
"Interop.OPCAutomation/1.0.0.0": {
"runtime": {
"Interop.OPCAutomation.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.0.0.0"
}
}
}
}
},
"libraries": {
"DriverOPCDaClient/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
},
"PluginInterface/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Interop.OPCAutomation/1.0.0.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -8,13 +8,21 @@
".NETCoreApp,Version=v6.0": { ".NETCoreApp,Version=v6.0": {
"DriverOPCUaClient/1.0.0": { "DriverOPCUaClient/1.0.0": {
"dependencies": { "dependencies": {
"OPCFoundation.NetStandard.Opc.Ua.Client": "1.4.367.75", "OPCFoundation.NetStandard.Opc.Ua.Client": "1.4.369.30",
"PluginInterface": "1.0.0" "PluginInterface": "1.0.0"
}, },
"runtime": { "runtime": {
"DriverOPCUaClient.dll": {} "DriverOPCUaClient.dll": {}
} }
}, },
"Microsoft.Extensions.Logging.Abstractions/6.0.1": {
"runtime": {
"lib/net6.0/Microsoft.Extensions.Logging.Abstractions.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.322.12309"
}
}
},
"Newtonsoft.Json/13.0.1": { "Newtonsoft.Json/13.0.1": {
"runtime": { "runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": { "lib/netstandard2.0/Newtonsoft.Json.dll": {
@ -23,49 +31,50 @@
} }
} }
}, },
"OPCFoundation.NetStandard.Opc.Ua.Client/1.4.367.75": { "OPCFoundation.NetStandard.Opc.Ua.Client/1.4.369.30": {
"dependencies": { "dependencies": {
"OPCFoundation.NetStandard.Opc.Ua.Configuration": "1.4.367.75", "OPCFoundation.NetStandard.Opc.Ua.Configuration": "1.4.369.30",
"OPCFoundation.NetStandard.Opc.Ua.Core": "1.4.367.75" "OPCFoundation.NetStandard.Opc.Ua.Core": "1.4.369.30"
}, },
"runtime": { "runtime": {
"lib/net6.0/Opc.Ua.Client.dll": { "lib/net6.0/Opc.Ua.Client.dll": {
"assemblyVersion": "1.4.367.0", "assemblyVersion": "1.4.369.0",
"fileVersion": "1.4.367.75" "fileVersion": "1.4.369.30"
} }
} }
}, },
"OPCFoundation.NetStandard.Opc.Ua.Configuration/1.4.367.75": { "OPCFoundation.NetStandard.Opc.Ua.Configuration/1.4.369.30": {
"dependencies": { "dependencies": {
"OPCFoundation.NetStandard.Opc.Ua.Core": "1.4.367.75" "OPCFoundation.NetStandard.Opc.Ua.Core": "1.4.369.30"
}, },
"runtime": { "runtime": {
"lib/net6.0/Opc.Ua.Configuration.dll": { "lib/net6.0/Opc.Ua.Configuration.dll": {
"assemblyVersion": "1.4.367.0", "assemblyVersion": "1.4.369.0",
"fileVersion": "1.4.367.75" "fileVersion": "1.4.369.30"
} }
} }
}, },
"OPCFoundation.NetStandard.Opc.Ua.Core/1.4.367.75": { "OPCFoundation.NetStandard.Opc.Ua.Core/1.4.369.30": {
"dependencies": { "dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.1",
"Newtonsoft.Json": "13.0.1", "Newtonsoft.Json": "13.0.1",
"OPCFoundation.NetStandard.Opc.Ua.Security.Certificates": "1.4.367.75" "OPCFoundation.NetStandard.Opc.Ua.Security.Certificates": "1.4.369.30"
}, },
"runtime": { "runtime": {
"lib/net6.0/Opc.Ua.Core.dll": { "lib/net6.0/Opc.Ua.Core.dll": {
"assemblyVersion": "1.4.367.0", "assemblyVersion": "1.4.369.0",
"fileVersion": "1.4.367.75" "fileVersion": "1.4.369.30"
} }
} }
}, },
"OPCFoundation.NetStandard.Opc.Ua.Security.Certificates/1.4.367.75": { "OPCFoundation.NetStandard.Opc.Ua.Security.Certificates/1.4.369.30": {
"dependencies": { "dependencies": {
"System.Formats.Asn1": "6.0.0" "System.Formats.Asn1": "6.0.0"
}, },
"runtime": { "runtime": {
"lib/net6.0/Opc.Ua.Security.Certificates.dll": { "lib/net6.0/Opc.Ua.Security.Certificates.dll": {
"assemblyVersion": "1.4.367.0", "assemblyVersion": "1.4.369.0",
"fileVersion": "1.4.367.75" "fileVersion": "1.4.369.30"
} }
} }
}, },
@ -86,6 +95,13 @@
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
}, },
"Microsoft.Extensions.Logging.Abstractions/6.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-dzB2Cgg+JmrouhjkcQGzSFjjvpwlq353i8oBQO2GWNjCXSzhbtBRUf28HSauWe7eib3wYOdb3tItdjRwAdwCSg==",
"path": "microsoft.extensions.logging.abstractions/6.0.1",
"hashPath": "microsoft.extensions.logging.abstractions.6.0.1.nupkg.sha512"
},
"Newtonsoft.Json/13.0.1": { "Newtonsoft.Json/13.0.1": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
@ -93,33 +109,33 @@
"path": "newtonsoft.json/13.0.1", "path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512" "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
}, },
"OPCFoundation.NetStandard.Opc.Ua.Client/1.4.367.75": { "OPCFoundation.NetStandard.Opc.Ua.Client/1.4.369.30": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
"sha512": "sha512-Y1BF7xoDS0LPz5ksbfsKJbMvbeE4sXazgHwadfSTtrCixOzxwzZrBVo0k+LmI5z13uzIq0mMOA6mTNcdgnAxzA==", "sha512": "sha512-xJHIazzYwIjixJEm/3QSqobySQilJ6VDIAnkNsmSAn5N43AtB0mV5anLT+tg3BDPznYL5hIINIm/4Gt9kSWarQ==",
"path": "opcfoundation.netstandard.opc.ua.client/1.4.367.75", "path": "opcfoundation.netstandard.opc.ua.client/1.4.369.30",
"hashPath": "opcfoundation.netstandard.opc.ua.client.1.4.367.75.nupkg.sha512" "hashPath": "opcfoundation.netstandard.opc.ua.client.1.4.369.30.nupkg.sha512"
}, },
"OPCFoundation.NetStandard.Opc.Ua.Configuration/1.4.367.75": { "OPCFoundation.NetStandard.Opc.Ua.Configuration/1.4.369.30": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
"sha512": "sha512-4VtYqVSpmm4Pxfy5w40GJxuVLSBeTeyZwUf8dPp//g3Op4D0NCl5M7NYS5LW7a8FFJZHeRBfLsnaKmNkRFRhTA==", "sha512": "sha512-QXLG2eM4caw6Q9a50Pj3RjXFZa8lWQWu560+KtZ2NlHc4Bq4dRHkThK5JnP9yKcB6jsCSWKzIuh9fwoy+VO8Cw==",
"path": "opcfoundation.netstandard.opc.ua.configuration/1.4.367.75", "path": "opcfoundation.netstandard.opc.ua.configuration/1.4.369.30",
"hashPath": "opcfoundation.netstandard.opc.ua.configuration.1.4.367.75.nupkg.sha512" "hashPath": "opcfoundation.netstandard.opc.ua.configuration.1.4.369.30.nupkg.sha512"
}, },
"OPCFoundation.NetStandard.Opc.Ua.Core/1.4.367.75": { "OPCFoundation.NetStandard.Opc.Ua.Core/1.4.369.30": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
"sha512": "sha512-6yyKF1Kp/doU1P9iVDZ5rIaw2DQJeG5ce8uEGRqX2HnvD+TBMgKXcs0t2WxRJ47ISwcGzrqjONt/XFDxPv1vQQ==", "sha512": "sha512-SGFmPdZVFw42wLzi60Kdl4o3S6BFkNi02qgg1fr/3gDiYA5ZWdDAN0odZWtFoDK6eDQHSPjQv/r+nMBigoTuFw==",
"path": "opcfoundation.netstandard.opc.ua.core/1.4.367.75", "path": "opcfoundation.netstandard.opc.ua.core/1.4.369.30",
"hashPath": "opcfoundation.netstandard.opc.ua.core.1.4.367.75.nupkg.sha512" "hashPath": "opcfoundation.netstandard.opc.ua.core.1.4.369.30.nupkg.sha512"
}, },
"OPCFoundation.NetStandard.Opc.Ua.Security.Certificates/1.4.367.75": { "OPCFoundation.NetStandard.Opc.Ua.Security.Certificates/1.4.369.30": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
"sha512": "sha512-Az6TN1I0WfZnbUZG3OHJ8PEKxAk+jEm7Tm198xhLahP+wuGOYXReZeqK1pJGZB/oXybExUFYfryRGjZxBgVqOA==", "sha512": "sha512-SkyfvLeunJK008ysVg3Q3al77Q3rMJoqAti7MTjDnE/7viXy/IxSKGA24Foc+vIE4LmPqpdyKpgUE5j4nH+egQ==",
"path": "opcfoundation.netstandard.opc.ua.security.certificates/1.4.367.75", "path": "opcfoundation.netstandard.opc.ua.security.certificates/1.4.369.30",
"hashPath": "opcfoundation.netstandard.opc.ua.security.certificates.1.4.367.75.nupkg.sha512" "hashPath": "opcfoundation.netstandard.opc.ua.security.certificates.1.4.369.30.nupkg.sha512"
}, },
"System.Formats.Asn1/6.0.0": { "System.Formats.Asn1/6.0.0": {
"type": "package", "type": "package",

Binary file not shown.

Binary file not shown.

View File

@ -8,21 +8,21 @@
".NETCoreApp,Version=v6.0": { ".NETCoreApp,Version=v6.0": {
"DriverOmronFins/1.0.0": { "DriverOmronFins/1.0.0": {
"dependencies": { "dependencies": {
"IoTClient": "1.0.22", "IoTClient": "1.0.28",
"PluginInterface": "1.0.0" "PluginInterface": "1.0.0"
}, },
"runtime": { "runtime": {
"DriverOmronFins.dll": {} "DriverOmronFins.dll": {}
} }
}, },
"IoTClient/1.0.22": { "IoTClient/1.0.28": {
"dependencies": { "dependencies": {
"System.IO.Ports": "4.6.0" "System.IO.Ports": "4.6.0"
}, },
"runtime": { "runtime": {
"lib/netstandard2.0/IoTClient.dll": { "lib/netstandard2.0/IoTClient.dll": {
"assemblyVersion": "1.0.22.0", "assemblyVersion": "1.0.28.0",
"fileVersion": "1.0.22.0" "fileVersion": "1.0.28.0"
} }
} }
}, },
@ -140,12 +140,12 @@
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
}, },
"IoTClient/1.0.22": { "IoTClient/1.0.28": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
"sha512": "sha512-UqkeoTFWpDiskvtuPiwdk7XLkvb2no1iJSE0sJusjccapbs6J5GPCf/0eGqu4ftlrHxG8E4fd7lgTA1R5Ztbgw==", "sha512": "sha512-C9H2L6dkYE2zk3XPNhYIQgPzu+vfaDUHWao3xt4kR0/PxHO7LP94i2hnJqh+tmB/+k2wULKkdy+g1RbJEIxOvQ==",
"path": "iotclient/1.0.22", "path": "iotclient/1.0.28",
"hashPath": "iotclient.1.0.22.nupkg.sha512" "hashPath": "iotclient.1.0.28.nupkg.sha512"
}, },
"Microsoft.NETCore.Platforms/3.0.0": { "Microsoft.NETCore.Platforms/3.0.0": {
"type": "package", "type": "package",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.