rename PORT to Port

add a Space
This commit is contained in:
Max
2019-07-10 20:42:52 +02:00
parent f2d33855ca
commit b2183dd760
3 changed files with 6 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ namespace S7.Net
/// <summary>
/// PORT Number of the PLC, default is 102
/// </summary>
public int PORT { get; private set; }
public int Port { get; private set; }
/// <summary>
/// CPU type of the PLC
@@ -125,7 +125,7 @@ namespace S7.Net
/// <param name="rack">rack of the PLC, usually it's 0, but check in the hardware configuration of Step7 or TIA portal</param>
/// <param name="slot">slot of the CPU of the PLC, usually it's 2 for S7300-S7400, 0 for S7-1200 and S7-1500.
/// If you use an external ethernet card, this must be set accordingly.</param>
public Plc(CpuType cpu, string ip,int port, Int16 rack, Int16 slot)
public Plc(CpuType cpu, string ip, int port, Int16 rack, Int16 slot)
{
if (!Enum.IsDefined(typeof(CpuType), cpu))
throw new ArgumentException($"The value of argument '{nameof(cpu)}' ({cpu}) is invalid for Enum type '{typeof(CpuType).Name}'.", nameof(cpu));
@@ -135,7 +135,7 @@ namespace S7.Net
CPU = cpu;
IP = ip;
PORT = port;
Port = port;
Rack = rack;
Slot = slot;
MaxPDUSize = 240;
@@ -161,7 +161,7 @@ namespace S7.Net
CPU = cpu;
IP = ip;
PORT = 102;
Port = 102;
Rack = rack;
Slot = slot;
MaxPDUSize = 240;

View File

@@ -45,7 +45,7 @@ namespace S7.Net
{
tcpClient = new TcpClient();
ConfigureConnection();
await tcpClient.ConnectAsync(IP, PORT);
await tcpClient.ConnectAsync(IP, Port);
stream = tcpClient.GetStream();
}

View File

@@ -51,7 +51,7 @@ namespace S7.Net
{
tcpClient = new TcpClient();
ConfigureConnection();
tcpClient.Connect(IP, PORT);
tcpClient.Connect(IP, Port);
stream = tcpClient.GetStream();
}
catch (SocketException sex)