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:01:58 UTC
[incubator-plc4x] branch feature/Beckhoff_ADS_protocol updated:
added todo about wrong state flag implementation
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 2fb37fd added todo about wrong state flag implementation
2fb37fd is described below
commit 2fb37fdfc046c1c0ea6ea1c710688c36ba79bcdc
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed Feb 7 17:01:52 2018 +0100
added todo about wrong state flag implementation
---
.../org/apache/plc4x/java/ads/api/generic/types/State.java | 11 +++++++++++
.../src/test/java/org/apache/plc4x/java/ads/ADSDumper.java | 6 +++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/State.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/State.java
index 4250637..b58b15e 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/State.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/State.java
@@ -49,6 +49,17 @@ public enum State implements ByteReadable {
ADS_RESPONSE_UDP(0x45),
UNKNOWN();
+ // TODO: refactor as this is not really an enum, its more a flag collection:
+ //.... .... .... ...0 = RESPONSE: Not set
+ //.... .... .... ..0. = NO RETURN: Not set
+ //.... .... .... .1.. = ADS COMMAND: Set
+ //.... .... .... 0... = SYSTEM COMMAND: Not set
+ //.... .... ...0 .... = HIGH PRIORITY COMMAND: Not set
+ //.... .... ..0. .... = TIMESTAMP ADDED: Not set
+ //.... .... .0.. .... = UDP COMMAND: Not set
+ //.... .... 0... .... = INIT COMMAND: Not set
+ //0... .... .... .... = BROADCAST: Not set
+
public static final int NUM_BYTES = 2;
final byte[] value;
diff --git a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/ADSDumper.java b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/ADSDumper.java
index 49037f3..798d99f 100644
--- a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/ADSDumper.java
+++ b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/ADSDumper.java
@@ -61,9 +61,9 @@ public class ADSDumper {
AMSPort.of(12),
AMSNetId.of("192.168.0.70.1.1"),
AMSPort.of(14),
- Invoke.of((byte) 0, (byte) 0, (byte) 0, (byte) 0),
- IndexGroup.of((byte) 0, (byte) 0, (byte) 0, (byte) 0),
- IndexOffset.of((byte) 0, (byte) 0, (byte) 0, (byte) 0),
+ Invoke.of(0),
+ IndexGroup.of(1),
+ IndexOffset.of(3),
Length.of(randomString.getBytes().length),
Data.of(randomString.getBytes())
);
--
To stop receiving notification emails like this one, please contact
sruehl@apache.org.