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/08/30 13:51:56 UTC
[plc4x] 01/02: fix(plc-simulator/cbus): avoid sending out the inner message
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 b7db778f4506c34cdd3639d9f2c0d1251016fef6
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Aug 30 15:15:48 2022 +0200
fix(plc-simulator/cbus): avoid sending out the inner message
+ The inner message is contained in a "decoded" form a virtual field now
---
.../plc4x/simulator/server/cbus/protocol/CBusServerAdapter.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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 cb9378dff..2943d6b13 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
@@ -122,7 +122,7 @@ public class CBusServerAdapter extends ChannelInboundHandlerAdapter {
if (request instanceof RequestDirectCommandAccess) {
RequestDirectCommandAccess requestDirectCommandAccess = (RequestDirectCommandAccess) request;
CALData calData = requestDirectCommandAccess.getCalData();
- LOGGER.info("Handling RequestDirectCommandAccess\n{}\n{}", requestDirectCommandAccess, calData);
+ LOGGER.info("Handling RequestDirectCommandAccess\n{}", requestDirectCommandAccess);
// TODO: handle other cal data type
if (calData instanceof CALDataWrite) {
@@ -137,7 +137,7 @@ public class CBusServerAdapter extends ChannelInboundHandlerAdapter {
replyOrConfirmation = new ReplyOrConfirmationConfirmation((byte) 0x0, new Confirmation(requestDirectCommandAccess.getAlpha(), null, ConfirmationType.CONFIRMATION_SUCCESSFUL), replyOrConfirmation, cBusOptions, requestContext);
}
CBusMessageToClient cBusMessageToClient = new CBusMessageToClient(replyOrConfirmation, requestContext, cBusOptions);
- LOGGER.info("Sending ack\n{}\n{}", cBusMessageToClient, encodedReply);
+ LOGGER.info("Sending ack\n{}", cBusMessageToClient);
ctx.writeAndFlush(cBusMessageToClient);
};
switch (calDataWrite.getParamNo().getParameterType()) {
@@ -547,7 +547,7 @@ public class CBusServerAdapter extends ChannelInboundHandlerAdapter {
Reply reply = new ReplyEncodedReply((byte) 0x0, encodedReply, null, cBusOptions, requestContext);
ReplyOrConfirmation replyOrConfirmation = new ReplyOrConfirmationReply((byte) 0x00, reply, new ResponseTermination(), cBusOptions, requestContext);
CBusMessage message = new CBusMessageToClient(replyOrConfirmation, requestContext, cBusOptions);
- LOGGER.info("[SAL Monitor] Sending out\n{}\n{}", message, encodedReply);
+ LOGGER.info("[SAL Monitor] Sending out\n{}", message);
ctx.writeAndFlush(message);
} finally {
outputLock.unlock();
@@ -595,7 +595,7 @@ public class CBusServerAdapter extends ChannelInboundHandlerAdapter {
Reply reply = new ReplyEncodedReply((byte) 0x0, encodedReply, null, cBusOptions, requestContext);
ReplyOrConfirmation replyOrConfirmation = new ReplyOrConfirmationReply((byte) 0x00, reply, new ResponseTermination(), cBusOptions, requestContext);
CBusMessage message = new CBusMessageToClient(replyOrConfirmation, requestContext, cBusOptions);
- LOGGER.info("[MMI Monitor] Sending out\n{}\n{}", message, encodedReply);
+ LOGGER.info("[MMI Monitor] Sending out\n{}", message);
ctx.writeAndFlush(message);
} finally {
outputLock.unlock();