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/01/26 17:45:42 UTC

[incubator-plc4x] branch feature/Beckhoff_ADS_protocol updated: implement subclasses as byte readable

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 7c2e63f  implement subclasses as byte readable
7c2e63f is described below

commit 7c2e63f714916e8f4e95e95906322a964ab25724
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Jan 26 18:45:38 2018 +0100

    implement subclasses as byte readable
---
 .../java/ads/model/commands/ADSDeviceNotificationRequest.java      | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeviceNotificationRequest.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeviceNotificationRequest.java
index c99bf12..99421b5 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeviceNotificationRequest.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeviceNotificationRequest.java
@@ -23,6 +23,7 @@ import org.apache.plc4x.java.ads.model.generic.ADSData;
 import org.apache.plc4x.java.ads.model.generic.AMSHeader;
 import org.apache.plc4x.java.ads.model.generic.AMSTCPHeader;
 import org.apache.plc4x.java.ads.model.generic.AMSTCPPaket;
+import org.apache.plc4x.java.ads.model.util.ByteReadable;
 import org.apache.plc4x.java.ads.model.util.ByteValue;
 
 /**
@@ -71,7 +72,7 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
         }
     }
 
-    class AdsStampHeader extends ByteValue {
+    class AdsStampHeader implements ByteReadable {
 
         /**
          * 8 bytes	The timestamp is coded after the Windos FILETIME format. I.e. the value contains the number of the nano seconds, which passed since 1.1.1601. In addition, the local time change is not considered. Thus the time stamp is present as universal Coordinated time (UTC).
@@ -87,7 +88,6 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
         final AdsNotificationSample adsNotificationSample;
 
         public AdsStampHeader(TimeStamp timeStamp, Samples samples, AdsNotificationSample adsNotificationSample) {
-            super(new byte[]{0x00});
             this.timeStamp = timeStamp;
             this.samples = samples;
             this.adsNotificationSample = adsNotificationSample;
@@ -109,7 +109,7 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
             }
         }
 
-        class AdsNotificationSample extends ByteValue {
+        class AdsNotificationSample implements ByteReadable {
 
             /**
              * 4 Bytes	Handle of notification.
@@ -125,7 +125,6 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
             final Data data;
 
             public AdsNotificationSample(NotificationHandle notificationHandle, SampleSize sampleSize, Data data) {
-                super((byte) 0x00);
                 this.notificationHandle = notificationHandle;
                 this.sampleSize = sampleSize;
                 this.data = data;

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