[New] Added PlcExecutionPolicy.unregister()

This commit is contained in:
Robert von Burg 2023-04-25 14:43:40 +02:00
parent d898fb64df
commit 8f7a029dfd
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
1 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,11 @@ public abstract class PlcExecutionPolicy extends SimpleExecution
this.registeredKeys.add(key);
}
protected void unregister(PlcAddressKey key) {
this.plcHandler.unregister(getPlcId(), key, this);
this.registeredKeys.remove(key);
}
protected void unregisterAll() {
this.registeredKeys.forEach(k -> this.plcHandler.unregister(getPlcId(), k, this));
}