You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2024/02/16 06:58:24 UTC

(plc4x) branch develop updated: chore: updated generated code

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

cdutz 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 f3b528284d chore: updated generated code
f3b528284d is described below

commit f3b528284db40f35c2a874a462b4ef0cd1935404
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Fri Feb 16 07:58:19 2024 +0100

    chore: updated generated code
---
 RELEASE_NOTES                                      |   2 +-
 .../opcua/readwrite/OpcuaNegotiationMessage.java   | 127 ---------------------
 tools/release-0-update-generated-code.sh           |   7 ++
 3 files changed, 8 insertions(+), 128 deletions(-)

diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index e2df5f752e..bcaa8407ff 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -20,7 +20,7 @@ Incompatible changes
 - Java 8 is no longer officially supported and Java 11 is the
   new base-line.
 - Renamed the PlcDriverManager method `listDrivers` to
-  `listProtocolCodes`
+  `getProtocolCodes`
 - The configuration syntax for configuring transport-related
   config options in the connection-string was updated to be
   now prefixed with the transport name the option belongs to.
diff --git a/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/OpcuaNegotiationMessage.java b/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/OpcuaNegotiationMessage.java
deleted file mode 100644
index 1615a6e924..0000000000
--- a/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/OpcuaNegotiationMessage.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.plc4x.java.opcua.readwrite;
-
-import static org.apache.plc4x.java.spi.codegen.fields.FieldReaderFactory.*;
-import static org.apache.plc4x.java.spi.codegen.fields.FieldWriterFactory.*;
-import static org.apache.plc4x.java.spi.codegen.io.DataReaderFactory.*;
-import static org.apache.plc4x.java.spi.codegen.io.DataWriterFactory.*;
-import static org.apache.plc4x.java.spi.generation.StaticHelper.*;
-
-import java.time.*;
-import java.util.*;
-import org.apache.plc4x.java.api.exceptions.*;
-import org.apache.plc4x.java.api.value.*;
-import org.apache.plc4x.java.spi.codegen.*;
-import org.apache.plc4x.java.spi.codegen.fields.*;
-import org.apache.plc4x.java.spi.codegen.io.*;
-import org.apache.plc4x.java.spi.generation.*;
-
-// Code generated by code-generation. DO NOT EDIT.
-
-public class OpcuaNegotiationMessage implements Message {
-
-  // Properties.
-  protected final long version;
-
-  public OpcuaNegotiationMessage(long version) {
-    super();
-    this.version = version;
-  }
-
-  public long getVersion() {
-    return version;
-  }
-
-  public void serialize(WriteBuffer writeBuffer) throws SerializationException {
-    PositionAware positionAware = writeBuffer;
-    boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get();
-    writeBuffer.pushContext("OpcuaNegotiationMessage");
-
-    // Simple Field (version)
-    writeSimpleField("version", version, writeUnsignedLong(writeBuffer, 32));
-
-    writeBuffer.popContext("OpcuaNegotiationMessage");
-  }
-
-  @Override
-  public int getLengthInBytes() {
-    return (int) Math.ceil((float) getLengthInBits() / 8.0);
-  }
-
-  @Override
-  public int getLengthInBits() {
-    int lengthInBits = 0;
-    OpcuaNegotiationMessage _value = this;
-    boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get();
-
-    // Simple field (version)
-    lengthInBits += 32;
-
-    return lengthInBits;
-  }
-
-  public static OpcuaNegotiationMessage staticParse(ReadBuffer readBuffer, Object... args)
-      throws ParseException {
-    PositionAware positionAware = readBuffer;
-    return staticParse(readBuffer);
-  }
-
-  public static OpcuaNegotiationMessage staticParse(ReadBuffer readBuffer) throws ParseException {
-    readBuffer.pullContext("OpcuaNegotiationMessage");
-    PositionAware positionAware = readBuffer;
-    boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get();
-
-    long version = readSimpleField("version", readUnsignedLong(readBuffer, 32));
-
-    readBuffer.closeContext("OpcuaNegotiationMessage");
-    // Create the instance
-    OpcuaNegotiationMessage _opcuaNegotiationMessage;
-    _opcuaNegotiationMessage = new OpcuaNegotiationMessage(version);
-    return _opcuaNegotiationMessage;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) {
-      return true;
-    }
-    if (!(o instanceof OpcuaNegotiationMessage)) {
-      return false;
-    }
-    OpcuaNegotiationMessage that = (OpcuaNegotiationMessage) o;
-    return (getVersion() == that.getVersion()) && true;
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(getVersion());
-  }
-
-  @Override
-  public String toString() {
-    WriteBufferBoxBased writeBufferBoxBased = new WriteBufferBoxBased(true, true);
-    try {
-      writeBufferBoxBased.writeSerializable(this);
-    } catch (SerializationException e) {
-      throw new RuntimeException(e);
-    }
-    return "\n" + writeBufferBoxBased.getBox().toString() + "\n";
-  }
-}
diff --git a/tools/release-0-update-generated-code.sh b/tools/release-0-update-generated-code.sh
index 6e456ea824..f71a4400a7 100755
--- a/tools/release-0-update-generated-code.sh
+++ b/tools/release-0-update-generated-code.sh
@@ -52,6 +52,13 @@ if [ $? -ne 0 ]; then
     exit 1
 fi
 
+# 4. Make sure the generated driver documentation is up-to-date.
+docker compose run --rm releaser bash /ws/mvnw -e -P with-java -Dmaven.repo.local=/ws/out/.repository clean site -pl :plc4j-driver-all
+if [ $? -ne 0 ]; then
+    echo "Got non-0 exit code from docker compose, aborting."
+    exit 1
+fi
+
 # Check if there is unchanged files (or committing and pushing nothing will fail) (local)
 if [[ $(git status --porcelain) ]]; then
   echo "Committing changes."