From cd2757a488ea7824fc6b179580577a0ecc0881c9 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Wed, 15 Apr 2020 13:08:23 +0200 Subject: [PATCH] [New] PlcGwService.register(String, String) now returns PlcAddressKey --- .../main/java/li/strolch/plc/gw/server/PlcGwService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/strolch-plc-gw-server/src/main/java/li/strolch/plc/gw/server/PlcGwService.java b/strolch-plc-gw-server/src/main/java/li/strolch/plc/gw/server/PlcGwService.java index 13af1d8..5cad772 100644 --- a/strolch-plc-gw-server/src/main/java/li/strolch/plc/gw/server/PlcGwService.java +++ b/strolch-plc-gw-server/src/main/java/li/strolch/plc/gw/server/PlcGwService.java @@ -62,8 +62,10 @@ public abstract class PlcGwService implements PlcNotificationListener, PlcAddres this.state = PlcServiceState.Unregistered; } - protected void register(String resource, String action) { - this.plcHandler.register(this.plcId, keyFor(resource, action), this); + protected PlcAddressKey register(String resource, String action) { + PlcAddressKey addressKey = keyFor(resource, action); + this.plcHandler.register(this.plcId, addressKey, this); + return addressKey; } protected void register(PlcAddressKey key) {