# Conflicts:
#	IoTGateway/iotgateway.db
#	Plugins/Plugin/DeviceService.cs
This commit is contained in:
liushoushan_notebook 2022-06-27 15:53:49 +08:00
commit f2cf7f95be
86 changed files with 14044 additions and 1210 deletions

View File

@ -97,9 +97,9 @@ namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs
var DapThread = deviceService.DeviceThreads.Where(x => x._device.ID == item.DeviceId).FirstOrDefault(); var DapThread = deviceService.DeviceThreads.Where(x => x._device.ID == item.DeviceId).FirstOrDefault();
if (DapThread?.DeviceValues != null && DapThread.DeviceValues.ContainsKey(item.ID)) if (DapThread?.DeviceValues != null && DapThread.DeviceValues.ContainsKey(item.ID))
{ {
item.Value = JsonConvert.SerializeObject(DapThread.DeviceValues[item.ID].Value); item.Value = DapThread?.DeviceValues[item.ID]?.Value?.ToString();
item.CookedValue = JsonConvert.SerializeObject(DapThread.DeviceValues[item.ID].CookedValue); item.CookedValue = DapThread?.DeviceValues[item.ID]?.CookedValue?.ToString();
item.State = DapThread.DeviceValues[item.ID].StatusType.ToString(); item.State = DapThread?.DeviceValues[item.ID]?.StatusType.ToString();
} }
} }

View File

