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 2018/02/07 16:19:23 UTC

[incubator-plc4x] branch feature/Beckhoff_ADS_protocol updated: removed wrong implementation of readRequest mapping

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch feature/Beckhoff_ADS_protocol
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git


The following commit(s) were added to refs/heads/feature/Beckhoff_ADS_protocol by this push:
     new 3ab89ff  removed wrong implementation of readRequest mapping
3ab89ff is described below

commit 3ab89ffa383f94f26ef700f183788dc66af4a07b
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed Feb 7 17:19:20 2018 +0100

    removed wrong implementation of readRequest mapping
---
 .../java/org/apache/plc4x/java/ads/netty/Plc4XADSProtocol.java   | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/Plc4XADSProtocol.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/Plc4XADSProtocol.java
index 9e46113..192af39 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/Plc4XADSProtocol.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/Plc4XADSProtocol.java
@@ -119,12 +119,9 @@ public class Plc4XADSProtocol extends MessageToMessageCodec<AMSTCPPaket, PlcRequ
             throw new PlcProtocolException("Address not of type ADSAddress: " + address.getClass());
         }
         ADSAddress adsAddress = (ADSAddress) address;
-        // TODO: we need a long parser her
-        Invoke invokeId = Invoke.of((byte) correlationBuilder.incrementAndGet());
-        // TODO: we need a long parser her
-        IndexGroup indexGroup = IndexGroup.of((byte) adsAddress.getIndexGroup());
-        // TODO: we need a long parser her
-        IndexOffset indexOffset = IndexOffset.of((byte) adsAddress.getIndexOffset());
+        Invoke invokeId = Invoke.of(correlationBuilder.incrementAndGet());
+        IndexGroup indexGroup = IndexGroup.of(adsAddress.getIndexGroup());
+        IndexOffset indexOffset = IndexOffset.of(adsAddress.getIndexOffset());
         Length length = Length.of(readRequestItem.getSize());
         AMSTCPPaket amstcpPaket = new ADSReadRequest(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, invokeId, indexGroup, indexOffset, length);
         out.add(amstcpPaket);

-- 
To stop receiving notification emails like this one, please contact
sruehl@apache.org.