36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
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; }
|
|
}
|
|
}
|
|
}
|