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

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


The following commit(s) were added to refs/heads/master by this push:
     new 09cca18  implement too more methods to improve performance
09cca18 is described below

commit 09cca18c531501e499c80d963bc7d3ac5a099978
Author: Sebastian Rühl <sru...@apache.org>
AuthorDate: Fri Mar 2 08:50:42 2018 +0100

    implement too more methods to improve performance
    
    (cherry picked from commit 8117160)
---
 .../java/org/apache/plc4x/java/ads/api/generic/types/Command.java    | 5 +++++
 .../src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java  | 5 +++++
 2 files changed, 10 insertions(+)

diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/Command.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/Command.java
index d7ba4e0..c59c473 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/Command.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/Command.java
@@ -82,6 +82,11 @@ public enum Command implements ByteReadable {
         return Unpooled.buffer().writeBytes(value);
     }
 
+    @Override
+    public long getCalculatedLength() {
+        return NUM_BYTES;
+    }
+
     public static Command of(byte... bytes) {
         // TODO: improve by using a map
         for (Command command : values()) {
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
index d211e18..0da050d 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
@@ -65,6 +65,11 @@ public class ByteValue implements ByteReadable {
     }
 
     @Override
+    public long getCalculatedLength() {
+        return value.length;
+    }
+
+    @Override
     public boolean equals(Object o) {
         if (this == o)
             return true;

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

Reply via email to