You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by hu...@apache.org on 2023/02/01 08:40:13 UTC

[plc4x] branch develop updated: fix(plc4j/profinet): Removed dangling bracket from mspec

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

hutcheb 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 0e6e0ac1bd fix(plc4j/profinet): Removed dangling bracket from mspec
0e6e0ac1bd is described below

commit 0e6e0ac1bd1a3605b2d9c37d33f16c9436b7df8d
Author: Ben Hutcheson <be...@gmail.com>
AuthorDate: Wed Feb 1 09:37:05 2023 +0100

    fix(plc4j/profinet): Removed dangling bracket from mspec
---
 .../PnDcp_Block_DevicePropertiesNameOfStation.java | 22 ++--------------------
 .../resources/protocols/profinet/profinet.mspec    |  2 +-
 2 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/plc4j/drivers/profinet/src/main/generated/org/apache/plc4x/java/profinet/readwrite/PnDcp_Block_DevicePropertiesNameOfStation.java b/plc4j/drivers/profinet/src/main/generated/org/apache/plc4x/java/profinet/readwrite/PnDcp_Block_DevicePropertiesNameOfStation.java
index d2445e8867..7a3226e372 100644
--- a/plc4j/drivers/profinet/src/main/generated/org/apache/plc4x/java/profinet/readwrite/PnDcp_Block_DevicePropertiesNameOfStation.java
+++ b/plc4j/drivers/profinet/src/main/generated/org/apache/plc4x/java/profinet/readwrite/PnDcp_Block_DevicePropertiesNameOfStation.java
@@ -51,8 +51,6 @@ public class PnDcp_Block_DevicePropertiesNameOfStation extends PnDcp_Block imple
 
   // Arguments.
   protected final Integer blockLength;
-  // Reserved Fields
-  private Integer reservedField0;
 
   public PnDcp_Block_DevicePropertiesNameOfStation(byte[] nameOfStation, Integer blockLength) {
     super();
@@ -70,12 +68,6 @@ public class PnDcp_Block_DevicePropertiesNameOfStation extends PnDcp_Block imple
     int startPos = positionAware.getPos();
     writeBuffer.pushContext("PnDcp_Block_DevicePropertiesNameOfStation");
 
-    // Reserved Field (reserved)
-    writeReservedField(
-        "reserved",
-        reservedField0 != null ? reservedField0 : (int) 0x0000,
-        writeUnsignedInt(writeBuffer, 16));
-
     // Array Field (nameOfStation)
     writeByteArrayField("nameOfStation", nameOfStation, writeByteArray(writeBuffer, 8));
 
@@ -102,9 +94,6 @@ public class PnDcp_Block_DevicePropertiesNameOfStation extends PnDcp_Block imple
     int lengthInBits = super.getLengthInBits();
     PnDcp_Block_DevicePropertiesNameOfStation _value = this;
 
-    // Reserved Field (reserved)
-    lengthInBits += 16;
-
     // Array field
     if (nameOfStation != null) {
       lengthInBits += 8 * nameOfStation.length;
@@ -130,9 +119,6 @@ public class PnDcp_Block_DevicePropertiesNameOfStation extends PnDcp_Block imple
     int startPos = positionAware.getPos();
     int curPos;
 
-    Integer reservedField0 =
-        readReservedField("reserved", readUnsignedInt(readBuffer, 16), (int) 0x0000);
-
     byte[] nameOfStation =
         readBuffer.readByteArray("nameOfStation", Math.toIntExact((blockLength) - (2)));
 
@@ -145,27 +131,23 @@ public class PnDcp_Block_DevicePropertiesNameOfStation extends PnDcp_Block imple
 
     readBuffer.closeContext("PnDcp_Block_DevicePropertiesNameOfStation");
     // Create the instance
-    return new PnDcp_Block_DevicePropertiesNameOfStationBuilderImpl(
-        nameOfStation, blockLength, reservedField0);
+    return new PnDcp_Block_DevicePropertiesNameOfStationBuilderImpl(nameOfStation, blockLength);
   }
 
   public static class PnDcp_Block_DevicePropertiesNameOfStationBuilderImpl
       implements PnDcp_Block.PnDcp_BlockBuilder {
     private final byte[] nameOfStation;
     private final Integer blockLength;
-    private final Integer reservedField0;
 
     public PnDcp_Block_DevicePropertiesNameOfStationBuilderImpl(
-        byte[] nameOfStation, Integer blockLength, Integer reservedField0) {
+        byte[] nameOfStation, Integer blockLength) {
       this.nameOfStation = nameOfStation;
       this.blockLength = blockLength;
-      this.reservedField0 = reservedField0;
     }
 
     public PnDcp_Block_DevicePropertiesNameOfStation build() {
       PnDcp_Block_DevicePropertiesNameOfStation pnDcp_Block_DevicePropertiesNameOfStation =
           new PnDcp_Block_DevicePropertiesNameOfStation(nameOfStation, blockLength);
-      pnDcp_Block_DevicePropertiesNameOfStation.reservedField0 = reservedField0;
       return pnDcp_Block_DevicePropertiesNameOfStation;
     }
   }
diff --git a/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec b/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec
index 1ba08ea938..95da70617a 100644
--- a/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec
+++ b/protocols/profinet/src/main/resources/protocols/profinet/profinet.mspec
@@ -553,7 +553,7 @@
             [array    byte        deviceVendorValue count 'blockLength-2'             ]
             [padding  uint 8      pad '0x00' 'STATIC_CALL("arrayLength", deviceVendorValue) % 2']
         ]
-        ['DEVICE_PROPERTIES_OPTION','2' PnDcp_Block_DevicePropertiesNameOfStation(uint 16 blockLength)                                                      ]
+        ['DEVICE_PROPERTIES_OPTION','2' PnDcp_Block_DevicePropertiesNameOfStation(uint 16 blockLength)
             [array    byte        nameOfStation count 'blockLength-2'                 ]
             [padding  uint 8      pad '0x00' 'STATIC_CALL("arrayLength", nameOfStation) % 2']
         ]