调整调试页面
This commit is contained in:
@@ -81,6 +81,15 @@ dotnet_diagnostic.CA2208.severity = none
|
||||
# IDE0057: 使用范围运算符
|
||||
dotnet_diagnostic.IDE0057.severity = none
|
||||
|
||||
# IDE0056: 使用索引运算符
|
||||
dotnet_diagnostic.IDE0056.severity = none
|
||||
|
||||
# CA1830: 最好使用 StringBuilder 的强类型 Append 和 Insert 方法重载
|
||||
dotnet_diagnostic.CA1830.severity = none
|
||||
|
||||
# CA1847: 将字符型文本用于单个字符查找
|
||||
dotnet_diagnostic.CA1847.severity = none
|
||||
|
||||
[*.vb]
|
||||
#### 命名样式 ####
|
||||
|
||||
|
||||
@@ -78,8 +78,7 @@ public partial class SerialClientPage
|
||||
/// <inheritdoc/>
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
config?.Dispose();
|
||||
config = new TouchSocketConfig();
|
||||
config ??= new TouchSocketConfig();
|
||||
var LogMessage = new TouchSocket.Core.LoggerGroup() { LogLevel = TouchSocket.Core.LogLevel.Trace };
|
||||
LogMessage.AddLogger(new EasyLogger(LogOut) { LogLevel = TouchSocket.Core.LogLevel.Trace });
|
||||
config.ConfigureContainer(a => a.RegisterSingleton<ILog>(LogMessage));
|
||||
|
||||
@@ -78,8 +78,7 @@ public partial class TcpClientPage
|
||||
/// <returns></returns>
|
||||
public TcpClientEx GetTcpClient()
|
||||
{
|
||||
config?.Dispose();
|
||||
config = new TouchSocketConfig();
|
||||
config ??= new TouchSocketConfig();
|
||||
var LogMessage = new TouchSocket.Core.LoggerGroup() { LogLevel = TouchSocket.Core.LogLevel.Trace };
|
||||
LogMessage.AddLogger(new EasyLogger(LogOut) { LogLevel = TouchSocket.Core.LogLevel.Trace });
|
||||
config.ConfigureContainer(a => a.RegisterSingleton<ILog>(LogMessage));
|
||||
|
||||
@@ -67,8 +67,7 @@ public partial class TcpServerPage
|
||||
/// <returns></returns>
|
||||
public TcpService GetTcpServer()
|
||||
{
|
||||
config?.Dispose();
|
||||
config = new TouchSocketConfig();
|
||||
config ??= new TouchSocketConfig();
|
||||
var LogMessage = new TouchSocket.Core.LoggerGroup() { LogLevel = TouchSocket.Core.LogLevel.Trace };
|
||||
LogMessage.AddLogger(new EasyLogger(LogOut) { LogLevel = TouchSocket.Core.LogLevel.Trace });
|
||||
config.ConfigureContainer(a => a.RegisterSingleton<ILog>(LogMessage));
|
||||
|
||||
@@ -67,8 +67,7 @@ public partial class UdpSessionPage : IDisposable
|
||||
/// <returns></returns>
|
||||
public UdpSession GetUdpSession()
|
||||
{
|
||||
config?.Dispose();
|
||||
config = new TouchSocketConfig();
|
||||
config ??= new TouchSocketConfig();
|
||||
var LogMessage = new TouchSocket.Core.LoggerGroup() { LogLevel = TouchSocket.Core.LogLevel.Trace };
|
||||
LogMessage.AddLogger(new EasyLogger(LogOut) { LogLevel = TouchSocket.Core.LogLevel.Trace });
|
||||
config.ConfigureContainer(a => a.RegisterSingleton<ILog>(LogMessage));
|
||||
|
||||
@@ -24,10 +24,8 @@ public abstract class ReadWriteDevicesUdpBase : ReadWriteDevicesClientBase
|
||||
/// <inheritdoc cref="ReadWriteDevicesUdpBase"/>
|
||||
public ReadWriteDevicesUdpBase(UdpSession udpSession)
|
||||
{
|
||||
|
||||
UdpSession = udpSession;
|
||||
WaitingClientEx = UdpSession.GetWaitingClientEx(new());
|
||||
|
||||
SetDataAdapter();
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
@@ -8,15 +8,18 @@ namespace ModbusDemo
|
||||
{
|
||||
static async Task Main(string[] args)
|
||||
{
|
||||
OPCUAClient oPCUAClient = new(new EasyLogger(a => Console.WriteLine(a)));
|
||||
oPCUAClient.OPCNode = new()
|
||||
OPCUAClient oPCUAClient = new(new EasyLogger(a => Console.WriteLine(a)))
|
||||
{
|
||||
OPCUrl = "opc.tcp://desktop-p5gb4iq:50001/StandardServer",
|
||||
IsUseSecurity = true,
|
||||
OPCNode = new()
|
||||
{
|
||||
OPCUrl = "opc.tcp://desktop-p5gb4iq:50001/StandardServer",
|
||||
IsUseSecurity = true,
|
||||
}
|
||||
};
|
||||
await oPCUAClient.ConnectAsync();
|
||||
|
||||
var testData1 = await oPCUAClient.ReadJTokenValueAsync(new[] { "ns=2;i=2897" });
|
||||
await oPCUAClient.WriteNodeAsync("ns=2;i=2897", testData1.FirstOrDefault().Item3);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,12 +82,12 @@ public class ModbusRtu : ReadWriteDevicesSerialBase
|
||||
/// <inheritdoc/>
|
||||
public override void SetDataAdapter()
|
||||
{
|
||||
ModbusRtuDataHandleAdapter DataHandleAdapter = new()
|
||||
ModbusRtuDataHandleAdapter dataHandleAdapter = new()
|
||||
{
|
||||
Crc16CheckEnable = Crc16CheckEnable,
|
||||
CacheTimeout = TimeSpan.FromMilliseconds(CacheTimeout)
|
||||
};
|
||||
SerialClient.SetDataHandlingAdapter(DataHandleAdapter);
|
||||
SerialClient.SetDataHandlingAdapter(dataHandleAdapter);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -78,12 +78,12 @@ public class ModbusRtuOverTcp : ReadWriteDevicesTcpClientBase
|
||||
/// <inheritdoc/>
|
||||
public override void SetDataAdapter()
|
||||
{
|
||||
ModbusRtuDataHandleAdapter DataHandleAdapter = new()
|
||||
ModbusRtuDataHandleAdapter dataHandleAdapter = new()
|
||||
{
|
||||
Crc16CheckEnable = Crc16CheckEnable,
|
||||
CacheTimeout = TimeSpan.FromMilliseconds(CacheTimeout)
|
||||
};
|
||||
TcpClientEx.SetDataHandlingAdapter(DataHandleAdapter);
|
||||
TcpClientEx.SetDataHandlingAdapter(dataHandleAdapter);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -72,11 +72,14 @@ public class ModbusRtuOverUdp : ReadWriteDevicesUdpBase
|
||||
/// <inheritdoc/>
|
||||
public override void SetDataAdapter()
|
||||
{
|
||||
ModbusRtuOverUdpDataHandleAdapter DataHandleAdapter = new()
|
||||
ModbusRtuOverUdpDataHandleAdapter dataHandleAdapter = new()
|
||||
{
|
||||
Crc16CheckEnable = Crc16CheckEnable,
|
||||
};
|
||||
UdpSession.SetDataHandlingAdapter(DataHandleAdapter);
|
||||
UdpSession.Config.SetUdpDataHandlingAdapter(() =>
|
||||
{
|
||||
return dataHandleAdapter;
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -78,8 +78,8 @@ public class ModbusServer : ReadWriteDevicesTcpServerBase
|
||||
/// <inheritdoc/>
|
||||
public override void SetDataAdapter(SocketClient client)
|
||||
{
|
||||
ModbusServerDataHandleAdapter DataHandleAdapter = new();
|
||||
client.SetDataHandlingAdapter(DataHandleAdapter);
|
||||
ModbusServerDataHandleAdapter dataHandleAdapter = new();
|
||||
client.SetDataHandlingAdapter(dataHandleAdapter);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -79,12 +79,12 @@ public class ModbusTcp : ReadWriteDevicesTcpClientBase
|
||||
/// <inheritdoc/>
|
||||
public override void SetDataAdapter()
|
||||
{
|
||||
ModbusTcpDataHandleAdapter DataHandleAdapter = new()
|
||||
ModbusTcpDataHandleAdapter dataHandleAdapter = new()
|
||||
{
|
||||
IsCheckMessageId = IsCheckMessageId,
|
||||
CacheTimeout = TimeSpan.FromMilliseconds(CacheTimeout)
|
||||
};
|
||||
TcpClientEx.SetDataHandlingAdapter(DataHandleAdapter);
|
||||
TcpClientEx.SetDataHandlingAdapter(dataHandleAdapter);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -75,11 +75,14 @@ public class ModbusUdp : ReadWriteDevicesUdpBase
|
||||
/// <inheritdoc/>
|
||||
public override void SetDataAdapter()
|
||||
{
|
||||
ModbusUdpDataHandleAdapter DataHandleAdapter = new()
|
||||
ModbusUdpDataHandleAdapter dataHandleAdapter = new()
|
||||
{
|
||||
IsCheckMessageId = IsCheckMessageId
|
||||
};
|
||||
UdpSession.SetDataHandlingAdapter(DataHandleAdapter);
|
||||
UdpSession.Config.SetUdpDataHandlingAdapter(() =>
|
||||
{
|
||||
return dataHandleAdapter;
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -305,6 +305,8 @@ namespace ThingsGateway.Foundation.Adapter.Siemens
|
||||
foreach (var item in commandResult.Content)
|
||||
{
|
||||
ResponsedData result = await WaitingClientEx.SendThenResponseAsync(item, TimeOut, token);
|
||||
if (!((MessageBase)result.RequestInfo).IsSuccess)
|
||||
return OperResult.CreateFailedResult<byte[]>(((MessageBase)result.RequestInfo));
|
||||
bytes.Add(result);
|
||||
}
|
||||
return OperResult.CreateSuccessResult(bytes.ToArray());
|
||||
@@ -338,7 +340,7 @@ namespace ThingsGateway.Foundation.Adapter.Siemens
|
||||
if (commandResult.IsSuccess)
|
||||
{
|
||||
var result = await WaitingClientEx.SendThenResponseAsync(commandResult.Content, TimeOut, token);
|
||||
return OperResult.CreateSuccessResult(result);
|
||||
return (MessageBase)result.RequestInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.SerialPort" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MCheckbox Class="mx-1" Label=@(_plc.Description(x => x.Crc16CheckEnable)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Crc16CheckEnable></MCheckbox>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.FrameTime)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.FrameTime></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.CacheTimeout)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.CacheTimeout></MTextField>
|
||||
<MCheckbox Class="ma-1" Label=@(_plc.Description(x => x.Crc16CheckEnable)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Crc16CheckEnable></MCheckbox>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.FrameTime)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.FrameTime></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.CacheTimeout)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.CacheTimeout></MTextField>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
@@ -54,6 +54,7 @@
|
||||
{
|
||||
//载入配置
|
||||
_plc = new ThingsGateway.Foundation.Adapter.Modbus.ModbusRtu((SerialClient)defalutDebugDriverPage.SerialClientPage.GetSerialClient());
|
||||
defalutDebugDriverPage.Plc = _plc;
|
||||
}
|
||||
base.OnAfterRender(firstRender);
|
||||
}
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.TcpClientEx" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MCheckbox Class="mx-1" Label=@(_plc.Description(x => x.Crc16CheckEnable)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Crc16CheckEnable></MCheckbox>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.FrameTime)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.FrameTime></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.CacheTimeout)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.CacheTimeout></MTextField>
|
||||
<MCheckbox Class="ma-1" Label=@(_plc.Description(x => x.Crc16CheckEnable)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Crc16CheckEnable></MCheckbox>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.FrameTime)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.FrameTime></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.CacheTimeout)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.CacheTimeout></MTextField>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.UdpSession" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MCheckbox Class="mx-1" Label=@(_plc.Description(x => x.Crc16CheckEnable)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Crc16CheckEnable></MCheckbox>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.FrameTime)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.FrameTime></MTextField>
|
||||
<MCheckbox Class="ma-1" Label=@(_plc.Description(x => x.Crc16CheckEnable)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Crc16CheckEnable></MCheckbox>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.FrameTime)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.FrameTime></MTextField>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.TcpServer" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MCheckbox Class="mx-1" Label=@(_plc.Description(x => x.MulStation)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.MulStation></MCheckbox>
|
||||
<MCheckbox Class="ma-1" Label=@(_plc.Description(x => x.MulStation)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.MulStation></MCheckbox>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.TcpClientEx" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MCheckbox Class="mx-1" Label=@(_plc.Description(x => x.IsCheckMessageId)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.IsCheckMessageId></MCheckbox>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.FrameTime)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.FrameTime></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.CacheTimeout)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.CacheTimeout></MTextField>
|
||||
<MCheckbox Class="ma-1" Label=@(_plc.Description(x => x.IsCheckMessageId)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.IsCheckMessageId></MCheckbox>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.FrameTime)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.FrameTime></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.CacheTimeout)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.CacheTimeout></MTextField>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.UdpSession" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MCheckbox Class="mx-1" Label=@(_plc.Description(x => x.IsCheckMessageId)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.IsCheckMessageId></MCheckbox>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.FrameTime)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.FrameTime></MTextField>
|
||||
<MCheckbox Class="ma-1" Label=@(_plc.Description(x => x.IsCheckMessageId)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.IsCheckMessageId></MCheckbox>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.FrameTime)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.FrameTime></MTextField>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Station)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Station></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
|
||||
@@ -89,7 +89,7 @@ public partial class ImportVariable
|
||||
|
||||
var dataTypeId = (Opc.Ua.NodeId)(await PLC.ReadNoteAttributeAsync(a.NodeId.ToString(), Attributes.DataType)).Content.FirstOrDefault().Value;
|
||||
var dataType = Opc.Ua.TypeInfo.GetSystemType(dataTypeId, PLC.Session.Factory);
|
||||
var result = dataType != null ? Enum.TryParse<DataTypeEnum>(dataType.Name, out dataTypeEnum) : false;
|
||||
var result = dataType != null && Enum.TryParse<DataTypeEnum>(dataType.Name, out dataTypeEnum);
|
||||
if (!result)
|
||||
{
|
||||
dataTypeEnum = DataTypeEnum.Object;
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.TcpClientEx" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.TcpClientEx" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.TcpClientEx" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.TcpClientEx" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.TcpClientEx" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
<DefalutDebugDriverPage Channel="ChannelEnum.TcpClientEx" @ref=defalutDebugDriverPage>
|
||||
<MCard Flat Elevation="0">
|
||||
<MRow Class="my-1" NoGutters Justify="JustifyTypes.SpaceBetween" Align="AlignTypes.Center">
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Slot)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Slot></MTextField>
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.Rack)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.Rack></MTextField>
|
||||
|
||||
<MTextField Class="mx-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="mx-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
<MTextField Class="ma-1" Label=@(_plc.Description(x => x.TimeOut)) Dense Outlined HideDetails="@("auto")" @bind-Value=@_plc.TimeOut></MTextField>
|
||||
<MSelect Class="ma-1" Style="max-width:200px" @bind-Value="_plc.DataFormat" Outlined Label="@(_plc.Description(x => x.DataFormat))"
|
||||
Items=@(typeof(DataFormat).GetEnumList())
|
||||
MenuProps="@(props => { props.Auto = true; props.OffsetY = true; })"
|
||||
ItemText=@((u) =>u.des)
|
||||
|
||||
@@ -88,6 +88,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Foundataion.Demo", "Foundat
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModbusDemo", "ThingsGateway.Plugin\Foundataion.Demo\ModbusDemo\ModbusDemo.csproj", "{48D2CA26-E535-413D-8CA9-A4A2AAC6582D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OPCUAClientDemo", "ThingsGateway.Plugin\Foundataion.Demo\OPCUAClientDemo\OPCUAClientDemo.csproj", "{3F83EF0F-002D-4D06-87A8-739399074DBA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -186,6 +188,10 @@ Global
|
||||
{48D2CA26-E535-413D-8CA9-A4A2AAC6582D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{48D2CA26-E535-413D-8CA9-A4A2AAC6582D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{48D2CA26-E535-413D-8CA9-A4A2AAC6582D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3F83EF0F-002D-4D06-87A8-739399074DBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3F83EF0F-002D-4D06-87A8-739399074DBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3F83EF0F-002D-4D06-87A8-739399074DBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3F83EF0F-002D-4D06-87A8-739399074DBA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -220,6 +226,7 @@ Global
|
||||
{E1C327FA-C442-45DD-9265-9EA26573B61E} = {F2DF3BE7-D497-44B3-9CD6-CDDBC4FBD09C}
|
||||
{E733E483-4823-4BD6-BC29-669426386A96} = {86119A5F-5717-42FF-8888-F034B4136A1B}
|
||||
{48D2CA26-E535-413D-8CA9-A4A2AAC6582D} = {E733E483-4823-4BD6-BC29-669426386A96}
|
||||
{3F83EF0F-002D-4D06-87A8-739399074DBA} = {E733E483-4823-4BD6-BC29-669426386A96}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {38B292E0-B3E7-4608-9912-1B057C2A508F}
|
||||
|
||||
Reference in New Issue
Block a user