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 2021/08/18 13:52:40 UTC

[plc4x] branch s7event updated (c4ea06f -> a18e9ed)

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

cdutz pushed a change to branch s7event
in repository https://gitbox.apache.org/repos/asf/plc4x.git.


    from c4ea06f  - Fine-tuning of the PR.
     add 971cbcd  - Continued porting the changes to PLC4C - Changed all usages of enum fields in the s7 to simple fields (all except one, where the enum field actually is required)
     add 22f8c3b  - Fixed a typo in a function name
     add a3b6582  - Continued porting the changes to PLC4C - Changed all usages of enum fields in the s7 to simple fields (all except one, where the enum field actually is required)
     new d8f10f2  - Continued getting the plc4c build working again
     new a18e9ed  - Cleaned up the pom configuration of the language test for go

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../plc4x/language/c/CLanguageTemplateHelper.java  |  35 +-
 .../resources/templates/c/data-io-template.h.ftlh  |   1 +
 .../resources/templates/c/enum-template.c.ftlh     |  22 ++
 .../resources/templates/c/enum-template.h.ftlh     |  17 +
 .../resources/templates/c/pojo-template.c.ftlh     |  16 +-
 .../resources/templates/c/pojo-template.h.ftlh     |   3 +-
 .../test/resources/integration-test/CMakeLists.txt |   2 +
 .../include/plc4c/driver_test_static.h             |  12 +-
 .../language-go/src/test/resources/plc4go/pom.xml  |  14 +-
 plc4c/drivers/modbus/CMakeLists.txt                |   2 +-
 .../modbus/include/plc4c/driver_modbus_static.h    |   6 +-
 plc4c/drivers/s7/CMakeLists.txt                    |   2 +-
 plc4c/drivers/s7/include/plc4c/driver_s7.h         |  22 --
 .../plc4c/{driver_s7.h => driver_s7_static.h}      |  73 ++--
 plc4c/drivers/s7/src/driver_s7.c                   |  95 ------
 plc4c/drivers/s7/src/driver_s7_packets.c           |  21 +-
 plc4c/drivers/s7/src/driver_s7_sm_read.c           |   6 +-
 .../s7/src/{driver_s7.c => driver_s7_static.c}     |  77 ++---
 plc4c/examples/hello-world-modbus/CMakeLists.txt   |   1 +
 plc4c/examples/hello-world-s7/CMakeLists.txt       |   1 +
 plc4c/generated-sources/modbus/include/data_item.h |   1 +
 .../modbus/include/modbus_constants.h              |   1 +
 .../modbus/include/modbus_data_type.h              |  11 +
 .../modbus/include/modbus_error_code.h             |  11 +
 .../generated-sources/modbus/include/modbus_pdu.h  |   1 +
 .../modbus_pdu_read_file_record_request_item.h     |   1 +
 .../modbus_pdu_read_file_record_response_item.h    |   1 +
 .../modbus_pdu_write_file_record_request_item.h    |   1 +
 .../modbus_pdu_write_file_record_response_item.h   |   1 +
 .../modbus/include/modbus_serial_adu.h             |   1 +
 .../modbus/include/modbus_tcp_adu.h                |   1 +
 .../modbus/src/modbus_data_type.c                  |  22 ++
 .../modbus/src/modbus_error_code.c                 |  22 ++
 plc4c/generated-sources/modbus/src/modbus_pdu.c    |  22 +-
 .../include/alarm_message_ack_object_push_type.h   |  68 ++++
 .../s7/include/alarm_message_ack_push_type.h       |  62 ++++
 .../s7/include/alarm_message_ack_response_type.h   |  59 ++++
 .../s7/include/alarm_message_ack_type.h            |  60 ++++
 .../s7/include/alarm_message_object_ack_type.h     |  69 ++++
 .../s7/include/alarm_message_object_push_type.h    |  72 ++++
 .../s7/include/alarm_message_object_query_type.h   |  71 ++++
 .../s7/include/alarm_message_push_type.h           |  62 ++++
 ...load_data_item.h => alarm_message_query_type.h} |  30 +-
 .../s7/include/alarm_state_type.h                  |  67 ++++
 plc4c/generated-sources/s7/include/alarm_type.h    |  64 ++++
 ...payload_data_item.h => associated_value_type.h} |  22 +-
 plc4c/generated-sources/s7/include/cotp_packet.h   |   1 +
 .../generated-sources/s7/include/cotp_parameter.h  |   1 +
 .../s7/include/cotp_protocol_class.h               |  11 +
 .../generated-sources/s7/include/cotp_tpdu_size.h  |  11 +
 .../s7/include/cpu_subscribe_events.h              |  65 ++++
 plc4c/generated-sources/s7/include/data_item.h     |   1 +
 .../s7/include/data_transport_error_code.h         |  11 +
 .../s7/include/data_transport_size.h               |  11 +
 .../s7/include/{tpkt_packet.h => date_and_time.h}  |  35 +-
 plc4c/generated-sources/s7/include/device_group.h  |  11 +
 plc4c/generated-sources/s7/include/event_type.h    |  65 ++++
 plc4c/generated-sources/s7/include/memory_area.h   |  11 +
 .../s7/include/mode_transition_type.h              |  70 ++++
 plc4c/generated-sources/s7/include/query_type.h    |  64 ++++
 plc4c/generated-sources/s7/include/s7_address.h    |   1 +
 .../s7/include/s7_data_alarm_message.h             |  98 ++++++
 plc4c/generated-sources/s7/include/s7_message.h    |   1 +
 plc4c/generated-sources/s7/include/s7_parameter.h  |   1 +
 .../s7/include/s7_parameter_user_data_item.h       |   1 +
 plc4c/generated-sources/s7/include/s7_payload.h    |   1 +
 .../s7/include/s7_payload_user_data_item.h         |   7 +-
 .../s7/include/s7_var_payload_data_item.h          |   1 +
 .../s7/include/s7_var_payload_status_item.h        |   1 +
 .../s7/include/s7_var_request_parameter_item.h     |   1 +
 .../s7/include/{szl_id.h => state.h}               |  34 +-
 .../generated-sources/s7/include/syntax_id_type.h  |  74 ++++
 .../s7/include/szl_data_tree_item.h                |   1 +
 plc4c/generated-sources/s7/include/szl_id.h        |   1 +
 .../s7/include/szl_module_type_class.h             |  11 +
 plc4c/generated-sources/s7/include/szl_sublist.h   |  11 +
 plc4c/generated-sources/s7/include/tpkt_packet.h   |   1 +
 .../generated-sources/s7/include/transport_size.h  |  11 +
 .../s7/src/alarm_message_ack_object_push_type.c    | 182 ++++++++++
 .../s7/src/alarm_message_ack_push_type.c           | 151 +++++++++
 .../s7/src/alarm_message_ack_response_type.c       | 125 +++++++
 .../s7/src/alarm_message_ack_type.c                | 134 ++++++++
 .../s7/src/alarm_message_object_ack_type.c         | 186 +++++++++++
 .../s7/src/alarm_message_object_push_type.c        | 259 ++++++++++++++
 .../s7/src/alarm_message_object_query_type.c       | 237 +++++++++++++
 .../s7/src/alarm_message_push_type.c               | 151 +++++++++
 .../s7/src/alarm_message_query_type.c              | 191 +++++++++++
 plc4c/generated-sources/s7/src/alarm_state_type.c  | 105 ++++++
 plc4c/generated-sources/s7/src/alarm_type.c        |  87 +++++
 .../s7/src/associated_value_type.c                 | 138 ++++++++
 plc4c/generated-sources/s7/src/cotp_packet.c       |  48 +--
 plc4c/generated-sources/s7/src/cotp_parameter.c    |  18 +-
 .../generated-sources/s7/src/cotp_protocol_class.c |  22 ++
 plc4c/generated-sources/s7/src/cotp_tpdu_size.c    |  22 ++
 .../s7/src/cpu_subscribe_events.c                  |  93 ++++++
 .../s7/src/data_transport_error_code.c             |  22 ++
 .../generated-sources/s7/src/data_transport_size.c |  22 ++
 plc4c/generated-sources/s7/src/date_and_time.c     | 165 +++++++++
 plc4c/generated-sources/s7/src/device_group.c      |  22 ++
 plc4c/generated-sources/s7/src/event_type.c        |  93 ++++++
 plc4c/generated-sources/s7/src/memory_area.c       |  22 ++
 .../s7/src/mode_transition_type.c                  | 123 +++++++
 plc4c/generated-sources/s7/src/query_type.c        |  87 +++++
 plc4c/generated-sources/s7/src/s7_address.c        |  16 +-
 .../s7/src/s7_data_alarm_message.c                 | 372 +++++++++++++++++++++
 plc4c/generated-sources/s7/src/s7_parameter.c      |   6 +-
 plc4c/generated-sources/s7/src/s7_payload.c        |   8 +-
 .../s7/src/s7_payload_user_data_item.c             | 146 ++++----
 .../s7/src/s7_var_payload_data_item.c              |  34 +-
 .../s7/src/s7_var_payload_status_item.c            |  16 +-
 plc4c/generated-sources/s7/src/state.c             | 193 +++++++++++
 plc4c/generated-sources/s7/src/syntax_id_type.c    | 147 ++++++++
 .../generated-sources/s7/src/szl_data_tree_item.c  |   2 +-
 plc4c/generated-sources/s7/src/szl_id.c            |  32 +-
 .../s7/src/szl_module_type_class.c                 |  22 ++
 plc4c/generated-sources/s7/src/szl_sublist.c       |  22 ++
 plc4c/generated-sources/s7/src/transport_size.c    |  22 ++
 plc4go/internal/plc4go/spi/default/DefaultCodec.go |   1 +
 plc4go/pom.xml                                     |   2 +-
 .../s7/src/main/resources/protocols/s7/s7.mspec    | 252 +++++++-------
 120 files changed, 5238 insertions(+), 616 deletions(-)
 copy plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/ChannelExposingConnection.java => code-generation/language-c/src/test/resources/integration-test/include/plc4c/driver_test_static.h (83%)
 copy plc4go/cmd/main/main.go => plc4c/drivers/modbus/include/plc4c/driver_modbus_static.h (87%)
 copy plc4c/drivers/s7/include/plc4c/{driver_s7.h => driver_s7_static.h} (50%)
 copy plc4c/drivers/s7/src/{driver_s7.c => driver_s7_static.c} (62%)
 create mode 100644 plc4c/generated-sources/s7/include/alarm_message_ack_object_push_type.h
 create mode 100644 plc4c/generated-sources/s7/include/alarm_message_ack_push_type.h
 create mode 100644 plc4c/generated-sources/s7/include/alarm_message_ack_response_type.h
 create mode 100644 plc4c/generated-sources/s7/include/alarm_message_ack_type.h
 create mode 100644 plc4c/generated-sources/s7/include/alarm_message_object_ack_type.h
 create mode 100644 plc4c/generated-sources/s7/include/alarm_message_object_push_type.h
 create mode 100644 plc4c/generated-sources/s7/include/alarm_message_object_query_type.h
 create mode 100644 plc4c/generated-sources/s7/include/alarm_message_push_type.h
 copy plc4c/generated-sources/s7/include/{s7_var_payload_data_item.h => alarm_message_query_type.h} (53%)
 create mode 100644 plc4c/generated-sources/s7/include/alarm_state_type.h
 create mode 100644 plc4c/generated-sources/s7/include/alarm_type.h
 copy plc4c/generated-sources/s7/include/{s7_var_payload_data_item.h => associated_value_type.h} (56%)
 create mode 100644 plc4c/generated-sources/s7/include/cpu_subscribe_events.h
 copy plc4c/generated-sources/s7/include/{tpkt_packet.h => date_and_time.h} (52%)
 create mode 100644 plc4c/generated-sources/s7/include/event_type.h
 create mode 100644 plc4c/generated-sources/s7/include/mode_transition_type.h
 create mode 100644 plc4c/generated-sources/s7/include/query_type.h
 create mode 100644 plc4c/generated-sources/s7/include/s7_data_alarm_message.h
 copy plc4c/generated-sources/s7/include/{szl_id.h => state.h} (55%)
 create mode 100644 plc4c/generated-sources/s7/include/syntax_id_type.h
 create mode 100644 plc4c/generated-sources/s7/src/alarm_message_ack_object_push_type.c
 create mode 100644 plc4c/generated-sources/s7/src/alarm_message_ack_push_type.c
 create mode 100644 plc4c/generated-sources/s7/src/alarm_message_ack_response_type.c
 create mode 100644 plc4c/generated-sources/s7/src/alarm_message_ack_type.c
 create mode 100644 plc4c/generated-sources/s7/src/alarm_message_object_ack_type.c
 create mode 100644 plc4c/generated-sources/s7/src/alarm_message_object_push_type.c
 create mode 100644 plc4c/generated-sources/s7/src/alarm_message_object_query_type.c
 create mode 100644 plc4c/generated-sources/s7/src/alarm_message_push_type.c
 create mode 100644 plc4c/generated-sources/s7/src/alarm_message_query_type.c
 create mode 100644 plc4c/generated-sources/s7/src/alarm_state_type.c
 create mode 100644 plc4c/generated-sources/s7/src/alarm_type.c
 create mode 100644 plc4c/generated-sources/s7/src/associated_value_type.c
 create mode 100644 plc4c/generated-sources/s7/src/cpu_subscribe_events.c
 create mode 100644 plc4c/generated-sources/s7/src/date_and_time.c
 create mode 100644 plc4c/generated-sources/s7/src/event_type.c
 create mode 100644 plc4c/generated-sources/s7/src/mode_transition_type.c
 create mode 100644 plc4c/generated-sources/s7/src/query_type.c
 create mode 100644 plc4c/generated-sources/s7/src/s7_data_alarm_message.c
 create mode 100644 plc4c/generated-sources/s7/src/state.c
 create mode 100644 plc4c/generated-sources/s7/src/syntax_id_type.c

