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 10:49:29 UTC

[plc4x] branch develop updated: fix(plc-simulator/cbus): fixed broken outputs of text

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


The following commit(s) were added to refs/heads/develop by this push:
     new cfecae2dc fix(plc-simulator/cbus): fixed broken outputs of text
cfecae2dc is described below

commit cfecae2dcb40f20158ce436429f53a04ef594ed7
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Aug 30 12:48:31 2022 +0200

    fix(plc-simulator/cbus): fixed broken outputs of text
---
 .../plc4x/simulator/server/cbus/protocol/CBusServerAdapter.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sandbox/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/cbus/protocol/CBusServerAdapter.java b/sandbox/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/cbus/protocol/CBusServerAdapter.java
index ac543dc15..8c150d18b 100644
--- a/sandbox/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/cbus/protocol/CBusServerAdapter.java
+++ b/sandbox/plc-simulator/src/main/java/org/apache/plc4x/simulator/server/cbus/protocol/CBusServerAdapter.java
@@ -393,7 +393,7 @@ public class CBusServerAdapter extends ChannelInboundHandlerAdapter {
     }
 
     private void handleCalDataIdentify(ChannelHandlerContext ctx, CALDataIdentify calDataIdentify, Alpha alpha) {
-        short numBytes = 0;
+        short numBytes;
         IdentifyReplyCommand identifyReplyCommand;
         switch (calDataIdentify.getAttribute()) {
             case Manufacturer:
@@ -406,15 +406,15 @@ public class CBusServerAdapter extends ChannelInboundHandlerAdapter {
                 break;
             case FirmwareVersion:
                 numBytes = 0x08;
-                identifyReplyCommand = new IdentifyReplyCommandFirmwareVersion("0.9", numBytes);
+                identifyReplyCommand = new IdentifyReplyCommandFirmwareVersion("  0.09  ", numBytes);
                 break;
             case Summary:
                 numBytes = 0x09;
-                identifyReplyCommand = new IdentifyReplyCommandSummary("0.9", (byte) 0xAF, "0.0", numBytes);
+                identifyReplyCommand = new IdentifyReplyCommandSummary("NOIDEA", (byte) 0xAF, "0900", numBytes);
                 break;
             case ExtendedDiagnosticSummary:
                 numBytes = 0x0C;
-                identifyReplyCommand = new IdentifyReplyCommandExtendedDiagnosticSummary(ApplicationIdContainer.FREE_USAGE_01, ApplicationIdContainer.FREE_USAGE_0F, (byte) 0x0, 0x0, 4711l, (byte) 0x13, false, false, false, true, false, false, false, false, false, false, false, false, false, numBytes);
+                identifyReplyCommand = new IdentifyReplyCommandExtendedDiagnosticSummary(ApplicationIdContainer.FREE_USAGE_01, ApplicationIdContainer.FREE_USAGE_0F, (byte) 0x0, 0x0, 4711L, (byte) 0x13, false, false, false, true, false, false, false, false, false, false, false, false, false, numBytes);
                 break;
             case NetworkTerminalLevels:
                 numBytes = 0x0C;