新增三菱PLC、欧姆龙PLC、AB(罗克韦尔)PLC驱动;优化页面

This commit is contained in:
dd 2022-01-16 00:16:53 +08:00
parent 9d7aa0d235
commit abcdcd96ac
59 changed files with 1903 additions and 30 deletions

View File

@ -85,7 +85,27 @@
"ProjectGuid": "dabb562d-5eb7-4f9d-90ef-424c2bf63a4d", "ProjectGuid": "dabb562d-5eb7-4f9d-90ef-424c2bf63a4d",
"DisplayName": "DriverOPCUaClient", "DisplayName": "DriverOPCUaClient",
"ColorIndex": 15 "ColorIndex": 15
},
"0602dc6c-fb26-41b1-972e-298679826e3f": {
"ProjectGuid": "0602dc6c-fb26-41b1-972e-298679826e3f",
"DisplayName": "DriverMTConnect",
"ColorIndex": 0
},
"6d926cd7-5ff9-489b-9049-7030ae8059c9": {
"ProjectGuid": "6d926cd7-5ff9-489b-9049-7030ae8059c9",
"DisplayName": "DriverMitsubishi",
"ColorIndex": 1
},
"92e2bb84-c7ec-418e-879a-40b891cae6e7": {
"ProjectGuid": "92e2bb84-c7ec-418e-879a-40b891cae6e7",
"DisplayName": "DriverOmronFins",
"ColorIndex": 2
},
"c8c82c05-defd-4e79-9772-b5ea3d2e5d88": {
"ProjectGuid": "c8c82c05-defd-4e79-9772-b5ea3d2e5d88",
"DisplayName": "DriverAllenBradley",
"ColorIndex": 3
} }
}, },
"NextColorIndex": 0 "NextColorIndex": 4
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -9,12 +9,14 @@ using System.ComponentModel.DataAnnotations;
using IoTGateway.Model; using IoTGateway.Model;
using PluginInterface; using PluginInterface;
using Plugin; using Plugin;
using Newtonsoft.Json;
namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs
{ {
public partial class DeviceVariableListVM : BasePagedListVM<DeviceVariable_View, DeviceVariableSearcher> public partial class DeviceVariableListVM : BasePagedListVM<DeviceVariable_View, DeviceVariableSearcher>
{ {
public List<TreeSelectListItem> AllDevices { get; set; } public List<TreeSelectListItem> AllDevices { get; set; }
public List<LayuiTreeItem> DevicesTree { get; set; }
protected override List<GridAction> InitGridAction() protected override List<GridAction> InitGridAction()
{ {
return new List<GridAction> return new List<GridAction>
@ -36,15 +38,20 @@ namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs
.OrderBy(x => x.Parent.Index).ThenBy(x => x.Parent.DeviceName) .OrderBy(x => x.Parent.Index).ThenBy(x => x.Parent.DeviceName)
.OrderBy(x => x.Index).ThenBy(x => x.DeviceName) .OrderBy(x => x.Index).ThenBy(x => x.DeviceName)
.GetTreeSelectListItems(Wtm, x => x.DeviceName); .GetTreeSelectListItems(Wtm, x => x.DeviceName);
var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService;
foreach (var device in AllDevices) foreach (var device in AllDevices)
{ {
foreach (var item in device.Children) foreach (var item in device.Children)
{ {
var deviceThread = deviceService.DeviceThreads.Where(x => x.Device.ID.ToString() == (string)item.Value).FirstOrDefault();
item.Text = item.Text; item.Text = item.Text;
item.Icon = "layui-icon layui-icon-link"; item.Icon = deviceThread.Device.AutoStart ? (deviceThread.Driver.IsConnected ? "layui-icon-link" : "layui-icon-unlink") : "layui-icon-pause";
item.Expended = true; item.Expended = true;
} }
} }
DevicesTree = GetLayuiTree(AllDevices);
base.InitListVM(); base.InitListVM();
} }
protected override IEnumerable<IGridColumn<DeviceVariable_View>> InitGridHeader() protected override IEnumerable<IGridColumn<DeviceVariable_View>> InitGridHeader()
@ -114,6 +121,60 @@ namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs
return query; return query;
} }
private List<LayuiTreeItem> GetLayuiTree(List<TreeSelectListItem> tree, int level = 0)
{
List<LayuiTreeItem> rv = new List<LayuiTreeItem>();
foreach (var s in tree)
{
var news = new LayuiTreeItem
{
Id = (string)s.Value,
Title = s.Text,
Icon = s.Icon,
Url = s.Url,
Expand = s.Expended,
Level = level,
Checked = s.Selected
//Children = new List<LayuiTreeItem>()
};
if (s.Children != null && s.Children.Count > 0)
{
news.Children = GetLayuiTree(s.Children, level + 1);
if (news.Children.Where(x => x.Checked == true || x.Expand == true).Count() > 0)
{
news.Expand = true;
}
}
rv.Add(news);
}
return rv;
}
public class LayuiTreeItem
{
[JsonProperty(PropertyName = "title")]
public string Title { get; set; }
[JsonProperty(PropertyName = "icon")]
public string Icon { get; set; }
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
[JsonProperty(PropertyName = "children")]
public List<LayuiTreeItem> Children { get; set; }
[JsonProperty(PropertyName = "href")]
public string Url { get; set; }
[JsonProperty(PropertyName = "spread")]
public bool Expand { get; set; }
[JsonProperty(PropertyName = "checked")]
public bool Checked { get; set; }
[JsonProperty(PropertyName = "level")]
public int Level { get; set; }
}
} }
public class DeviceVariable_View : DeviceVariable public class DeviceVariable_View : DeviceVariable

