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 16:30:35 UTC

[plc4x] branch s7event updated: - Fixed some more enum related problems in PLC4C (We're allmost there)

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


The following commit(s) were added to refs/heads/s7event by this push:
     new 242bfd9  - Fixed some more enum related problems in PLC4C (We're allmost there)
242bfd9 is described below

commit 242bfd96ef4239837f9d32651757d363809dbe32
Author: cdutz <ch...@c-ware.de>
AuthorDate: Wed Aug 18 18:30:21 2021 +0200

    - Fixed some more enum related problems in PLC4C (We're allmost there)
---
 .../resources/templates/c/enum-template.c.ftlh     |  2 +-
 .../src/main/resources/protocols/test/test.mspec   |  8 +++---
 .../modbus/src/modbus_data_type.c                  |  2 +-
 .../modbus/src/modbus_error_code.c                 |  2 +-
 .../s7/include/alarm_message_object_ack_type.h     |  2 +-
 .../s7/include/s7_data_alarm_message.h             |  4 +--
 .../s7/include/s7_payload_user_data_item.h         |  8 +++---
 .../s7/src/alarm_message_object_ack_type.c         |  8 +++---
 plc4c/generated-sources/s7/src/alarm_state_type.c  |  2 +-
 plc4c/generated-sources/s7/src/alarm_type.c        |  2 +-
 .../generated-sources/s7/src/cotp_protocol_class.c |  2 +-
 plc4c/generated-sources/s7/src/cotp_tpdu_size.c    |  2 +-
 .../s7/src/cpu_subscribe_events.c                  |  2 +-
 .../s7/src/data_transport_error_code.c             |  2 +-
 .../generated-sources/s7/src/data_transport_size.c |  2 +-
 plc4c/generated-sources/s7/src/device_group.c      |  2 +-
 plc4c/generated-sources/s7/src/event_type.c        |  2 +-
 plc4c/generated-sources/s7/src/memory_area.c       |  2 +-
 .../s7/src/mode_transition_type.c                  |  2 +-
 plc4c/generated-sources/s7/src/query_type.c        |  2 +-
 .../s7/src/s7_data_alarm_message.c                 | 16 ++++++------
 .../s7/src/s7_payload_user_data_item.c             | 30 +++++++++++-----------
 plc4c/generated-sources/s7/src/syntax_id_type.c    |  2 +-
 .../s7/src/szl_module_type_class.c                 |  2 +-
 plc4c/generated-sources/s7/src/szl_sublist.c       |  2 +-
 plc4c/generated-sources/s7/src/transport_size.c    |  2 +-
 26 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/code-generation/language-c/src/main/resources/templates/c/enum-template.c.ftlh b/code-generation/language-c/src/main/resources/templates/c/enum-template.c.ftlh
index 0b8d23b..9603e0e 100644
--- a/code-generation/language-c/src/main/resources/templates/c/enum-template.c.ftlh
+++ b/code-generation/language-c/src/main/resources/templates/c/enum-template.c.ftlh
@@ -76,7 +76,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer*
 plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_buffer* writeBuffer, ${helper.getCTypeName(type.name)}* _message) {
     plc4c_return_code _res = OK;
 
-    _res = ${helper.getWriteBufferWriteMethodCall(type.type, "_message", null)?no_esc};
+    _res = ${helper.getWriteBufferWriteMethodCall(type.type, "*_message", null)?no_esc};
 
     return _res;
 }
diff --git a/code-generation/protocol-test/src/main/resources/protocols/test/test.mspec b/code-generation/protocol-test/src/main/resources/protocols/test/test.mspec
index 3bc44c9..04d89ff 100644
--- a/code-generation/protocol-test/src/main/resources/protocols/test/test.mspec
+++ b/code-generation/protocol-test/src/main/resources/protocols/test/test.mspec
@@ -400,10 +400,10 @@
 //    ['102.0' BIG]
 //]
 
-//String based enum's needs some work in C, compiles but assigns 0 as values.
-[enum string '-1' 'EnumTypeString'
-    ['Toddy1' TODDY]
-]
+//TODO:  C doesn't support non integer switch fields
+//[enum string '-1' 'EnumTypeString'
+//    ['Toddy1' TODDY]
+//]
 
 //TODO:  Fails to import the base Enum in C, need to find it in getComplexTypeReferences
 //[enum EnumType 'EnumTypeEnum'
diff --git a/plc4c/generated-sources/modbus/src/modbus_data_type.c b/plc4c/generated-sources/modbus/src/modbus_data_type.c
index 716ea2f..f364053 100644
--- a/plc4c/generated-sources/modbus/src/modbus_data_type.c
+++ b/plc4c/generated-sources/modbus/src/modbus_data_type.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_data_type_parse(plc4c_spi_read_
 plc4c_return_code plc4c_modbus_read_write_modbus_data_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_data_type* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/modbus/src/modbus_error_code.c b/plc4c/generated-sources/modbus/src/modbus_error_code.c
index c530d03..7bfd0bb 100644
--- a/plc4c/generated-sources/modbus/src/modbus_error_code.c
+++ b/plc4c/generated-sources/modbus/src/modbus_error_code.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_error_code_parse(plc4c_spi_read
 plc4c_return_code plc4c_modbus_read_write_modbus_error_code_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_error_code* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
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 5a270fd..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,8 +37,8 @@ extern "C" {
 
 
 // Constant values.
-uint8_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_LENGTH();
 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 {
   /* Properties */
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 53d96e9..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,10 +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_VARIABLE_SPEC();
 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 9b952b4..7f68a63 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,13 +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_FUNCTION_ID();
 uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_RESPONSE_NUMBER_MESSAGE_OBJ();
+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_VARIABLE_SPEC();
-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_FUNCTION_ID();
-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_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 541b793..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,14 +25,14 @@
 
 
 // Constant values.
-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;
-}
 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;
+}
 
 // Parse function.
 plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_object_ack_type** _message) {
diff --git a/plc4c/generated-sources/s7/src/alarm_state_type.c b/plc4c/generated-sources/s7/src/alarm_state_type.c
index bd392ad..6d0840b 100644
--- a/plc4c/generated-sources/s7/src/alarm_state_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_state_type.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_state_type_parse(plc4c_spi_read_buff
 plc4c_return_code plc4c_s7_read_write_alarm_state_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_state_type* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/alarm_type.c b/plc4c/generated-sources/s7/src/alarm_type.c
index 4212887..4831450 100644
--- a/plc4c/generated-sources/s7/src/alarm_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_type.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_type_parse(plc4c_spi_read_buffer* re
 plc4c_return_code plc4c_s7_read_write_alarm_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_type* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/cotp_protocol_class.c b/plc4c/generated-sources/s7/src/cotp_protocol_class.c
index 87577b7..b752563 100644
--- a/plc4c/generated-sources/s7/src/cotp_protocol_class.c
+++ b/plc4c/generated-sources/s7/src/cotp_protocol_class.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_cotp_protocol_class_parse(plc4c_spi_read_b
 plc4c_return_code plc4c_s7_read_write_cotp_protocol_class_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_protocol_class* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_signed_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_signed_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/cotp_tpdu_size.c b/plc4c/generated-sources/s7/src/cotp_tpdu_size.c
index 4bd0fb8..bc9fb94 100644
--- a/plc4c/generated-sources/s7/src/cotp_tpdu_size.c
+++ b/plc4c/generated-sources/s7/src/cotp_tpdu_size.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_cotp_tpdu_size_parse(plc4c_spi_read_buffer
 plc4c_return_code plc4c_s7_read_write_cotp_tpdu_size_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_tpdu_size* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_signed_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_signed_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/cpu_subscribe_events.c b/plc4c/generated-sources/s7/src/cpu_subscribe_events.c
index cca2003..bf47673 100644
--- a/plc4c/generated-sources/s7/src/cpu_subscribe_events.c
+++ b/plc4c/generated-sources/s7/src/cpu_subscribe_events.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_cpu_subscribe_events_parse(plc4c_spi_read_
 plc4c_return_code plc4c_s7_read_write_cpu_subscribe_events_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cpu_subscribe_events* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/data_transport_error_code.c b/plc4c/generated-sources/s7/src/data_transport_error_code.c
index 71474b9..970fe36 100644
--- a/plc4c/generated-sources/s7/src/data_transport_error_code.c
+++ b/plc4c/generated-sources/s7/src/data_transport_error_code.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_data_transport_error_code_parse(plc4c_spi_
 plc4c_return_code plc4c_s7_read_write_data_transport_error_code_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_data_transport_error_code* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/data_transport_size.c b/plc4c/generated-sources/s7/src/data_transport_size.c
index cf290c7..9e8680c 100644
--- a/plc4c/generated-sources/s7/src/data_transport_size.c
+++ b/plc4c/generated-sources/s7/src/data_transport_size.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_data_transport_size_parse(plc4c_spi_read_b
 plc4c_return_code plc4c_s7_read_write_data_transport_size_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_data_transport_size* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/device_group.c b/plc4c/generated-sources/s7/src/device_group.c
index 57c9be0..099fc0c 100644
--- a/plc4c/generated-sources/s7/src/device_group.c
+++ b/plc4c/generated-sources/s7/src/device_group.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_device_group_parse(plc4c_spi_read_buffer*
 plc4c_return_code plc4c_s7_read_write_device_group_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_device_group* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_signed_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_signed_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/event_type.c b/plc4c/generated-sources/s7/src/event_type.c
index c84e34e..8aa6deb 100644
--- a/plc4c/generated-sources/s7/src/event_type.c
+++ b/plc4c/generated-sources/s7/src/event_type.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_event_type_parse(plc4c_spi_read_buffer* re
 plc4c_return_code plc4c_s7_read_write_event_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_event_type* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/memory_area.c b/plc4c/generated-sources/s7/src/memory_area.c
index 5fa9ece..87e6ac0 100644
--- a/plc4c/generated-sources/s7/src/memory_area.c
+++ b/plc4c/generated-sources/s7/src/memory_area.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_memory_area_parse(plc4c_spi_read_buffer* r
 plc4c_return_code plc4c_s7_read_write_memory_area_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_memory_area* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/mode_transition_type.c b/plc4c/generated-sources/s7/src/mode_transition_type.c
index f4ed991..8f1f8e8 100644
--- a/plc4c/generated-sources/s7/src/mode_transition_type.c
+++ b/plc4c/generated-sources/s7/src/mode_transition_type.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_mode_transition_type_parse(plc4c_spi_read_
 plc4c_return_code plc4c_s7_read_write_mode_transition_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_mode_transition_type* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/query_type.c b/plc4c/generated-sources/s7/src/query_type.c
index a65b6e7..b864010 100644
--- a/plc4c/generated-sources/s7/src/query_type.c
+++ b/plc4c/generated-sources/s7/src/query_type.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_query_type_parse(plc4c_spi_read_buffer* re
 plc4c_return_code plc4c_s7_read_write_query_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_query_type* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     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 9eaf1f4..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,22 +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_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;
-}
 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 d2aa59d..a75bdef 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,33 +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_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 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_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_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_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;
-}
-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_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/plc4c/generated-sources/s7/src/syntax_id_type.c b/plc4c/generated-sources/s7/src/syntax_id_type.c
index de35880..8c55e97 100644
--- a/plc4c/generated-sources/s7/src/syntax_id_type.c
+++ b/plc4c/generated-sources/s7/src/syntax_id_type.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_syntax_id_type_parse(plc4c_spi_read_buffer
 plc4c_return_code plc4c_s7_read_write_syntax_id_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_syntax_id_type* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/szl_module_type_class.c b/plc4c/generated-sources/s7/src/szl_module_type_class.c
index 91c3fa5..a42a080 100644
--- a/plc4c/generated-sources/s7/src/szl_module_type_class.c
+++ b/plc4c/generated-sources/s7/src/szl_module_type_class.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_szl_module_type_class_parse(plc4c_spi_read
 plc4c_return_code plc4c_s7_read_write_szl_module_type_class_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_module_type_class* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 4, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 4, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/szl_sublist.c b/plc4c/generated-sources/s7/src/szl_sublist.c
index 90bd825..3b76388 100644
--- a/plc4c/generated-sources/s7/src/szl_sublist.c
+++ b/plc4c/generated-sources/s7/src/szl_sublist.c
@@ -48,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_szl_sublist_parse(plc4c_spi_read_buffer* r
 plc4c_return_code plc4c_s7_read_write_szl_sublist_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_sublist* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
 
     return _res;
 }
diff --git a/plc4c/generated-sources/s7/src/transport_size.c b/plc4c/generated-sources/s7/src/transport_size.c
index a964041..b7758d1 100644
--- a/plc4c/generated-sources/s7/src/transport_size.c
+++ b/plc4c/generated-sources/s7/src/transport_size.c
@@ -50,7 +50,7 @@ plc4c_return_code plc4c_s7_read_write_transport_size_parse(plc4c_spi_read_buffer
 plc4c_return_code plc4c_s7_read_write_transport_size_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_transport_size* _message) {
     plc4c_return_code _res = OK;
 
-    _res = plc4c_spi_write_signed_byte(writeBuffer, 8, _message);
+    _res = plc4c_spi_write_signed_byte(writeBuffer, 8, *_message);
 
     return _res;
 }