Add underlying byte data for registers

- change backend logic for register r/w
- remade interface builder pattern for better syntactic sugar
- refined tests
This commit is contained in:
Felix Weiß
2023-07-12 00:32:56 +02:00
parent fbd53c850f
commit 6c7e91f648
32 changed files with 1172 additions and 463 deletions

View File

@@ -25,7 +25,7 @@ internal class OnlineCommand : CommandLineExcecuteable {
string ip = split[0];
int port = int.Parse(split[1]);
using (var plc = Mewtocol.Ethernet(ip, port)) {
using (var plc = Mewtocol.Ethernet(ip, port).Build()) {
await AfterSetup(plc);

View File

@@ -45,7 +45,7 @@ internal class ScanCommand : CommandLineExcecuteable {
ctx.Status($"Getting cassette PLC {item.Cassette.IPAddress}:{item.Cassette.Port}")
.Spinner(Spinner.Known.Dots);
var dev = Mewtocol.Ethernet(item.Cassette.IPAddress, item.Cassette.Port);
var dev = Mewtocol.Ethernet(item.Cassette.IPAddress, item.Cassette.Port).Build();
dev.ConnectTimeout = 1000;
await dev.ConnectAsync();
item.PLCInf = dev.PlcInfo;