[plc4x] 01/02: - Continued getting the plc4c build working again

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch s7event
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit d8f10f29e8c3da11d93e09ddc77706abd301d1fe
Author: cdutz <ch...@c-ware.de>
AuthorDate: Wed Aug 18 15:51:59 2021 +0200

    - Continued getting the plc4c build working again
---
 .../plc4x/language/c/CLanguageTemplateHelper.java  | 31 ++++++++++++++--------
 .../resources/templates/c/pojo-template.c.ftlh     |  8 ++----
 .../resources/templates/c/pojo-template.h.ftlh     |  2 +-
 plc4c/drivers/s7/include/plc4c/driver_s7_static.h  |  6 ++++-
 plc4c/drivers/s7/src/driver_s7_sm_read.c           |  2 +-
 plc4c/drivers/s7/src/driver_s7_static.c            | 14 +++++++++-
 plc4c/examples/hello-world-modbus/CMakeLists.txt   |  1 +
 plc4c/examples/hello-world-s7/CMakeLists.txt       |  1 +
 .../s7/include/alarm_message_object_ack_type.h     |  1 +
 .../s7/include/s7_data_alarm_message.h             |  4 ++-
 .../s7/include/s7_payload_user_data_item.h         |  6 ++++-
 .../s7/src/alarm_message_object_ack_type.c         |  4 +++
 .../s7/src/associated_value_type.c                 |  2 +-
 plc4c/generated-sources/s7/src/date_and_time.c     | 14 +++++-----
 .../s7/src/s7_data_alarm_message.c                 | 14 +++++++---
 .../s7/src/s7_payload_user_data_item.c             | 22 ++++++++++++---
 plc4go/internal/plc4go/spi/default/DefaultCodec.go |  1 +
 plc4go/pom.xml                                     |  2 +-
 .../s7/src/main/resources/protocols/s7/s7.mspec    | 14 +++++-----
 19 files changed, 104 insertions(+), 45 deletions(-)

