You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/09/27 09:58:16 UTC
[plc4x] 01/02: fix(plc-simulator/cbus): fix missing reset echo on smart or connect
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 01a2ecef479021ae40f90733e77313961a1fb119
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Sep 27 11:57:10 2022 +0200
fix(plc-simulator/cbus): fix missing reset echo on smart or connect
---
.../plc4x/simulator/server/cbus/protocol/CBusServerAdapter.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/plc4j/utils/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/cbus/protocol/CBusServerAdapter.java b/plc4j/utils/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/cbus/protocol/CBusServerAdapter.java
index 493decf9b..677e633cc 100644
--- a/plc4j/utils/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/cbus/protocol/CBusServerAdapter.java
+++ b/plc4j/utils/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/cbus/protocol/CBusServerAdapter.java
@@ -128,6 +128,11 @@ public class CBusServerAdapter extends ChannelInboundHandlerAdapter {
LOGGER.info("Handling RequestObsolete\n{}", requestObsolete);
// TODO: handle this
} else if (request instanceof RequestReset) {
+ if (smart || connect) {
+ // On reset, we need to send the echo if we had not sent it above
+ LOGGER.info("Sending echo");
+ ctx.write(msg);
+ }
handleReset((RequestReset) request);
} else if (request instanceof RequestSmartConnectShortcut) {
handleSmartConnect((RequestSmartConnectShortcut) request);