Change register list source

- add poller levels
- add new register builder pattern
This commit is contained in:
Felix Weiß
2023-07-12 18:54:07 +02:00
parent 6c7e91f648
commit 82821e773d
30 changed files with 1209 additions and 1097 deletions

View File

@@ -32,11 +32,14 @@ namespace MewtocolNet {
#region TCP connection state handling
/// <inheritdoc/>
public void ConfigureConnection (string ip, int port = 9094, int station = 1) {
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");
if (stationNumber != 0xEE && stationNumber > 99)
throw new NotSupportedException("Station number can't be greater than 99");
Port = port;
stationNumber = station;
@@ -45,10 +48,14 @@ namespace MewtocolNet {
}
/// <inheritdoc/>
public void ConfigureConnection(IPAddress ip, int port = 9094, int station = 1) {
public void ConfigureConnection(IPAddress ip, int port = 9094, int station = 0xEE) {
ipAddr = ip;
Port = port;
if (stationNumber != 0xEE && stationNumber > 99)
throw new NotSupportedException("Station number can't be greater than 99");
stationNumber = station;
Disconnect();