Skip to content

Commit

Permalink
升级IoT架构
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Jul 12, 2023
1 parent 9b1973d commit 07b3449
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 4 additions & 6 deletions NewLife.Panasonic/Drivers/PanasonicDriver.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.ComponentModel;
using NewLife.IoT.Protocols;
using NewLife.Panasonic.Drivers;
using NewLife.Serialization;

namespace NewLife.IoT.Drivers;

Expand All @@ -18,12 +16,12 @@ public class PanasonicDriver : ModbusDriver, IDriver
/// </summary>
/// <param name="device">逻辑设备</param>
/// <param name="node">设备节点</param>
/// <param name="parameters">参数</param>
/// <param name="parameter">参数</param>
/// <returns></returns>
protected override Modbus CreateModbus(IDevice device, ModbusNode node, IDictionary<String, Object> parameters)
protected override Modbus CreateModbus(IDevice device, ModbusNode node, ModbusParameter parameter)
{
var p = JsonHelper.Convert<ModbusTcpParameter>(parameters);
if (p.Server.IsNullOrEmpty()) throw new ArgumentException("参数中未指定地址Server");
var p = parameter as ModbusTcpParameter;
if (p == null || p.Server.IsNullOrEmpty()) throw new ArgumentException("参数中未指定地址Server");

node.Parameter = p;

Expand Down
6 changes: 3 additions & 3 deletions NewLife.Panasonic/NewLife.Panasonic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NewLife.Core" Version="10.3.2023.503" />
<PackageReference Include="NewLife.IoT" Version="1.8.2023.511" />
<PackageReference Include="NewLife.Modbus" Version="1.6.2023.511" />
<PackageReference Include="NewLife.Core" Version="10.4.2023.707" />
<PackageReference Include="NewLife.IoT" Version="1.8.2023.711" />
<PackageReference Include="NewLife.Modbus" Version="1.6.2023.711-beta1735" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 07b3449

Please sign in to comment.