You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2023/08/28 08:38:51 UTC
[plc4x] branch develop updated: feat(plc4j/iec-60870): Fixed the problem decoding subsequent incoming messages.
This is an automated email from the ASF dual-hosted git repository.
cdutz 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 f4a689189d feat(plc4j/iec-60870): Fixed the problem decoding subsequent incoming messages.
f4a689189d is described below
commit f4a689189d3c9e93223e84b65a99522331464d8d
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Mon Aug 28 10:38:37 2023 +0200
feat(plc4j/iec-60870): Fixed the problem decoding subsequent incoming messages.
---
.../apache/plc4x/java/iec608705104/readwrite/Iec60870514PlcDriver.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plc4j/drivers/iec-60870/src/main/java/org/apache/plc4x/java/iec608705104/readwrite/Iec60870514PlcDriver.java b/plc4j/drivers/iec-60870/src/main/java/org/apache/plc4x/java/iec608705104/readwrite/Iec60870514PlcDriver.java
index 5beb83dfda..00a5caf441 100644
--- a/plc4j/drivers/iec-60870/src/main/java/org/apache/plc4x/java/iec608705104/readwrite/Iec60870514PlcDriver.java
+++ b/plc4j/drivers/iec-60870/src/main/java/org/apache/plc4x/java/iec608705104/readwrite/Iec60870514PlcDriver.java
@@ -114,7 +114,7 @@ public class Iec60870514PlcDriver extends GeneratedDriverBase<APDU> {
@Override
public int applyAsInt(ByteBuf byteBuf) {
if (byteBuf.readableBytes() >= 2) {
- return byteBuf.getUnsignedByte( 1) + 2;
+ return byteBuf.getUnsignedByte( byteBuf.readerIndex() + 1) + 2;
}
return -1;
}