View File

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 17
VisualStudioVersion = 16.0.31313.79 VisualStudioVersion = 17.0.31919.166
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTGateway", "IoTGateway\IoTGateway.csproj", "{68ABBDF2-1485-4756-9A94-6AFA874D69A3}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTGateway", "IoTGateway\IoTGateway.csproj", "{68ABBDF2-1485-4756-9A94-6AFA874D69A3}"
EndProject EndProject
@ -35,6 +35,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverOPCUaClient", "Plugin
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverMTConnect", "Plugins\Drivers\DriverMTConnect\DriverMTConnect.csproj", "{0602DC6C-FB26-41B1-972E-298679826E3F}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverMTConnect", "Plugins\Drivers\DriverMTConnect\DriverMTConnect.csproj", "{0602DC6C-FB26-41B1-972E-298679826E3F}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverMitsubishi", "Plugins\Drivers\DriverMitsubishi\DriverMitsubishi.csproj", "{6D926CD7-5FF9-489B-9049-7030AE8059C9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverOmronFins", "Plugins\Drivers\OmronFins\DriverOmronFins.csproj", "{92E2BB84-C7EC-418E-879A-40B891CAE6E7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverAllenBradley", "Plugins\Drivers\DriverAllenBradley\DriverAllenBradley.csproj", "{C8C82C05-DEFD-4E79-9772-B5EA3D2E5D88}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -93,6 +99,18 @@ Global
{0602DC6C-FB26-41B1-972E-298679826E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU {0602DC6C-FB26-41B1-972E-298679826E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0602DC6C-FB26-41B1-972E-298679826E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU {0602DC6C-FB26-41B1-972E-298679826E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0602DC6C-FB26-41B1-972E-298679826E3F}.Release|Any CPU.Build.0 = Release|Any CPU {0602DC6C-FB26-41B1-972E-298679826E3F}.Release|Any CPU.Build.0 = Release|Any CPU
{6D926CD7-5FF9-489B-9049-7030AE8059C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D926CD7-5FF9-489B-9049-7030AE8059C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D926CD7-5FF9-489B-9049-7030AE8059C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D926CD7-5FF9-489B-9049-7030AE8059C9}.Release|Any CPU.Build.0 = Release|Any CPU
{92E2BB84-C7EC-418E-879A-40B891CAE6E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92E2BB84-C7EC-418E-879A-40B891CAE6E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{92E2BB84-C7EC-418E-879A-40B891CAE6E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{92E2BB84-C7EC-418E-879A-40B891CAE6E7}.Release|Any CPU.Build.0 = Release|Any CPU
{C8C82C05-DEFD-4E79-9772-B5EA3D2E5D88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8C82C05-DEFD-4E79-9772-B5EA3D2E5D88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8C82C05-DEFD-4E79-9772-B5EA3D2E5D88}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8C82C05-DEFD-4E79-9772-B5EA3D2E5D88}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -108,6 +126,9 @@ Global
{B884FBE3-C8C5-471E-B629-12ECA0FC5DAC} = {52D96C24-2F2F-49B5-9F29-00414DEA41D8} {B884FBE3-C8C5-471E-B629-12ECA0FC5DAC} = {52D96C24-2F2F-49B5-9F29-00414DEA41D8}
{DABB562D-5EB7-4F9D-90EF-424C2BF63A4D} = {52D96C24-2F2F-49B5-9F29-00414DEA41D8} {DABB562D-5EB7-4F9D-90EF-424C2BF63A4D} = {52D96C24-2F2F-49B5-9F29-00414DEA41D8}
{0602DC6C-FB26-41B1-972E-298679826E3F} = {52D96C24-2F2F-49B5-9F29-00414DEA41D8} {0602DC6C-FB26-41B1-972E-298679826E3F} = {52D96C24-2F2F-49B5-9F29-00414DEA41D8}
{6D926CD7-5FF9-489B-9049-7030AE8059C9} = {52D96C24-2F2F-49B5-9F29-00414DEA41D8}
{92E2BB84-C7EC-418E-879A-40B891CAE6E7} = {52D96C24-2F2F-49B5-9F29-00414DEA41D8}
{C8C82C05-DEFD-4E79-9772-B5EA3D2E5D88} = {52D96C24-2F2F-49B5-9F29-00414DEA41D8}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1F219808-E6E8-4C1D-B846-41F2F7CF20FA} SolutionGuid = {1F219808-E6E8-4C1D-B846-41F2F7CF20FA}

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,6 +1,7 @@
/** /**
@Nametree 树组件 @Namelayui.tree
@Authorstar1029
@LicenseMIT @LicenseMIT
*/ */
@ -27,7 +28,7 @@ layui.define('form', function(exports){
return that; return that;
} }
//事件 //事件监听
,on: function(events, callback){ ,on: function(events, callback){
return layui.onevent.call(this, MOD_NAME, events, callback); return layui.onevent.call(this, MOD_NAME, events, callback);
} }
@ -183,7 +184,7 @@ layui.define('form', function(exports){
if(hasChild){ if(hasChild){
return '<span class="layui-tree-iconClick layui-tree-icon"><i class="layui-icon '+ (item.spread ? "layui-icon-subtraction" : "layui-icon-addition") +'"></i></span>'; return '<span class="layui-tree-iconClick layui-tree-icon"><i class="layui-icon '+ (item.spread ? "layui-icon-subtraction" : "layui-icon-addition") +'"></i></span>';
}else{ }else{
return '<span class="layui-tree-iconClick"><i class="layui-icon layui-icon-file"></i></span>'; return '<span class="layui-tree-iconClick"></span>';
}; };
}else{ }else{
return '<span class="layui-tree-iconClick"><i class="layui-tree-iconArrow '+ (hasChild ? "": HIDE) +'"></i></span>'; return '<span class="layui-tree-iconClick"><i class="layui-tree-iconArrow '+ (hasChild ? "": HIDE) +'"></i></span>';
@ -199,8 +200,9 @@ layui.define('form', function(exports){
,function(){ ,function(){
if(options.isJump && item.href){ if(options.isJump && item.href){
return '<a href="'+ item.href +'" target="_blank" class="'+ ELEM_TEXT +'">'+ (item.title || item.label || options.text.defaultNodeName) +'</a>'; return '<a href="'+ item.href +'" target="_blank" class="'+ ELEM_TEXT +'">'+ (item.title || item.label || options.text.defaultNodeName) +'</a>';
}else{ } else {
return '<span class="'+ ELEM_TEXT + (item.disabled ? ' '+ DISABLED : '') +'">'+ (item.title || item.label || options.text.defaultNodeName) +'</span>'; return '<span class="' + ELEM_TEXT + (item.disabled ? ' ' + DISABLED : '') + '"><i class="layui-icon ' + (item.icon || '') + '"></i>' + (item.title || item.label || options.text.defaultNodeName) + '</span>';
//return '<span class="' + ELEM_TEXT + (item.disabled ? ' ' + DISABLED : '') + '">' + (item.title || item.label || options.text.defaultNodeName) + '</span>';
} }
}() }()
,'</div>' ,'</div>'

View File

@ -0,0 +1,160 @@
using IoTClient.Clients.PLC;
using IoTClient.Enums;
using PluginInterface;
using System;
using System.Text;
namespace DriverAllenBradley
{
[DriverSupported("AllenBradley")]
[DriverInfoAttribute("AllenBradley", "V1.0.0", "Copyright WHD-IoTClient© 2022-01-15")]
public class AllenBradley : IDriver
{
private AllenBradleyClient plc = null;
#region
[ConfigParameter("设备Id")]
public Guid DeviceId { get; set; }
[ConfigParameter("IP地址")]
public string IpAddress { get; set; } = "127.0.0.1";
[ConfigParameter("端口号")]
public int Port { get; set; } = 44818;
[ConfigParameter("超时时间ms")]
public int Timeout { get; set; } = 3000;
[ConfigParameter("最小通讯周期ms")]
public uint MinPeriod { get; set; } = 3000;
#endregion
public AllenBradley(Guid deviceId)
{
DeviceId = deviceId;
}
public bool IsConnected
{
get
{
return plc != null && plc.Connected;
}
}
public bool Connect()
{
try
{
plc = new AllenBradleyClient(IpAddress, Port);
plc.Open();
}
catch (Exception)
{
return false;
}
return IsConnected;
}
public bool Close()
{
try
{
plc?.Close();
return !IsConnected;
}
catch (Exception)
{
return false;
}
}
public void Dispose()
{
try
{
plc = null;
}
catch (Exception)
{
}
}
[Method("读西门子PLC标准地址", description: "读西门子PLC标准地址")]
public DriverReturnValueModel Read(DriverAddressIoArgModel ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (plc != null && this.IsConnected)
{
try
{
switch (ioarg.ValueType)
{
case PluginInterface.DataTypeEnum.Bit:
ret.Value = plc.ReadBoolean(ioarg.Address).Value == true ? 1 : 0;
break;
case PluginInterface.DataTypeEnum.Bool:
ret.Value = plc.ReadBoolean(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.UByte:
ret.Value = plc.ReadByte(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Byte:
ret.Value = (sbyte)plc.ReadByte(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Uint16:
ret.Value =plc.ReadUInt16(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Int16:
ret.Value = plc.ReadInt16(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Uint32:
ret.Value =plc.ReadUInt32(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Int32:
ret.Value = plc.ReadInt32(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Float:
ret.Value = plc.ReadFloat(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Double:
ret.Value = plc.ReadDouble(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Uint64:
ret.Value = plc.ReadUInt64(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Int64:
ret.Value = plc.ReadInt64(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.AsciiString:
ret.Value = plc.ReadString(ioarg.Address);
break;
case PluginInterface.DataTypeEnum.Utf8String:
ret.Value = plc.ReadString(ioarg.Address);
break;
default:
break;
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
}
}

View File

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<OutputPath>../../../IoTGateway/bin/Debug/net5.0/drivers</OutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="IoTClient" Version="1.0.22" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\PluginInterface\PluginInterface.csproj" />
</ItemGroup>
</Project>

View File

@ -15,7 +15,7 @@ namespace DriverMTConnect
public string Uri { get; set; } public string Uri { get; set; }
[ConfigParameter("超时时间ms")] [ConfigParameter("超时时间ms")]
public uint Timeout { get; set; } = 3000; public int Timeout { get; set; } = 3000;
[ConfigParameter("最小通讯周期ms")] [ConfigParameter("最小通讯周期ms")]
public uint MinPeriod { get; set; } = 3000; public uint MinPeriod { get; set; } = 3000;
@ -51,6 +51,7 @@ namespace DriverMTConnect
try try
{ {
m_client = new EntityClient(Uri); m_client = new EntityClient(Uri);
m_client.RequestTimeout = Timeout;
IsConnected = true; IsConnected = true;
} }
catch (Exception) catch (Exception)

View File

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<OutputPath>../../../IoTGateway/bin/Debug/net5.0/drivers</OutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="IoTClient" Version="1.0.22" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\PluginInterface\PluginInterface.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,164 @@
using IoTClient.Clients.PLC;
using IoTClient.Enums;
using PluginInterface;
using System;
using System.Text;
namespace DriverMitsubishi
{
[DriverSupported("A_1E")]
[DriverSupported("Qna_3E")]
[DriverInfoAttribute("Mitsubishi", "V1.0.0", "Copyright WHD-IoTClient© 2022-01-15")]
public class Mitsubishi : IDriver
{
private MitsubishiClient plc = null;
#region
[ConfigParameter("设备Id")]
public Guid DeviceId { get; set; }
[ConfigParameter("PLC类型")]
public MitsubishiVersion CpuType { get; set; } = MitsubishiVersion.Qna_3E;
[ConfigParameter("IP地址")]
public string IpAddress { get; set; } = "127.0.0.1";
[ConfigParameter("端口号")]
public int Port { get; set; } = 6000;
[ConfigParameter("超时时间ms")]
public int Timeout { get; set; } = 3000;
[ConfigParameter("最小通讯周期ms")]
public uint MinPeriod { get; set; } = 3000;
#endregion
public Mitsubishi(Guid deviceId)
{
DeviceId = deviceId;
}
public bool IsConnected
{
get
{
return plc != null && plc.Connected;
}
}
public bool Connect()
{
try
{
plc = new MitsubishiClient(MitsubishiVersion.Qna_3E, IpAddress, Port);
plc.Open();
}
catch (Exception)
{
return false;
}
return IsConnected;
}
public bool Close()
{
try
{
plc?.Close();
return !IsConnected;
}
catch (Exception)
{
return false;
}
}
public void Dispose()
{
try
{
plc = null;
}
catch (Exception)
{
}
}
[Method("读西门子PLC标准地址", description: "读西门子PLC标准地址")]
public DriverReturnValueModel Read(DriverAddressIoArgModel ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (plc != null && this.IsConnected)
{
try
{
switch (ioarg.ValueType)
{
case PluginInterface.DataTypeEnum.Bit:
ret.Value = plc.ReadBoolean(ioarg.Address).Value == true ? 1 : 0;
break;
case PluginInterface.DataTypeEnum.Bool:
ret.Value = plc.ReadBoolean(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.UByte:
ret.Value = plc.ReadByte(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Byte:
ret.Value = (sbyte)plc.ReadByte(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Uint16:
ret.Value =plc.ReadUInt16(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Int16:
ret.Value = plc.ReadInt16(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Uint32:
ret.Value =plc.ReadUInt32(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Int32:
ret.Value = plc.ReadInt32(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Float:
ret.Value = plc.ReadFloat(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Double:
ret.Value = plc.ReadDouble(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Uint64:
ret.Value = plc.ReadUInt64(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Int64:
ret.Value = plc.ReadInt64(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.AsciiString:
ret.Value = plc.ReadString(ioarg.Address);
break;
case PluginInterface.DataTypeEnum.Utf8String:
ret.Value = plc.ReadString(ioarg.Address);
break;
default:
break;
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
}
}

View File

@ -57,7 +57,7 @@ namespace DriverModbusMaster
public byte SlaveAddress { get; set; } = 1; public byte SlaveAddress { get; set; } = 1;
[ConfigParameter("超时时间ms")] [ConfigParameter("超时时间ms")]
public uint Timeout { get; set; } = 3000; public int Timeout { get; set; } = 3000;
[ConfigParameter("最小通讯周期ms")] [ConfigParameter("最小通讯周期ms")]
public uint MinPeriod { get; set; } = 3000; public uint MinPeriod { get; set; } = 3000;
@ -101,43 +101,61 @@ namespace DriverModbusMaster
{ {
case Master_TYPE.Tcp: case Master_TYPE.Tcp:
clientTcp = new TcpClient(IpAddress.ToString(), Port); clientTcp = new TcpClient(IpAddress.ToString(), Port);
clientTcp.ReceiveTimeout = Timeout;
clientTcp.SendTimeout = Timeout;
master = ModbusIpMaster.CreateIp(clientTcp); master = ModbusIpMaster.CreateIp(clientTcp);
break; break;
case Master_TYPE.Udp: case Master_TYPE.Udp:
clientUdp = new UdpClient(IpAddress.ToString(), Port); clientUdp = new UdpClient(IpAddress.ToString(), Port);
clientUdp.Client.ReceiveTimeout = Timeout;
clientUdp.Client.SendTimeout = Timeout;
master = ModbusIpMaster.CreateIp(clientUdp); master = ModbusIpMaster.CreateIp(clientUdp);
break; break;
case Master_TYPE.Rtu: case Master_TYPE.Rtu:
port = new SerialPort(PortName, BaudRate, Parity, DataBits, StopBits); port = new SerialPort(PortName, BaudRate, Parity, DataBits, StopBits);
port.ReadTimeout = Timeout;
port.WriteTimeout = Timeout;
port.Open(); port.Open();
adapter = new SerialPortAdapter(port); adapter = new SerialPortAdapter(port);
master = ModbusSerialMaster.CreateRtu(adapter); master = ModbusSerialMaster.CreateRtu(adapter);
break; break;
case Master_TYPE.RtuOnTcp: case Master_TYPE.RtuOnTcp:
clientTcp = new TcpClient(IpAddress.ToString(), Port); clientTcp = new TcpClient(IpAddress.ToString(), Port);
clientTcp.ReceiveTimeout = Timeout;
clientTcp.SendTimeout = Timeout;
master = ModbusSerialMaster.CreateRtu(clientTcp); master = ModbusSerialMaster.CreateRtu(clientTcp);
break; break;
case Master_TYPE.RtuOnUdp: case Master_TYPE.RtuOnUdp:
clientUdp = new UdpClient(IpAddress.ToString(), Port); clientUdp = new UdpClient(IpAddress.ToString(), Port);
clientUdp.Client.ReceiveTimeout = Timeout;
clientUdp.Client.SendTimeout = Timeout;
master = ModbusSerialMaster.CreateRtu(clientUdp); master = ModbusSerialMaster.CreateRtu(clientUdp);
break; break;
case Master_TYPE.Ascii: case Master_TYPE.Ascii:
port = new SerialPort(PortName, BaudRate, Parity, DataBits, StopBits); port = new SerialPort(PortName, BaudRate, Parity, DataBits, StopBits);
port.ReadTimeout = Timeout;
port.WriteTimeout = Timeout;
port.Open(); port.Open();
adapter = new SerialPortAdapter(port); adapter = new SerialPortAdapter(port);
master = ModbusSerialMaster.CreateAscii(adapter); master = ModbusSerialMaster.CreateAscii(adapter);
break; break;
case Master_TYPE.AsciiOnTcp: case Master_TYPE.AsciiOnTcp:
clientTcp = new TcpClient(IpAddress.ToString(), Port); clientTcp = new TcpClient(IpAddress.ToString(), Port);
clientTcp.ReceiveTimeout = Timeout;
clientTcp.SendTimeout = Timeout;
master = ModbusSerialMaster.CreateAscii(clientTcp); master = ModbusSerialMaster.CreateAscii(clientTcp);
break; break;
case Master_TYPE.AsciiOnUdp: case Master_TYPE.AsciiOnUdp:
clientUdp = new UdpClient(IpAddress.ToString(), Port); clientUdp = new UdpClient(IpAddress.ToString(), Port);
clientUdp.Client.ReceiveTimeout = Timeout;
clientUdp.Client.SendTimeout = Timeout;
master = ModbusSerialMaster.CreateAscii(clientUdp); master = ModbusSerialMaster.CreateAscii(clientUdp);
break; break;
default: default:
break; break;
} }
master.Transport.ReadTimeout = Timeout;
master.Transport.WriteTimeout = Timeout;
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -224,6 +242,76 @@ namespace DriverModbusMaster
return ret; return ret;
} }
[Method("功能码:01", description: "ReadCoil读线圈")]
public DriverReturnValueModel ReadCoil(DriverAddressIoArgModel ioarg)
{
DriverReturnValueModel ret = new();
try
{
if (IsConnected)
{
var retBool = master.ReadCoils(SlaveAddress, ushort.Parse(ioarg.Address), 1)[0];
if (ioarg.ValueType == DataTypeEnum.Bit)
{
if (retBool)
ret.Value = 1;
else
ret.Value = 0;
}
else
ret.Value = retBool;
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "TCP连接异常";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.UnKnow;
ret.Message = ex.Message;
}
return ret;
}
[Method("功能码:02", description: "ReadInput读输入")]
public DriverReturnValueModel ReadInput(DriverAddressIoArgModel ioarg)
{
DriverReturnValueModel ret = new();
try
{
if (IsConnected)
{
var retBool = master.ReadInputs(SlaveAddress, ushort.Parse(ioarg.Address), 1)[0];
if (ioarg.ValueType == DataTypeEnum.Bit)
{
if (retBool)
ret.Value = 1;
else
ret.Value = 0;
}
else
ret.Value = retBool;
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "TCP连接异常";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.UnKnow;
ret.Message = ex.Message;
}
return ret;
}
[Method("Read方法样例", description: "Read方法样例描述")] [Method("Read方法样例", description: "Read方法样例描述")]
public DriverReturnValueModel Read(DriverAddressIoArgModel ioarg) public DriverReturnValueModel Read(DriverAddressIoArgModel ioarg)
{ {

View File

@ -25,7 +25,7 @@ namespace DriverOPCUaClient
public string Uri { get; set; } = "opc.tcp://localhost:62541/Quickstarts/ReferenceServer"; public string Uri { get; set; } = "opc.tcp://localhost:62541/Quickstarts/ReferenceServer";
[ConfigParameter("超时时间ms")] [ConfigParameter("超时时间ms")]
public uint Timeout { get; set; } = 3000; public int Timeout { get; set; } = 3000;
[ConfigParameter("最小通讯周期ms")] [ConfigParameter("最小通讯周期ms")]
public uint MinPeriod { get; set; } = 3000; public uint MinPeriod { get; set; } = 3000;
@ -36,7 +36,6 @@ namespace DriverOPCUaClient
{ {
DeviceId = deviceId; DeviceId = deviceId;
opcUaClient = new OpcUaClientHelper();
} }
@ -53,7 +52,8 @@ namespace DriverOPCUaClient
{ {
try try
{ {
opcUaClient.ConnectServer(Uri).Wait((int)Timeout); opcUaClient = new OpcUaClientHelper();
opcUaClient.ConnectServer(Uri).Wait(Timeout);
} }
catch (Exception) catch (Exception)
{ {

View File

@ -36,7 +36,7 @@ namespace DriverSiemensS7
public short Slot { get; set; } = 0; public short Slot { get; set; } = 0;
[ConfigParameter("超时时间ms")] [ConfigParameter("超时时间ms")]
public uint Timeout { get; set; } = 3000; public int Timeout { get; set; } = 3000;
[ConfigParameter("最小通讯周期ms")] [ConfigParameter("最小通讯周期ms")]
public uint MinPeriod { get; set; } = 3000; public uint MinPeriod { get; set; } = 3000;
@ -62,6 +62,8 @@ namespace DriverSiemensS7
try try
{ {
plc = new Plc(CpuType, IpAddress, Port, Rack, Slot); plc = new Plc(CpuType, IpAddress, Port, Rack, Slot);
plc.ReadTimeout = Timeout;
plc.WriteTimeout = Timeout;
plc.Open(); plc.Open();
} }
catch (Exception) catch (Exception)

View File

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<OutputPath>../../../IoTGateway/bin/Debug/net5.0/drivers</OutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="IoTClient" Version="1.0.22" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\PluginInterface\PluginInterface.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,160 @@
using IoTClient.Clients.PLC;
using IoTClient.Enums;
using PluginInterface;
using System;
using System.Text;
namespace DriverOmronFins
{
[DriverSupported("OmronFins")]
[DriverInfoAttribute("OmronFins", "V1.0.0", "Copyright WHD-IoTClient© 2022-01-15")]
public class OmronFins : IDriver
{
private OmronFinsClient plc = null;
#region
[ConfigParameter("设备Id")]
public Guid DeviceId { get; set; }
[ConfigParameter("IP地址")]
public string IpAddress { get; set; } = "127.0.0.1";
[ConfigParameter("端口号")]
public int Port { get; set; } = 6000;
[ConfigParameter("超时时间ms")]
public int Timeout { get; set; } = 3000;
[ConfigParameter("最小通讯周期ms")]
public uint MinPeriod { get; set; } = 3000;
#endregion
public OmronFins(Guid deviceId)
{
DeviceId = deviceId;
}
public bool IsConnected
{
get
{
return plc != null && plc.Connected;
}
}
public bool Connect()
{
try
{
plc = new OmronFinsClient(IpAddress, Port);
plc.Open();
}
catch (Exception)
{
return false;
}
return IsConnected;
}
public bool Close()
{
try
{
plc?.Close();
return !IsConnected;
}
catch (Exception)
{
return false;
}
}
public void Dispose()
{
try
{
plc = null;
}
catch (Exception)
{
}
}
[Method("读西门子PLC标准地址", description: "读西门子PLC标准地址")]
public DriverReturnValueModel Read(DriverAddressIoArgModel ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (plc != null && this.IsConnected)
{
try
{
switch (ioarg.ValueType)
{
case PluginInterface.DataTypeEnum.Bit:
ret.Value = plc.ReadBoolean(ioarg.Address).Value == true ? 1 : 0;
break;
case PluginInterface.DataTypeEnum.Bool:
ret.Value = plc.ReadBoolean(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.UByte:
ret.Value = plc.ReadByte(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Byte:
ret.Value = (sbyte)plc.ReadByte(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Uint16:
ret.Value =plc.ReadUInt16(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Int16:
ret.Value = plc.ReadInt16(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Uint32:
ret.Value =plc.ReadUInt32(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Int32:
ret.Value = plc.ReadInt32(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Float:
ret.Value = plc.ReadFloat(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Double:
ret.Value = plc.ReadDouble(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Uint64:
ret.Value = plc.ReadUInt64(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.Int64:
ret.Value = plc.ReadInt64(ioarg.Address).Value;
break;
case PluginInterface.DataTypeEnum.AsciiString:
ret.Value = plc.ReadString(ioarg.Address);
break;
case PluginInterface.DataTypeEnum.Utf8String:
ret.Value = plc.ReadString(ioarg.Address);
break;
default:
break;
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
}
}

View File

@ -6,7 +6,7 @@ namespace PluginInterface
{ {
public Guid DeviceId { get; } public Guid DeviceId { get; }
public bool IsConnected { get; } public bool IsConnected { get; }
public uint Timeout { get; } public int Timeout { get; }
public uint MinPeriod { get; } public uint MinPeriod { get; }
public bool Connect(); public bool Connect();
public bool Close(); public bool Close();

View File

@ -0,0 +1,233 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"DriverAllenBradley/1.0.0": {
"dependencies": {
"IoTClient": "1.0.22",
"PluginInterface": "1.0.0"
},
"runtime": {
"DriverAllenBradley.dll": {}
}
},
"IoTClient/1.0.22": {
"dependencies": {
"System.IO.Ports": "4.6.0"
},
"runtime": {
"lib/netstandard2.0/IoTClient.dll": {
"assemblyVersion": "1.0.22.0",
"fileVersion": "1.0.22.0"
}
}
},
"Microsoft.NETCore.Platforms/3.0.0": {},
"Microsoft.Win32.Registry/4.6.0": {
"dependencies": {
"System.Security.AccessControl": "4.6.0",
"System.Security.Principal.Windows": "4.6.0"
}
},
"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/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/linux-arm/native/System.IO.Ports.Native.so": {
"rid": "linux-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/linux-arm64/native/System.IO.Ports.Native.so": {
"rid": "linux-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/linux-x64/native/System.IO.Ports.Native.so": {
"rid": "linux-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.native.System.IO.Ports/4.6.0": {
"dependencies": {
"runtime.linux-arm.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14",
"runtime.linux-arm64.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14",
"runtime.linux-x64.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14",
"runtime.osx-x64.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14"
}
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/osx-x64/native/System.IO.Ports.Native.dylib": {
"rid": "osx-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"System.IO.Ports/4.6.0": {
"dependencies": {
"Microsoft.Win32.Registry": "4.6.0",
"runtime.native.System.IO.Ports": "4.6.0"
},
"runtime": {
"lib/netstandard2.0/System.IO.Ports.dll": {
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
}
},
"runtimeTargets": {
"runtimes/linux/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "linux",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
},
"runtimes/osx/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "osx",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
},
"runtimes/win/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
}
}
},
"System.Security.AccessControl/4.6.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.0.0",
"System.Security.Principal.Windows": "4.6.0"
}
},
"System.Security.Principal.Windows/4.6.0": {},
"PluginInterface/1.0.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1"
},
"runtime": {
"PluginInterface.dll": {}
}
}
}
},
"libraries": {
"DriverAllenBradley/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"IoTClient/1.0.22": {
"type": "package",
"serviceable": true,
"sha512": "sha512-UqkeoTFWpDiskvtuPiwdk7XLkvb2no1iJSE0sJusjccapbs6J5GPCf/0eGqu4ftlrHxG8E4fd7lgTA1R5Ztbgw==",
"path": "iotclient/1.0.22",
"hashPath": "iotclient.1.0.22.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/3.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-TsETIgVJb/AKoYfSP+iCxkuly5d3inZjTdx/ItZLk2CxY85v8083OBS3uai84kK3/baLnS5/b5XGs6zR7SuuHQ==",
"path": "microsoft.netcore.platforms/3.0.0",
"hashPath": "microsoft.netcore.platforms.3.0.0.nupkg.sha512"
},
"Microsoft.Win32.Registry/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Xuqo5Lf5h1eUAbT8sJwNSEgusyEcQQQcza1R8dxJ6q/1vLSU1SG/WxtgiCPAth14dz/IjBXCxWT/+6E9glX33w==",
"path": "microsoft.win32.registry/4.6.0",
"hashPath": "microsoft.win32.registry.4.6.0.nupkg.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/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-iPSWmmEhl0TNIVKHEOvgYEwpXoL7+KRxINcP9ni8JmfdeYPDVzTZXK/d0/1BxlLZIqXC3uMKjFhXFSFLxVlLAg==",
"path": "runtime.linux-arm.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.linux-arm.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Ii8t2RrqsHoBwnvpN8CwQYiukabVJnBYHE6ee/Yl+jKRpkbavlnA9pktxLQARsL1YJ4AKrNT/pAdQCuxTKECBA==",
"path": "runtime.linux-arm64.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"runtime.linux-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-zc0JugELjZ3MCPzYAroQyuTiChrw8lVUQlMc0bKolAsjpWcCECaLOLd9NRms1sfI52r4ILPvKFlqJwelc88Qhw==",
"path": "runtime.linux-x64.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.linux-x64.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"runtime.native.System.IO.Ports/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rbYF/0jSnO+Q6hY1/e/MGXG2MLMj7Enth1Euma85w/r1R+1u/kuEFYNc5bkqG8mpdY3EbVpGn5RTuRU0kVQ6rw==",
"path": "runtime.native.system.io.ports/4.6.0",
"hashPath": "runtime.native.system.io.ports.4.6.0.nupkg.sha512"
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-t2+r1sZd8zeBh7omYsd1ZnwxVZ8POBR1JmvcwUXK82R+XWtf2/RMFZenJFfuy1ii507hB79JvNCFj7ZF0+WhCQ==",
"path": "runtime.osx-x64.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.osx-x64.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"System.IO.Ports/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-9mh48ySrW31fi8JZdcXSKKSrtCH/ZgRkpOMYWwmN//KtCFGIgsyjxpft2wRKlGW/YHG70SG6Xsr/TCLf53fQOA==",
"path": "system.io.ports/4.6.0",
"hashPath": "system.io.ports.4.6.0.nupkg.sha512"
},
"System.Security.AccessControl/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-gmlk6khICtVhiUnVBBtlsH0H/5QFDqhTZgtpp3AX14wWE6OIE+BX95NLD+X4AolXnIy/oXpNNmXYnsNfW1KuDQ==",
"path": "system.security.accesscontrol/4.6.0",
"hashPath": "system.security.accesscontrol.4.6.0.nupkg.sha512"
},
"System.Security.Principal.Windows/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Mdukseovp0YIGaz16FMH6nbfgZkrCFOJbtXQptv0aeBO9h775Ilb9+TDwLVTKikoW7y7CY7lpoXl9zmZ5G3ndA==",
"path": "system.security.principal.windows/4.6.0",
"hashPath": "system.security.principal.windows.4.6.0.nupkg.sha512"
},
"PluginInterface/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,233 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"DriverMitsubishi/1.0.0": {
"dependencies": {
"IoTClient": "1.0.22",
"PluginInterface": "1.0.0"
},
"runtime": {
"DriverMitsubishi.dll": {}
}
},
"IoTClient/1.0.22": {
"dependencies": {
"System.IO.Ports": "4.6.0"
},
"runtime": {
"lib/netstandard2.0/IoTClient.dll": {
"assemblyVersion": "1.0.22.0",
"fileVersion": "1.0.22.0"
}
}
},
"Microsoft.NETCore.Platforms/3.0.0": {},
"Microsoft.Win32.Registry/4.6.0": {
"dependencies": {
"System.Security.AccessControl": "4.6.0",
"System.Security.Principal.Windows": "4.6.0"
}
},
"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/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/linux-arm/native/System.IO.Ports.Native.so": {
"rid": "linux-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/linux-arm64/native/System.IO.Ports.Native.so": {
"rid": "linux-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/linux-x64/native/System.IO.Ports.Native.so": {
"rid": "linux-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.native.System.IO.Ports/4.6.0": {
"dependencies": {
"runtime.linux-arm.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14",
"runtime.linux-arm64.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14",
"runtime.linux-x64.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14",
"runtime.osx-x64.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14"
}
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/osx-x64/native/System.IO.Ports.Native.dylib": {
"rid": "osx-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"System.IO.Ports/4.6.0": {
"dependencies": {
"Microsoft.Win32.Registry": "4.6.0",
"runtime.native.System.IO.Ports": "4.6.0"
},
"runtime": {
"lib/netstandard2.0/System.IO.Ports.dll": {
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
}
},
"runtimeTargets": {
"runtimes/linux/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "linux",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
},
"runtimes/osx/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "osx",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
},
"runtimes/win/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
}
}
},
"System.Security.AccessControl/4.6.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.0.0",
"System.Security.Principal.Windows": "4.6.0"
}
},
"System.Security.Principal.Windows/4.6.0": {},
"PluginInterface/1.0.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1"
},
"runtime": {
"PluginInterface.dll": {}
}
}
}
},
"libraries": {
"DriverMitsubishi/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"IoTClient/1.0.22": {
"type": "package",
"serviceable": true,
"sha512": "sha512-UqkeoTFWpDiskvtuPiwdk7XLkvb2no1iJSE0sJusjccapbs6J5GPCf/0eGqu4ftlrHxG8E4fd7lgTA1R5Ztbgw==",
"path": "iotclient/1.0.22",
"hashPath": "iotclient.1.0.22.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/3.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-TsETIgVJb/AKoYfSP+iCxkuly5d3inZjTdx/ItZLk2CxY85v8083OBS3uai84kK3/baLnS5/b5XGs6zR7SuuHQ==",
"path": "microsoft.netcore.platforms/3.0.0",
"hashPath": "microsoft.netcore.platforms.3.0.0.nupkg.sha512"
},
"Microsoft.Win32.Registry/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Xuqo5Lf5h1eUAbT8sJwNSEgusyEcQQQcza1R8dxJ6q/1vLSU1SG/WxtgiCPAth14dz/IjBXCxWT/+6E9glX33w==",
"path": "microsoft.win32.registry/4.6.0",
"hashPath": "microsoft.win32.registry.4.6.0.nupkg.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/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-iPSWmmEhl0TNIVKHEOvgYEwpXoL7+KRxINcP9ni8JmfdeYPDVzTZXK/d0/1BxlLZIqXC3uMKjFhXFSFLxVlLAg==",
"path": "runtime.linux-arm.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.linux-arm.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Ii8t2RrqsHoBwnvpN8CwQYiukabVJnBYHE6ee/Yl+jKRpkbavlnA9pktxLQARsL1YJ4AKrNT/pAdQCuxTKECBA==",
"path": "runtime.linux-arm64.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"runtime.linux-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-zc0JugELjZ3MCPzYAroQyuTiChrw8lVUQlMc0bKolAsjpWcCECaLOLd9NRms1sfI52r4ILPvKFlqJwelc88Qhw==",
"path": "runtime.linux-x64.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.linux-x64.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"runtime.native.System.IO.Ports/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rbYF/0jSnO+Q6hY1/e/MGXG2MLMj7Enth1Euma85w/r1R+1u/kuEFYNc5bkqG8mpdY3EbVpGn5RTuRU0kVQ6rw==",
"path": "runtime.native.system.io.ports/4.6.0",
"hashPath": "runtime.native.system.io.ports.4.6.0.nupkg.sha512"
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-t2+r1sZd8zeBh7omYsd1ZnwxVZ8POBR1JmvcwUXK82R+XWtf2/RMFZenJFfuy1ii507hB79JvNCFj7ZF0+WhCQ==",
"path": "runtime.osx-x64.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.osx-x64.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"System.IO.Ports/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-9mh48ySrW31fi8JZdcXSKKSrtCH/ZgRkpOMYWwmN//KtCFGIgsyjxpft2wRKlGW/YHG70SG6Xsr/TCLf53fQOA==",
"path": "system.io.ports/4.6.0",
"hashPath": "system.io.ports.4.6.0.nupkg.sha512"
},
"System.Security.AccessControl/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-gmlk6khICtVhiUnVBBtlsH0H/5QFDqhTZgtpp3AX14wWE6OIE+BX95NLD+X4AolXnIy/oXpNNmXYnsNfW1KuDQ==",
"path": "system.security.accesscontrol/4.6.0",
"hashPath": "system.security.accesscontrol.4.6.0.nupkg.sha512"
},
"System.Security.Principal.Windows/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Mdukseovp0YIGaz16FMH6nbfgZkrCFOJbtXQptv0aeBO9h775Ilb9+TDwLVTKikoW7y7CY7lpoXl9zmZ5G3ndA==",
"path": "system.security.principal.windows/4.6.0",
"hashPath": "system.security.principal.windows.4.6.0.nupkg.sha512"
},
"PluginInterface/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,233 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"DriverOmronFins/1.0.0": {
"dependencies": {
"IoTClient": "1.0.22",
"PluginInterface": "1.0.0"
},
"runtime": {
"DriverOmronFins.dll": {}
}
},
"IoTClient/1.0.22": {
"dependencies": {
"System.IO.Ports": "4.6.0"
},
"runtime": {
"lib/netstandard2.0/IoTClient.dll": {
"assemblyVersion": "1.0.22.0",
"fileVersion": "1.0.22.0"
}
}
},
"Microsoft.NETCore.Platforms/3.0.0": {},
"Microsoft.Win32.Registry/4.6.0": {
"dependencies": {
"System.Security.AccessControl": "4.6.0",
"System.Security.Principal.Windows": "4.6.0"
}
},
"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/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/linux-arm/native/System.IO.Ports.Native.so": {
"rid": "linux-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/linux-arm64/native/System.IO.Ports.Native.so": {
"rid": "linux-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/linux-x64/native/System.IO.Ports.Native.so": {
"rid": "linux-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.native.System.IO.Ports/4.6.0": {
"dependencies": {
"runtime.linux-arm.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14",
"runtime.linux-arm64.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14",
"runtime.linux-x64.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14",
"runtime.osx-x64.runtime.native.System.IO.Ports": "4.6.0-rc2.19462.14"
}
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"runtimeTargets": {
"runtimes/osx-x64/native/System.IO.Ports.Native.dylib": {
"rid": "osx-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"System.IO.Ports/4.6.0": {
"dependencies": {
"Microsoft.Win32.Registry": "4.6.0",
"runtime.native.System.IO.Ports": "4.6.0"
},
"runtime": {
"lib/netstandard2.0/System.IO.Ports.dll": {
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
}
},
"runtimeTargets": {
"runtimes/linux/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "linux",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
},
"runtimes/osx/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "osx",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
},
"runtimes/win/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.46214"
}
}
},
"System.Security.AccessControl/4.6.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.0.0",
"System.Security.Principal.Windows": "4.6.0"
}
},
"System.Security.Principal.Windows/4.6.0": {},
"PluginInterface/1.0.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1"
},
"runtime": {
"PluginInterface.dll": {}
}
}
}
},
"libraries": {
"DriverOmronFins/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"IoTClient/1.0.22": {
"type": "package",
"serviceable": true,
"sha512": "sha512-UqkeoTFWpDiskvtuPiwdk7XLkvb2no1iJSE0sJusjccapbs6J5GPCf/0eGqu4ftlrHxG8E4fd7lgTA1R5Ztbgw==",
"path": "iotclient/1.0.22",
"hashPath": "iotclient.1.0.22.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/3.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-TsETIgVJb/AKoYfSP+iCxkuly5d3inZjTdx/ItZLk2CxY85v8083OBS3uai84kK3/baLnS5/b5XGs6zR7SuuHQ==",
"path": "microsoft.netcore.platforms/3.0.0",
"hashPath": "microsoft.netcore.platforms.3.0.0.nupkg.sha512"
},
"Microsoft.Win32.Registry/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Xuqo5Lf5h1eUAbT8sJwNSEgusyEcQQQcza1R8dxJ6q/1vLSU1SG/WxtgiCPAth14dz/IjBXCxWT/+6E9glX33w==",
"path": "microsoft.win32.registry/4.6.0",
"hashPath": "microsoft.win32.registry.4.6.0.nupkg.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/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-iPSWmmEhl0TNIVKHEOvgYEwpXoL7+KRxINcP9ni8JmfdeYPDVzTZXK/d0/1BxlLZIqXC3uMKjFhXFSFLxVlLAg==",
"path": "runtime.linux-arm.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.linux-arm.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Ii8t2RrqsHoBwnvpN8CwQYiukabVJnBYHE6ee/Yl+jKRpkbavlnA9pktxLQARsL1YJ4AKrNT/pAdQCuxTKECBA==",
"path": "runtime.linux-arm64.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"runtime.linux-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-zc0JugELjZ3MCPzYAroQyuTiChrw8lVUQlMc0bKolAsjpWcCECaLOLd9NRms1sfI52r4ILPvKFlqJwelc88Qhw==",
"path": "runtime.linux-x64.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.linux-x64.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"runtime.native.System.IO.Ports/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rbYF/0jSnO+Q6hY1/e/MGXG2MLMj7Enth1Euma85w/r1R+1u/kuEFYNc5bkqG8mpdY3EbVpGn5RTuRU0kVQ6rw==",
"path": "runtime.native.system.io.ports/4.6.0",
"hashPath": "runtime.native.system.io.ports.4.6.0.nupkg.sha512"
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.6.0-rc2.19462.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-t2+r1sZd8zeBh7omYsd1ZnwxVZ8POBR1JmvcwUXK82R+XWtf2/RMFZenJFfuy1ii507hB79JvNCFj7ZF0+WhCQ==",
"path": "runtime.osx-x64.runtime.native.system.io.ports/4.6.0-rc2.19462.14",
"hashPath": "runtime.osx-x64.runtime.native.system.io.ports.4.6.0-rc2.19462.14.nupkg.sha512"
},
"System.IO.Ports/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-9mh48ySrW31fi8JZdcXSKKSrtCH/ZgRkpOMYWwmN//KtCFGIgsyjxpft2wRKlGW/YHG70SG6Xsr/TCLf53fQOA==",
"path": "system.io.ports/4.6.0",
"hashPath": "system.io.ports.4.6.0.nupkg.sha512"
},
"System.Security.AccessControl/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-gmlk6khICtVhiUnVBBtlsH0H/5QFDqhTZgtpp3AX14wWE6OIE+BX95NLD+X4AolXnIy/oXpNNmXYnsNfW1KuDQ==",
"path": "system.security.accesscontrol/4.6.0",
"hashPath": "system.security.accesscontrol.4.6.0.nupkg.sha512"
},
"System.Security.Principal.Windows/4.6.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Mdukseovp0YIGaz16FMH6nbfgZkrCFOJbtXQptv0aeBO9h775Ilb9+TDwLVTKikoW7y7CY7lpoXl9zmZ5G3ndA==",
"path": "system.security.principal.windows/4.6.0",
"hashPath": "system.security.principal.windows.4.6.0.nupkg.sha512"
},
"PluginInterface/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

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.

Binary file not shown.

Binary file not shown.

1
webscada-project Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long