添加配置连接窗口已经相关S7与ModbusTCP连接功能
This commit is contained in:
35
MainModule/Events/ConnectionConfigEvent.cs
Normal file
35
MainModule/Events/ConnectionConfigEvent.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Prism.Events;
|
||||
using S7.Net;
|
||||
using System.IO.Ports;
|
||||
|
||||
namespace MainModule.Events
|
||||
{
|
||||
public enum ProtocolType
|
||||
{
|
||||
S7,
|
||||
ModbusTCP,
|
||||
ModbusRTU,
|
||||
TCP,
|
||||
HTTP
|
||||
}
|
||||
|
||||
public class ConnectionConfigEvent : PubSubEvent<ConnectionConfigEvent.ConnectionConfigData>
|
||||
{
|
||||
public class ConnectionConfigData
|
||||
{
|
||||
public ProtocolType Protocol { get; set; }
|
||||
public string IpAddress { get; set; } = string.Empty;
|
||||
public int Port { get; set; }
|
||||
public string SerialPort { get; set; } = string.Empty;
|
||||
public int BaudRate { get; set; }
|
||||
public Parity Parity { get; set; }
|
||||
public int DataBits { get; set; }
|
||||
public StopBits StopBits { get; set; }
|
||||
public CpuType CpuType { get; set; }
|
||||
public short Rack { get; set; }
|
||||
public short Slot { get; set; }
|
||||
public int SendTimeout { get; set; }
|
||||
public int ReceiveTimeout { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user