diff --git a/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java b/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
index 30574c5..b303a5d 100644
--- a/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
+++ b/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
@@ -126,14 +126,14 @@ public class CLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelpe
         return getLanguageTypeNameForTypeReference(typeReference);
     }
 
-    public Map<ComplexTypeDefinition, ConstField> getAllConstFields() {
-        Map<ComplexTypeDefinition, ConstField> constFields = new HashMap<>();
+    public Map<ConstField, ComplexTypeDefinition> getAllConstFields() {
+        Map<ConstField, ComplexTypeDefinition> constFields = new HashMap<>();
         ((ComplexTypeDefinition) getThisTypeDefinition()).getConstFields().forEach(
-            constField -> constFields.put((ComplexTypeDefinition) getThisTypeDefinition(), constField));
+            constField -> constFields.put(constField, (ComplexTypeDefinition) getThisTypeDefinition()));
         if(getSwitchField() != null) {
             for (DiscriminatedComplexTypeDefinition switchCase : getSwitchField().getCases()) {
                 switchCase.getConstFields().forEach(
-                    constField -> constFields.put(switchCase, constField));
+                    constField -> constFields.put(constField, switchCase));
             }
         }
         return constFields;
@@ -618,6 +618,9 @@ public class CLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelpe
         }
         // STATIC_CALL implies that driver specific static logic should be called
         if ("STATIC_CALL".equals(vl.getName())) {
+            if (!(vl.getArgs().get(0) instanceof StringLiteral)) {
+                throw new FreemarkerException("Expecting the first argument of a 'STATIC_CALL' to be a StringLiteral");
+            }
             String functionName = ((StringLiteral) vl.getArgs().get(0)).getValue();
             // We'll cut off the java package structure and just take the segment after the last "."
             functionName = functionName.substring(functionName.lastIndexOf('.') + 1, functionName.length() -1);
@@ -756,13 +759,15 @@ public class CLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelpe
     private String toVariableSerializationExpression(TypeDefinition baseType, Field field, Term term, Argument[] serialzerArguments) {
         VariableLiteral vl = (VariableLiteral) term;
         if ("STATIC_CALL".equals(vl.getName())) {
-            StringBuilder sb = new StringBuilder();
             if (!(vl.getArgs().get(0) instanceof StringLiteral)) {
                 throw new FreemarkerException("Expecting the first argument of a 'STATIC_CALL' to be a StringLiteral");
             }
-            String methodName = ((StringLiteral) vl.getArgs().get(0)).getValue();
-            methodName = methodName.substring(1, methodName.length() - 1);
-            sb.append(methodName).append("(");
+            String functionName = ((StringLiteral) vl.getArgs().get(0)).getValue();
+            // We'll cut off the java package structure and just take the segment after the last "."
+            functionName = functionName.substring(functionName.lastIndexOf('.') + 1, functionName.length() -1);
+            // But to make the function name unique, well add the driver prefix to it.
+            StringBuilder sb = new StringBuilder(getCTypeName(functionName));
+            sb.append("(");
             for (int i = 1; i < vl.getArgs().size(); i++) {
                 Term arg = vl.getArgs().get(i);
                 if (i > 1) {
@@ -771,7 +776,7 @@ public class CLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelpe
                 if (arg instanceof VariableLiteral) {
                     VariableLiteral va = (VariableLiteral) arg;
                     // "io" and "_value" are always available in every parser.
-                    boolean isSerializerArg = "io".equals(va.getName()) || "_value".equals(va.getName()) || "element".equals(va.getName());
+                    boolean isSerializerArg = "writeBuffer".equals(va.getName()) || "_value".equals(va.getName()) || "element".equals(va.getName());
                     boolean isTypeArg = "_type".equals(va.getName());
                     if (!isSerializerArg && !isTypeArg && serialzerArguments != null) {
                         for (Argument serializerArgument : serialzerArguments) {
@@ -782,9 +787,13 @@ public class CLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelpe
                         }
                     }
                     if (isSerializerArg) {
-                        sb.append(va.getName());
+                        if("_value".equals(va.getName())) {
+                            sb.append("_message");
+                        } else {
+                            sb.append(va.getName());
+                        }
                         if(va.getChild() != null) {
-                            sb.append(".");
+                            sb.append("->");
                             appendVariableExpressionRest(sb, baseType, va.getChild());
                         }
                     } else if (isTypeArg) {
diff --git a/code-generation/language-c/src/main/resources/templates/c/pojo-template.c.ftlh b/code-generation/language-c/src/main/resources/templates/c/pojo-template.c.ftlh
index f96df41..ad00410 100644
--- a/code-generation/language-c/src/main/resources/templates/c/pojo-template.c.ftlh
+++ b/code-generation/language-c/src/main/resources/templates/c/pojo-template.c.ftlh
@@ -106,7 +106,7 @@ ${helper.getCTypeName(type.name)} ${helper.getCTypeName(type.name)}_null() {
 <#if helper.getAllConstFields()?has_content>
 
 // Constant values.
-    <#list helper.getAllConstFields() as parentType, constField>
+    <#list helper.getAllConstFields() as constField, parentType>
 static const ${helper.getLanguageTypeNameForField(constField)} ${helper.getCTypeName(parentType.name)?upper_case}_${helper.camelCaseToSnakeCase(constField.name)?upper_case}_const = ${constField.referenceValue};
 ${helper.getLanguageTypeNameForField(constField)} ${helper.getCTypeName(parentType.name)?upper_case}_${helper.camelCaseToSnakeCase(constField.name)?upper_case}() {
   return ${helper.getCTypeName(parentType.name)?upper_case}_${helper.camelCaseToSnakeCase(constField.name)?upper_case}_const;
@@ -537,11 +537,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_bu
             <#assign manualField = field>
 
 <#if indentContent>    </#if>  // Manual Field (${manualField.name})<#if indentContent>    </#if>  {
-            <#if helper.isSimpleTypeReference(manualField.type)>
-<#if indentContent>    </#if>  _res = ${helper.getWriteBufferWriteMethodCall(manualField.type, "(${helper.getLanguageTypeNameForTypeReference(manualField.type)}*) plc4c_utils_list_get_value(_message->" + helper.getFieldName(baseType, manualField), field)};
-            <#else>
-<#if indentContent>    </#if>  _res = ${helper.getCTypeName(manualField.type.name)}_serialize(writeBuffer, (void*) &_value);
-            </#if>
+<#if indentContent>    </#if>  _res = ${helper.toSerializationExpression(baseType, manualField, manualField.serializeExpression, baseType.parserArguments)};
 <#if indentContent>    </#if>  if(_res != OK) {
 <#if indentContent>    </#if>    return _res;
 <#if indentContent>    </#if>  }
diff --git a/code-generation/language-c/src/main/resources/templates/c/pojo-template.h.ftlh b/code-generation/language-c/src/main/resources/templates/c/pojo-template.h.ftlh
index fadef8e..47249d3 100644
--- a/code-generation/language-c/src/main/resources/templates/c/pojo-template.h.ftlh
+++ b/code-generation/language-c/src/main/resources/templates/c/pojo-template.h.ftlh
@@ -117,7 +117,7 @@ ${helper.getCTypeName(type.name)}_discriminator ${helper.getCTypeName(type.name)
 <#if helper.getAllConstFields()?has_content>
 
 // Constant values.
-    <#list helper.getAllConstFields() as parentType, constField>
+    <#list helper.getAllConstFields() as constField, parentType>
 ${helper.getLanguageTypeNameForField(constField)} ${helper.getCTypeName(parentType.name)?upper_case}_${helper.camelCaseToSnakeCase(constField.name)?upper_case}();
     </#list>
 </#if>
diff --git a/plc4c/drivers/s7/include/plc4c/driver_s7_static.h b/plc4c/drivers/s7/include/plc4c/driver_s7_static.h
index 3575b8b..2ef20fe 100644
--- a/plc4c/drivers/s7/include/plc4c/driver_s7_static.h
+++ b/plc4c/drivers/s7/include/plc4c/driver_s7_static.h
@@ -33,12 +33,16 @@ uint16_t plc4c_s7_read_write_event_item_length(plc4c_spi_read_buffer* io, uint16
 
 uint16_t plc4c_s7_read_write_right_shift3(plc4c_spi_read_buffer* io);
 
-void plc4c_s7_read_write_left_shift3(plc4c_spi_write_buffer* io, uint16_t value);
+plc4c_return_code plc4c_s7_read_write_left_shift3(plc4c_spi_write_buffer* io, uint16_t value);
 
 uint8_t plc4c_s7_read_write_bcd_to_int(plc4c_spi_read_buffer* io);
 
+plc4c_return_code plc4c_s7_read_write_byte_to_bcd(plc4c_spi_write_buffer* writeBuffer, uint8_t value);
+
 uint16_t plc4c_s7_read_write_s7msec_to_int(plc4c_spi_read_buffer* io);
 
+plc4c_return_code plc4c_s7_read_write_int_to_s7msec(plc4c_spi_write_buffer* writeBuffer, uint16_t value);
+
 char* plc4c_s7_read_write_parse_s7_string(plc4c_spi_read_buffer* io, int32_t stringLength, char* encoding);
 
 char* plc4c_s7_read_write_parse_s7_char(plc4c_spi_read_buffer* io, char* encoding);
diff --git a/plc4c/drivers/s7/src/driver_s7_sm_read.c b/plc4c/drivers/s7/src/driver_s7_sm_read.c
index 11f9038..bf306c3 100644
--- a/plc4c/drivers/s7/src/driver_s7_sm_read.c
+++ b/plc4c/drivers/s7/src/driver_s7_sm_read.c
@@ -185,7 +185,7 @@ void plc4c_driver_s7_free_read_response(plc4c_read_response* response) {
   free(response->items);
 }
 
-plc4c_return_code plc4c_driver_s7_parse_read_responce( 
+plc4c_return_code plc4c_driver_s7_parse_read_response(
                                 plc4c_read_request_execution* execution,
                                 plc4c_s7_read_write_tpkt_packet* packet) {
 
diff --git a/plc4c/drivers/s7/src/driver_s7_static.c b/plc4c/drivers/s7/src/driver_s7_static.c
index d650192..afb5228 100644
--- a/plc4c/drivers/s7/src/driver_s7_static.c
+++ b/plc4c/drivers/s7/src/driver_s7_static.c
@@ -35,7 +35,8 @@ uint16_t plc4c_s7_read_write_right_shift3(plc4c_spi_read_buffer* io) {
   return 0;
 }
 
-void plc4c_s7_read_write_left_shift3(plc4c_spi_write_buffer* io, uint16_t value) {
+plc4c_return_code plc4c_s7_read_write_left_shift3(plc4c_spi_write_buffer* io, uint16_t value) {
+  return OK;
 }
 
 uint8_t plc4c_s7_read_write_bcd_to_int(plc4c_spi_read_buffer* io) {
@@ -132,3 +133,14 @@ time_t plc4c_s7_read_write_parse_tia_date_time(plc4c_spi_read_buffer* io) {
   // TODO: Implement ...
   return 0;
 }
+
+plc4c_return_code plc4c_s7_read_write_byte_to_bcd(plc4c_spi_write_buffer* writeBuffer, uint8_t value) {
+  // TODO: Implement ...
+  return 0;
+}
+
+plc4c_return_code plc4c_s7_read_write_int_to_s7msec(plc4c_spi_write_buffer* writeBuffer, uint16_t value) {
+  // TODO: Implement ...
+  return 0;
+}
+
diff --git a/plc4c/examples/hello-world-modbus/CMakeLists.txt b/plc4c/examples/hello-world-modbus/CMakeLists.txt
index 481460c..250d42a 100644
--- a/plc4c/examples/hello-world-modbus/CMakeLists.txt
+++ b/plc4c/examples/hello-world-modbus/CMakeLists.txt
@@ -18,6 +18,7 @@
 ]]
 
 include_directories("../../api/include"
+        "../../spi/include"
         "../../drivers/modbus/include"
         "../../transports/tcp/include" )
 
diff --git a/plc4c/examples/hello-world-s7/CMakeLists.txt b/plc4c/examples/hello-world-s7/CMakeLists.txt
index e0b72c1..a2bc94c 100644
--- a/plc4c/examples/hello-world-s7/CMakeLists.txt
+++ b/plc4c/examples/hello-world-s7/CMakeLists.txt
@@ -18,6 +18,7 @@
 ]]
 
 include_directories("../../api/include"
+        "../../spi/include"
         "../../drivers/s7/include"
         "../../transports/tcp/include" )
 
diff --git a/plc4c/generated-sources/s7/include/alarm_message_object_ack_type.h b/plc4c/generated-sources/s7/include/alarm_message_object_ack_type.h
index 789b238..baf4bf6 100644
--- a/plc4c/generated-sources/s7/include/alarm_message_object_ack_type.h
+++ b/plc4c/generated-sources/s7/include/alarm_message_object_ack_type.h
@@ -37,6 +37,7 @@ extern "C" {
 
 
 // Constant values.
+uint8_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_VARIABLE_SPEC();
 uint8_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_LENGTH();
 
 struct plc4c_s7_read_write_alarm_message_object_ack_type {
diff --git a/plc4c/generated-sources/s7/include/s7_data_alarm_message.h b/plc4c/generated-sources/s7/include/s7_data_alarm_message.h
index 5d81774..a858b9e 100644
--- a/plc4c/generated-sources/s7/include/s7_data_alarm_message.h
+++ b/plc4c/generated-sources/s7/include/s7_data_alarm_message.h
@@ -56,8 +56,10 @@ typedef enum plc4c_s7_read_write_s7_data_alarm_message_type plc4c_s7_read_write_
 plc4c_s7_read_write_s7_data_alarm_message_discriminator plc4c_s7_read_write_s7_data_alarm_message_get_discriminator(plc4c_s7_read_write_s7_data_alarm_message_type type);
 
 // Constant values.
-uint8_t PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_NUMBER_MESSAGE_OBJ();
+uint8_t PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_FUNCTION_ID();
 uint8_t PLC4C_S7_READ_WRITE_S7_MESSAGE_OBJECT_REQUEST_LENGTH();
+uint8_t PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_NUMBER_MESSAGE_OBJ();
+uint8_t PLC4C_S7_READ_WRITE_S7_MESSAGE_OBJECT_REQUEST_VARIABLE_SPEC();
 
 struct plc4c_s7_read_write_s7_data_alarm_message {
   /* This is an abstract type so this property saves the type of this typed union */
diff --git a/plc4c/generated-sources/s7/include/s7_payload_user_data_item.h b/plc4c/generated-sources/s7/include/s7_payload_user_data_item.h
index c6eb147..c84adba 100644
--- a/plc4c/generated-sources/s7/include/s7_payload_user_data_item.h
+++ b/plc4c/generated-sources/s7/include/s7_payload_user_data_item.h
@@ -81,9 +81,13 @@ typedef enum plc4c_s7_read_write_s7_payload_user_data_item_type plc4c_s7_read_wr
 plc4c_s7_read_write_s7_payload_user_data_item_discriminator plc4c_s7_read_write_s7_payload_user_data_item_get_discriminator(plc4c_s7_read_write_s7_payload_user_data_item_type type);
 
 // Constant values.
+uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_NUMBER_MESSAGE_OBJ();
+uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_LENGTH();
 uint16_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_READ_SZL_RESPONSE_SZL_ITEM_LENGTH();
+uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_FUNCTION_ID();
 uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_RESPONSE_NUMBER_MESSAGE_OBJ();
-uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_LENGTH();
+uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_VARIABLE_SPEC();
+uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_RESPONSE_FUNCTION_ID();
 
 struct plc4c_s7_read_write_s7_payload_user_data_item {
   /* This is an abstract type so this property saves the type of this typed union */
diff --git a/plc4c/generated-sources/s7/src/alarm_message_object_ack_type.c b/plc4c/generated-sources/s7/src/alarm_message_object_ack_type.c
index 0eaa59c..ed4bc26 100644
--- a/plc4c/generated-sources/s7/src/alarm_message_object_ack_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_message_object_ack_type.c
@@ -25,6 +25,10 @@
 
 
 // Constant values.
+static const uint8_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_VARIABLE_SPEC_const = 0x12;
+uint8_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_VARIABLE_SPEC() {
+  return PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_VARIABLE_SPEC_const;
+}
 static const uint8_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_LENGTH_const = 0x08;
 uint8_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_LENGTH() {
   return PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_LENGTH_const;
diff --git a/plc4c/generated-sources/s7/src/associated_value_type.c b/plc4c/generated-sources/s7/src/associated_value_type.c
index d860baa..e4f04a5 100644
--- a/plc4c/generated-sources/s7/src/associated_value_type.c
+++ b/plc4c/generated-sources/s7/src/associated_value_type.c
@@ -96,7 +96,7 @@ plc4c_return_code plc4c_s7_read_write_associated_value_type_serialize(plc4c_spi_
   }
 
   // Manual Field (valueLength)  {
-  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, (uint16_t*) plc4c_utils_list_get_value(_message->value_length);
+  _res = plc4c_s7_read_write_left_shift3(writeBuffer, _message->value_length);
   if(_res != OK) {
     return _res;
   }
diff --git a/plc4c/generated-sources/s7/src/date_and_time.c b/plc4c/generated-sources/s7/src/date_and_time.c
index 55a6eb7..0dd112b 100644
--- a/plc4c/generated-sources/s7/src/date_and_time.c
+++ b/plc4c/generated-sources/s7/src/date_and_time.c
@@ -79,43 +79,43 @@ plc4c_return_code plc4c_s7_read_write_date_and_time_serialize(plc4c_spi_write_bu
   plc4c_return_code _res = OK;
 
   // Manual Field (year)  {
-  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (uint8_t*) plc4c_utils_list_get_value(_message->year);
+  _res = plc4c_s7_read_write_byte_to_bcd(writeBuffer, _message->year);
   if(_res != OK) {
     return _res;
   }
 
   // Manual Field (month)  {
-  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (uint8_t*) plc4c_utils_list_get_value(_message->month);
+  _res = plc4c_s7_read_write_byte_to_bcd(writeBuffer, _message->month);
   if(_res != OK) {
     return _res;
   }
 
   // Manual Field (day)  {
-  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (uint8_t*) plc4c_utils_list_get_value(_message->day);
+  _res = plc4c_s7_read_write_byte_to_bcd(writeBuffer, _message->day);
   if(_res != OK) {
     return _res;
   }
 
   // Manual Field (hour)  {
-  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (uint8_t*) plc4c_utils_list_get_value(_message->hour);
+  _res = plc4c_s7_read_write_byte_to_bcd(writeBuffer, _message->hour);
   if(_res != OK) {
     return _res;
   }
 
   // Manual Field (minutes)  {
-  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (uint8_t*) plc4c_utils_list_get_value(_message->minutes);
+  _res = plc4c_s7_read_write_byte_to_bcd(writeBuffer, _message->minutes);
   if(_res != OK) {
     return _res;
   }
 
   // Manual Field (seconds)  {
-  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (uint8_t*) plc4c_utils_list_get_value(_message->seconds);
+  _res = plc4c_s7_read_write_byte_to_bcd(writeBuffer, _message->seconds);
   if(_res != OK) {
     return _res;
   }
 
   // Manual Field (msec)  {
-  _res = plc4c_spi_write_unsigned_short(writeBuffer, 12, (uint16_t*) plc4c_utils_list_get_value(_message->msec);
+  _res = plc4c_s7_read_write_int_to_s7msec(writeBuffer, _message->msec);
   if(_res != OK) {
     return _res;
   }
diff --git a/plc4c/generated-sources/s7/src/s7_data_alarm_message.c b/plc4c/generated-sources/s7/src/s7_data_alarm_message.c
index 339ad91..2ca09bc 100644
--- a/plc4c/generated-sources/s7/src/s7_data_alarm_message.c
+++ b/plc4c/generated-sources/s7/src/s7_data_alarm_message.c
@@ -48,14 +48,22 @@ plc4c_s7_read_write_s7_data_alarm_message plc4c_s7_read_write_s7_data_alarm_mess
 
 
 // Constant values.
-static const uint8_t PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_NUMBER_MESSAGE_OBJ_const = 0x01;
-uint8_t PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_NUMBER_MESSAGE_OBJ() {
-  return PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_NUMBER_MESSAGE_OBJ_const;
+static const uint8_t PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_FUNCTION_ID_const = 0x00;
+uint8_t PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_FUNCTION_ID() {
+  return PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_FUNCTION_ID_const;
 }
 static const uint8_t PLC4C_S7_READ_WRITE_S7_MESSAGE_OBJECT_REQUEST_LENGTH_const = 0x08;
 uint8_t PLC4C_S7_READ_WRITE_S7_MESSAGE_OBJECT_REQUEST_LENGTH() {
   return PLC4C_S7_READ_WRITE_S7_MESSAGE_OBJECT_REQUEST_LENGTH_const;
 }
+static const uint8_t PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_NUMBER_MESSAGE_OBJ_const = 0x01;
+uint8_t PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_NUMBER_MESSAGE_OBJ() {
+  return PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_NUMBER_MESSAGE_OBJ_const;
+}
+static const uint8_t PLC4C_S7_READ_WRITE_S7_MESSAGE_OBJECT_REQUEST_VARIABLE_SPEC_const = 0x12;
+uint8_t PLC4C_S7_READ_WRITE_S7_MESSAGE_OBJECT_REQUEST_VARIABLE_SPEC() {
+  return PLC4C_S7_READ_WRITE_S7_MESSAGE_OBJECT_REQUEST_VARIABLE_SPEC_const;
+}
 
 // Parse function.
 plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_parse(plc4c_spi_read_buffer* readBuffer, uint8_t cpuFunctionType, plc4c_s7_read_write_s7_data_alarm_message** _message) {
diff --git a/plc4c/generated-sources/s7/src/s7_payload_user_data_item.c b/plc4c/generated-sources/s7/src/s7_payload_user_data_item.c
index d02a5ed..49d4277 100644
--- a/plc4c/generated-sources/s7/src/s7_payload_user_data_item.c
+++ b/plc4c/generated-sources/s7/src/s7_payload_user_data_item.c
@@ -80,17 +80,33 @@ plc4c_s7_read_write_s7_payload_user_data_item plc4c_s7_read_write_s7_payload_use
 
 
 // Constant values.
+static const uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_NUMBER_MESSAGE_OBJ_const = 0x01;
+uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_NUMBER_MESSAGE_OBJ() {
+  return PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_NUMBER_MESSAGE_OBJ_const;
+}
+static const uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_LENGTH_const = 0x08;
+uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_LENGTH() {
+  return PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_LENGTH_const;
+}
 static const uint16_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_READ_SZL_RESPONSE_SZL_ITEM_LENGTH_const = 28;
 uint16_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_READ_SZL_RESPONSE_SZL_ITEM_LENGTH() {
   return PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_READ_SZL_RESPONSE_SZL_ITEM_LENGTH_const;
 }
+static const uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_FUNCTION_ID_const = 0x00;
+uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_FUNCTION_ID() {
+  return PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_FUNCTION_ID_const;
+}
 static const uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_RESPONSE_NUMBER_MESSAGE_OBJ_const = 0x01;
 uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_RESPONSE_NUMBER_MESSAGE_OBJ() {
   return PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_RESPONSE_NUMBER_MESSAGE_OBJ_const;
 }
-static const uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_LENGTH_const = 0x08;
-uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_LENGTH() {
-  return PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_LENGTH_const;
+static const uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_VARIABLE_SPEC_const = 0x12;
+uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_VARIABLE_SPEC() {
+  return PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_VARIABLE_SPEC_const;
+}
+static const uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_RESPONSE_FUNCTION_ID_const = 0x00;
+uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_RESPONSE_FUNCTION_ID() {
+  return PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_RESPONSE_FUNCTION_ID_const;
 }
 
 // Parse function.
diff --git a/plc4go/internal/plc4go/spi/default/DefaultCodec.go b/plc4go/internal/plc4go/spi/default/DefaultCodec.go
index 1f7310c..57e5126 100644
--- a/plc4go/internal/plc4go/spi/default/DefaultCodec.go
+++ b/plc4go/internal/plc4go/spi/default/DefaultCodec.go
@@ -231,6 +231,7 @@ func (m *defaultCodec) HandleMessages(message interface{}) bool {
 func (m *defaultCodec) Work(codec *DefaultCodecRequirements) {
 	defer func() {
 		if err := recover(); err != nil {
+			// TODO: If this is an error, cast it to an error and log it with "Err(err)"
 			log.Error().Msgf("recovered from %v", err)
 		}
 		log.Info().Msg("Keep running")
diff --git a/plc4go/pom.xml b/plc4go/pom.xml
index 71c6491..b2dfeca 100644
--- a/plc4go/pom.xml
+++ b/plc4go/pom.xml
@@ -296,7 +296,7 @@
       <plugin>
         <groupId>com.igormaznitsa</groupId>
         <artifactId>mvn-golang-wrapper</artifactId>
-        <version>2.3.8</version>
+        <version>2.3.9</version>
         <extensions>true</extensions>
         <executions>
           <execution>
diff --git a/protocols/s7/src/main/resources/protocols/s7/s7.mspec b/protocols/s7/src/main/resources/protocols/s7/s7.mspec
index 54d4f9e..f4c402b 100644
--- a/protocols/s7/src/main/resources/protocols/s7/s7.mspec
+++ b/protocols/s7/src/main/resources/protocols/s7/s7.mspec
@@ -286,13 +286,13 @@
 
 //TODO: Convert BCD to uint
 [type 'DateAndTime'
-    [manual uint 8 'year'     'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.year)' '1']
-    [manual uint 8  'month'   'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.month)' '1']
-    [manual uint 8  'day'     'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.day)' '1']
-    [manual uint 8  'hour'    'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.hour)' '1']
-    [manual uint 8  'minutes' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.minutes)' '1']
-    [manual uint 8  'seconds' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.seconds)' '1']
-    [manual uint 12 'msec'    'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.S7msecToInt", readBuffer)' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.IntToS7msec", writeBuffer, _value.msec)' '2']
+    [manual uint 8  'year'    'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)'    'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.year)'    '1']
+    [manual uint 8  'month'   'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)'    'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.month)'   '1']
+    [manual uint 8  'day'     'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)'    'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.day)'     '1']
+    [manual uint 8  'hour'    'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)'    'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.hour)'    '1']
+    [manual uint 8  'minutes' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)'    'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.minutes)' '1']
+    [manual uint 8  'seconds' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.BcdToInt", readBuffer)'    'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.ByteToBcd", writeBuffer, _value.seconds)' '1']
+    [manual uint 12 'msec'    'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.S7msecToInt", readBuffer)' 'STATIC_CALL("org.apache.plc4x.java.s7.utils.S7EventHelper.IntToS7msec", writeBuffer, _value.msec)'  '2']
     [simple uint 4  'dow']
 ]
 

[plc4x] 02/02: - Cleaned up the pom configuration of the language test for go

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch s7event
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit a18e9ed35764f273c417179434b5cea0468f85d1
Author: cdutz <ch...@c-ware.de>
AuthorDate: Wed Aug 18 15:52:26 2021 +0200

    - Cleaned up the pom configuration of the language test for go
---
 .../language-go/src/test/resources/plc4go/pom.xml          | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/code-generation/language-go/src/test/resources/plc4go/pom.xml b/code-generation/language-go/src/test/resources/plc4go/pom.xml
index bec061a..9f073d4 100644
--- a/code-generation/language-go/src/test/resources/plc4go/pom.xml
+++ b/code-generation/language-go/src/test/resources/plc4go/pom.xml
@@ -33,6 +33,10 @@
 
 <build>
   <plugins>
+    <!--
+      First copy parts of the PLC4Go code here:
+      This is a workaround for the hen-eg-problem of needing the language in order to compile the drivers
+    -->
     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-resources-plugin</artifactId>
@@ -56,13 +60,6 @@
             <encoding>UTF-8</encoding>
           </configuration>
         </execution>
-      </executions>
-    </plugin>
-    <plugin>
-      <groupId>org.apache.maven.plugins</groupId>
-      <artifactId>maven-resources-plugin</artifactId>
-      <version>2.5</version>
-      <executions>
         <execution>
           <id>go-spi</id>
           <phase>generate-sources</phase>
@@ -168,7 +165,7 @@
     <plugin>
       <groupId>com.igormaznitsa</groupId>
       <artifactId>mvn-golang-wrapper</artifactId>
-      <version>2.3.6</version>
+      <version>2.3.9</version>
       <extensions>true</extensions>
       <executions>
         <execution>
@@ -196,6 +193,7 @@
         </execution>
       </executions>
       <configuration>
+        <goVersion>1.16</goVersion>
         <packages>
           <!-- We want to format every package here so we don't get dirty commits -->
           <package>./internal/...</package>