Simplify registers

- add array conversion
- fixed dt area merging
This commit is contained in:
Felix Weiß
2023-07-17 00:41:27 +02:00
parent 4666d3071b
commit d6c00097bc
68 changed files with 1479 additions and 1210 deletions

View File

@@ -1,6 +1,5 @@
using MewtocolNet.Exceptions;
using MewtocolNet.Logging;
using MewtocolNet.RegisterAttributes;
using System;
using System.Net;
using System.Net.Sockets;
@@ -27,12 +26,12 @@ namespace MewtocolNet {
/// <inheritdoc/>
public IPEndPoint HostEndpoint { get; set; }
internal MewtocolInterfaceTcp () : base() { }
internal MewtocolInterfaceTcp() : base() { }
#region TCP connection state handling
/// <inheritdoc/>
public void ConfigureConnection (string ip, int port = 9094, int station = 0xEE) {
public void ConfigureConnection(string ip, int port = 9094, int station = 0xEE) {
if (!IPAddress.TryParse(ip, out ipAddr))
throw new MewtocolException($"The ip: {ip} is no valid ip address");
@@ -63,7 +62,7 @@ namespace MewtocolNet {
}
/// <inheritdoc/>
public override async Task ConnectAsync () {
public override async Task ConnectAsync() {
try {
@@ -110,6 +109,8 @@ namespace MewtocolNet {
if (plcinf != null) {
await base.ConnectAsync();
OnConnected(plcinf.Value);
} else {