@ -41,88 +41,172 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverSiemensS7", "Plugins\
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverOmronFins", "Plugins\Drivers\DriverOmronFins\DriverOmronFins.csproj", "{FE2BFDBD-E021-45EA-B327-C56F6114D7A1}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverOmronFins", "Plugins\Drivers\DriverOmronFins\DriverOmronFins.csproj", "{FE2BFDBD-E021-45EA-B327-C56F6114D7A1}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverFanuc", "Plugins\Drivers\DriverFanuc\DriverFanuc.csproj", "{EA652A3B-5F4A-47FE-A5DA-98A0EFC4F842}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverSimTcpClient", "Plugins\Drivers\DriverSimTcpClient\DriverSimTcpClient.csproj", "{F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DriverSimTcpClient", "Plugins\Drivers\DriverSimTcpClient\DriverSimTcpClient.csproj", "{F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverFanucHsl", "Plugins\Drivers\DriverFanucHsl\DriverFanucHsl.csproj", "{10D22B6E-DE30-4F11-A005-8188DF549F72}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverFanuc", "Plugins\Drivers\DriverFanuc\DriverFanuc.csproj", "{41F81606-1728-4A03-AE64-FA2CCF49BE5A}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Debug|Any CPU.Build.0 = Debug|Any CPU {1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Debug|x86.ActiveCfg = Debug|Any CPU
{1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Debug|x86.Build.0 = Debug|Any CPU
{1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Release|Any CPU.ActiveCfg = Release|Any CPU {1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Release|Any CPU.Build.0 = Release|Any CPU {1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Release|Any CPU.Build.0 = Release|Any CPU
{1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Release|x86.ActiveCfg = Release|Any CPU
{1F9122C1-19DE-4A8B-9A00-D59E592ECC3A}.Release|x86.Build.0 = Release|Any CPU
{44619988-9F09-4714-9532-A44FAF8275FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {44619988-9F09-4714-9532-A44FAF8275FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44619988-9F09-4714-9532-A44FAF8275FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {44619988-9F09-4714-9532-A44FAF8275FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44619988-9F09-4714-9532-A44FAF8275FE}.Debug|x86.ActiveCfg = Debug|Any CPU
{44619988-9F09-4714-9532-A44FAF8275FE}.Debug|x86.Build.0 = Debug|Any CPU
{44619988-9F09-4714-9532-A44FAF8275FE}.Release|Any CPU.ActiveCfg = Release|Any CPU {44619988-9F09-4714-9532-A44FAF8275FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44619988-9F09-4714-9532-A44FAF8275FE}.Release|Any CPU.Build.0 = Release|Any CPU {44619988-9F09-4714-9532-A44FAF8275FE}.Release|Any CPU.Build.0 = Release|Any CPU
{44619988-9F09-4714-9532-A44FAF8275FE}.Release|x86.ActiveCfg = Release|Any CPU
{44619988-9F09-4714-9532-A44FAF8275FE}.Release|x86.Build.0 = Release|Any CPU
{27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Debug|Any CPU.Build.0 = Debug|Any CPU {27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Debug|x86.ActiveCfg = Debug|Any CPU
{27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Debug|x86.Build.0 = Debug|Any CPU
{27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Release|Any CPU.ActiveCfg = Release|Any CPU {27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Release|Any CPU.Build.0 = Release|Any CPU {27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Release|Any CPU.Build.0 = Release|Any CPU
{27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Release|x86.ActiveCfg = Release|Any CPU
{27FF2D65-0BBA-4C69-9DD7-311A4F21541E}.Release|x86.Build.0 = Release|Any CPU
{E63C22D5-5F9B-4671-B115-40721B27F09F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E63C22D5-5F9B-4671-B115-40721B27F09F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E63C22D5-5F9B-4671-B115-40721B27F09F}.Debug|Any CPU.Build.0 = Debug|Any CPU {E63C22D5-5F9B-4671-B115-40721B27F09F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E63C22D5-5F9B-4671-B115-40721B27F09F}.Debug|x86.ActiveCfg = Debug|Any CPU
{E63C22D5-5F9B-4671-B115-40721B27F09F}.Debug|x86.Build.0 = Debug|Any CPU
{E63C22D5-5F9B-4671-B115-40721B27F09F}.Release|Any CPU.ActiveCfg = Release|Any CPU {E63C22D5-5F9B-4671-B115-40721B27F09F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E63C22D5-5F9B-4671-B115-40721B27F09F}.Release|Any CPU.Build.0 = Release|Any CPU {E63C22D5-5F9B-4671-B115-40721B27F09F}.Release|Any CPU.Build.0 = Release|Any CPU
{E63C22D5-5F9B-4671-B115-40721B27F09F}.Release|x86.ActiveCfg = Release|Any CPU
{E63C22D5-5F9B-4671-B115-40721B27F09F}.Release|x86.Build.0 = Release|Any CPU
{89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Debug|Any CPU.Build.0 = Debug|Any CPU {89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Debug|x86.ActiveCfg = Debug|Any CPU
{89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Debug|x86.Build.0 = Debug|Any CPU
{89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Release|Any CPU.ActiveCfg = Release|Any CPU {89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Release|Any CPU.Build.0 = Release|Any CPU {89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Release|Any CPU.Build.0 = Release|Any CPU
{89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Release|x86.ActiveCfg = Release|Any CPU
{89DE240E-5393-4DD4-87C9-3AD9D44B6E7E}.Release|x86.Build.0 = Release|Any CPU
{96D436B4-4703-4448-A879-B69ACE89CA11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {96D436B4-4703-4448-A879-B69ACE89CA11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96D436B4-4703-4448-A879-B69ACE89CA11}.Debug|Any CPU.Build.0 = Debug|Any CPU {96D436B4-4703-4448-A879-B69ACE89CA11}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96D436B4-4703-4448-A879-B69ACE89CA11}.Debug|x86.ActiveCfg = Debug|Any CPU
{96D436B4-4703-4448-A879-B69ACE89CA11}.Debug|x86.Build.0 = Debug|Any CPU
{96D436B4-4703-4448-A879-B69ACE89CA11}.Release|Any CPU.ActiveCfg = Release|Any CPU {96D436B4-4703-4448-A879-B69ACE89CA11}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96D436B4-4703-4448-A879-B69ACE89CA11}.Release|Any CPU.Build.0 = Release|Any CPU {96D436B4-4703-4448-A879-B69ACE89CA11}.Release|Any CPU.Build.0 = Release|Any CPU
{96D436B4-4703-4448-A879-B69ACE89CA11}.Release|x86.ActiveCfg = Release|Any CPU
{96D436B4-4703-4448-A879-B69ACE89CA11}.Release|x86.Build.0 = Release|Any CPU
{816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Debug|Any CPU.Build.0 = Debug|Any CPU {816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Debug|x86.ActiveCfg = Debug|Any CPU
{816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Debug|x86.Build.0 = Debug|Any CPU
{816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Release|Any CPU.ActiveCfg = Release|Any CPU {816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Release|Any CPU.Build.0 = Release|Any CPU {816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Release|Any CPU.Build.0 = Release|Any CPU
{816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Release|x86.ActiveCfg = Release|Any CPU
{816DDA22-F7E8-4FB2-83A4-0954A0EEEBBF}.Release|x86.Build.0 = Release|Any CPU
{5C12EBFB-B152-48C6-AA52-71128F246594}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5C12EBFB-B152-48C6-AA52-71128F246594}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C12EBFB-B152-48C6-AA52-71128F246594}.Debug|Any CPU.Build.0 = Debug|Any CPU {5C12EBFB-B152-48C6-AA52-71128F246594}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C12EBFB-B152-48C6-AA52-71128F246594}.Debug|x86.ActiveCfg = Debug|Any CPU
{5C12EBFB-B152-48C6-AA52-71128F246594}.Debug|x86.Build.0 = Debug|Any CPU
{5C12EBFB-B152-48C6-AA52-71128F246594}.Release|Any CPU.ActiveCfg = Release|Any CPU {5C12EBFB-B152-48C6-AA52-71128F246594}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C12EBFB-B152-48C6-AA52-71128F246594}.Release|Any CPU.Build.0 = Release|Any CPU {5C12EBFB-B152-48C6-AA52-71128F246594}.Release|Any CPU.Build.0 = Release|Any CPU
{5C12EBFB-B152-48C6-AA52-71128F246594}.Release|x86.ActiveCfg = Release|Any CPU
{5C12EBFB-B152-48C6-AA52-71128F246594}.Release|x86.Build.0 = Release|Any CPU
{7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Debug|Any CPU.Build.0 = Debug|Any CPU {7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Debug|x86.ActiveCfg = Debug|Any CPU
{7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Debug|x86.Build.0 = Debug|Any CPU
{7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Release|Any CPU.ActiveCfg = Release|Any CPU {7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Release|Any CPU.Build.0 = Release|Any CPU {7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Release|Any CPU.Build.0 = Release|Any CPU
{7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Release|x86.ActiveCfg = Release|Any CPU
{7752AD8C-04BF-4BD2-9272-CDA4F78FA954}.Release|x86.Build.0 = Release|Any CPU
{3106F31C-0502-42D3-A27B-BDD2199D72CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3106F31C-0502-42D3-A27B-BDD2199D72CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3106F31C-0502-42D3-A27B-BDD2199D72CC}.Debug|Any CPU.Build.0 = Debug|Any CPU {3106F31C-0502-42D3-A27B-BDD2199D72CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3106F31C-0502-42D3-A27B-BDD2199D72CC}.Debug|x86.ActiveCfg = Debug|Any CPU
{3106F31C-0502-42D3-A27B-BDD2199D72CC}.Debug|x86.Build.0 = Debug|Any CPU
{3106F31C-0502-42D3-A27B-BDD2199D72CC}.Release|Any CPU.ActiveCfg = Release|Any CPU {3106F31C-0502-42D3-A27B-BDD2199D72CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3106F31C-0502-42D3-A27B-BDD2199D72CC}.Release|Any CPU.Build.0 = Release|Any CPU {3106F31C-0502-42D3-A27B-BDD2199D72CC}.Release|Any CPU.Build.0 = Release|Any CPU
{3106F31C-0502-42D3-A27B-BDD2199D72CC}.Release|x86.ActiveCfg = Release|Any CPU
{3106F31C-0502-42D3-A27B-BDD2199D72CC}.Release|x86.Build.0 = Release|Any CPU
{8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Debug|Any CPU.Build.0 = Debug|Any CPU {8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Debug|x86.ActiveCfg = Debug|Any CPU
{8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Debug|x86.Build.0 = Debug|Any CPU
{8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Release|Any CPU.ActiveCfg = Release|Any CPU {8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Release|Any CPU.Build.0 = Release|Any CPU {8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Release|Any CPU.Build.0 = Release|Any CPU
{8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Release|x86.ActiveCfg = Release|Any CPU
{8919CDA5-23A6-4C04-87F9-C83DF4BEF357}.Release|x86.Build.0 = Release|Any CPU
{8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Debug|x86.ActiveCfg = Debug|Any CPU
{8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Debug|x86.Build.0 = Debug|Any CPU
{8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Release|Any CPU.Build.0 = Release|Any CPU {8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Release|Any CPU.Build.0 = Release|Any CPU
{8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Release|x86.ActiveCfg = Release|Any CPU
{8E2D91DC-DEE4-4843-8D09-6FC06651527E}.Release|x86.Build.0 = Release|Any CPU
{64D4C755-33DD-4103-908B-82FA63C5BFB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64D4C755-33DD-4103-908B-82FA63C5BFB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64D4C755-33DD-4103-908B-82FA63C5BFB2}.Debug|Any CPU.Build.0 = Debug|Any CPU {64D4C755-33DD-4103-908B-82FA63C5BFB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64D4C755-33DD-4103-908B-82FA63C5BFB2}.Debug|x86.ActiveCfg = Debug|Any CPU
{64D4C755-33DD-4103-908B-82FA63C5BFB2}.Debug|x86.Build.0 = Debug|Any CPU
{64D4C755-33DD-4103-908B-82FA63C5BFB2}.Release|Any CPU.ActiveCfg = Release|Any CPU {64D4C755-33DD-4103-908B-82FA63C5BFB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{64D4C755-33DD-4103-908B-82FA63C5BFB2}.Release|Any CPU.Build.0 = Release|Any CPU {64D4C755-33DD-4103-908B-82FA63C5BFB2}.Release|Any CPU.Build.0 = Release|Any CPU
{64D4C755-33DD-4103-908B-82FA63C5BFB2}.Release|x86.ActiveCfg = Release|Any CPU
{64D4C755-33DD-4103-908B-82FA63C5BFB2}.Release|x86.Build.0 = Release|Any CPU
{AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Debug|Any CPU.Build.0 = Debug|Any CPU {AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Debug|x86.ActiveCfg = Debug|Any CPU
{AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Debug|x86.Build.0 = Debug|Any CPU
{AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Release|Any CPU.ActiveCfg = Release|Any CPU {AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Release|Any CPU.Build.0 = Release|Any CPU {AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Release|Any CPU.Build.0 = Release|Any CPU
{AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Release|x86.ActiveCfg = Release|Any CPU
{AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6}.Release|x86.Build.0 = Release|Any CPU
{28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Debug|Any CPU.Build.0 = Debug|Any CPU {28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Debug|x86.ActiveCfg = Debug|Any CPU
{28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Debug|x86.Build.0 = Debug|Any CPU
{28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Release|Any CPU.ActiveCfg = Release|Any CPU {28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Release|Any CPU.Build.0 = Release|Any CPU {28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Release|Any CPU.Build.0 = Release|Any CPU
{28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Release|x86.ActiveCfg = Release|Any CPU
{28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2}.Release|x86.Build.0 = Release|Any CPU
{FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Debug|Any CPU.Build.0 = Debug|Any CPU {FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Debug|x86.ActiveCfg = Debug|Any CPU
{FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Debug|x86.Build.0 = Debug|Any CPU
{FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Release|Any CPU.ActiveCfg = Release|Any CPU {FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Release|Any CPU.Build.0 = Release|Any CPU {FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Release|Any CPU.Build.0 = Release|Any CPU
{EA652A3B-5F4A-47FE-A5DA-98A0EFC4F842}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Release|x86.ActiveCfg = Release|Any CPU
{EA652A3B-5F4A-47FE-A5DA-98A0EFC4F842}.Debug|Any CPU.Build.0 = Debug|Any CPU {FE2BFDBD-E021-45EA-B327-C56F6114D7A1}.Release|x86.Build.0 = Release|Any CPU
{EA652A3B-5F4A-47FE-A5DA-98A0EFC4F842}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EA652A3B-5F4A-47FE-A5DA-98A0EFC4F842}.Release|Any CPU.Build.0 = Release|Any CPU
{F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Debug|Any CPU.Build.0 = Debug|Any CPU {F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Debug|x86.ActiveCfg = Debug|Any CPU
{F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Debug|x86.Build.0 = Debug|Any CPU
{F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Release|Any CPU.ActiveCfg = Release|Any CPU {F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Release|Any CPU.Build.0 = Release|Any CPU {F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Release|Any CPU.Build.0 = Release|Any CPU
{F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Release|x86.ActiveCfg = Release|Any CPU
{F8EC5EDE-9A2C-443B-B125-E39C748EBB2F}.Release|x86.Build.0 = Release|Any CPU
{10D22B6E-DE30-4F11-A005-8188DF549F72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10D22B6E-DE30-4F11-A005-8188DF549F72}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10D22B6E-DE30-4F11-A005-8188DF549F72}.Debug|x86.ActiveCfg = Debug|Any CPU
{10D22B6E-DE30-4F11-A005-8188DF549F72}.Debug|x86.Build.0 = Debug|Any CPU
{10D22B6E-DE30-4F11-A005-8188DF549F72}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10D22B6E-DE30-4F11-A005-8188DF549F72}.Release|Any CPU.Build.0 = Release|Any CPU
{10D22B6E-DE30-4F11-A005-8188DF549F72}.Release|x86.ActiveCfg = Release|x86
{10D22B6E-DE30-4F11-A005-8188DF549F72}.Release|x86.Build.0 = Release|x86
{41F81606-1728-4A03-AE64-FA2CCF49BE5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41F81606-1728-4A03-AE64-FA2CCF49BE5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41F81606-1728-4A03-AE64-FA2CCF49BE5A}.Debug|x86.ActiveCfg = Debug|Any CPU
{41F81606-1728-4A03-AE64-FA2CCF49BE5A}.Debug|x86.Build.0 = Debug|Any CPU
{41F81606-1728-4A03-AE64-FA2CCF49BE5A}.Release|Any CPU.ActiveCfg = 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.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -141,8 +225,9 @@ Global
{AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1} {AAC81E6C-C62E-4F52-85B5-1EA8D54AE9F6} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1}
{28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1} {28FEF3AF-4CAA-4B5C-B16F-E74BAD70BCE2} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1}
{FE2BFDBD-E021-45EA-B327-C56F6114D7A1} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1} {FE2BFDBD-E021-45EA-B327-C56F6114D7A1} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1}
{EA652A3B-5F4A-47FE-A5DA-98A0EFC4F842} = {D05CFF72-D58C-418A-8F52-B06848DAC4F1}
{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}
{41F81606-1728-4A03-AE64-FA2CCF49BE5A} = {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

@ -50,6 +50,9 @@ namespace IoTGateway.Controllers
[ActionDescription("Sys.Create")] [ActionDescription("Sys.Create")]
public ActionResult Create(DeviceVariableVM vm) public ActionResult Create(DeviceVariableVM vm)
{ {
if (vm.FC.ContainsKey("Entity.Expressions"))
vm.Entity.Expressions = vm.FC["Entity.Expressions"].ToString();
if (!ModelState.IsValid) if (!ModelState.IsValid)
{ {
return PartialView(vm); return PartialView(vm);
@ -83,6 +86,8 @@ namespace IoTGateway.Controllers
[ValidateFormItemOnly] [ValidateFormItemOnly]
public ActionResult Edit(DeviceVariableVM vm) public ActionResult Edit(DeviceVariableVM vm)
{ {
if (vm.FC.ContainsKey("Entity.Expressions"))
vm.Entity.Expressions = vm.FC["Entity.Expressions"].ToString();
if (!ModelState.IsValid) if (!ModelState.IsValid)
{ {
return PartialView(vm); return PartialView(vm);

BIN
IoTGateway/Dll/Fwlib32.dll Normal file

Binary file not shown.

BIN
IoTGateway/Dll/Fwlib64.dll Normal file

Binary file not shown.

BIN
IoTGateway/Dll/fwlib30i.dll Normal file

Binary file not shown.

Binary file not shown.

BIN
IoTGateway/Dll/fwlibe1.dll Normal file

Binary file not shown.

BIN
IoTGateway/Dll/fwlibe64.dll Normal file

Binary file not shown.

View File

@ -1,41 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<CopyRefAssembliesToPublishDirectory>true</CopyRefAssembliesToPublishDirectory> <CopyRefAssembliesToPublishDirectory>true</CopyRefAssembliesToPublishDirectory>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<SatelliteResourceLanguages>zh-Hans,en</SatelliteResourceLanguages> <SatelliteResourceLanguages>zh-Hans,en</SatelliteResourceLanguages>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<CopyRefAssembliesToPublishDirectory>true</CopyRefAssembliesToPublishDirectory> <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<PlatformTarget>x86</PlatformTarget>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> </PropertyGroup>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="ClientApp\**" /> <Compile Remove="ClientApp\**" />
<Content Remove="ClientApp\**" /> <Content Remove="ClientApp\**" />
<EmbeddedResource Remove="ClientApp\**" /> <EmbeddedResource Remove="ClientApp\**" />
<None Remove="ClientApp\**" /> <None Remove="ClientApp\**" />
</ItemGroup> </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.1" />
<PackageReference Include="MQTTnet.AspNetCore" Version="3.1.1" /> <PackageReference Include="MQTTnet.AspNetCore" Version="3.1.1" />
<PackageReference Include="MQTTnet.Extensions.ManagedClient" Version="3.1.1" /> <PackageReference Include="MQTTnet.Extensions.ManagedClient" Version="3.1.1" />
<PackageReference Include="MQTTnet.Extensions.Rpc" Version="3.1.1" /> <PackageReference Include="MQTTnet.Extensions.Rpc" Version="3.1.1" />
<PackageReference Include="System.IO.Ports" Version="6.0.0" /> <PackageReference Include="System.IO.Ports" Version="6.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\IoTGateway.Model\IoTGateway.Model.csproj" /> <ProjectReference Include="..\IoTGateway.Model\IoTGateway.Model.csproj" />
<ProjectReference Include="..\IoTGateway.DataAccess\IoTGateway.DataAccess.csproj" /> <ProjectReference Include="..\IoTGateway.DataAccess\IoTGateway.DataAccess.csproj" />
<ProjectReference Include="..\IoTGateway.ViewModel\IoTGateway.ViewModel.csproj" /> <ProjectReference Include="..\IoTGateway.ViewModel\IoTGateway.ViewModel.csproj" />
<ProjectReference Include="..\WalkingTec.Mvvm\WalkingTec.Mvvm.Mvc\WalkingTec.Mvvm.Mvc.csproj" /> <ProjectReference Include="..\WalkingTec.Mvvm\WalkingTec.Mvvm.Mvc\WalkingTec.Mvvm.Mvc.csproj" />
<ProjectReference Include="..\WalkingTec.Mvvm\WalkingTec.Mvvm.TagHelpers.LayUI\WalkingTec.Mvvm.TagHelpers.LayUI.csproj" /> <ProjectReference Include="..\WalkingTec.Mvvm\WalkingTec.Mvvm.TagHelpers.LayUI\WalkingTec.Mvvm.TagHelpers.LayUI.csproj" />
</ItemGroup> </ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions> <ProjectExtensions>
<VisualStudio>
<UserProperties appsettings_1json__JsonSchema="" />
</VisualStudio>
</ProjectExtensions>
</Project> </Project>

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:\Repos\iotgateway\IoTGateway\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>FolderProfile</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

@ -4,17 +4,19 @@ 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>
<DeleteExistingFiles>True</DeleteExistingFiles> <DeleteExistingFiles>true</DeleteExistingFiles>
<ExcludeApp_Data>False</ExcludeApp_Data> <ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform> <LastUsedPlatform>x86</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider> <PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\net6.0\publish\</PublishUrl> <PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod> <WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish /> <SiteUrlToLaunchAfterPublish />
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<ProjectGuid>68abbdf2-1485-4756-9a94-6afa874d69a3</ProjectGuid> <ProjectGuid>68abbdf2-1485-4756-9a94-6afa874d69a3</ProjectGuid>
<SelfContained>false</SelfContained> <SelfContained>true</SelfContained>
<RuntimeIdentifier>linux-arm</RuntimeIdentifier>
<PublishTrimmed>false</PublishTrimmed>
</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:\Repos\iotgateway\IoTGateway\bin\Release\net6.0\publish\</_PublishTargetUrl> <_PublishTargetUrl>D:\000000-IIoTGateway\00000-iotgateway\IoTGateway\bin\Release\net6.0\publish\</_PublishTargetUrl>
<History>True|2022-01-24T15:31:28.3620602Z;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-06-09T07:43:47.6180879Z;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.

Binary file not shown.

Binary file not shown.

View File

@ -7,7 +7,7 @@ using System.Text;
namespace DriverAllenBradley namespace DriverAllenBradley
{ {
[DriverSupported("AllenBradley")] [DriverSupported("AllenBradley")]
[DriverInfoAttribute("AllenBradley", "V1.0.0", "Copyright WHD-IoTClient© 2022-01-15")] [DriverInfoAttribute("AllenBradley", "V1.0.0", "Copyright IoTGateway-IoTClient© 2022-01-15")]
public class AllenBradley : IDriver public class AllenBradley : IDriver
{ {
private AllenBradleyClient plc = null; private AllenBradleyClient plc = null;

View File

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

View File

@ -5,26 +5,9 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<None Remove="HslCommunication.dll" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="HslCommunication" Version="11.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\PluginInterface\PluginInterface.csproj" /> <ProjectReference Include="..\..\PluginInterface\PluginInterface.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Reference Include="HslCommunication">
<HintPath>HslCommunication.dll</HintPath>
</Reference>
</ItemGroup>
</Project> </Project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,309 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DriverFaunc
{
public class FanucFocas : Focas1
{
public static ushort h;
//下载程序 5-27
//开始
private static short dwnstart(ushort handle, short type)
{
return FanucFocas.cnc_dwnstart3(handle, type);
}
//结束
private static short dwnend(ushort handle)
{
return FanucFocas.cnc_dwnend3(handle);
}
//下载
private static short dwnload(ushort handle, ref int datalength, string data)
{
//开始下载程序 datalength将会被返回实际的输出的字符数量
return FanucFocas.cnc_download3(handle, ref datalength, data);
}
//获取详细的错误信息
private static short getdtailerr(ushort handle, FanucFocas.ODBERR odberr)
{
return FanucFocas.cnc_getdtailerr(handle, odberr);
}
//下载程序的入口点
/// <summary>
/// 向CNC下载指定类型的程序
/// </summary>
/// <param name="handle">句柄</param>
/// <param name="type">程序类型</param>
/// <param name="data">程序的内容</param>
/// <param name="odberr">保存返回错误信息的详细内容,为null不返回</param>
/// <returns>错误码</returns>
public static short download(ushort handle, short type, string data, FanucFocas.ODBERR odberr)
{
int datalength = data.Length;
short ret = dwnstart(handle, type);
if (ret == 0)
{
int olddata = datalength;
while (true)
{
ret = dwnload(handle, ref datalength, data);
//说明缓存已满或为空,继续尝试
if (ret == (short)FanucFocas.focas_ret.EW_BUFFER)
{
continue;
}
if (ret == FanucFocas.EW_OK)
{
//说明当前下载完成,temp记录剩余下载量
int temp = olddata - datalength;
if (temp <= 0)
{
break;
}
else
{
data = data.Substring(datalength, temp);
datalength = temp; olddata = temp;
}
}
else
{
//下载出现错误,解析出具体的错误信息
if (odberr != null)
{
getdtailerr(handle, odberr);
}
//下载出错
break;
}
}
//判断是哪里出的问题
if (ret == 0)
{
ret = dwnend(handle);
//结束下载出错
return ret;
}
else
{
dwnend(handle);
//下载出错
return ret;
}
}
else
{
dwnend(handle);
//开始下载出错
return ret;
}
}
//下载程序 5-27
//上传程序 5-28
//开始
private static short upstart(ushort handle, short type, int startno, int endno)
{
return cnc_upstart3(handle, type, startno, endno);
}
//上传
private static short uplod(ushort handle, int length, char[] databuf)
{
return cnc_upload3(handle, ref length, databuf);
}
//结束
private static short upend(ushort handle)
{
return cnc_upend3(handle);
}
//上传程序的入口
/// <summary>
/// 根据程序号读取指定程序
/// </summary>
/// <param name="handle">句柄</param>
/// <param name="type">类型</param>
/// <param name="no">程序号</param>
/// <param name="odberr">详细错误内容null不返回</param>
/// <param name="data">返回的程序内容</param>
/// <returns>错误码</returns>
public static short upload(ushort handle, short type, int no, ref string data, FanucFocas.ODBERR odberr)
{
int startno = no; int endno = no;
int length = 256; char[] databuf = new char[256];
short ret = upstart(handle, type, startno, endno);
if (ret == FanucFocas.EW_OK)
{
string temp = "";
while (true)
{
//上传
ret = uplod(handle, length, databuf);
temp = new string(databuf);
int one = temp.Length;
if (ret == (short)FanucFocas.focas_ret.EW_BUFFER)
{
continue;
}
if (ret == FanucFocas.EW_OK)
{
temp = temp.Replace("\0", "");
data += temp;
string lastchar = temp.Substring(temp.Length - 1, 1);
if (lastchar == "%")
{
break;
}
}
else
{
//下载出现错误,解析出具体的错误信息
if (odberr != null)
{
getdtailerr(handle, odberr);
}
//下载出错
break;
}
}
//判断是哪里出的问题
if (ret == 0)
{
ret = upend(handle);
//结束上传出错
return ret;
}
else
{
upend(handle);
//上传出错
return ret;
}
}
else
{
//开始出错
upend(handle);
return ret;
}
}
//上传程序 5-28
//根据alm_grp 编号 返回 提示内容 简
public static string getalmgrp(short no)
{
string ret = "";
switch (no)
{
case 0:
ret = "SW";
break;
case 1:
ret = "PW";
break;
case 2:
ret = "IO";
break;
case 3:
ret = "PS";
break;
case 4:
ret = "OT";
break;
case 5:
ret = "OH";
break;
case 6:
ret = "SV";
break;
case 7:
ret = "SR";
break;
case 8:
ret = "MC";
break;
case 9:
ret = "SP";
break;
case 10:
ret = "DS";
break;
case 11:
ret = "IE";
break;
case 12:
ret = "BG";
break;
case 13:
ret = "SN";
break;
case 14:
ret = "reserved";
break;
case 15:
ret = "EX";
break;
case 19:
ret = "PC";
break;
default:
ret = "Not used";
break;
}
return ret;
}
//根据alm_grp 编号 返回 提示内容 简
//2016-6-2 根据地址码和地址号,返回完整的显示信息
public static string getpmcadd(short a, ushort b)
{
string tempa = "";
switch (a)
{
case 0:
tempa = "G";
break;
case 1:
tempa = "F";
break;
case 2:
tempa = "Y";
break;
case 3:
tempa = "X";
break;
case 4:
tempa = "A";
break;
case 5:
tempa = "R";
break;
case 6:
tempa = "T";
break;
case 7:
tempa = "K";
break;
case 8:
tempa = "C";
break;
case 9:
tempa = "D";
break;
default:
tempa = "n";
break;
}
string tempb = b.ToString().PadLeft(4, '0');
return tempa + tempb;
}
//2016-6-2 根据地址码和地址号,返回完整的显示信息
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
<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>
<PackageReference Include="HslCommunication" Version="11.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\PluginInterface\PluginInterface.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,863 @@

using PluginInterface;
using System;
using System.Text;
using HslCommunication.CNC.Fanuc;
using HslCommunication;
namespace DriverFanucHsl
{
[DriverSupported("Fanuc-0i")]
[DriverInfoAttribute("Fanuc-0i", "V11.0.0", "Copyright HSL ")]
public class FanucHsl : IDriver
{
private FanucSeries0i fanuc;
#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; } = 8193;
[ConfigParameter("超时时间ms")]
public int Timeout { get; set; } = 3000;
[ConfigParameter("最小通讯周期ms")]
public uint MinPeriod { get; set; } = 3000;
#endregion
public FanucHsl(Guid deviceId)
{
// 授权示例 Authorization example
if (!Authorization.SetAuthorizationCode("输入你的授权号"))
{
//return; // 激活失败应该退出系统
}
DeviceId = deviceId;
}
public bool IsConnected
{
get
{
if (fanuc == null)
return false;
else
{
OperateResult<int[]> read = fanuc.ReadProgramList();
if (read.IsSuccess)
{
return true;
}
else
{
return false;
}
}
}
}
public bool Connect()
{
try
{
fanuc?.ConnectClose();
fanuc = new FanucSeries0i(IpAddress, Port);
return fanuc.ConnectServer().IsSuccess;
}
catch (Exception)
{
return false;
}
return IsConnected;
}
public bool Close()
{
try
{
fanuc.ConnectClose();
return !IsConnected;
}
catch (Exception)
{
return false;
}
}
public void Dispose()
{
}
[Method("Fanuc", description: "读系统状态")]
public DriverReturnValueModel ReadSysStatusInfo(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<SysStatusInfo> read = fanuc.ReadSysStatusInfo();
if (read.IsSuccess)
ret.Value = Newtonsoft.Json.JsonConvert.SerializeObject(read.Content);
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "读报警信息")]
public DriverReturnValueModel ReadSystemAlarm(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<SysAlarm[]> read = fanuc.ReadSystemAlarm();
if (read.IsSuccess)
ret.Value = Newtonsoft.Json.JsonConvert.SerializeObject(read.Content);
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "坐标数据")]
public DriverReturnValueModel ReadSysAllCoors(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<SysAllCoors> read = fanuc.ReadSysAllCoors();
if (read.IsSuccess)
ret.Value = Newtonsoft.Json.JsonConvert.SerializeObject(read.Content);
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "程序列表")]
public DriverReturnValueModel ReadProgramList(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<int[]> read = fanuc.ReadProgramList();
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "当前程序名")]
public DriverReturnValueModel ReadSystemProgramCurrent(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<string, int> read = fanuc.ReadSystemProgramCurrent();
if (read.IsSuccess)
ret.Value = Newtonsoft.Json.JsonConvert.SerializeObject(
new Dictionary<string, object>() { { "ProgramName", read.Content1 }, { "ProgramNo", read.Content2 } }
);
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "主轴转进速")]
public DriverReturnValueModel ReadSpindleSpeedAndFeedRate(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<double, double> read = fanuc.ReadSpindleSpeedAndFeedRate();
if (read.IsSuccess)
ret.Value = Newtonsoft.Json.JsonConvert.SerializeObject(
new Dictionary<string, object>() { { "SpindleSpeed", read.Content1 }, { "FeedRate", read.Content2 } }
);
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "伺服负载")]
public DriverReturnValueModel ReadFanucAxisLoad(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<double[]> read = fanuc.ReadFanucAxisLoad();
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "道具补偿")]
public DriverReturnValueModel ReadCutterInfos(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<CutterInfo[]> read = fanuc.ReadCutterInfos();
if (read.IsSuccess)
ret.Value = Newtonsoft.Json.JsonConvert.SerializeObject(read.Content);
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "程序路径")]
public DriverReturnValueModel ReadCurrentForegroundDir(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<string> read = fanuc.ReadCurrentForegroundDir();
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "工件尺寸")]
public DriverReturnValueModel ReadDeviceWorkPiecesSize(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<double[]> read = fanuc.ReadDeviceWorkPiecesSize();
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "报警代号")]
public DriverReturnValueModel ReadAlarmStatus(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<int> read = fanuc.ReadAlarmStatus();
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "机床时间")]
public DriverReturnValueModel ReadCurrentDateTime(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<DateTime> read = fanuc.ReadCurrentDateTime();
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "已加工数量")]
public DriverReturnValueModel ReadCurrentProduceCount(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<int> read = fanuc.ReadCurrentProduceCount();
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "总加工数量")]
public DriverReturnValueModel ReadExpectProduceCount(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<int> read = fanuc.ReadExpectProduceCount();
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "系统语言")]
public DriverReturnValueModel ReadLanguage(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<ushort> read = fanuc.ReadLanguage();
if (read.IsSuccess)
ret.Value = (LanguageType)read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "当前程序")]
public DriverReturnValueModel ReadCurrentProgram(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<string> read = fanuc.ReadCurrentProgram();
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "开机时间")]
public DriverReturnValueModel ReadOnLineTime(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<long> read = fanuc.ReadTimeData(0);
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "运行时间")]
public DriverReturnValueModel ReadRunTime(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<long> read = fanuc.ReadTimeData(1);
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "切割时间")]
public DriverReturnValueModel ReadCuttingTime(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<long> read = fanuc.ReadTimeData(2);
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "空闲时间")]
public DriverReturnValueModel ReadIdleTime(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<long> read = fanuc.ReadTimeData(3);
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "当前道具号")]
public DriverReturnValueModel ReadCutterNumber(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
OperateResult<int> read = fanuc.ReadCutterNumber();
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "读宏变量")]
public DriverReturnValueModel ReadSystemMacroValue(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
if (!int.TryParse(Ioarg.Address, out int address))
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"宏变量地址错误";
}
else
{
OperateResult<double> read = fanuc.ReadSystemMacroValue(address);
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = "连接失败";
}
return ret;
}
[Method("Fanuc", description: "读取程序")]
public DriverReturnValueModel ReadProgramAsync(DriverAddressIoArgModel Ioarg)
{
var ret = new DriverReturnValueModel { StatusType = VaribaleStatusTypeEnum.Good };
if (IsConnected)
{
try
{
if (!int.TryParse(Ioarg.Address, out int address))
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"程序号错误";
}
else
{
OperateResult<string> read = fanuc.ReadProgram(address);
if (read.IsSuccess)
ret.Value = read.Content;
else
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败";
}
}
}
catch (Exception ex)
{
ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.Message = $"读取失败,{ex.Message}";
}
}
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;
}
public DriverReturnValueModel Read(DriverAddressIoArgModel Ioarg)
{
throw new NotImplementedException();
}
private enum LanguageType
{
= 0,
= 1,
= 2,
= 3,
= 4,
= 6,
= 15,
= 16,
= 17
}
}
}

View File

@ -8,7 +8,7 @@ namespace DriverMitsubishi
{ {
[DriverSupported("A_1E")] [DriverSupported("A_1E")]
[DriverSupported("Qna_3E")] [DriverSupported("Qna_3E")]
[DriverInfoAttribute("Mitsubishi", "V1.0.0", "Copyright WHD-IoTClient© 2022-01-15")] [DriverInfoAttribute("Mitsubishi", "V1.0.0", "Copyright IoTGateway-IoTClient© 2022-01-15")]
public class Mitsubishi : IDriver public class Mitsubishi : IDriver
{ {
private MitsubishiClient plc = null; private MitsubishiClient plc = null;

View File

@ -13,7 +13,7 @@ namespace DriverModbusMaster
[DriverSupported("ModbusUDP")] [DriverSupported("ModbusUDP")]
[DriverSupported("ModbusRtu")] [DriverSupported("ModbusRtu")]
[DriverSupported("ModbusAscii")] [DriverSupported("ModbusAscii")]
[DriverInfoAttribute("ModbusMaster", "V1.0.0", "Copyright WHD© 2021-12-19")] [DriverInfoAttribute("ModbusMaster", "V1.0.0", "Copyright IoTGateway© 2021-12-19")]
public class ModbusMaster : IDriver public class ModbusMaster : IDriver
{ {
private TcpClient clientTcp = null; private TcpClient clientTcp = null;
@ -331,47 +331,70 @@ namespace DriverModbusMaster
{ {
DriverReturnValueModel ret = new() { StatusType = VaribaleStatusTypeEnum.Good }; DriverReturnValueModel ret = new() { StatusType = VaribaleStatusTypeEnum.Good };
if (!IsConnected) if (!IsConnected)
ret.StatusType = VaribaleStatusTypeEnum.Bad;
else
{ {
ushort startAddress;
if (!ushort.TryParse(ioarg.Address.Trim(), out startAddress)) ret.StatusType = VaribaleStatusTypeEnum.Bad;
ret.StatusType = VaribaleStatusTypeEnum.AddressError; 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))
{ {
var count = GetModbusReadCount(3, ioarg.ValueType); ret.StatusType = VaribaleStatusTypeEnum.AddressError;
try return ret;
{ }
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); var count = GetModbusReadCount(3, ioarg.ValueType);
if (ioarg.ValueType.ToString().Contains("Uint16")) if (ioarg.ValueType == DataTypeEnum.Any)
ret.Value = retBuffers[0]; {
else if (ioarg.ValueType.ToString().Contains("Int16")) count = 125;
ret.Value = (short)retBuffers[0]; if (userSetAddrArray.Length>1)
else if (ioarg.ValueType.ToString().Contains("Uint32")) {
ret.Value = (UInt32)(retBuffers[0] << 16) + retBuffers[1]; if(!ushort.TryParse(userSetAddrArray[1], out count))
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.Value = BitConverter.ToSingle(bytes, 0);
}
}
catch (Exception ex)
{ {
ret.StatusType = VaribaleStatusTypeEnum.Bad; //转换失败!
ret.Message = ex.Message; count = 125;
} }
} }
} }
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.Value = BitConverter.ToSingle(bytes, 0);
}
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;
} }
@ -388,6 +411,9 @@ 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"))
{ {

View File

@ -12,7 +12,7 @@ using OpcUaHelper;
namespace DriverOPCUaClient namespace DriverOPCUaClient
{ {
[DriverSupported("OPC UA")] [DriverSupported("OPC UA")]
[DriverInfoAttribute("OPCUaClient", "V1.0.0", "Copyright WHD© 2021-12-19")] [DriverInfoAttribute("OPCUaClient", "V1.0.0", "Copyright IoTGateway© 2021-12-19")]
public class OPCUaClient : IDriver public class OPCUaClient : IDriver
{ {
OpcUaClientHelper opcUaClient = null; OpcUaClientHelper opcUaClient = null;

View File

@ -7,7 +7,7 @@ using System.Text;
namespace DriverOmronFins namespace DriverOmronFins
{ {
[DriverSupported("OmronFins")] [DriverSupported("OmronFins")]
[DriverInfoAttribute("OmronFins", "V1.0.0", "Copyright WHD-IoTClient© 2022-01-15")] [DriverInfoAttribute("OmronFins", "V1.0.0", "Copyright IoTGateway-IoTClient© 2022-01-15")]
public class OmronFins : IDriver public class OmronFins : IDriver
{ {
private OmronFinsClient plc = null; private OmronFinsClient plc = null;

View File

@ -11,7 +11,7 @@ namespace DriverSiemensS7
[DriverSupported("300")] [DriverSupported("300")]
[DriverSupported("200")] [DriverSupported("200")]
[DriverSupported("200Smart")] [DriverSupported("200Smart")]
[DriverInfoAttribute("SiemensS7", "V1.0.0", "Copyright WHD© 2021-12-19")] [DriverInfoAttribute("SiemensS7", "V1.0.0", "Copyright IoTGateway© 2021-12-19")]
public class SiemensS7 : IDriver public class SiemensS7 : IDriver
{ {
private Plc plc = null; private Plc plc = null;

View File

@ -6,7 +6,7 @@ using System.Text;
namespace DriverSimTcpClient namespace DriverSimTcpClient
{ {
[DriverSupported("SimTcpServerDevice")] [DriverSupported("SimTcpServerDevice")]
[DriverInfoAttribute("SimTcpClient", "V1.0.0", "Copyright iotgateway© 2022-06-04")] [DriverInfoAttribute("SimTcpClient", "V1.0.0", "Copyright IoTGateway© 2022-06-04")]
public class SimTcpClient : IDriver public class SimTcpClient : IDriver
{ {
/// <summary> /// <summary>

View File

@ -1,16 +1,8 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using PluginInterface; using PluginInterface;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core; using WalkingTec.Mvvm.Core;
using IoTGateway.DataAccess; using IoTGateway.DataAccess;
using IoTGateway.Model; using IoTGateway.Model;
@ -82,70 +74,75 @@ namespace Plugin
{ {
try try
{ {
_logger.LogInformation($"CreateDeviceThread Start:{Device.DeviceName}"); _logger.LogInformation($"CreateDeviceThread Start:{Device.DeviceName},Driver:{Device.Driver}");
if (Device.Driver == null)
return;
using (var DC = new DataContext(connnectSetting, DBType)) using (var DC = new DataContext(connnectSetting, DBType))
{ {
var systemManage = DC.Set<SystemConfig>().FirstOrDefault(); var systemManage = DC.Set<SystemConfig>().FirstOrDefault();
var driver = _DrvierManager.DriverInfos.Where(x => x.Type.FullName == Device.Driver.AssembleName).SingleOrDefault(); var driver = _DrvierManager.DriverInfos.Where(x => x.Type.FullName == Device.Driver.AssembleName).SingleOrDefault();
if (driver == null) if (driver == null)
return; _logger.LogError($"找不到设备:[{Device.DeviceName}]的驱动:[{Device.Driver.AssembleName}]");
else
var settings = DC.Set<DeviceConfig>().Where(x => x.DeviceId == Device.ID).AsNoTracking().ToList();
Type[] types = new Type[1] { typeof(Guid) };
object[] param = new object[1] { Device.ID };
ConstructorInfo constructor = driver.Type.GetConstructor(types);
var DeviceObj = constructor.Invoke(param) as IDriver;
foreach (var p in driver.Type.GetProperties())
{ {
var config = p.GetCustomAttribute(typeof(ConfigParameterAttribute)); var settings = DC.Set<DeviceConfig>().Where(x => x.DeviceId == Device.ID).AsNoTracking().ToList();
var setting = settings.Where(x => x.DeviceConfigName == p.Name).FirstOrDefault(); Type[] types = new Type[1] { typeof(Guid) };
if (config == null || setting == null) object[] param = new object[1] { Device.ID };
continue;
object value = setting.Value; ConstructorInfo constructor = driver.Type.GetConstructor(types);
var DeviceObj = constructor.Invoke(param) as IDriver;
if (p.PropertyType == typeof(bool)) foreach (var p in driver.Type.GetProperties())
value = setting.Value == "0" ? false : true; {
else if (p.PropertyType == typeof(byte)) var config = p.GetCustomAttribute(typeof(ConfigParameterAttribute));
value = byte.Parse(setting.Value); var setting = settings.Where(x => x.DeviceConfigName == p.Name).FirstOrDefault();
else if (p.PropertyType == typeof(sbyte)) if (config == null || setting == null)
value = sbyte.Parse(setting.Value); continue;
else if (p.PropertyType == typeof(short))
value = short.Parse(setting.Value);
else if (p.PropertyType == typeof(ushort))
value = ushort.Parse(setting.Value);
else if (p.PropertyType == typeof(int))
value = int.Parse(setting.Value);
else if (p.PropertyType == typeof(uint))
value = uint.Parse(setting.Value);
else if (p.PropertyType == typeof(long))
value = long.Parse(setting.Value);
else if (p.PropertyType == typeof(ulong))
value = ulong.Parse(setting.Value);
else if (p.PropertyType == typeof(float))
value = float.Parse(setting.Value);
else if (p.PropertyType == typeof(double))
value = double.Parse(setting.Value);
else if (p.PropertyType == typeof(decimal))
value = decimal.Parse(setting.Value);
else if (p.PropertyType == typeof(Guid))
value = Guid.Parse(setting.Value);
else if (p.PropertyType == typeof(DateTime))
value = DateTime.Parse(setting.Value);
else if (p.PropertyType == typeof(string))
value = setting.Value;
else if (p.PropertyType == typeof(IPAddress))
value = IPAddress.Parse(setting.Value);
else if (p.PropertyType.BaseType == typeof(Enum))
value = Enum.Parse(p.PropertyType, setting.Value);
p.SetValue(DeviceObj, value); object value = setting.Value;
if (p.PropertyType == typeof(bool))
value = setting.Value != "0";
else if (p.PropertyType == typeof(byte))
value = byte.Parse(setting.Value);
else if (p.PropertyType == typeof(sbyte))
value = sbyte.Parse(setting.Value);
else if (p.PropertyType == typeof(short))
value = short.Parse(setting.Value);
else if (p.PropertyType == typeof(ushort))
value = ushort.Parse(setting.Value);
else if (p.PropertyType == typeof(int))
value = int.Parse(setting.Value);
else if (p.PropertyType == typeof(uint))
value = uint.Parse(setting.Value);
else if (p.PropertyType == typeof(long))
value = long.Parse(setting.Value);
else if (p.PropertyType == typeof(ulong))
value = ulong.Parse(setting.Value);
else if (p.PropertyType == typeof(float))
value = float.Parse(setting.Value);
else if (p.PropertyType == typeof(double))
value = double.Parse(setting.Value);
else if (p.PropertyType == typeof(decimal))
value = decimal.Parse(setting.Value);
else if (p.PropertyType == typeof(Guid))
value = Guid.Parse(setting.Value);
else if (p.PropertyType == typeof(DateTime))
value = DateTime.Parse(setting.Value);
else if (p.PropertyType == typeof(string))
value = setting.Value;
else if (p.PropertyType == typeof(IPAddress))
value = IPAddress.Parse(setting.Value);
else if (p.PropertyType.BaseType == typeof(Enum))
value = Enum.Parse(p.PropertyType, setting.Value);
p.SetValue(DeviceObj, value);
}
var deviceThread = new DeviceThread(Device, DeviceObj, systemManage.GatewayName, _MyMqttClient, interpreter, _MqttServer, _logger);
DeviceThreads.Add(deviceThread);
} }
var deviceThread = new DeviceThread(Device, DeviceObj, systemManage.GatewayName, _MyMqttClient, interpreter, _MqttServer, _logger);
DeviceThreads.Add(deviceThread);
} }
@ -159,17 +156,17 @@ namespace Plugin
} }
public void CreateDeviceThreads(List<Device> Devices) public void CreateDeviceThreads(List<Device> devices)
{ {
foreach (Device device in Devices) foreach (Device device in devices)
CreateDeviceThread(device); CreateDeviceThread(device);
} }
public void RemoveDeviceThread(Device Device) public void RemoveDeviceThread(Device devices)
{ {
if (Device != null) if (devices != null)
{ {
var DeviceThread = DeviceThreads.Where(x => x._device.ID == Device.ID).FirstOrDefault(); var DeviceThread = DeviceThreads.Where(x => x._device.ID == devices.ID).FirstOrDefault();
if (DeviceThread != null) if (DeviceThread != null)
{ {
DeviceThread.StopThread(); DeviceThread.StopThread();
@ -179,19 +176,19 @@ namespace Plugin
} }
} }
public void RemoveDeviceThreads(List<Device> Devices) public void RemoveDeviceThreads(List<Device> devices)
{ {
foreach (var device in Devices) foreach (var device in devices)
RemoveDeviceThread(device); RemoveDeviceThread(device);
} }
public List<ComboSelectListItem> GetDriverMethods(Guid? DeviceId) public List<ComboSelectListItem> GetDriverMethods(Guid? deviceId)
{ {
List<ComboSelectListItem> driverFilesComboSelect = new List<ComboSelectListItem>(); List<ComboSelectListItem> driverFilesComboSelect = new List<ComboSelectListItem>();
try try
{ {
_logger.LogInformation($"GetDriverMethods Start:{DeviceId}"); _logger.LogInformation($"GetDriverMethods Start:{deviceId}");
foreach (var method in DeviceThreads.Where(x => x._device.ID == DeviceId).FirstOrDefault()?.Methods) foreach (var method in DeviceThreads.Where(x => x._device.ID == deviceId).FirstOrDefault()?.Methods)
{ {
var Attribute = method.CustomAttributes.ToList().FirstOrDefault().ConstructorArguments; var Attribute = method.CustomAttributes.ToList().FirstOrDefault().ConstructorArguments;
var item = new ComboSelectListItem var item = new ComboSelectListItem
@ -201,12 +198,12 @@ namespace Plugin
}; };
driverFilesComboSelect.Add(item); driverFilesComboSelect.Add(item);
} }
_logger.LogInformation($"GetDriverMethods End:{DeviceId}"); _logger.LogInformation($"GetDriverMethods End:{deviceId}");
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogInformation($"GetDriverMethods Error:{DeviceId}"); _logger.LogInformation($"GetDriverMethods Error:{deviceId}");
} }
return driverFilesComboSelect; return driverFilesComboSelect;

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;", "&");
} }
} }

View File

@ -116,7 +116,7 @@ namespace Plugin
Client.SubscribeAsync("v1/gateway/attributes", MqttQualityOfServiceLevel.ExactlyOnce); Client.SubscribeAsync("v1/gateway/attributes", MqttQualityOfServiceLevel.ExactlyOnce);
break; break;
case IoTPlatformType.IoTSharp: case IoTPlatformType.IoTSharp:
Client.SubscribeAsync("devices/+/rpc/response/+/+", MqttQualityOfServiceLevel.ExactlyOnce); Client.SubscribeAsync("devices/+/rpc/request/+/+", MqttQualityOfServiceLevel.ExactlyOnce);
Client.SubscribeAsync("devices/+/attributes/update", MqttQualityOfServiceLevel.ExactlyOnce); Client.SubscribeAsync("devices/+/attributes/update", MqttQualityOfServiceLevel.ExactlyOnce);
//Message: {"device": "Device A", "data": {"attribute1": "value1", "attribute2": 42}} //Message: {"device": "Device A", "data": {"attribute1": "value1", "attribute2": 42}}
Client.SubscribeAsync("devices/+/attributes/response/+", MqttQualityOfServiceLevel.ExactlyOnce); Client.SubscribeAsync("devices/+/attributes/response/+", MqttQualityOfServiceLevel.ExactlyOnce);
@ -448,7 +448,7 @@ namespace Plugin
//是否变化 //是否变化
else else
{ {
if (JsonConvert.SerializeObject(SendModel[device.DeviceName]) != JsonConvert.SerializeObject(LastTelemetrys[device.DeviceName])) if (JsonConvert.SerializeObject(SendModel[device.DeviceName][0].Values) != JsonConvert.SerializeObject(LastTelemetrys[device.DeviceName][0].Values))
canPub = true; canPub = true;
} }
@ -463,7 +463,8 @@ namespace Plugin
canPub = true; canPub = true;
Console.WriteLine(e); Console.WriteLine(e);
} }
LastTelemetrys[device.DeviceName] = SendModel[device.DeviceName]; if(canPub)
LastTelemetrys[device.DeviceName] = SendModel[device.DeviceName];
return canPub; return canPub;
} }
public void PublishTelemetry(Device device, Dictionary<string, List<PayLoad>> SendModel) public void PublishTelemetry(Device device, Dictionary<string, List<PayLoad>> SendModel)
@ -496,19 +497,44 @@ namespace Plugin
break; break;
case IoTPlatformType.IotDB: case IoTPlatformType.IotDB:
{ {
foreach (var payload in SendModel[device.DeviceName]) if(Client.IsConnected)
{ {
if (payload.DeviceStatus != DeviceStatusTypeEnum.Good) foreach (var payload in SendModel[device.DeviceName])
continue;
IotTsData tsData = new IotTsData()
{ {
device = device.DeviceName, if (payload.DeviceStatus != DeviceStatusTypeEnum.Good)
timestamp = payload.TS, continue;
measurements = payload.Values.Keys.ToList(),
values = payload.Values.Values.ToList() var keylist= payload.Values.Keys.ToList();
}; var vallist = payload.Values.Values.ToList();
Client.PublishAsync(device.DeviceName, JsonConvert.SerializeObject(tsData)); IotTsData tsData = null;
if (keylist.Count==1&& vallist[0].GetType()== typeof(ushort[]))
{
var tempData = vallist[0] as ushort[];
tsData = new IotTsData()
{
device = device.DeviceName,
timestamp = payload.TS, measurements = new List<string>(), values=new List<dynamic>()
};
for (int i = 0; i < tempData.Length; i++)
{
tsData.measurements.Add(String.Format("{0}_{1}", keylist[0], i));
tsData.values.Add(tempData[i]);
}
}
else
{
tsData = new IotTsData()
{
device = device.DeviceName,
timestamp = payload.TS,
measurements = keylist,
values = vallist
};
}
if(tsData != null)
Client.PublishAsync(device.DeviceName, JsonConvert.SerializeObject(tsData));
}
} }
break; break;

View File

@ -47,6 +47,8 @@ namespace PluginInterface
TimeStampMs, TimeStampMs,
[Display(Name = "timestamp(s)")] [Display(Name = "timestamp(s)")]
TimeStampS, TimeStampS,
[Display(Name = "任意类型")]
Any,
[Display(Name = "自定义1")] [Display(Name = "自定义1")]
Custome1, Custome1,
[Display(Name = "自定义2")] [Display(Name = "自定义2")]

View File

@ -13,7 +13,7 @@ namespace PluginInterface.IotDB
{ {
public string device { get; set; } public string device { get; set; }
public List<string> measurements { get; set; } public List<string> measurements { get; set; }
public List<object> values { get; set; } public List<dynamic> values { get; set; }
public long timestamp { get; set; } public long timestamp { get; set; }
} }
} }

View File

@ -344,8 +344,9 @@ namespace WalkingTec.Mvvm.Core
/// <param name="updateAllFields">为true时框架会更新当前Entity的全部值为false时框架会检查Request.Form里的key只更新表单提交的字段</param> /// <param name="updateAllFields">为true时框架会更新当前Entity的全部值为false时框架会检查Request.Form里的key只更新表单提交的字段</param>
public virtual void DoEdit(bool updateAllFields = false) public virtual void DoEdit(bool updateAllFields = false)
{ {
DoEditPrepare(updateAllFields); DoEditPrepare(updateAllFields);
try try
{ {
DC.SaveChanges(); DC.SaveChanges();
@ -629,10 +630,11 @@ namespace WalkingTec.Mvvm.Core
string name = f.Replace("entity.", ""); string name = f.Replace("entity.", "");
try try
{ {
DC.UpdateProperty(Entity, pros.Where(x => x.Name.ToLower() == name).Select(x => x.Name).FirstOrDefault()); DC.UpdateProperty(Entity, pros.Where(x => name!="id" && x.Name.ToLower() == name).Select(x => x.Name).FirstOrDefault());//id字段不可修改
} }
catch (Exception) catch (Exception ex)
{ {
MSD.AddModelError("", CoreProgram._localizer?["Sys.EditPrepare"]);
} }
} }
} }

View File

@ -508,6 +508,8 @@ namespace WalkingTec.Mvvm.Core
public void UpdateProperty<T>(T entity, string fieldName) public void UpdateProperty<T>(T entity, string fieldName)
where T : TopBasePoco where T : TopBasePoco
{ {
if (string.IsNullOrEmpty(fieldName))
return;
var set = this.Set<T>(); var set = this.Set<T>();
if (set.Local.AsQueryable().CheckID(entity.GetID()).FirstOrDefault() == null) if (set.Local.AsQueryable().CheckID(entity.GetID()).FirstOrDefault() == null)
{ {

View File

@ -8,33 +8,12 @@
".NETCoreApp,Version=v6.0": { ".NETCoreApp,Version=v6.0": {
"DriverFanuc/1.0.0": { "DriverFanuc/1.0.0": {
"dependencies": { "dependencies": {
"HslCommunication": "11.0.0",
"Newtonsoft.Json": "13.0.1",
"PluginInterface": "1.0.0" "PluginInterface": "1.0.0"
}, },
"runtime": { "runtime": {
"DriverFanuc.dll": {} "DriverFanuc.dll": {}
} }
}, },
"HslCommunication/11.0.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"System.IO.Ports": "4.7.0"
},
"runtime": {
"lib/netstandard2.1/HslCommunication.dll": {
"assemblyVersion": "11.0.0.0",
"fileVersion": "11.0.0.0"
}
}
},
"Microsoft.NETCore.Platforms/3.1.0": {},
"Microsoft.Win32.Registry/4.7.0": {
"dependencies": {
"System.Security.AccessControl": "4.7.0",
"System.Security.Principal.Windows": "4.7.0"
}
},
"Newtonsoft.Json/13.0.1": { "Newtonsoft.Json/13.0.1": {
"runtime": { "runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": { "lib/netstandard2.0/Newtonsoft.Json.dll": {
@ -43,89 +22,6 @@
} }
} }
}, },
"runtime.linux-arm.runtime.native.System.IO.Ports/4.7.0": {
"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.7.0": {
"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.7.0": {
"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.7.0": {
"dependencies": {
"runtime.linux-arm.runtime.native.System.IO.Ports": "4.7.0",
"runtime.linux-arm64.runtime.native.System.IO.Ports": "4.7.0",
"runtime.linux-x64.runtime.native.System.IO.Ports": "4.7.0",
"runtime.osx-x64.runtime.native.System.IO.Ports": "4.7.0"
}
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.7.0": {
"runtimeTargets": {
"runtimes/osx-x64/native/System.IO.Ports.Native.dylib": {
"rid": "osx-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"System.IO.Ports/4.7.0": {
"dependencies": {
"Microsoft.Win32.Registry": "4.7.0",
"runtime.native.System.IO.Ports": "4.7.0"
},
"runtime": {
"lib/netstandard2.0/System.IO.Ports.dll": {
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
}
},
"runtimeTargets": {
"runtimes/linux/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "linux",
"assetType": "runtime",
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
},
"runtimes/osx/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "osx",
"assetType": "runtime",
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
},
"runtimes/win/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
}
}
},
"System.Security.AccessControl/4.7.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"System.Security.Principal.Windows": "4.7.0"
}
},
"System.Security.Principal.Windows/4.7.0": {},
"PluginInterface/1.0.0": { "PluginInterface/1.0.0": {
"dependencies": { "dependencies": {
"Newtonsoft.Json": "13.0.1" "Newtonsoft.Json": "13.0.1"
@ -142,27 +38,6 @@
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
}, },
"HslCommunication/11.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-9JcbMka4dQ8251DCXIP9JExrIqmnt6b6/pX1ZFsdQ7/GQsPtfGMshvQDFUuSx8xf9+gADw3sFu5CDcpbFSQpZg==",
"path": "hslcommunication/11.0.0",
"hashPath": "hslcommunication.11.0.0.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/3.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==",
"path": "microsoft.netcore.platforms/3.1.0",
"hashPath": "microsoft.netcore.platforms.3.1.0.nupkg.sha512"
},
"Microsoft.Win32.Registry/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KSrRMb5vNi0CWSGG1++id2ZOs/1QhRqROt+qgbEAdQuGjGrFcl4AOl4/exGPUYz2wUnU42nvJqon1T3U0kPXLA==",
"path": "microsoft.win32.registry/4.7.0",
"hashPath": "microsoft.win32.registry.4.7.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.1": { "Newtonsoft.Json/13.0.1": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
@ -170,62 +45,6 @@
"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"
}, },
"runtime.linux-arm.runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pCaX07mRrO11GfUb+whjn2AJgCofx26slw0sI3XC9v0pEZO8101iK6q4ymZOiI2M4a9sQxLr2LawAEDvF4RNXg==",
"path": "runtime.linux-arm.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.linux-arm.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/J6A4bexUUJciGUwrhtzrFW4tIHqoJYlCsz5RudRmqUaqvuG2tjrbn6bEopOFs7CU4gZqAKWcU9pkp180c3DkQ==",
"path": "runtime.linux-arm64.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.linux-x64.runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-aaaiH4ttfkLizo0OKf++5kPN0yxKbgzcyAD3w52Y3YP96aB/M79fm0r06SedXJGv86Iou6ipj3wUQBMFaL8LnQ==",
"path": "runtime.linux-x64.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.linux-x64.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-yidiZEGEIOyGnRkZvoV6XbeqzEBg9L47PyZNBymLIsu9HHseF98wiOxR6RnHmMqQMTBlc/EONfw4NT3pw0S6YQ==",
"path": "runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-c1h87v6gopjfeAu3WhVGguUhzCdpZFqX8oXrevO1ciuH4g/mFrxnzlo5POlp+TtZdQ1i8yu0ZzBMKbmX2bJJ0g==",
"path": "runtime.osx-x64.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.osx-x64.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-tNHiZcdskfRpxU7LBBlA69YYgBqWMBE/JDdmrEIDa4iw944VK1u4+B0FeSls1FUm+Pm4X/Fl0fSGqi8MDhb8/Q==",
"path": "system.io.ports/4.7.0",
"hashPath": "system.io.ports.4.7.0.nupkg.sha512"
},
"System.Security.AccessControl/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-JECvTt5aFF3WT3gHpfofL2MNNP6v84sxtXxpqhLBCcDRzqsPBmHhQ6shv4DwwN2tRlzsUxtb3G9M3763rbXKDg==",
"path": "system.security.accesscontrol/4.7.0",
"hashPath": "system.security.accesscontrol.4.7.0.nupkg.sha512"
},
"System.Security.Principal.Windows/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ojD0PX0XhneCsUbAZVKdb7h/70vyYMDYs85lwEI+LngEONe/17A0cFaRFqZU+sOEidcVswYWikYOQ9PPfjlbtQ==",
"path": "system.security.principal.windows/4.7.0",
"hashPath": "system.security.principal.windows.4.7.0.nupkg.sha512"
},
"PluginInterface/1.0.0": { "PluginInterface/1.0.0": {
"type": "project", "type": "project",
"serviceable": false, "serviceable": false,

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,235 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"DriverFanucHsl/1.0.0": {
"dependencies": {
"HslCommunication": "11.0.0",
"Newtonsoft.Json": "13.0.1",
"PluginInterface": "1.0.0"
},
"runtime": {
"DriverFanucHsl.dll": {}
}
},
"HslCommunication/11.0.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1",
"System.IO.Ports": "4.7.0"
},
"runtime": {
"lib/netstandard2.1/HslCommunication.dll": {
"assemblyVersion": "11.0.0.0",
"fileVersion": "11.0.0.0"
}
}
},
"Microsoft.NETCore.Platforms/3.1.0": {},
"Microsoft.Win32.Registry/4.7.0": {
"dependencies": {
"System.Security.AccessControl": "4.7.0",
"System.Security.Principal.Windows": "4.7.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.7.0": {
"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.7.0": {
"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.7.0": {
"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.7.0": {
"dependencies": {
"runtime.linux-arm.runtime.native.System.IO.Ports": "4.7.0",
"runtime.linux-arm64.runtime.native.System.IO.Ports": "4.7.0",
"runtime.linux-x64.runtime.native.System.IO.Ports": "4.7.0",
"runtime.osx-x64.runtime.native.System.IO.Ports": "4.7.0"
}
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.7.0": {
"runtimeTargets": {
"runtimes/osx-x64/native/System.IO.Ports.Native.dylib": {
"rid": "osx-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"System.IO.Ports/4.7.0": {
"dependencies": {
"Microsoft.Win32.Registry": "4.7.0",
"runtime.native.System.IO.Ports": "4.7.0"
},
"runtime": {
"lib/netstandard2.0/System.IO.Ports.dll": {
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
}
},
"runtimeTargets": {
"runtimes/linux/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "linux",
"assetType": "runtime",
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
},
"runtimes/osx/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "osx",
"assetType": "runtime",
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
},
"runtimes/win/lib/netstandard2.0/System.IO.Ports.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
}
}
},
"System.Security.AccessControl/4.7.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"System.Security.Principal.Windows": "4.7.0"
}
},
"System.Security.Principal.Windows/4.7.0": {},
"PluginInterface/1.0.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1"
},
"runtime": {
"PluginInterface.dll": {}
}
}
}
},
"libraries": {
"DriverFanucHsl/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"HslCommunication/11.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-9JcbMka4dQ8251DCXIP9JExrIqmnt6b6/pX1ZFsdQ7/GQsPtfGMshvQDFUuSx8xf9+gADw3sFu5CDcpbFSQpZg==",
"path": "hslcommunication/11.0.0",
"hashPath": "hslcommunication.11.0.0.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/3.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==",
"path": "microsoft.netcore.platforms/3.1.0",
"hashPath": "microsoft.netcore.platforms.3.1.0.nupkg.sha512"
},
"Microsoft.Win32.Registry/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KSrRMb5vNi0CWSGG1++id2ZOs/1QhRqROt+qgbEAdQuGjGrFcl4AOl4/exGPUYz2wUnU42nvJqon1T3U0kPXLA==",
"path": "microsoft.win32.registry/4.7.0",
"hashPath": "microsoft.win32.registry.4.7.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.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pCaX07mRrO11GfUb+whjn2AJgCofx26slw0sI3XC9v0pEZO8101iK6q4ymZOiI2M4a9sQxLr2LawAEDvF4RNXg==",
"path": "runtime.linux-arm.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.linux-arm.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/J6A4bexUUJciGUwrhtzrFW4tIHqoJYlCsz5RudRmqUaqvuG2tjrbn6bEopOFs7CU4gZqAKWcU9pkp180c3DkQ==",
"path": "runtime.linux-arm64.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.linux-x64.runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-aaaiH4ttfkLizo0OKf++5kPN0yxKbgzcyAD3w52Y3YP96aB/M79fm0r06SedXJGv86Iou6ipj3wUQBMFaL8LnQ==",
"path": "runtime.linux-x64.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.linux-x64.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-yidiZEGEIOyGnRkZvoV6XbeqzEBg9L47PyZNBymLIsu9HHseF98wiOxR6RnHmMqQMTBlc/EONfw4NT3pw0S6YQ==",
"path": "runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"runtime.osx-x64.runtime.native.System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-c1h87v6gopjfeAu3WhVGguUhzCdpZFqX8oXrevO1ciuH4g/mFrxnzlo5POlp+TtZdQ1i8yu0ZzBMKbmX2bJJ0g==",
"path": "runtime.osx-x64.runtime.native.system.io.ports/4.7.0",
"hashPath": "runtime.osx-x64.runtime.native.system.io.ports.4.7.0.nupkg.sha512"
},
"System.IO.Ports/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-tNHiZcdskfRpxU7LBBlA69YYgBqWMBE/JDdmrEIDa4iw944VK1u4+B0FeSls1FUm+Pm4X/Fl0fSGqi8MDhb8/Q==",
"path": "system.io.ports/4.7.0",
"hashPath": "system.io.ports.4.7.0.nupkg.sha512"
},
"System.Security.AccessControl/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-JECvTt5aFF3WT3gHpfofL2MNNP6v84sxtXxpqhLBCcDRzqsPBmHhQ6shv4DwwN2tRlzsUxtb3G9M3763rbXKDg==",
"path": "system.security.accesscontrol/4.7.0",
"hashPath": "system.security.accesscontrol.4.7.0.nupkg.sha512"
},
"System.Security.Principal.Windows/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ojD0PX0XhneCsUbAZVKdb7h/70vyYMDYs85lwEI+LngEONe/17A0cFaRFqZU+sOEidcVswYWikYOQ9PPfjlbtQ==",
"path": "system.security.principal.windows/4.7.0",
"hashPath": "system.security.principal.windows.4.7.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.

View File

@ -0,0 +1,70 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"DriverSimTcpClient/1.0.0": {
"dependencies": {
"PluginInterface": "1.0.0",
"SimpleTCP.Core": "1.0.4"
},
"runtime": {
"DriverSimTcpClient.dll": {}
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"SimpleTCP.Core/1.0.4": {
"runtime": {
"lib/netstandard2.0/SimpleTCP.Core.dll": {
"assemblyVersion": "1.0.4.0",
"fileVersion": "1.0.4.0"
}
}
},
"PluginInterface/1.0.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1"
},
"runtime": {
"PluginInterface.dll": {}
}
}
}
},
"libraries": {
"DriverSimTcpClient/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"
},
"SimpleTCP.Core/1.0.4": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IOZ3lyf+kdaOSbuIY/BAcDlAekPtSCYJCrD0QoihtdiY+7kB/5sUa8hfKuNUWXhZ322Bl4Xvej+Jay3eTDCgNA==",
"path": "simpletcp.core/1.0.4",
"hashPath": "simpletcp.core.1.0.4.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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.