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 2023/02/03 07:56:56 UTC

[plc4x] branch featrue/cdutz/arrays-with-special-variables updated: refactor(plc4c): Updated PLC4C to work with serializer and parse contexts in order to support variables like the "_latest"

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

cdutz pushed a commit to branch featrue/cdutz/arrays-with-special-variables
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/featrue/cdutz/arrays-with-special-variables by this push:
     new e139d4de74 refactor(plc4c): Updated PLC4C to work with serializer and parse contexts in order to support variables like the "_latest"
e139d4de74 is described below

commit e139d4de74159a797bc50aa13aa50ec644c8d601
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Fri Feb 3 08:56:46 2023 +0100

    refactor(plc4c): Updated PLC4C to work with serializer and parse contexts in order to support variables like the "_latest"
---
 .../plc4x/language/c/CLanguageTemplateHelper.java  |  12 +-
 .../templates/c/complex-type-template.c.ftlh       |  39 +++---
 .../templates/c/complex-type-template.h.ftlh       |   9 +-
 .../resources/templates/c/data-io-template.c.ftlh  |  10 +-
 .../resources/templates/c/data-io-template.h.ftlh  |   9 +-
 .../resources/templates/c/enum-template.c.ftlh     |  10 +-
 .../resources/templates/c/enum-template.h.ftlh     |   9 +-
 plc4c/drivers/modbus/src/driver_modbus_packets.c   |   6 +-
 plc4c/drivers/modbus/src/driver_modbus_sm_read.c   |   2 +-
 plc4c/drivers/plc4x/src/driver_plc4x_packets.c     |   7 +-
 plc4c/drivers/s7/src/driver_s7_encode_decode.c     |   2 +-
 plc4c/drivers/s7/src/driver_s7_packets.c           |   6 +-
 plc4c/drivers/s7/src/driver_s7_sm_read.c           |   4 +-
 plc4c/drivers/s7/test/s7_test.c                    |   4 +-
 plc4c/generated-sources/modbus/include/data_item.h |   9 +-
 .../generated-sources/modbus/include/driver_type.h |   9 +-
 .../generated-sources/modbus/include/modbus_adu.h  |   9 +-
 .../modbus/include/modbus_constants.h              |   9 +-
 .../modbus/include/modbus_data_type.h              |   9 +-
 .../modbus_device_information_conformity_level.h   |   9 +-
 .../include/modbus_device_information_level.h      |   9 +-
 .../modbus_device_information_more_follows.h       |   9 +-
 .../include/modbus_device_information_object.h     |   9 +-
 .../modbus/include/modbus_error_code.h             |   9 +-
 .../generated-sources/modbus/include/modbus_pdu.h  |   9 +-
 .../modbus_pdu_read_file_record_request_item.h     |   9 +-
 .../modbus_pdu_read_file_record_response_item.h    |   9 +-
 .../modbus_pdu_write_file_record_request_item.h    |   9 +-
 .../modbus_pdu_write_file_record_response_item.h   |   9 +-
 plc4c/generated-sources/modbus/src/data_item.c     |  10 +-
 plc4c/generated-sources/modbus/src/driver_type.c   |  10 +-
 plc4c/generated-sources/modbus/src/modbus_adu.c    |  31 ++---
 .../modbus/src/modbus_constants.c                  |  11 +-
 .../modbus/src/modbus_data_type.c                  |  10 +-
 .../modbus_device_information_conformity_level.c   |  10 +-
 .../modbus/src/modbus_device_information_level.c   |  10 +-
 .../src/modbus_device_information_more_follows.c   |  10 +-
 .../modbus/src/modbus_device_information_object.c  |  11 +-
 .../modbus/src/modbus_error_code.c                 |  10 +-
 plc4c/generated-sources/modbus/src/modbus_pdu.c    |  71 +++++------
 .../src/modbus_pdu_read_file_record_request_item.c |  11 +-
 .../modbus_pdu_read_file_record_response_item.c    |  11 +-
 .../modbus_pdu_write_file_record_request_item.c    |  11 +-
 .../modbus_pdu_write_file_record_response_item.c   |  11 +-
 .../plc4x/include/plc4x_constants.h                |   9 +-
 .../plc4x/include/plc4x_message.h                  |   9 +-
 .../plc4x/include/plc4x_request_type.h             |   9 +-
 .../plc4x/include/plc4x_response_code.h            |   9 +-
 .../plc4x/include/plc4x_subscription_type.h        |   9 +-
 plc4c/generated-sources/plc4x/include/plc4x_tag.h  |   9 +-
 .../plc4x/include/plc4x_tag_request.h              |   9 +-
 .../plc4x/include/plc4x_tag_response.h             |   9 +-
 .../plc4x/include/plc4x_tag_value_request.h        |   9 +-
 .../plc4x/include/plc4x_tag_value_response.h       |   9 +-
 .../generated-sources/plc4x/include/plc4x_value.h  |   9 +-
 .../plc4x/include/plc4x_value_type.h               |   9 +-
 .../generated-sources/plc4x/src/plc4x_constants.c  |  11 +-
 plc4c/generated-sources/plc4x/src/plc4x_message.c  |  59 ++++-----
 .../plc4x/src/plc4x_request_type.c                 |  10 +-
 .../plc4x/src/plc4x_response_code.c                |  10 +-
 .../plc4x/src/plc4x_subscription_type.c            |  10 +-
 plc4c/generated-sources/plc4x/src/plc4x_tag.c      |  11 +-
 .../plc4x/src/plc4x_tag_request.c                  |  17 +--
 .../plc4x/src/plc4x_tag_response.c                 |  23 ++--
 .../plc4x/src/plc4x_tag_value_request.c            |  29 ++---
 .../plc4x/src/plc4x_tag_value_response.c           |  35 +++---
 plc4c/generated-sources/plc4x/src/plc4x_value.c    |  10 +-
 .../generated-sources/plc4x/src/plc4x_value_type.c |  10 +-
 .../plc4x/test/ParserSerializerTestsuite.c         |  32 ++---
 .../include/alarm_message_ack_object_push_type.h   |   9 +-
 .../s7/include/alarm_message_ack_push_type.h       |   9 +-
 .../s7/include/alarm_message_ack_response_type.h   |   9 +-
 .../s7/include/alarm_message_ack_type.h            |   9 +-
 .../s7/include/alarm_message_object_ack_type.h     |   9 +-
 .../s7/include/alarm_message_object_push_type.h    |   9 +-
 .../s7/include/alarm_message_object_query_type.h   |   9 +-
 .../s7/include/alarm_message_push_type.h           |   9 +-
 .../s7/include/alarm_message_query_type.h          |   9 +-
 .../s7/include/alarm_state_type.h                  |   9 +-
 plc4c/generated-sources/s7/include/alarm_type.h    |   9 +-
 .../s7/include/associated_value_type.h             |   9 +-
 plc4c/generated-sources/s7/include/cotp_packet.h   |   9 +-
 .../generated-sources/s7/include/cotp_parameter.h  |   9 +-
 .../s7/include/cotp_protocol_class.h               |   9 +-
 .../generated-sources/s7/include/cotp_tpdu_size.h  |   9 +-
 .../s7/include/cpu_subscribe_events.h              |   9 +-
 plc4c/generated-sources/s7/include/data_item.h     |   9 +-
 .../s7/include/data_transport_error_code.h         |   9 +-
 .../s7/include/data_transport_size.h               |   9 +-
 plc4c/generated-sources/s7/include/date_and_time.h |   9 +-
 plc4c/generated-sources/s7/include/device_group.h  |   9 +-
 plc4c/generated-sources/s7/include/event_type.h    |   9 +-
 plc4c/generated-sources/s7/include/memory_area.h   |   9 +-
 .../s7/include/mode_transition_type.h              |   9 +-
 plc4c/generated-sources/s7/include/query_type.h    |   9 +-
 plc4c/generated-sources/s7/include/s7_address.h    |   9 +-
 .../s7/include/s7_data_alarm_message.h             |   9 +-
 plc4c/generated-sources/s7/include/s7_message.h    |   9 +-
 plc4c/generated-sources/s7/include/s7_parameter.h  |   9 +-
 .../s7/include/s7_parameter_user_data_item.h       |   9 +-
 plc4c/generated-sources/s7/include/s7_payload.h    |   9 +-
 .../s7/include/s7_payload_user_data_item.h         |   9 +-
 .../s7/include/s7_var_payload_data_item.h          |   9 +-
 .../s7/include/s7_var_payload_status_item.h        |   9 +-
 .../s7/include/s7_var_request_parameter_item.h     |   9 +-
 plc4c/generated-sources/s7/include/state.h         |   9 +-
 .../generated-sources/s7/include/syntax_id_type.h  |   9 +-
 .../s7/include/szl_data_tree_item.h                |   9 +-
 plc4c/generated-sources/s7/include/szl_id.h        |   9 +-
 .../s7/include/szl_module_type_class.h             |   9 +-
 plc4c/generated-sources/s7/include/szl_sublist.h   |   9 +-
 plc4c/generated-sources/s7/include/tpkt_packet.h   |   9 +-
 .../generated-sources/s7/include/transport_size.h  |   9 +-
 .../s7/src/alarm_message_ack_object_push_type.c    |  29 ++---
 .../s7/src/alarm_message_ack_push_type.c           |  23 ++--
 .../s7/src/alarm_message_ack_response_type.c       |  11 +-
 .../s7/src/alarm_message_ack_type.c                |  17 +--
 .../s7/src/alarm_message_object_ack_type.c         |  29 ++---
 .../s7/src/alarm_message_object_push_type.c        |  47 +++----
 .../s7/src/alarm_message_object_query_type.c       |  53 ++++----
 .../s7/src/alarm_message_push_type.c               |  23 ++--
 .../s7/src/alarm_message_query_type.c              |  29 ++---
 plc4c/generated-sources/s7/src/alarm_state_type.c  |  10 +-
 plc4c/generated-sources/s7/src/alarm_type.c        |  10 +-
 .../s7/src/associated_value_type.c                 |  23 ++--
 plc4c/generated-sources/s7/src/cotp_packet.c       |  43 +++----
 plc4c/generated-sources/s7/src/cotp_parameter.c    |  19 +--
 .../generated-sources/s7/src/cotp_protocol_class.c |  10 +-
 plc4c/generated-sources/s7/src/cotp_tpdu_size.c    |  10 +-
 .../s7/src/cpu_subscribe_events.c                  |  10 +-
 plc4c/generated-sources/s7/src/data_item.c         |  10 +-
 .../s7/src/data_transport_error_code.c             |  10 +-
 .../generated-sources/s7/src/data_transport_size.c |  10 +-
 plc4c/generated-sources/s7/src/date_and_time.c     |  11 +-
 plc4c/generated-sources/s7/src/device_group.c      |  10 +-
 plc4c/generated-sources/s7/src/event_type.c        |  10 +-
 plc4c/generated-sources/s7/src/memory_area.c       |  10 +-
 .../s7/src/mode_transition_type.c                  |  10 +-
 plc4c/generated-sources/s7/src/query_type.c        |  10 +-
 plc4c/generated-sources/s7/src/s7_address.c        |  17 +--
 .../s7/src/s7_data_alarm_message.c                 |  41 +++---
 plc4c/generated-sources/s7/src/s7_message.c        |  27 ++--
 plc4c/generated-sources/s7/src/s7_parameter.c      |  31 ++---
 .../s7/src/s7_parameter_user_data_item.c           |  13 +-
 plc4c/generated-sources/s7/src/s7_payload.c        |  35 +++---
 .../s7/src/s7_payload_user_data_item.c             | 139 +++++++++++----------
 .../s7/src/s7_var_payload_data_item.c              |  29 ++---
 .../s7/src/s7_var_payload_status_item.c            |  17 +--
 .../s7/src/s7_var_request_parameter_item.c         |  19 +--
 plc4c/generated-sources/s7/src/state.c             |  11 +-
 plc4c/generated-sources/s7/src/syntax_id_type.c    |  10 +-
 .../generated-sources/s7/src/szl_data_tree_item.c  |  11 +-
 plc4c/generated-sources/s7/src/szl_id.c            |  23 ++--
 .../s7/src/szl_module_type_class.c                 |  10 +-
 plc4c/generated-sources/s7/src/szl_sublist.c       |  10 +-
 plc4c/generated-sources/s7/src/tpkt_packet.c       |  19 +--
 plc4c/generated-sources/s7/src/transport_size.c    |  10 +-
 .../s7/test/ParserSerializerTestsuite.c            |  44 +++----
 plc4c/spi/CMakeLists.txt                           |   1 +
 plc4c/spi/include/plc4c/spi/context.h              |  42 +++++++
 plc4c/spi/src/context.c                            |  46 +++++++
 .../plc4py/protocols/modbus/readwrite/DataItem.py  |  48 -------
 .../plc4py/protocols/modbus/readwrite/ModbusADU.py |   3 -
 .../plc4py/protocols/modbus/readwrite/ModbusPDU.py |  39 ------
 .../protocols/simulated/readwrite/DataItem.py      |  55 --------
 165 files changed, 1286 insertions(+), 1224 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 58d309354f..21e068875f 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
@@ -753,11 +753,11 @@ public class CLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelpe
                 lengthType = typeReferenceForProperty.asNonSimpleTypeReference().orElseThrow().getTypeDefinition();
                 lengthExpression = variableExpressionGenerator.apply(variableLiteral);
             }
-            return tracer + getCTypeName(lengthType.getName()) + "_length_in_bytes(" + lengthExpression + ")";
-        } else if (variableLiteral.getName().equals("lastItem")) {
-            tracer = tracer.dive("lastItem");
-            return tracer + "lastItem";
-            // If this literal references an Enum type, then we have to output it differently.
+            return tracer + getCTypeName(lengthType.getName()) + "_length_in_bytes(ctx, " + lengthExpression + ")";
+        } else if (variableLiteral.getName().equals("_lastItem")) {
+            tracer = tracer.dive("_lastItem");
+            return tracer + "plc4x_spi_context_get_last_item_from_context(ctx)";
+        // If this literal references an Enum type, then we have to output it differently.
         } else if (getTypeDefinitions().get(variableLiteral.getName()) instanceof EnumTypeDefinition) {
             tracer = tracer.dive("enum type definition");
             return tracer + getCTypeName(variableLiteral.getName()) + "_" + variableLiteral.getChild().map(VariableLiteral::getName).orElseThrow(() -> new FreemarkerException("child required"));
@@ -1095,7 +1095,7 @@ public class CLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelpe
         // If it wasn't an enum, treat it as a normal property.
         if (variableLiteral.getName().equals("lengthInBits")) {
             tracer = tracer.dive("is length in bits");
-            return tracer + getCTypeName(baseType.getName()) + "_length_in_bits(_message)";
+            return tracer + getCTypeName(baseType.getName()) + "_length_in_bits(ctx, _message)";
         }
         if (variableLiteral.getChild().isPresent() && "length".equals(variableLiteral.getChild().get().getName())) {
             tracer = tracer.dive("is length");
diff --git a/code-generation/language-c/src/main/resources/templates/c/complex-type-template.c.ftlh b/code-generation/language-c/src/main/resources/templates/c/complex-type-template.c.ftlh
index 03380bfc5e..cf631b7ad1 100644
--- a/code-generation/language-c/src/main/resources/templates/c/complex-type-template.c.ftlh
+++ b/code-generation/language-c/src/main/resources/templates/c/complex-type-template.c.ftlh
@@ -46,6 +46,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_${protocolName}_static.h>
 
@@ -106,7 +107,7 @@ ${helper.getLanguageTypeNameForField(constField)} ${helper.getCTypeName(parentTy
 </#if>
 
 // Parse function.
-plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer* readBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if parserArgument.type.isComplexTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>${helper.getCTypeName(type.name)}** _message) {
+plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if parserArgument.type.isComplexTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>${helper.getCTypeName(type.name)}** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -153,7 +154,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer*
     <#assign nonSimpleTypeReference = elementTypeReference.asNonSimpleTypeReference().orElseThrow()>
       <#-- Inizialize a local variable with the complex type (Intentionally keeping the java-style names so they can be used in expressions) -->
       ${helper.getCTypeName(nonSimpleTypeReference.name)}* _value = NULL;
-      _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(readBuffer<#if elementTypeReference.isNonSimpleTypeReference() && elementTypeReference.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list elementTypeReference.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toParseExpression(baseType, arrayField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, (void*) &_value);
+      _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(ctx, readBuffer<#if elementTypeReference.isNonSimpleTypeReference() && elementTypeReference.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list elementTypeReference.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toParseExpression(baseType, arrayField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -179,7 +180,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer*
     <#assign nonSimpleTypeReference = elementTypeReference.asNonSimpleTypeReference().orElseThrow()>
                 <#-- Inizialize a local variable with the complex type (Intentionally keeping the java-style names so they can be used in expressions) -->
       ${helper.getCTypeName(nonSimpleTypeReference.name)}* _value = NULL;
-      _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(readBuffer<#if elementTypeReference.isNonSimpleTypeReference() && elementTypeReference.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list elementTypeReference.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toParseExpression(baseType, arrayField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, (void*) &_value);
+      _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(ctx, readBuffer<#if elementTypeReference.isNonSimpleTypeReference() && elementTypeReference.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list elementTypeReference.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toParseExpression(baseType, arrayField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -204,7 +205,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer*
     <#assign nonSimpleTypeReference = elementTypeReference.asNonSimpleTypeReference().orElseThrow()>
                 <#-- Inizialize a local variable with the complex type (Intentionally keeping the java-style names so they can be used in expressions) -->
       ${helper.getCTypeName(nonSimpleTypeReference.name)}* _value = NULL;
-      _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(readBuffer<#if elementTypeReference.isNonSimpleTypeReference() && elementTypeReference.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list elementTypeReference.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toParseExpression(baseType, arrayField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, (void*) &_value);
+      _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(ctx, readBuffer<#if elementTypeReference.isNonSimpleTypeReference() && elementTypeReference.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list elementTypeReference.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toParseExpression(baseType, arrayField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -262,7 +263,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer*
         <#elseif discriminatorField.type.isEnumTypeReference()>
             <#assign enumTypeReference = discriminatorField.type.asEnumTypeReference().orElseThrow()>
   ${helper.getLanguageTypeNameForTypeReference(enumTypeReference)} ${discriminatorField.name};
-  _res = ${helper.getCTypeName(enumTypeReference.name)}_parse(readBuffer, &${discriminatorField.name});
+  _res = ${helper.getCTypeName(enumTypeReference.name)}_parse(ctx, readBuffer, &${discriminatorField.name});
         </#if>
   if(_res != OK) {
     return _res;
@@ -324,7 +325,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer*
     _res = ${helper.getReadBufferReadMethodCall(simpleTypeReference, optionalField.name, optionalField)};
         <#else>
             <#assign nonSimpleTypeReference = optionalField.type.asNonSimpleTypeReference().orElseThrow()>
-    _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(readBuffer<#if optionalField.type.isNonSimpleTypeReference() && optionalField.type.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list optionalField.type.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toParseExpression(baseType, optionalField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, &${optionalField.name});
+    _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(ctx, readBuffer<#if optionalField.type.isNonSimpleTypeReference() && optionalField.type.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list optionalField.type.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toParseExpression(baseType, optionalField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, &${optionalField.name});
         </#if>
     if(_res != OK) {
       return _res;
@@ -383,12 +384,12 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer*
                 <#assign enumTypeReference = simpleField.type.asEnumTypeReference().orElseThrow()>
             <#-- Inizialize a local variable with the complex type (Intentionally keeping the java-style names so they can be used in expressions) -->
   ${helper.getLanguageTypeNameForField(field)} ${simpleField.name};
-  _res = ${helper.getCTypeName(enumTypeReference.name)}_parse(readBuffer, (void*) &${simpleField.name});
+  _res = ${helper.getCTypeName(enumTypeReference.name)}_parse(ctx, readBuffer, (void*) &${simpleField.name});
             <#else>
                 <#assign nonSimpleTypeReference = simpleField.type.asNonSimpleTypeReference().orElseThrow()>
             <#-- Inizialize a local variable with the complex type (Intentionally keeping the java-style names so they can be used in expressions) -->
   ${helper.getLanguageTypeNameForField(field)}* ${simpleField.name};
-  _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(readBuffer<#if simpleField.type.isNonSimpleTypeReference() && simpleField.type.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list simpleField.type.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toParseExpression(baseType, simpleField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, (void*) &${simpleField.name});
+  _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(ctx, readBuffer<#if simpleField.type.isNonSimpleTypeReference() && simpleField.type.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list simpleField.type.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toParseExpression(baseType, simpleField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, (void*) &${simpleField.name});
             </#if>
   if(_res != OK) {
     return _res;
@@ -452,7 +453,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer*
   return OK;
 }
 
-plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_buffer* writeBuffer, ${helper.getCTypeName(type.name)}* _message<#--if helper.getSerializerArguments(parserArguments)?has_content>, <#list helper.getSerializerArguments(parserArguments) as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)} ${parserArgument.name}<#sep>, </#sep></#list></#if-->) {
+plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, ${helper.getCTypeName(type.name)}* _message<#--if helper.getSerializerArguments(parserArguments)?has_content>, <#list helper.getSerializerArguments(parserArguments) as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)} ${parserArgument.name}<#sep>, </#sep></#list></#if-->) {
   plc4c_return_code _res = OK;
 <#macro fieldSerializer baseType field indentContent>
     <#-- @ftlvariable name="baseType" type="org.apache.plc4x.plugins.codegenerator.types.definitions.ComplexTypeDefinition" -->
@@ -475,7 +476,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_bu
             <#if elementTypeReference.isSimpleTypeReference()>
       ${helper.getWriteBufferWriteMethodCall(elementTypeReference.asSimpleTypeReference().orElseThrow(), "*_value", arrayField)};
             <#else>
-      _res = ${helper.getCTypeName(elementTypeReference.asNonSimpleTypeReference().orElseThrow().name)}_serialize(writeBuffer, (void*) _value<#--#if helper.getSerializerTerms(field.params.orElse(null))?has_content>, <#list helper.getSerializerTerms(field.params.orElse(null)) as serializerTerm>${helper.toSerializationExpression(baseType, field, serializerTerm, parserArguments)}<#sep>, </#sep></#list></#if-->);
+      _res = ${helper.getCTypeName(elementTypeReference.asNonSimpleTypeReference().orElseThrow().name)}_serialize(ctx, writeBuffer, (void*) _value<#--#if helper.getSerializerTerms(field.params.orElse(null))?has_content>, <#list helper.getSerializerTerms(field.params.orElse(null)) as serializerTerm>${helper.toSerializationExpression(baseType, field, serializerTerm, parserArguments)}<#sep>, </#sep></#list></#if-->);
       if(_res != OK) {
         return _res;
       }
@@ -508,7 +509,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_bu
 
   // Enumerated Discriminator Field (${discriminatorField.name})
   ${helper.getLanguageTypeNameForTypeReference(enumTypeReference)} _${discriminatorField.name} = ${helper.getCTypeName(baseType.name) + "_get_discriminator(_message->_type)." + discriminatorField.name};
-  _res = ${helper.getCTypeName(enumTypeReference.name)}_serialize(writeBuffer, &_${discriminatorField.name});
+  _res = ${helper.getCTypeName(enumTypeReference.name)}_serialize(ctx, writeBuffer, &_${discriminatorField.name});
   if(_res != OK) {
     return _res;
   }
@@ -561,7 +562,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_bu
             <#if optionalField.type.isSimpleTypeReference()>
     _res = ${helper.getWriteBufferWriteMethodCall(optionalField.type.asSimpleTypeReference().orElseThrow(), "*_message->" + helper.getFieldName(baseType, optionalField), optionalField)};
             <#else>
-    _res = ${helper.getCTypeName(optionalField.type.asNonSimpleTypeReference().orElseThrow().name)}_serialize(writeBuffer<#if optionalField.type.isDataIoTypeReference() && optionalField.type.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list optionalField.type.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toSerializationExpression(baseType, optionalField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, <#if optionalField.type.isEnumT [...]
+    _res = ${helper.getCTypeName(optionalField.type.asNonSimpleTypeReference().orElseThrow().name)}_serialize(ctx, writeBuffer<#if optionalField.type.isDataIoTypeReference() && optionalField.type.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list optionalField.type.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toSerializationExpression(baseType, optionalField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, <#if optionalField.type.is [...]
             </#if>
     if(_res != OK) {
       return _res;
@@ -604,7 +605,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_bu
   _res = ${helper.getWriteBufferWriteMethodCall(simpleTypeReference, "_message->" + helper.getFieldName(baseType, simpleField), simpleField)};
             <#else>
                 <#assign nonSimpleTypeRererence = simpleField.type.asNonSimpleTypeReference().orElseThrow()>
-  _res = ${helper.getCTypeName(nonSimpleTypeRererence.name)}_serialize(writeBuffer<#if simpleField.type.isDataIoTypeReference() && simpleField.type.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list simpleField.type.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toSerializationExpression(baseType, simpleField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, <#if simpleField.type.isEnumTypeReference() || simpleField.type.isDataIoTypeRe [...]
+  _res = ${helper.getCTypeName(nonSimpleTypeRererence.name)}_serialize(ctx, writeBuffer<#if simpleField.type.isDataIoTypeReference() && simpleField.type.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list simpleField.type.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toSerializationExpression(baseType, simpleField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, <#if simpleField.type.isEnumTypeReference() || simpleField.type.isDataIoT [...]
             </#if>
   if(_res != OK) {
     return _res;
@@ -635,11 +636,11 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_bu
   return OK;
 }
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(${helper.getCTypeName(type.name)}* _message) {
-  return ${helper.getCTypeName(type.name)}_length_in_bits(_message) / 8;
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(plc4x_spi_context ctx, ${helper.getCTypeName(type.name)}* _message) {
+  return ${helper.getCTypeName(type.name)}_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(${helper.getCTypeName(type.name)}* _message) {
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(plc4x_spi_context ctx, ${helper.getCTypeName(type.name)}* _message) {
     <#macro fieldSize baseType field indentContent>
         <#-- @ftlvariable name="baseType" type="org.apache.plc4x.plugins.codegenerator.types.definitions.ComplexTypeDefinition" -->
         <#-- @ftlvariable name="field" type="org.apache.plc4x.plugins.codegenerator.types.fields.Field" -->
@@ -657,7 +658,7 @@ uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(${helper.getCTypeName(
   if(_message-><@fieldName baseType=baseType field=arrayField/> != NULL) {
     plc4c_list_element* curElement = _message-><@fieldName baseType=baseType field=arrayField/>->tail;
     while (curElement != NULL) {
-      lengthInBits += ${helper.getLengthInBitsFunctionNameForComplexTypedField(arrayField)}((${helper.getLanguageTypeNameForTypeReference(elementTypeReference)}*) curElement->value);
+      lengthInBits += ${helper.getLengthInBitsFunctionNameForComplexTypedField(arrayField)}(ctx, (${helper.getLanguageTypeNameForTypeReference(elementTypeReference)}*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -730,7 +731,7 @@ uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(${helper.getCTypeName(
                     <#assign simpleTypeReference = optionalField.type.asSimpleTypeReference().orElseThrow()>
     lengthInBits += ${simpleTypeReference.sizeInBits};
                 <#else>
-    lengthInBits += ${helper.getLengthInBitsFunctionNameForComplexTypedField(optionalField)}(_message-><@fieldName baseType=baseType field=optionalField/><#if optionalField.type.isDataIoTypeReference() && optionalField.type.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list optionalField.type.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toSerializationExpression(baseType, optionalField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>);
+    lengthInBits += ${helper.getLengthInBitsFunctionNameForComplexTypedField(optionalField)}(ctx, _message-><@fieldName baseType=baseType field=optionalField/><#if optionalField.type.isDataIoTypeReference() && optionalField.type.asNonSimpleTypeReference().get().getParams().isPresent()>, <#list optionalField.type.asNonSimpleTypeReference().get().getParams().get() as parserTerm>${helper.toSerializationExpression(baseType, optionalField, parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>);
                 </#if>
   }
                 <#break>
@@ -765,7 +766,7 @@ uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(${helper.getCTypeName(
   lengthInBits += ${simpleTypeReference.sizeInBits};
                     </#if>
                 <#else>
-  lengthInBits += ${helper.getLengthInBitsFunctionNameForComplexTypedField(simpleField)}(<#if simpleField.type.isEnumTypeReference()>&</#if>_message-><@fieldName baseType=baseType field=simpleField/>);
+  lengthInBits += ${helper.getLengthInBitsFunctionNameForComplexTypedField(simpleField)}(ctx, <#if simpleField.type.isEnumTypeReference()>&</#if>_message-><@fieldName baseType=baseType field=simpleField/>);
                 </#if>
                 <#break>
             <#case "switch">
diff --git a/code-generation/language-c/src/main/resources/templates/c/complex-type-template.h.ftlh b/code-generation/language-c/src/main/resources/templates/c/complex-type-template.h.ftlh
index 328b225b06..93710c0b08 100644
--- a/code-generation/language-c/src/main/resources/templates/c/complex-type-template.h.ftlh
+++ b/code-generation/language-c/src/main/resources/templates/c/complex-type-template.h.ftlh
@@ -52,6 +52,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -175,16 +176,16 @@ ${helper.getCTypeName(type.name)} ${helper.getCTypeName(type.name)}_null();
 <#--
     Define the parse-method for elements of this tpye
 -->
-plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer* readBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if parserArgument.type.isComplexTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>${helper.getCTypeName(type.name)}** message);
+plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if parserArgument.type.isComplexTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>${helper.getCTypeName(type.name)}** message);
 
 <#--
     Define the serialize-method for elements of this tpye
 -->
-plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_buffer* writeBuffer, ${helper.getCTypeName(type.name)}* message);
+plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, ${helper.getCTypeName(type.name)}* message);
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(${helper.getCTypeName(type.name)}* message);
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(plc4x_spi_context ctx, ${helper.getCTypeName(type.name)}* message);
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(${helper.getCTypeName(type.name)}* message);
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(plc4x_spi_context ctx, ${helper.getCTypeName(type.name)}* message);
 
 <#--#ifdef __cplusplus
 }
diff --git a/code-generation/language-c/src/main/resources/templates/c/data-io-template.c.ftlh b/code-generation/language-c/src/main/resources/templates/c/data-io-template.c.ftlh
index 114889903b..f3235a1ea7 100644
--- a/code-generation/language-c/src/main/resources/templates/c/data-io-template.c.ftlh
+++ b/code-generation/language-c/src/main/resources/templates/c/data-io-template.c.ftlh
@@ -61,7 +61,7 @@ ${helper.getSourceDirectory()?replace(".", "/")}/${helper.camelCaseToSnakeCase(t
 <#-- TODO: the code below implies that parserArguments will be null if not present... not pretty  -->
 <#if type.parserArguments.isPresent()><#assign parserArguments=type.parserArguments.orElseThrow()></#if>
 // Parse function.
-plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer* readBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>plc4c_data** data_item) {
+plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>plc4c_data** data_item) {
     uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
     uint16_t curPos;
     plc4c_return_code _res = OK;
@@ -237,7 +237,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer*
   return OK;
 }
 
-plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_buffer* writeBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>plc4c_data** data_item) {
+plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>plc4c_data** data_item) {
   plc4c_return_code _res = OK;
     <#list type.switchField.orElseThrow().cases as case>
         <#if case.discriminatorValueTerms?has_content>if(<#list case.discriminatorValueTerms as discriminatorValueTerm><#if case.discriminatorValueTerms?size &gt; 1>(</#if><#if helper.discriminatorValueNeedsStringEqualityCheck(type.switchField.orElseThrow().discriminatorExpressions[discriminatorValueTerm?index])>strcmp(${helper.toParseExpression(type, null, type.switchField.orElseThrow().discriminatorExpressions[discriminatorValueTerm?index], parserArguments)}, ${helper.toParseExpression [...]
@@ -325,11 +325,11 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_bu
   return OK;
 }
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(plc4c_data* data_item<#if type.parserArguments.isPresent()>, <#list type.parserArguments.orElseThrow() as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)} ${helper.camelCaseToSnakeCase(parserArgument.name)}<#sep>, </#sep></#list></#if>) {
-  return ${helper.getCTypeName(type.name)}_length_in_bits(data_item<#if type.parserArguments.isPresent()>, <#list type.parserArguments.orElseThrow() as parserArgument>${helper.camelCaseToSnakeCase(parserArgument.name)}<#sep>, </#sep></#list></#if>) / 8;
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item<#if type.parserArguments.isPresent()>, <#list type.parserArguments.orElseThrow() as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)} ${helper.camelCaseToSnakeCase(parserArgument.name)}<#sep>, </#sep></#list></#if>) {
+  return ${helper.getCTypeName(type.name)}_length_in_bits(ctx, data_item<#if type.parserArguments.isPresent()>, <#list type.parserArguments.orElseThrow() as parserArgument>${helper.camelCaseToSnakeCase(parserArgument.name)}<#sep>, </#sep></#list></#if>) / 8;
 }
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(plc4c_data* data_item<#if parserArguments?has_content>, <#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list></#if>) {
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item<#if parserArguments?has_content>, <#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list></#if>) {
   uint16_t lengthInBits = 0;
     <#list type.switchField.orElseThrow().cases as case>
     <#if case.discriminatorValueTerms?has_content>if(<#list case.discriminatorValueTerms as discriminatorValueTerm><#if case.discriminatorValueTerms?size &gt; 1>(</#if><#if helper.discriminatorValueNeedsStringEqualityCheck(type.switchField.orElseThrow().discriminatorExpressions[discriminatorValueTerm?index])>strcmp(${helper.toParseExpression(type, null, type.switchField.orElseThrow().discriminatorExpressions[discriminatorValueTerm?index], parserArguments)}, ${helper.toParseExpression(nul [...]
diff --git a/code-generation/language-c/src/main/resources/templates/c/data-io-template.h.ftlh b/code-generation/language-c/src/main/resources/templates/c/data-io-template.h.ftlh
index cf05952572..974b389d01 100644
--- a/code-generation/language-c/src/main/resources/templates/c/data-io-template.h.ftlh
+++ b/code-generation/language-c/src/main/resources/templates/c/data-io-template.h.ftlh
@@ -51,6 +51,7 @@ ${helper.getIncludesDirectory()?replace(".", "/")}/${helper.camelCaseToSnakeCase
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -74,16 +75,16 @@ extern "C" {
 <#--
     Define the parse-method for elements of this tpye
 -->
-plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer* readBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>plc4c_data** data_item);
+plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>plc4c_data** data_item);
 
 <#--
     Define the serialize-method for elements of this tpye
 -->
-plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_buffer* writeBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>plc4c_data** data_item);
+plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, <#if parserArguments?has_content><#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list>, </#if>plc4c_data** data_item);
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(plc4c_data* data_item<#if parserArguments?has_content>, <#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list></#if>);
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item<#if parserArguments?has_content>, <#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list></#if>);
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(plc4c_data* data_item<#if parserArguments?has_content>, <#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list></#if>);
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item<#if parserArguments?has_content>, <#list parserArguments as parserArgument>${helper.getLanguageTypeNameForTypeReference(parserArgument.type)}<#if !parserArgument.type.isSimpleTypeReference() && !parserArgument.type.isEnumTypeReference()>*</#if> ${parserArgument.name}<#sep>, </#list></#if>);
 
 <#--#ifdef __cplusplus
 }
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 e7ea775ea5..fd0fcfaafe 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
@@ -64,7 +64,7 @@ ${helper.getCTypeName(type.name)} ${helper.getCTypeName(type.name)}_null() {
 }
 
 // Parse function.
-plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer* readBuffer, ${helper.getCTypeName(type.name)}* _message) {
+plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, ${helper.getCTypeName(type.name)}* _message) {
     plc4c_return_code _res = OK;
 
     ${helper.getLanguageTypeNameForTypeReference(type.type.orElseThrow())} value;
@@ -74,7 +74,7 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer*
     return _res;
 }
 
-plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_buffer* writeBuffer, ${helper.getCTypeName(type.name)}* _message) {
+plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, ${helper.getCTypeName(type.name)}* _message) {
     plc4c_return_code _res = OK;
 
     _res = ${helper.getWriteBufferWriteMethodCall(type.type.orElseThrow().asSimpleTypeReference().orElseThrow(), "*_message", null)?no_esc};
@@ -194,10 +194,10 @@ ${helper.getCTypeName(type.name)} ${helper.getCTypeName(type.name)}_get_first_en
     </#list>
 </#if>
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(${helper.getCTypeName(type.name)}* _message) {
-    return ${helper.getCTypeName(type.name)}_length_in_bits(_message) / 8;
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(plc4x_spi_context ctx, ${helper.getCTypeName(type.name)}* _message) {
+    return ${helper.getCTypeName(type.name)}_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(${helper.getCTypeName(type.name)}* _message) {
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(plc4x_spi_context ctx, ${helper.getCTypeName(type.name)}* _message) {
     return ${type.type.orElseThrow().asSimpleTypeReference().orElseThrow().sizeInBits};
 }
diff --git a/code-generation/language-c/src/main/resources/templates/c/enum-template.h.ftlh b/code-generation/language-c/src/main/resources/templates/c/enum-template.h.ftlh
index 08ebd165b9..9d85d23b62 100644
--- a/code-generation/language-c/src/main/resources/templates/c/enum-template.h.ftlh
+++ b/code-generation/language-c/src/main/resources/templates/c/enum-template.h.ftlh
@@ -44,6 +44,7 @@ ${helper.getIncludesDirectory()?replace(".", "/")}/${helper.camelCaseToSnakeCase
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -79,12 +80,12 @@ ${helper.getCTypeName(type.name)} ${helper.getCTypeName(type.name)}_null();
 <#--
     Define the parse-method for elements of this tpye
 -->
-plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4c_spi_read_buffer* readBuffer, ${helper.getCTypeName(type.name)}* message);
+plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, ${helper.getCTypeName(type.name)}* message);
 
 <#--
     Define the serialize-method for elements of this tpye
 -->
-plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4c_spi_write_buffer* writeBuffer, ${helper.getCTypeName(type.name)}* message);
+plc4c_return_code ${helper.getCTypeName(type.name)}_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, ${helper.getCTypeName(type.name)}* message);
 
 ${helper.getCTypeName(type.name)} ${helper.getCTypeName(type.name)}_for_value(${helper.getLanguageTypeNameForTypeReference(type.type.orElseThrow())} value);
 
@@ -106,9 +107,9 @@ ${helper.getCTypeName(type.name)} ${helper.getCTypeName(type.name)}_get_first_en
     </#list>
 </#if>
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(${helper.getCTypeName(type.name)}* message);
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bytes(plc4x_spi_context ctx, ${helper.getCTypeName(type.name)}* message);
 
-uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(${helper.getCTypeName(type.name)}* message);
+uint16_t ${helper.getCTypeName(type.name)}_length_in_bits(plc4x_spi_context ctx, ${helper.getCTypeName(type.name)}* message);
 
 <#--#ifdef __cplusplus
 }
diff --git a/plc4c/drivers/modbus/src/driver_modbus_packets.c b/plc4c/drivers/modbus/src/driver_modbus_packets.c
index eb152b9e77..85c495a4de 100644
--- a/plc4c/drivers/modbus/src/driver_modbus_packets.c
+++ b/plc4c/drivers/modbus/src/driver_modbus_packets.c
@@ -54,7 +54,7 @@ plc4c_return_code plc4c_driver_modbus_send_packet(
     plc4c_modbus_read_write_modbus_adu* packet) {
   // Get the size required to contain the serialized form of this packet.
   uint16_t packet_size =
-      plc4c_modbus_read_write_modbus_adu_length_in_bytes(packet);
+      plc4c_modbus_read_write_modbus_adu_length_in_bytes(plc4x_spi_context_background(), packet);
 
   // Serialize this message to a byte-array.
   plc4c_spi_write_buffer* write_buffer;
@@ -64,7 +64,7 @@ plc4c_return_code plc4c_driver_modbus_send_packet(
     return return_code;
   }
   return_code = plc4c_modbus_read_write_modbus_adu_serialize(
-      write_buffer, packet);
+      plc4x_spi_context_background(), write_buffer, packet);
   if (return_code != OK) {
     return return_code;
   }
@@ -100,7 +100,7 @@ plc4c_return_code plc4c_driver_modbus_receive_packet(
 
   return_code =
       plc4c_modbus_read_write_modbus_adu_parse(
-          read_buffer,driver_type, true, packet);
+          plc4x_spi_context_background(), read_buffer,driver_type, true, packet);
   if (return_code != OK) {
     return return_code;
   }
diff --git a/plc4c/drivers/modbus/src/driver_modbus_sm_read.c b/plc4c/drivers/modbus/src/driver_modbus_sm_read.c
index 2f2e078098..49f32d6e66 100644
--- a/plc4c/drivers/modbus/src/driver_modbus_sm_read.c
+++ b/plc4c/drivers/modbus/src/driver_modbus_sm_read.c
@@ -170,7 +170,7 @@ plc4c_return_code plc4c_driver_modbus_read_machine_function(
 
       // Decode the items in the response ...
       plc4c_data* data_item;
-      plc4c_modbus_read_write_data_item_parse(read_buffer, modbus_item->datatype, modbus_item->num_elements, &data_item);
+      plc4c_modbus_read_write_data_item_parse(plc4x_spi_context_background(), read_buffer, modbus_item->datatype, modbus_item->num_elements, &data_item);
 
       // Create a new response value-item
       plc4c_response_value_item* response_value_item = malloc(sizeof(plc4c_response_value_item));
diff --git a/plc4c/drivers/plc4x/src/driver_plc4x_packets.c b/plc4c/drivers/plc4x/src/driver_plc4x_packets.c
index 3e2a94e1be..2acee6d51d 100644
--- a/plc4c/drivers/plc4x/src/driver_plc4x_packets.c
+++ b/plc4c/drivers/plc4x/src/driver_plc4x_packets.c
@@ -19,6 +19,7 @@
 
 #include <ctype.h>
 #include <plc4c/driver_plc4x.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/types_private.h>
 #include <stdlib.h>
 #include <string.h>
@@ -33,14 +34,14 @@ plc4c_return_code plc4c_driver_plc4x_send_packet(plc4c_connection* connection,
   plc4c_return_code return_code;
 
   // Get the size required to contain the serialized form of this packet.
-  packet_size = plc4c_plc4x_read_write_plc4x_message_length_in_bytes(packet);
+  packet_size = plc4c_plc4x_read_write_plc4x_message_length_in_bytes(plc4x_spi_context_background(), packet);
 
   // Serialize this message to a byte-array.
   return_code = plc4c_spi_write_buffer_create(packet_size, &write_buffer);
   if (return_code != OK) {
     return return_code;
   }
-  return_code = plc4c_plc4x_read_write_plc4x_message_serialize(write_buffer, packet);
+  return_code = plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_context_background(), write_buffer, packet);
   if(return_code != OK) {
     return return_code;
   }
@@ -86,7 +87,7 @@ plc4c_return_code plc4c_driver_plc4x_receive_packet(plc4c_connection* connection
 
   // Parse the packet by consuming the read_buffer data.
   *packet = NULL;
-  return_code = plc4c_plc4x_read_write_plc4x_message_parse(read_buffer, packet);
+  return_code = plc4c_plc4x_read_write_plc4x_message_parse(plc4x_spi_context_background(), read_buffer, packet);
   if (return_code != OK) {
     return return_code;
   }
diff --git a/plc4c/drivers/s7/src/driver_s7_encode_decode.c b/plc4c/drivers/s7/src/driver_s7_encode_decode.c
index 9b9043b591..af2bf2765e 100644
--- a/plc4c/drivers/s7/src/driver_s7_encode_decode.c
+++ b/plc4c/drivers/s7/src/driver_s7_encode_decode.c
@@ -391,7 +391,7 @@ plc4c_return_code plc4c_driver_s7_encode_address(char* address, void** item) {
     //   parse the byte array
     //   - directly add the resulting struct to the request
     plc4c_s7_read_write_s7_address_parse(
-        read_buffer, &s7_item->s7_var_request_parameter_item_address_address);
+        plc4x_spi_context_background(), read_buffer, &s7_item->s7_var_request_parameter_item_address_address);
 
     free(read_buffer);
     free(raw_data);
diff --git a/plc4c/drivers/s7/src/driver_s7_packets.c b/plc4c/drivers/s7/src/driver_s7_packets.c
index 3742f9a73e..31a72434e1 100644
--- a/plc4c/drivers/s7/src/driver_s7_packets.c
+++ b/plc4c/drivers/s7/src/driver_s7_packets.c
@@ -143,14 +143,14 @@ plc4c_return_code plc4c_driver_s7_send_packet(plc4c_connection* connection,
   plc4c_return_code return_code;
   
   // Get the size required to contain the serialized form of this packet.
-  packet_size = plc4c_s7_read_write_tpkt_packet_length_in_bytes(packet);
+  packet_size = plc4c_s7_read_write_tpkt_packet_length_in_bytes(plc4x_spi_context_background(), packet);
 
   // Serialize this message to a byte-array.
   return_code = plc4c_spi_write_buffer_create(packet_size, &write_buffer);
   if (return_code != OK) {
     return return_code;
   }
-  return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, packet);
+  return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, packet);
   if(return_code != OK) {
     return return_code;
   }
@@ -185,7 +185,7 @@ plc4c_return_code plc4c_driver_s7_receive_packet(plc4c_connection* connection,
 
   // Parse the packet by consuming the read_buffer data.
   *packet = NULL;
-  return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, packet);
+  return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, packet);
   if (return_code != OK) {
     return return_code;
   }
diff --git a/plc4c/drivers/s7/src/driver_s7_sm_read.c b/plc4c/drivers/s7/src/driver_s7_sm_read.c
index 2a41ab9c3f..abc8d59f64 100644
--- a/plc4c/drivers/s7/src/driver_s7_sm_read.c
+++ b/plc4c/drivers/s7/src/driver_s7_sm_read.c
@@ -257,12 +257,12 @@ plc4c_return_code plc4c_driver_s7_parse_read_response(
       all_data_item = plc4c_data_create_list_data(all_list);
       free(all_list);
       for (idx = 0; idx < num_elements ; idx++) {
-        plc4c_s7_read_write_data_item_parse(read_buffer, data_protocol_id, string_length, &data_item);
+        plc4c_s7_read_write_data_item_parse(plc4x_spi_context_background(), read_buffer, data_protocol_id, string_length, &data_item);
         plc4c_utils_list_insert_head_value(all_data_item->data.list_value, (void*)data_item);
       }
       data_item = all_data_item;
     } else {
-      plc4c_s7_read_write_data_item_parse(read_buffer, data_protocol_id, string_length, &data_item);
+      plc4c_s7_read_write_data_item_parse(plc4x_spi_context_background(), read_buffer, data_protocol_id, string_length, &data_item);
     }
 
     // Create a new response value-item
diff --git a/plc4c/drivers/s7/test/s7_test.c b/plc4c/drivers/s7/test/s7_test.c
index 344a94fc95..53aa8f6e8f 100644
--- a/plc4c/drivers/s7/test/s7_test.c
+++ b/plc4c/drivers/s7/test/s7_test.c
@@ -64,7 +64,7 @@ void internal_parse_serialize_test(uint8_t* payload,
   }
 
   plc4c_s7_read_write_tpkt_packet* message = NULL;
-  return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+  return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
   if (return_code != OK) {
     TEST_FAIL_MESSAGE("Error parsing packet");
   }
@@ -76,7 +76,7 @@ void internal_parse_serialize_test(uint8_t* payload,
   }
 
   return_code =
-      plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+      plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
 
   if (return_code != OK) {
     TEST_FAIL_MESSAGE("Error serializing");
diff --git a/plc4c/generated-sources/modbus/include/data_item.h b/plc4c/generated-sources/modbus/include/data_item.h
index b13b479d7d..d2945a6c26 100644
--- a/plc4c/generated-sources/modbus/include/data_item.h
+++ b/plc4c/generated-sources/modbus/include/data_item.h
@@ -21,6 +21,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -28,12 +29,12 @@
 
 // Code generated by code-generation. DO NOT EDIT.
 
-plc4c_return_code plc4c_modbus_read_write_data_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues, plc4c_data** data_item);
+plc4c_return_code plc4c_modbus_read_write_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues, plc4c_data** data_item);
 
-plc4c_return_code plc4c_modbus_read_write_data_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues, plc4c_data** data_item);
+plc4c_return_code plc4c_modbus_read_write_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues, plc4c_data** data_item);
 
-uint16_t plc4c_modbus_read_write_data_item_length_in_bytes(plc4c_data* data_item, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues);
+uint16_t plc4c_modbus_read_write_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues);
 
-uint16_t plc4c_modbus_read_write_data_item_length_in_bits(plc4c_data* data_item, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues);
+uint16_t plc4c_modbus_read_write_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues);
 
 #endif  // PLC4C_MODBUS_READ_WRITE_DATA_ITEM_H_
diff --git a/plc4c/generated-sources/modbus/include/driver_type.h b/plc4c/generated-sources/modbus/include/driver_type.h
index 23cfa10de6..e7d1f5fb7c 100644
--- a/plc4c/generated-sources/modbus/include/driver_type.h
+++ b/plc4c/generated-sources/modbus/include/driver_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -38,9 +39,9 @@ typedef enum plc4c_modbus_read_write_driver_type plc4c_modbus_read_write_driver_
 // Get an empty NULL-struct
 plc4c_modbus_read_write_driver_type plc4c_modbus_read_write_driver_type_null();
 
-plc4c_return_code plc4c_modbus_read_write_driver_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_driver_type* message);
+plc4c_return_code plc4c_modbus_read_write_driver_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_driver_type* message);
 
-plc4c_return_code plc4c_modbus_read_write_driver_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_driver_type* message);
+plc4c_return_code plc4c_modbus_read_write_driver_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_driver_type* message);
 
 plc4c_modbus_read_write_driver_type plc4c_modbus_read_write_driver_type_for_value(uint32_t value);
 
@@ -50,9 +51,9 @@ int plc4c_modbus_read_write_driver_type_num_values();
 
 plc4c_modbus_read_write_driver_type plc4c_modbus_read_write_driver_type_value_for_index(int index);
 
-uint16_t plc4c_modbus_read_write_driver_type_length_in_bytes(plc4c_modbus_read_write_driver_type* message);
+uint16_t plc4c_modbus_read_write_driver_type_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_driver_type* message);
 
-uint16_t plc4c_modbus_read_write_driver_type_length_in_bits(plc4c_modbus_read_write_driver_type* message);
+uint16_t plc4c_modbus_read_write_driver_type_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_driver_type* message);
 
 
 #endif  // PLC4C_MODBUS_READ_WRITE_DRIVER_TYPE_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_adu.h b/plc4c/generated-sources/modbus/include/modbus_adu.h
index 3acf90c4b0..66f15024a3 100644
--- a/plc4c/generated-sources/modbus/include/modbus_adu.h
+++ b/plc4c/generated-sources/modbus/include/modbus_adu.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -76,12 +77,12 @@ typedef struct plc4c_modbus_read_write_modbus_adu plc4c_modbus_read_write_modbus
 // Create an empty NULL-struct
 plc4c_modbus_read_write_modbus_adu plc4c_modbus_read_write_modbus_adu_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_adu_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_driver_type driverType, bool response, plc4c_modbus_read_write_modbus_adu** message);
+plc4c_return_code plc4c_modbus_read_write_modbus_adu_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_driver_type driverType, bool response, plc4c_modbus_read_write_modbus_adu** message);
 
-plc4c_return_code plc4c_modbus_read_write_modbus_adu_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_adu* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_adu_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_adu* message);
 
-uint16_t plc4c_modbus_read_write_modbus_adu_length_in_bytes(plc4c_modbus_read_write_modbus_adu* message);
+uint16_t plc4c_modbus_read_write_modbus_adu_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_adu* message);
 
-uint16_t plc4c_modbus_read_write_modbus_adu_length_in_bits(plc4c_modbus_read_write_modbus_adu* message);
+uint16_t plc4c_modbus_read_write_modbus_adu_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_adu* message);
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_ADU_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_constants.h b/plc4c/generated-sources/modbus/include/modbus_constants.h
index f490ef81e3..25ba237fed 100644
--- a/plc4c/generated-sources/modbus/include/modbus_constants.h
+++ b/plc4c/generated-sources/modbus/include/modbus_constants.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -41,12 +42,12 @@ typedef struct plc4c_modbus_read_write_modbus_constants plc4c_modbus_read_write_
 // Create an empty NULL-struct
 plc4c_modbus_read_write_modbus_constants plc4c_modbus_read_write_modbus_constants_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_constants_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_constants** message);
+plc4c_return_code plc4c_modbus_read_write_modbus_constants_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_constants** message);
 
-plc4c_return_code plc4c_modbus_read_write_modbus_constants_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_constants* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_constants_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_constants* message);
 
-uint16_t plc4c_modbus_read_write_modbus_constants_length_in_bytes(plc4c_modbus_read_write_modbus_constants* message);
+uint16_t plc4c_modbus_read_write_modbus_constants_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_constants* message);
 
-uint16_t plc4c_modbus_read_write_modbus_constants_length_in_bits(plc4c_modbus_read_write_modbus_constants* message);
+uint16_t plc4c_modbus_read_write_modbus_constants_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_constants* message);
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_CONSTANTS_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_data_type.h b/plc4c/generated-sources/modbus/include/modbus_data_type.h
index f38f8bac7d..ed76694eb5 100644
--- a/plc4c/generated-sources/modbus/include/modbus_data_type.h
+++ b/plc4c/generated-sources/modbus/include/modbus_data_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -62,9 +63,9 @@ typedef enum plc4c_modbus_read_write_modbus_data_type plc4c_modbus_read_write_mo
 // Get an empty NULL-struct
 plc4c_modbus_read_write_modbus_data_type plc4c_modbus_read_write_modbus_data_type_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_data_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_data_type* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_data_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_data_type* message);
 
-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 plc4c_modbus_read_write_modbus_data_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_data_type* message);
 
 plc4c_modbus_read_write_modbus_data_type plc4c_modbus_read_write_modbus_data_type_for_value(uint8_t value);
 
@@ -77,9 +78,9 @@ plc4c_modbus_read_write_modbus_data_type plc4c_modbus_read_write_modbus_data_typ
 uint8_t plc4c_modbus_read_write_modbus_data_type_get_data_type_size(plc4c_modbus_read_write_modbus_data_type value);
 plc4c_modbus_read_write_modbus_data_type plc4c_modbus_read_write_modbus_data_type_get_first_enum_for_field_data_type_size(uint8_t value);
 
-uint16_t plc4c_modbus_read_write_modbus_data_type_length_in_bytes(plc4c_modbus_read_write_modbus_data_type* message);
+uint16_t plc4c_modbus_read_write_modbus_data_type_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_data_type* message);
 
-uint16_t plc4c_modbus_read_write_modbus_data_type_length_in_bits(plc4c_modbus_read_write_modbus_data_type* message);
+uint16_t plc4c_modbus_read_write_modbus_data_type_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_data_type* message);
 
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_DATA_TYPE_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_device_information_conformity_level.h b/plc4c/generated-sources/modbus/include/modbus_device_information_conformity_level.h
index e7dd0cd423..933aec8ab1 100644
--- a/plc4c/generated-sources/modbus/include/modbus_device_information_conformity_level.h
+++ b/plc4c/generated-sources/modbus/include/modbus_device_information_conformity_level.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -38,9 +39,9 @@ typedef enum plc4c_modbus_read_write_modbus_device_information_conformity_level
 // Get an empty NULL-struct
 plc4c_modbus_read_write_modbus_device_information_conformity_level plc4c_modbus_read_write_modbus_device_information_conformity_level_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_conformity_level_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_conformity_level* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_conformity_level_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_conformity_level* message);
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_conformity_level_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_conformity_level* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_conformity_level_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_conformity_level* message);
 
 plc4c_modbus_read_write_modbus_device_information_conformity_level plc4c_modbus_read_write_modbus_device_information_conformity_level_for_value(uint8_t value);
 
@@ -50,9 +51,9 @@ int plc4c_modbus_read_write_modbus_device_information_conformity_level_num_value
 
 plc4c_modbus_read_write_modbus_device_information_conformity_level plc4c_modbus_read_write_modbus_device_information_conformity_level_value_for_index(int index);
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bytes(plc4c_modbus_read_write_modbus_device_information_conformity_level* message);
+uint16_t plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_conformity_level* message);
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bits(plc4c_modbus_read_write_modbus_device_information_conformity_level* message);
+uint16_t plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_conformity_level* message);
 
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_DEVICE_INFORMATION_CONFORMITY_LEVEL_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_device_information_level.h b/plc4c/generated-sources/modbus/include/modbus_device_information_level.h
index 2806bba291..0d8d9f12fe 100644
--- a/plc4c/generated-sources/modbus/include/modbus_device_information_level.h
+++ b/plc4c/generated-sources/modbus/include/modbus_device_information_level.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -39,9 +40,9 @@ typedef enum plc4c_modbus_read_write_modbus_device_information_level plc4c_modbu
 // Get an empty NULL-struct
 plc4c_modbus_read_write_modbus_device_information_level plc4c_modbus_read_write_modbus_device_information_level_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_level_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_level* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_level_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_level* message);
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_level_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_level* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_level_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_level* message);
 
 plc4c_modbus_read_write_modbus_device_information_level plc4c_modbus_read_write_modbus_device_information_level_for_value(uint8_t value);
 
@@ -51,9 +52,9 @@ int plc4c_modbus_read_write_modbus_device_information_level_num_values();
 
 plc4c_modbus_read_write_modbus_device_information_level plc4c_modbus_read_write_modbus_device_information_level_value_for_index(int index);
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_level_length_in_bytes(plc4c_modbus_read_write_modbus_device_information_level* message);
+uint16_t plc4c_modbus_read_write_modbus_device_information_level_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_level* message);
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_level_length_in_bits(plc4c_modbus_read_write_modbus_device_information_level* message);
+uint16_t plc4c_modbus_read_write_modbus_device_information_level_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_level* message);
 
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_DEVICE_INFORMATION_LEVEL_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_device_information_more_follows.h b/plc4c/generated-sources/modbus/include/modbus_device_information_more_follows.h
index 57a4741b18..779826e9eb 100644
--- a/plc4c/generated-sources/modbus/include/modbus_device_information_more_follows.h
+++ b/plc4c/generated-sources/modbus/include/modbus_device_information_more_follows.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -37,9 +38,9 @@ typedef enum plc4c_modbus_read_write_modbus_device_information_more_follows plc4
 // Get an empty NULL-struct
 plc4c_modbus_read_write_modbus_device_information_more_follows plc4c_modbus_read_write_modbus_device_information_more_follows_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_more_follows_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_more_follows* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_more_follows_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_more_follows* message);
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_more_follows_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_more_follows* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_more_follows_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_more_follows* message);
 
 plc4c_modbus_read_write_modbus_device_information_more_follows plc4c_modbus_read_write_modbus_device_information_more_follows_for_value(uint8_t value);
 
@@ -49,9 +50,9 @@ int plc4c_modbus_read_write_modbus_device_information_more_follows_num_values();
 
 plc4c_modbus_read_write_modbus_device_information_more_follows plc4c_modbus_read_write_modbus_device_information_more_follows_value_for_index(int index);
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bytes(plc4c_modbus_read_write_modbus_device_information_more_follows* message);
+uint16_t plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_more_follows* message);
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bits(plc4c_modbus_read_write_modbus_device_information_more_follows* message);
+uint16_t plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_more_follows* message);
 
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_DEVICE_INFORMATION_MORE_FOLLOWS_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_device_information_object.h b/plc4c/generated-sources/modbus/include/modbus_device_information_object.h
index 9962275545..7bc3fc8be1 100644
--- a/plc4c/generated-sources/modbus/include/modbus_device_information_object.h
+++ b/plc4c/generated-sources/modbus/include/modbus_device_information_object.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -39,12 +40,12 @@ typedef struct plc4c_modbus_read_write_modbus_device_information_object plc4c_mo
 // Create an empty NULL-struct
 plc4c_modbus_read_write_modbus_device_information_object plc4c_modbus_read_write_modbus_device_information_object_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_object_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_object** message);
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_object_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_object** message);
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_object_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_object* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_object_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_object* message);
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_object_length_in_bytes(plc4c_modbus_read_write_modbus_device_information_object* message);
+uint16_t plc4c_modbus_read_write_modbus_device_information_object_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_object* message);
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_object_length_in_bits(plc4c_modbus_read_write_modbus_device_information_object* message);
+uint16_t plc4c_modbus_read_write_modbus_device_information_object_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_object* message);
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_DEVICE_INFORMATION_OBJECT_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_error_code.h b/plc4c/generated-sources/modbus/include/modbus_error_code.h
index cc1015fa8f..9a8dc55d71 100644
--- a/plc4c/generated-sources/modbus/include/modbus_error_code.h
+++ b/plc4c/generated-sources/modbus/include/modbus_error_code.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -45,9 +46,9 @@ typedef enum plc4c_modbus_read_write_modbus_error_code plc4c_modbus_read_write_m
 // Get an empty NULL-struct
 plc4c_modbus_read_write_modbus_error_code plc4c_modbus_read_write_modbus_error_code_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_error_code_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_error_code* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_error_code_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_error_code* message);
 
-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 plc4c_modbus_read_write_modbus_error_code_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_error_code* message);
 
 plc4c_modbus_read_write_modbus_error_code plc4c_modbus_read_write_modbus_error_code_for_value(uint8_t value);
 
@@ -57,9 +58,9 @@ int plc4c_modbus_read_write_modbus_error_code_num_values();
 
 plc4c_modbus_read_write_modbus_error_code plc4c_modbus_read_write_modbus_error_code_value_for_index(int index);
 
-uint16_t plc4c_modbus_read_write_modbus_error_code_length_in_bytes(plc4c_modbus_read_write_modbus_error_code* message);
+uint16_t plc4c_modbus_read_write_modbus_error_code_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_error_code* message);
 
-uint16_t plc4c_modbus_read_write_modbus_error_code_length_in_bits(plc4c_modbus_read_write_modbus_error_code* message);
+uint16_t plc4c_modbus_read_write_modbus_error_code_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_error_code* message);
 
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_ERROR_CODE_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_pdu.h b/plc4c/generated-sources/modbus/include/modbus_pdu.h
index 8c63464d83..a82f0c406f 100644
--- a/plc4c/generated-sources/modbus/include/modbus_pdu.h
+++ b/plc4c/generated-sources/modbus/include/modbus_pdu.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -247,12 +248,12 @@ typedef struct plc4c_modbus_read_write_modbus_pdu plc4c_modbus_read_write_modbus
 // Create an empty NULL-struct
 plc4c_modbus_read_write_modbus_pdu plc4c_modbus_read_write_modbus_pdu_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_parse(plc4c_spi_read_buffer* readBuffer, bool response, plc4c_modbus_read_write_modbus_pdu** message);
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, bool response, plc4c_modbus_read_write_modbus_pdu** message);
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu* message);
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bytes(plc4c_modbus_read_write_modbus_pdu* message);
+uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu* message);
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4c_modbus_read_write_modbus_pdu* message);
+uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu* message);
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_PDU_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_pdu_read_file_record_request_item.h b/plc4c/generated-sources/modbus/include/modbus_pdu_read_file_record_request_item.h
index fe508c932a..c58c88c72d 100644
--- a/plc4c/generated-sources/modbus/include/modbus_pdu_read_file_record_request_item.h
+++ b/plc4c/generated-sources/modbus/include/modbus_pdu_read_file_record_request_item.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -41,12 +42,12 @@ typedef struct plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item
 // Create an empty NULL-struct
 plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item** message);
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item** message);
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* message);
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bytes(plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* message);
+uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* message);
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bits(plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* message);
+uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* message);
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_PDU_READ_FILE_RECORD_REQUEST_ITEM_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_pdu_read_file_record_response_item.h b/plc4c/generated-sources/modbus/include/modbus_pdu_read_file_record_response_item.h
index 6e61b0ec4a..ff39f89041 100644
--- a/plc4c/generated-sources/modbus/include/modbus_pdu_read_file_record_response_item.h
+++ b/plc4c/generated-sources/modbus/include/modbus_pdu_read_file_record_response_item.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -39,12 +40,12 @@ typedef struct plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item
 // Create an empty NULL-struct
 plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item** message);
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item** message);
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* message);
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bytes(plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* message);
+uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* message);
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bits(plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* message);
+uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* message);
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_PDU_READ_FILE_RECORD_RESPONSE_ITEM_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_pdu_write_file_record_request_item.h b/plc4c/generated-sources/modbus/include/modbus_pdu_write_file_record_request_item.h
index d790e142c9..e833a76c6d 100644
--- a/plc4c/generated-sources/modbus/include/modbus_pdu_write_file_record_request_item.h
+++ b/plc4c/generated-sources/modbus/include/modbus_pdu_write_file_record_request_item.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -41,12 +42,12 @@ typedef struct plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item
 // Create an empty NULL-struct
 plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item** message);
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item** message);
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* message);
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bytes(plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* message);
+uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* message);
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bits(plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* message);
+uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* message);
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_PDU_WRITE_FILE_RECORD_REQUEST_ITEM_H_
diff --git a/plc4c/generated-sources/modbus/include/modbus_pdu_write_file_record_response_item.h b/plc4c/generated-sources/modbus/include/modbus_pdu_write_file_record_response_item.h
index c0ca03726e..b2ed83105c 100644
--- a/plc4c/generated-sources/modbus/include/modbus_pdu_write_file_record_response_item.h
+++ b/plc4c/generated-sources/modbus/include/modbus_pdu_write_file_record_response_item.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -41,12 +42,12 @@ typedef struct plc4c_modbus_read_write_modbus_pdu_write_file_record_response_ite
 // Create an empty NULL-struct
 plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_null();
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item** message);
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item** message);
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* message);
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* message);
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bytes(plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* message);
+uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* message);
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bits(plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* message);
+uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* message);
 
 #endif  // PLC4C_MODBUS_READ_WRITE_MODBUS_PDU_WRITE_FILE_RECORD_RESPONSE_ITEM_H_
diff --git a/plc4c/generated-sources/modbus/src/data_item.c b/plc4c/generated-sources/modbus/src/data_item.c
index 30d78a4a72..bc5bd30b39 100644
--- a/plc4c/generated-sources/modbus/src/data_item.c
+++ b/plc4c/generated-sources/modbus/src/data_item.c
@@ -31,7 +31,7 @@
 // Code generated by code-generation. DO NOT EDIT.
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_data_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues, plc4c_data** data_item) {
+plc4c_return_code plc4c_modbus_read_write_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues, plc4c_data** data_item) {
     uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
     uint16_t curPos;
     plc4c_return_code _res = OK;
@@ -528,7 +528,7 @@ plc4c_return_code plc4c_modbus_read_write_data_item_parse(plc4c_spi_read_buffer*
   return OK;
 }
 
-plc4c_return_code plc4c_modbus_read_write_data_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues, plc4c_data** data_item) {
+plc4c_return_code plc4c_modbus_read_write_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues, plc4c_data** data_item) {
   plc4c_return_code _res = OK;
         if((dataType == plc4c_modbus_read_write_modbus_data_type_BOOL) && (numberOfValues == 1)) { /* BOOL */
 
@@ -703,11 +703,11 @@ plc4c_return_code plc4c_modbus_read_write_data_item_serialize(plc4c_spi_write_bu
   return OK;
 }
 
-uint16_t plc4c_modbus_read_write_data_item_length_in_bytes(plc4c_data* data_item, plc4c_modbus_read_write_modbus_data_type data_type, uint16_t number_of_values) {
-  return plc4c_modbus_read_write_data_item_length_in_bits(data_item, data_type, number_of_values) / 8;
+uint16_t plc4c_modbus_read_write_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item, plc4c_modbus_read_write_modbus_data_type data_type, uint16_t number_of_values) {
+  return plc4c_modbus_read_write_data_item_length_in_bits(ctx, data_item, data_type, number_of_values) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_data_item_length_in_bits(plc4c_data* data_item, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues) {
+uint16_t plc4c_modbus_read_write_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item, plc4c_modbus_read_write_modbus_data_type dataType, uint16_t numberOfValues) {
   uint16_t lengthInBits = 0;
     if((dataType == plc4c_modbus_read_write_modbus_data_type_BOOL) && (numberOfValues == 1)) { /* BOOL */
 
diff --git a/plc4c/generated-sources/modbus/src/driver_type.c b/plc4c/generated-sources/modbus/src/driver_type.c
index bd9cb4b97e..e0d342c0fe 100644
--- a/plc4c/generated-sources/modbus/src/driver_type.c
+++ b/plc4c/generated-sources/modbus/src/driver_type.c
@@ -33,7 +33,7 @@ plc4c_modbus_read_write_driver_type plc4c_modbus_read_write_driver_type_null() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_driver_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_driver_type* _message) {
+plc4c_return_code plc4c_modbus_read_write_driver_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_driver_type* _message) {
     plc4c_return_code _res = OK;
 
     uint32_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_modbus_read_write_driver_type_parse(plc4c_spi_read_buffe
     return _res;
 }
 
-plc4c_return_code plc4c_modbus_read_write_driver_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_driver_type* _message) {
+plc4c_return_code plc4c_modbus_read_write_driver_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_driver_type* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_int(writeBuffer, 32, *_message);
@@ -94,10 +94,10 @@ plc4c_modbus_read_write_driver_type plc4c_modbus_read_write_driver_type_value_fo
     }
 }
 
-uint16_t plc4c_modbus_read_write_driver_type_length_in_bytes(plc4c_modbus_read_write_driver_type* _message) {
-    return plc4c_modbus_read_write_driver_type_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_driver_type_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_driver_type* _message) {
+    return plc4c_modbus_read_write_driver_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_driver_type_length_in_bits(plc4c_modbus_read_write_driver_type* _message) {
+uint16_t plc4c_modbus_read_write_driver_type_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_driver_type* _message) {
     return 32;
 }
diff --git a/plc4c/generated-sources/modbus/src/modbus_adu.c b/plc4c/generated-sources/modbus/src/modbus_adu.c
index f333dfa733..5abb17d5ac 100644
--- a/plc4c/generated-sources/modbus/src/modbus_adu.c
+++ b/plc4c/generated-sources/modbus/src/modbus_adu.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_modbus_static.h>
 
@@ -58,7 +59,7 @@ uint16_t PLC4C_MODBUS_READ_WRITE_MODBUS_TCP_ADU_PROTOCOL_IDENTIFIER() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_adu_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_driver_type driverType, bool response, plc4c_modbus_read_write_modbus_adu** _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_adu_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_driver_type driverType, bool response, plc4c_modbus_read_write_modbus_adu** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -112,7 +113,7 @@ if( driverType == plc4c_modbus_read_write_driver_type_MODBUS_TCP ) { /* ModbusTc
 
   // Simple Field (pdu)
   plc4c_modbus_read_write_modbus_pdu* pdu;
-  _res = plc4c_modbus_read_write_modbus_pdu_parse(readBuffer, response, (void*) &pdu);
+  _res = plc4c_modbus_read_write_modbus_pdu_parse(ctx, readBuffer, response, (void*) &pdu);
   if(_res != OK) {
     return _res;
   }
@@ -132,7 +133,7 @@ if( driverType == plc4c_modbus_read_write_driver_type_MODBUS_RTU ) { /* ModbusRt
 
   // Simple Field (pdu)
   plc4c_modbus_read_write_modbus_pdu* pdu;
-  _res = plc4c_modbus_read_write_modbus_pdu_parse(readBuffer, response, (void*) &pdu);
+  _res = plc4c_modbus_read_write_modbus_pdu_parse(ctx, readBuffer, response, (void*) &pdu);
   if(_res != OK) {
     return _res;
   }
@@ -168,7 +169,7 @@ if( driverType == plc4c_modbus_read_write_driver_type_MODBUS_ASCII ) { /* Modbus
 
   // Simple Field (pdu)
   plc4c_modbus_read_write_modbus_pdu* pdu;
-  _res = plc4c_modbus_read_write_modbus_pdu_parse(readBuffer, response, (void*) &pdu);
+  _res = plc4c_modbus_read_write_modbus_pdu_parse(ctx, readBuffer, response, (void*) &pdu);
   if(_res != OK) {
     return _res;
   }
@@ -194,7 +195,7 @@ if( driverType == plc4c_modbus_read_write_driver_type_MODBUS_ASCII ) { /* Modbus
   return OK;
 }
 
-plc4c_return_code plc4c_modbus_read_write_modbus_adu_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_adu* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_adu_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_adu* _message) {
   plc4c_return_code _res = OK;
 
   // Switch Field (Depending on the current type, serialize the subtype elements)
@@ -211,7 +212,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_adu_serialize(plc4c_spi_write_b
   plc4c_spi_write_unsigned_short(writeBuffer, 16, PLC4C_MODBUS_READ_WRITE_MODBUS_TCP_ADU_PROTOCOL_IDENTIFIER());
 
   // Implicit Field (length) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
-  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, (plc4c_modbus_read_write_modbus_pdu_length_in_bytes(_message->modbus_tcp_adu_pdu)) + (1));
+  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, (plc4c_modbus_read_write_modbus_pdu_length_in_bytes(ctx, _message->modbus_tcp_adu_pdu)) + (1));
   if(_res != OK) {
     return _res;
   }
@@ -223,7 +224,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_adu_serialize(plc4c_spi_write_b
   }
 
   // Simple Field (pdu)
-  _res = plc4c_modbus_read_write_modbus_pdu_serialize(writeBuffer, _message->modbus_tcp_adu_pdu);
+  _res = plc4c_modbus_read_write_modbus_pdu_serialize(ctx, writeBuffer, _message->modbus_tcp_adu_pdu);
   if(_res != OK) {
     return _res;
   }
@@ -239,7 +240,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_adu_serialize(plc4c_spi_write_b
   }
 
   // Simple Field (pdu)
-  _res = plc4c_modbus_read_write_modbus_pdu_serialize(writeBuffer, _message->modbus_rtu_adu_pdu);
+  _res = plc4c_modbus_read_write_modbus_pdu_serialize(ctx, writeBuffer, _message->modbus_rtu_adu_pdu);
   if(_res != OK) {
     return _res;
   }
@@ -262,7 +263,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_adu_serialize(plc4c_spi_write_b
   }
 
   // Simple Field (pdu)
-  _res = plc4c_modbus_read_write_modbus_pdu_serialize(writeBuffer, _message->modbus_ascii_adu_pdu);
+  _res = plc4c_modbus_read_write_modbus_pdu_serialize(ctx, writeBuffer, _message->modbus_ascii_adu_pdu);
   if(_res != OK) {
     return _res;
   }
@@ -281,11 +282,11 @@ plc4c_return_code plc4c_modbus_read_write_modbus_adu_serialize(plc4c_spi_write_b
   return OK;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_adu_length_in_bytes(plc4c_modbus_read_write_modbus_adu* _message) {
-  return plc4c_modbus_read_write_modbus_adu_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_adu_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_adu* _message) {
+  return plc4c_modbus_read_write_modbus_adu_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_adu_length_in_bits(plc4c_modbus_read_write_modbus_adu* _message) {
+uint16_t plc4c_modbus_read_write_modbus_adu_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_adu* _message) {
   uint16_t lengthInBits = 0;
 
   // Depending on the current type, add the length of sub-type elements ...
@@ -309,7 +310,7 @@ uint16_t plc4c_modbus_read_write_modbus_adu_length_in_bits(plc4c_modbus_read_wri
 
 
   // Simple field (pdu)
-  lengthInBits += plc4c_modbus_read_write_modbus_pdu_length_in_bits(_message->modbus_tcp_adu_pdu);
+  lengthInBits += plc4c_modbus_read_write_modbus_pdu_length_in_bits(ctx, _message->modbus_tcp_adu_pdu);
 
       break;
     }
@@ -320,7 +321,7 @@ uint16_t plc4c_modbus_read_write_modbus_adu_length_in_bits(plc4c_modbus_read_wri
 
 
   // Simple field (pdu)
-  lengthInBits += plc4c_modbus_read_write_modbus_pdu_length_in_bits(_message->modbus_rtu_adu_pdu);
+  lengthInBits += plc4c_modbus_read_write_modbus_pdu_length_in_bits(ctx, _message->modbus_rtu_adu_pdu);
 
 
   // Checksum Field (checksum)
@@ -335,7 +336,7 @@ uint16_t plc4c_modbus_read_write_modbus_adu_length_in_bits(plc4c_modbus_read_wri
 
 
   // Simple field (pdu)
-  lengthInBits += plc4c_modbus_read_write_modbus_pdu_length_in_bits(_message->modbus_ascii_adu_pdu);
+  lengthInBits += plc4c_modbus_read_write_modbus_pdu_length_in_bits(ctx, _message->modbus_ascii_adu_pdu);
 
 
   // Checksum Field (checksum)
diff --git a/plc4c/generated-sources/modbus/src/modbus_constants.c b/plc4c/generated-sources/modbus/src/modbus_constants.c
index 8c8c7d93c4..d82f9594a9 100644
--- a/plc4c/generated-sources/modbus/src/modbus_constants.c
+++ b/plc4c/generated-sources/modbus/src/modbus_constants.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_modbus_static.h>
 
@@ -33,7 +34,7 @@ uint16_t PLC4C_MODBUS_READ_WRITE_MODBUS_CONSTANTS_MODBUS_TCP_DEFAULT_PORT() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_constants_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_constants** _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_constants_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_constants** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -57,7 +58,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_constants_parse(plc4c_spi_read_
   return OK;
 }
 
-plc4c_return_code plc4c_modbus_read_write_modbus_constants_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_constants* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_constants_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_constants* _message) {
   plc4c_return_code _res = OK;
 
   // Const Field (modbusTcpDefaultPort)
@@ -66,11 +67,11 @@ plc4c_return_code plc4c_modbus_read_write_modbus_constants_serialize(plc4c_spi_w
   return OK;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_constants_length_in_bytes(plc4c_modbus_read_write_modbus_constants* _message) {
-  return plc4c_modbus_read_write_modbus_constants_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_constants_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_constants* _message) {
+  return plc4c_modbus_read_write_modbus_constants_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_constants_length_in_bits(plc4c_modbus_read_write_modbus_constants* _message) {
+uint16_t plc4c_modbus_read_write_modbus_constants_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_constants* _message) {
   uint16_t lengthInBits = 0;
 
   // Const Field (modbusTcpDefaultPort)
diff --git a/plc4c/generated-sources/modbus/src/modbus_data_type.c b/plc4c/generated-sources/modbus/src/modbus_data_type.c
index 7b4cc913b7..c17b6074f7 100644
--- a/plc4c/generated-sources/modbus/src/modbus_data_type.c
+++ b/plc4c/generated-sources/modbus/src/modbus_data_type.c
@@ -33,7 +33,7 @@ plc4c_modbus_read_write_modbus_data_type plc4c_modbus_read_write_modbus_data_typ
 }
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_data_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_data_type* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_data_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_data_type* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_data_type_parse(plc4c_spi_read_
     return _res;
 }
 
-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 plc4c_modbus_read_write_modbus_data_type_serialize(plc4x_spi_context ctx, 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);
@@ -347,10 +347,10 @@ plc4c_modbus_read_write_modbus_data_type plc4c_modbus_read_write_modbus_data_typ
     }
 }
 
-uint16_t plc4c_modbus_read_write_modbus_data_type_length_in_bytes(plc4c_modbus_read_write_modbus_data_type* _message) {
-    return plc4c_modbus_read_write_modbus_data_type_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_data_type_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_data_type* _message) {
+    return plc4c_modbus_read_write_modbus_data_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_data_type_length_in_bits(plc4c_modbus_read_write_modbus_data_type* _message) {
+uint16_t plc4c_modbus_read_write_modbus_data_type_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_data_type* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/modbus/src/modbus_device_information_conformity_level.c b/plc4c/generated-sources/modbus/src/modbus_device_information_conformity_level.c
index 542166472b..398fb22d4a 100644
--- a/plc4c/generated-sources/modbus/src/modbus_device_information_conformity_level.c
+++ b/plc4c/generated-sources/modbus/src/modbus_device_information_conformity_level.c
@@ -33,7 +33,7 @@ plc4c_modbus_read_write_modbus_device_information_conformity_level plc4c_modbus_
 }
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_conformity_level_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_conformity_level* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_conformity_level_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_conformity_level* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_device_information_conformity_l
     return _res;
 }
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_conformity_level_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_conformity_level* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_conformity_level_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_conformity_level* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_byte(writeBuffer, 7, *_message);
@@ -94,10 +94,10 @@ plc4c_modbus_read_write_modbus_device_information_conformity_level plc4c_modbus_
     }
 }
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bytes(plc4c_modbus_read_write_modbus_device_information_conformity_level* _message) {
-    return plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_conformity_level* _message) {
+    return plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bits(plc4c_modbus_read_write_modbus_device_information_conformity_level* _message) {
+uint16_t plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_conformity_level* _message) {
     return 7;
 }
diff --git a/plc4c/generated-sources/modbus/src/modbus_device_information_level.c b/plc4c/generated-sources/modbus/src/modbus_device_information_level.c
index 2a7d6efe40..884c10d307 100644
--- a/plc4c/generated-sources/modbus/src/modbus_device_information_level.c
+++ b/plc4c/generated-sources/modbus/src/modbus_device_information_level.c
@@ -33,7 +33,7 @@ plc4c_modbus_read_write_modbus_device_information_level plc4c_modbus_read_write_
 }
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_level_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_level* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_level_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_level* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_device_information_level_parse(
     return _res;
 }
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_level_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_level* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_level_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_level* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
@@ -100,10 +100,10 @@ plc4c_modbus_read_write_modbus_device_information_level plc4c_modbus_read_write_
     }
 }
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_level_length_in_bytes(plc4c_modbus_read_write_modbus_device_information_level* _message) {
-    return plc4c_modbus_read_write_modbus_device_information_level_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_device_information_level_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_level* _message) {
+    return plc4c_modbus_read_write_modbus_device_information_level_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_level_length_in_bits(plc4c_modbus_read_write_modbus_device_information_level* _message) {
+uint16_t plc4c_modbus_read_write_modbus_device_information_level_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_level* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/modbus/src/modbus_device_information_more_follows.c b/plc4c/generated-sources/modbus/src/modbus_device_information_more_follows.c
index c5078ef695..f2796d44f9 100644
--- a/plc4c/generated-sources/modbus/src/modbus_device_information_more_follows.c
+++ b/plc4c/generated-sources/modbus/src/modbus_device_information_more_follows.c
@@ -33,7 +33,7 @@ plc4c_modbus_read_write_modbus_device_information_more_follows plc4c_modbus_read
 }
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_more_follows_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_more_follows* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_more_follows_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_more_follows* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_device_information_more_follows
     return _res;
 }
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_more_follows_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_more_follows* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_more_follows_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_more_follows* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
@@ -88,10 +88,10 @@ plc4c_modbus_read_write_modbus_device_information_more_follows plc4c_modbus_read
     }
 }
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bytes(plc4c_modbus_read_write_modbus_device_information_more_follows* _message) {
-    return plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_more_follows* _message) {
+    return plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bits(plc4c_modbus_read_write_modbus_device_information_more_follows* _message) {
+uint16_t plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_more_follows* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/modbus/src/modbus_device_information_object.c b/plc4c/generated-sources/modbus/src/modbus_device_information_object.c
index 708fbef97b..63e9a72272 100644
--- a/plc4c/generated-sources/modbus/src/modbus_device_information_object.c
+++ b/plc4c/generated-sources/modbus/src/modbus_device_information_object.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_modbus_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_object_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_object** _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_object_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_device_information_object** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -76,7 +77,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_device_information_object_parse
   return OK;
 }
 
-plc4c_return_code plc4c_modbus_read_write_modbus_device_information_object_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_object* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_device_information_object_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_device_information_object* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (objectId)
@@ -104,11 +105,11 @@ plc4c_return_code plc4c_modbus_read_write_modbus_device_information_object_seria
   return OK;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_object_length_in_bytes(plc4c_modbus_read_write_modbus_device_information_object* _message) {
-  return plc4c_modbus_read_write_modbus_device_information_object_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_device_information_object_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_object* _message) {
+  return plc4c_modbus_read_write_modbus_device_information_object_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_device_information_object_length_in_bits(plc4c_modbus_read_write_modbus_device_information_object* _message) {
+uint16_t plc4c_modbus_read_write_modbus_device_information_object_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_device_information_object* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (objectId)
diff --git a/plc4c/generated-sources/modbus/src/modbus_error_code.c b/plc4c/generated-sources/modbus/src/modbus_error_code.c
index ef1fd6e70c..95616a2f93 100644
--- a/plc4c/generated-sources/modbus/src/modbus_error_code.c
+++ b/plc4c/generated-sources/modbus/src/modbus_error_code.c
@@ -33,7 +33,7 @@ plc4c_modbus_read_write_modbus_error_code plc4c_modbus_read_write_modbus_error_c
 }
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_error_code_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_error_code* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_error_code_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_error_code* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_error_code_parse(plc4c_spi_read
     return _res;
 }
 
-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 plc4c_modbus_read_write_modbus_error_code_serialize(plc4x_spi_context ctx, 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);
@@ -136,10 +136,10 @@ plc4c_modbus_read_write_modbus_error_code plc4c_modbus_read_write_modbus_error_c
     }
 }
 
-uint16_t plc4c_modbus_read_write_modbus_error_code_length_in_bytes(plc4c_modbus_read_write_modbus_error_code* _message) {
-    return plc4c_modbus_read_write_modbus_error_code_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_error_code_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_error_code* _message) {
+    return plc4c_modbus_read_write_modbus_error_code_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_error_code_length_in_bits(plc4c_modbus_read_write_modbus_error_code* _message) {
+uint16_t plc4c_modbus_read_write_modbus_error_code_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_error_code* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/modbus/src/modbus_pdu.c b/plc4c/generated-sources/modbus/src/modbus_pdu.c
index 67b683c44a..b2d1c87a03 100644
--- a/plc4c/generated-sources/modbus/src/modbus_pdu.c
+++ b/plc4c/generated-sources/modbus/src/modbus_pdu.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_modbus_static.h>
 
@@ -134,7 +135,7 @@ uint8_t PLC4C_MODBUS_READ_WRITE_MODBUS_PDU_READ_DEVICE_IDENTIFICATION_RESPONSE_M
 }
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_parse(plc4c_spi_read_buffer* readBuffer, bool response, plc4c_modbus_read_write_modbus_pdu** _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, bool response, plc4c_modbus_read_write_modbus_pdu** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -166,7 +167,7 @@ if( errorFlag == true ) { /* ModbusPDUError */
 
   // Simple Field (exceptionCode)
   plc4c_modbus_read_write_modbus_error_code exceptionCode;
-  _res = plc4c_modbus_read_write_modbus_error_code_parse(readBuffer, (void*) &exceptionCode);
+  _res = plc4c_modbus_read_write_modbus_error_code_parse(ctx, readBuffer, (void*) &exceptionCode);
   if(_res != OK) {
     return _res;
   }
@@ -832,7 +833,7 @@ if( ( errorFlag == false ) && ( functionFlag == 0x14 ) && ( response == false )
     uint8_t itemsEndPos = plc4c_spi_read_get_pos(readBuffer) + _itemsLength;
     while(plc4c_spi_read_get_pos(readBuffer) < itemsEndPos) {
       plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* _value = NULL;
-      _res = plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_parse(readBuffer, (void*) &_value);
+      _res = plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -864,7 +865,7 @@ if( ( errorFlag == false ) && ( functionFlag == 0x14 ) && ( response == true ) )
     uint8_t itemsEndPos = plc4c_spi_read_get_pos(readBuffer) + _itemsLength;
     while(plc4c_spi_read_get_pos(readBuffer) < itemsEndPos) {
       plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* _value = NULL;
-      _res = plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_parse(readBuffer, (void*) &_value);
+      _res = plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -896,7 +897,7 @@ if( ( errorFlag == false ) && ( functionFlag == 0x15 ) && ( response == false )
     uint8_t itemsEndPos = plc4c_spi_read_get_pos(readBuffer) + _itemsLength;
     while(plc4c_spi_read_get_pos(readBuffer) < itemsEndPos) {
       plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* _value = NULL;
-      _res = plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_parse(readBuffer, (void*) &_value);
+      _res = plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -928,7 +929,7 @@ if( ( errorFlag == false ) && ( functionFlag == 0x15 ) && ( response == true ) )
     uint8_t itemsEndPos = plc4c_spi_read_get_pos(readBuffer) + _itemsLength;
     while(plc4c_spi_read_get_pos(readBuffer) < itemsEndPos) {
       plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* _value = NULL;
-      _res = plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_parse(readBuffer, (void*) &_value);
+      _res = plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -1128,7 +1129,7 @@ if( ( errorFlag == false ) && ( functionFlag == 0x2B ) && ( response == false )
 
   // Simple Field (level)
   plc4c_modbus_read_write_modbus_device_information_level level;
-  _res = plc4c_modbus_read_write_modbus_device_information_level_parse(readBuffer, (void*) &level);
+  _res = plc4c_modbus_read_write_modbus_device_information_level_parse(ctx, readBuffer, (void*) &level);
   if(_res != OK) {
     return _res;
   }
@@ -1160,7 +1161,7 @@ if( ( errorFlag == false ) && ( functionFlag == 0x2B ) && ( response == true ) )
 
   // Simple Field (level)
   plc4c_modbus_read_write_modbus_device_information_level level;
-  _res = plc4c_modbus_read_write_modbus_device_information_level_parse(readBuffer, (void*) &level);
+  _res = plc4c_modbus_read_write_modbus_device_information_level_parse(ctx, readBuffer, (void*) &level);
   if(_res != OK) {
     return _res;
   }
@@ -1178,7 +1179,7 @@ if( ( errorFlag == false ) && ( functionFlag == 0x2B ) && ( response == true ) )
 
   // Simple Field (conformityLevel)
   plc4c_modbus_read_write_modbus_device_information_conformity_level conformityLevel;
-  _res = plc4c_modbus_read_write_modbus_device_information_conformity_level_parse(readBuffer, (void*) &conformityLevel);
+  _res = plc4c_modbus_read_write_modbus_device_information_conformity_level_parse(ctx, readBuffer, (void*) &conformityLevel);
   if(_res != OK) {
     return _res;
   }
@@ -1187,7 +1188,7 @@ if( ( errorFlag == false ) && ( functionFlag == 0x2B ) && ( response == true ) )
 
   // Simple Field (moreFollows)
   plc4c_modbus_read_write_modbus_device_information_more_follows moreFollows;
-  _res = plc4c_modbus_read_write_modbus_device_information_more_follows_parse(readBuffer, (void*) &moreFollows);
+  _res = plc4c_modbus_read_write_modbus_device_information_more_follows_parse(ctx, readBuffer, (void*) &moreFollows);
   if(_res != OK) {
     return _res;
   }
@@ -1223,7 +1224,7 @@ if( ( errorFlag == false ) && ( functionFlag == 0x2B ) && ( response == true ) )
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_modbus_read_write_modbus_device_information_object* _value = NULL;
-      _res = plc4c_modbus_read_write_modbus_device_information_object_parse(readBuffer, (void*) &_value);
+      _res = plc4c_modbus_read_write_modbus_device_information_object_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -1236,7 +1237,7 @@ if( ( errorFlag == false ) && ( functionFlag == 0x2B ) && ( response == true ) )
   return OK;
 }
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu* _message) {
   plc4c_return_code _res = OK;
 
   // Discriminator Field (errorFlag)
@@ -1250,7 +1251,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_b
     case plc4c_modbus_read_write_modbus_pdu_type_plc4c_modbus_read_write_modbus_pdu_error: {
 
   // Simple Field (exceptionCode)
-  _res = plc4c_modbus_read_write_modbus_error_code_serialize(writeBuffer, &_message->modbus_pdu_error_exception_code);
+  _res = plc4c_modbus_read_write_modbus_error_code_serialize(ctx, writeBuffer, &_message->modbus_pdu_error_exception_code);
   if(_res != OK) {
     return _res;
   }
@@ -1719,7 +1720,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_b
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* _value = (plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item*) plc4c_utils_list_get_value(_message->modbus_pdu_read_file_record_request_items, curItem);
-      _res = plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -1742,7 +1743,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_b
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* _value = (plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item*) plc4c_utils_list_get_value(_message->modbus_pdu_read_file_record_response_items, curItem);
-      _res = plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -1765,7 +1766,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_b
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* _value = (plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item*) plc4c_utils_list_get_value(_message->modbus_pdu_write_file_record_request_items, curItem);
-      _res = plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -1788,7 +1789,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_b
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* _value = (plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item*) plc4c_utils_list_get_value(_message->modbus_pdu_write_file_record_response_items, curItem);
-      _res = plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -1935,7 +1936,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_b
   plc4c_spi_write_unsigned_byte(writeBuffer, 8, PLC4C_MODBUS_READ_WRITE_MODBUS_PDU_READ_DEVICE_IDENTIFICATION_REQUEST_MEI_TYPE());
 
   // Simple Field (level)
-  _res = plc4c_modbus_read_write_modbus_device_information_level_serialize(writeBuffer, &_message->modbus_pdu_read_device_identification_request_level);
+  _res = plc4c_modbus_read_write_modbus_device_information_level_serialize(ctx, writeBuffer, &_message->modbus_pdu_read_device_identification_request_level);
   if(_res != OK) {
     return _res;
   }
@@ -1954,7 +1955,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_b
   plc4c_spi_write_unsigned_byte(writeBuffer, 8, PLC4C_MODBUS_READ_WRITE_MODBUS_PDU_READ_DEVICE_IDENTIFICATION_RESPONSE_MEI_TYPE());
 
   // Simple Field (level)
-  _res = plc4c_modbus_read_write_modbus_device_information_level_serialize(writeBuffer, &_message->modbus_pdu_read_device_identification_response_level);
+  _res = plc4c_modbus_read_write_modbus_device_information_level_serialize(ctx, writeBuffer, &_message->modbus_pdu_read_device_identification_response_level);
   if(_res != OK) {
     return _res;
   }
@@ -1966,13 +1967,13 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_b
   }
 
   // Simple Field (conformityLevel)
-  _res = plc4c_modbus_read_write_modbus_device_information_conformity_level_serialize(writeBuffer, &_message->modbus_pdu_read_device_identification_response_conformity_level);
+  _res = plc4c_modbus_read_write_modbus_device_information_conformity_level_serialize(ctx, writeBuffer, &_message->modbus_pdu_read_device_identification_response_conformity_level);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (moreFollows)
-  _res = plc4c_modbus_read_write_modbus_device_information_more_follows_serialize(writeBuffer, &_message->modbus_pdu_read_device_identification_response_more_follows);
+  _res = plc4c_modbus_read_write_modbus_device_information_more_follows_serialize(ctx, writeBuffer, &_message->modbus_pdu_read_device_identification_response_more_follows);
   if(_res != OK) {
     return _res;
   }
@@ -1995,7 +1996,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_b
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_modbus_read_write_modbus_device_information_object* _value = (plc4c_modbus_read_write_modbus_device_information_object*) plc4c_utils_list_get_value(_message->modbus_pdu_read_device_identification_response_objects, curItem);
-      _res = plc4c_modbus_read_write_modbus_device_information_object_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_modbus_read_write_modbus_device_information_object_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -2009,11 +2010,11 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_serialize(plc4c_spi_write_b
   return OK;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bytes(plc4c_modbus_read_write_modbus_pdu* _message) {
-  return plc4c_modbus_read_write_modbus_pdu_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu* _message) {
+  return plc4c_modbus_read_write_modbus_pdu_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4c_modbus_read_write_modbus_pdu* _message) {
+uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu* _message) {
   uint16_t lengthInBits = 0;
 
   // Discriminator Field (errorFlag)
@@ -2027,7 +2028,7 @@ uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4c_modbus_read_wri
     case plc4c_modbus_read_write_modbus_pdu_type_plc4c_modbus_read_write_modbus_pdu_error: {
 
   // Simple field (exceptionCode)
-  lengthInBits += plc4c_modbus_read_write_modbus_error_code_length_in_bits(&_message->modbus_pdu_error_exception_code);
+  lengthInBits += plc4c_modbus_read_write_modbus_error_code_length_in_bits(ctx, &_message->modbus_pdu_error_exception_code);
 
       break;
     }
@@ -2323,7 +2324,7 @@ uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4c_modbus_read_wri
   if(_message->modbus_pdu_read_file_record_request_items != NULL) {
     plc4c_list_element* curElement = _message->modbus_pdu_read_file_record_request_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bits((plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item*) curElement->value);
+      lengthInBits += plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bits(ctx, (plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -2340,7 +2341,7 @@ uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4c_modbus_read_wri
   if(_message->modbus_pdu_read_file_record_response_items != NULL) {
     plc4c_list_element* curElement = _message->modbus_pdu_read_file_record_response_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bits((plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item*) curElement->value);
+      lengthInBits += plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bits(ctx, (plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -2357,7 +2358,7 @@ uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4c_modbus_read_wri
   if(_message->modbus_pdu_write_file_record_request_items != NULL) {
     plc4c_list_element* curElement = _message->modbus_pdu_write_file_record_request_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bits((plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item*) curElement->value);
+      lengthInBits += plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bits(ctx, (plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -2374,7 +2375,7 @@ uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4c_modbus_read_wri
   if(_message->modbus_pdu_write_file_record_response_items != NULL) {
     plc4c_list_element* curElement = _message->modbus_pdu_write_file_record_response_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bits((plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item*) curElement->value);
+      lengthInBits += plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bits(ctx, (plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -2478,7 +2479,7 @@ uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4c_modbus_read_wri
 
 
   // Simple field (level)
-  lengthInBits += plc4c_modbus_read_write_modbus_device_information_level_length_in_bits(&_message->modbus_pdu_read_device_identification_request_level);
+  lengthInBits += plc4c_modbus_read_write_modbus_device_information_level_length_in_bits(ctx, &_message->modbus_pdu_read_device_identification_request_level);
 
 
   // Simple field (objectId)
@@ -2493,7 +2494,7 @@ uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4c_modbus_read_wri
 
 
   // Simple field (level)
-  lengthInBits += plc4c_modbus_read_write_modbus_device_information_level_length_in_bits(&_message->modbus_pdu_read_device_identification_response_level);
+  lengthInBits += plc4c_modbus_read_write_modbus_device_information_level_length_in_bits(ctx, &_message->modbus_pdu_read_device_identification_response_level);
 
 
   // Simple field (individualAccess)
@@ -2501,11 +2502,11 @@ uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4c_modbus_read_wri
 
 
   // Simple field (conformityLevel)
-  lengthInBits += plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bits(&_message->modbus_pdu_read_device_identification_response_conformity_level);
+  lengthInBits += plc4c_modbus_read_write_modbus_device_information_conformity_level_length_in_bits(ctx, &_message->modbus_pdu_read_device_identification_response_conformity_level);
 
 
   // Simple field (moreFollows)
-  lengthInBits += plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bits(&_message->modbus_pdu_read_device_identification_response_more_follows);
+  lengthInBits += plc4c_modbus_read_write_modbus_device_information_more_follows_length_in_bits(ctx, &_message->modbus_pdu_read_device_identification_response_more_follows);
 
 
   // Simple field (nextObjectId)
@@ -2520,7 +2521,7 @@ uint16_t plc4c_modbus_read_write_modbus_pdu_length_in_bits(plc4c_modbus_read_wri
   if(_message->modbus_pdu_read_device_identification_response_objects != NULL) {
     plc4c_list_element* curElement = _message->modbus_pdu_read_device_identification_response_objects->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_modbus_read_write_modbus_device_information_object_length_in_bits((plc4c_modbus_read_write_modbus_device_information_object*) curElement->value);
+      lengthInBits += plc4c_modbus_read_write_modbus_device_information_object_length_in_bits(ctx, (plc4c_modbus_read_write_modbus_device_information_object*) curElement->value);
       curElement = curElement->next;
     }
   }
diff --git a/plc4c/generated-sources/modbus/src/modbus_pdu_read_file_record_request_item.c b/plc4c/generated-sources/modbus/src/modbus_pdu_read_file_record_request_item.c
index b2a27c14c3..2b6ce56cf4 100644
--- a/plc4c/generated-sources/modbus/src/modbus_pdu_read_file_record_request_item.c
+++ b/plc4c/generated-sources/modbus/src/modbus_pdu_read_file_record_request_item.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_modbus_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item** _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -72,7 +73,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_request_it
   return OK;
 }
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (referenceType)
@@ -102,11 +103,11 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_request_it
   return OK;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bytes(plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* _message) {
-  return plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* _message) {
+  return plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bits(plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* _message) {
+uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_read_file_record_request_item* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (referenceType)
diff --git a/plc4c/generated-sources/modbus/src/modbus_pdu_read_file_record_response_item.c b/plc4c/generated-sources/modbus/src/modbus_pdu_read_file_record_response_item.c
index 8c34a1208f..ecc5388b49 100644
--- a/plc4c/generated-sources/modbus/src/modbus_pdu_read_file_record_response_item.c
+++ b/plc4c/generated-sources/modbus/src/modbus_pdu_read_file_record_response_item.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_modbus_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item** _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -76,7 +77,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_response_i
   return OK;
 }
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* _message) {
   plc4c_return_code _res = OK;
 
   // Implicit Field (dataLength) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
@@ -104,11 +105,11 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_read_file_record_response_i
   return OK;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bytes(plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* _message) {
-  return plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* _message) {
+  return plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bits(plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* _message) {
+uint16_t plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_read_file_record_response_item* _message) {
   uint16_t lengthInBits = 0;
 
   // Implicit Field (dataLength)
diff --git a/plc4c/generated-sources/modbus/src/modbus_pdu_write_file_record_request_item.c b/plc4c/generated-sources/modbus/src/modbus_pdu_write_file_record_request_item.c
index a963d9143d..41e2856890 100644
--- a/plc4c/generated-sources/modbus/src/modbus_pdu_write_file_record_request_item.c
+++ b/plc4c/generated-sources/modbus/src/modbus_pdu_write_file_record_request_item.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_modbus_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item** _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -92,7 +93,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_request_i
   return OK;
 }
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (referenceType)
@@ -132,11 +133,11 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_request_i
   return OK;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bytes(plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* _message) {
-  return plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* _message) {
+  return plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bits(plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* _message) {
+uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_write_file_record_request_item* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (referenceType)
diff --git a/plc4c/generated-sources/modbus/src/modbus_pdu_write_file_record_response_item.c b/plc4c/generated-sources/modbus/src/modbus_pdu_write_file_record_response_item.c
index 6fe7ed5f71..0f91db583d 100644
--- a/plc4c/generated-sources/modbus/src/modbus_pdu_write_file_record_response_item.c
+++ b/plc4c/generated-sources/modbus/src/modbus_pdu_write_file_record_response_item.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_modbus_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item** _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -92,7 +93,7 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_response_
   return OK;
 }
 
-plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* _message) {
+plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (referenceType)
@@ -132,11 +133,11 @@ plc4c_return_code plc4c_modbus_read_write_modbus_pdu_write_file_record_response_
   return OK;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bytes(plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* _message) {
-  return plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bits(_message) / 8;
+uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bytes(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* _message) {
+  return plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bits(plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* _message) {
+uint16_t plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item_length_in_bits(plc4x_spi_context ctx, plc4c_modbus_read_write_modbus_pdu_write_file_record_response_item* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (referenceType)
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_constants.h b/plc4c/generated-sources/plc4x/include/plc4x_constants.h
index d105103e69..14b252f31c 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_constants.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_constants.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -41,12 +42,12 @@ typedef struct plc4c_plc4x_read_write_plc4x_constants plc4c_plc4x_read_write_plc
 // Create an empty NULL-struct
 plc4c_plc4x_read_write_plc4x_constants plc4c_plc4x_read_write_plc4x_constants_null();
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_constants_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_constants** message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_constants_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_constants** message);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_constants_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_constants* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_constants_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_constants* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_constants_length_in_bytes(plc4c_plc4x_read_write_plc4x_constants* message);
+uint16_t plc4c_plc4x_read_write_plc4x_constants_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_constants* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_constants_length_in_bits(plc4c_plc4x_read_write_plc4x_constants* message);
+uint16_t plc4c_plc4x_read_write_plc4x_constants_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_constants* message);
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_CONSTANTS_H_
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_message.h b/plc4c/generated-sources/plc4x/include/plc4x_message.h
index 49f010709c..0b5a10bdec 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_message.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_message.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -96,12 +97,12 @@ typedef struct plc4c_plc4x_read_write_plc4x_message plc4c_plc4x_read_write_plc4x
 // Create an empty NULL-struct
 plc4c_plc4x_read_write_plc4x_message plc4c_plc4x_read_write_plc4x_message_null();
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_message_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_message** message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_message_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_message** message);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_message* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_message* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bytes(plc4c_plc4x_read_write_plc4x_message* message);
+uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_message* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bits(plc4c_plc4x_read_write_plc4x_message* message);
+uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_message* message);
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_MESSAGE_H_
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_request_type.h b/plc4c/generated-sources/plc4x/include/plc4x_request_type.h
index 8f99621087..b31bfa18bc 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_request_type.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_request_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -47,9 +48,9 @@ typedef enum plc4c_plc4x_read_write_plc4x_request_type plc4c_plc4x_read_write_pl
 // Get an empty NULL-struct
 plc4c_plc4x_read_write_plc4x_request_type plc4c_plc4x_read_write_plc4x_request_type_null();
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_request_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_request_type* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_request_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_request_type* message);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_request_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_request_type* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_request_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_request_type* message);
 
 plc4c_plc4x_read_write_plc4x_request_type plc4c_plc4x_read_write_plc4x_request_type_for_value(uint8_t value);
 
@@ -59,9 +60,9 @@ int plc4c_plc4x_read_write_plc4x_request_type_num_values();
 
 plc4c_plc4x_read_write_plc4x_request_type plc4c_plc4x_read_write_plc4x_request_type_value_for_index(int index);
 
-uint16_t plc4c_plc4x_read_write_plc4x_request_type_length_in_bytes(plc4c_plc4x_read_write_plc4x_request_type* message);
+uint16_t plc4c_plc4x_read_write_plc4x_request_type_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_request_type* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_request_type_length_in_bits(plc4c_plc4x_read_write_plc4x_request_type* message);
+uint16_t plc4c_plc4x_read_write_plc4x_request_type_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_request_type* message);
 
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_REQUEST_TYPE_H_
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_response_code.h b/plc4c/generated-sources/plc4x/include/plc4x_response_code.h
index 317a2bd78b..4ff524778e 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_response_code.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_response_code.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -46,9 +47,9 @@ typedef enum plc4c_plc4x_read_write_plc4x_response_code plc4c_plc4x_read_write_p
 // Get an empty NULL-struct
 plc4c_plc4x_read_write_plc4x_response_code plc4c_plc4x_read_write_plc4x_response_code_null();
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_response_code_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_response_code* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_response_code_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_response_code* message);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_response_code_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_response_code* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_response_code_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_response_code* message);
 
 plc4c_plc4x_read_write_plc4x_response_code plc4c_plc4x_read_write_plc4x_response_code_for_value(uint8_t value);
 
@@ -58,9 +59,9 @@ int plc4c_plc4x_read_write_plc4x_response_code_num_values();
 
 plc4c_plc4x_read_write_plc4x_response_code plc4c_plc4x_read_write_plc4x_response_code_value_for_index(int index);
 
-uint16_t plc4c_plc4x_read_write_plc4x_response_code_length_in_bytes(plc4c_plc4x_read_write_plc4x_response_code* message);
+uint16_t plc4c_plc4x_read_write_plc4x_response_code_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_response_code* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(plc4c_plc4x_read_write_plc4x_response_code* message);
+uint16_t plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_response_code* message);
 
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_RESPONSE_CODE_H_
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_subscription_type.h b/plc4c/generated-sources/plc4x/include/plc4x_subscription_type.h
index 811243dbe0..0f3bacb75d 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_subscription_type.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_subscription_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -38,9 +39,9 @@ typedef enum plc4c_plc4x_read_write_plc4x_subscription_type plc4c_plc4x_read_wri
 // Get an empty NULL-struct
 plc4c_plc4x_read_write_plc4x_subscription_type plc4c_plc4x_read_write_plc4x_subscription_type_null();
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_subscription_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_subscription_type* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_subscription_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_subscription_type* message);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_subscription_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_subscription_type* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_subscription_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_subscription_type* message);
 
 plc4c_plc4x_read_write_plc4x_subscription_type plc4c_plc4x_read_write_plc4x_subscription_type_for_value(uint8_t value);
 
@@ -50,9 +51,9 @@ int plc4c_plc4x_read_write_plc4x_subscription_type_num_values();
 
 plc4c_plc4x_read_write_plc4x_subscription_type plc4c_plc4x_read_write_plc4x_subscription_type_value_for_index(int index);
 
-uint16_t plc4c_plc4x_read_write_plc4x_subscription_type_length_in_bytes(plc4c_plc4x_read_write_plc4x_subscription_type* message);
+uint16_t plc4c_plc4x_read_write_plc4x_subscription_type_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_subscription_type* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_subscription_type_length_in_bits(plc4c_plc4x_read_write_plc4x_subscription_type* message);
+uint16_t plc4c_plc4x_read_write_plc4x_subscription_type_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_subscription_type* message);
 
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_SUBSCRIPTION_TYPE_H_
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_tag.h b/plc4c/generated-sources/plc4x/include/plc4x_tag.h
index 74257b1766..b15628857d 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_tag.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_tag.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -39,12 +40,12 @@ typedef struct plc4c_plc4x_read_write_plc4x_tag plc4c_plc4x_read_write_plc4x_tag
 // Create an empty NULL-struct
 plc4c_plc4x_read_write_plc4x_tag plc4c_plc4x_read_write_plc4x_tag_null();
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag** message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag** message);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_length_in_bytes(plc4c_plc4x_read_write_plc4x_tag* message);
+uint16_t plc4c_plc4x_read_write_plc4x_tag_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_length_in_bits(plc4c_plc4x_read_write_plc4x_tag* message);
+uint16_t plc4c_plc4x_read_write_plc4x_tag_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag* message);
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_TAG_H_
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_tag_request.h b/plc4c/generated-sources/plc4x/include/plc4x_tag_request.h
index 435075892c..9b07a08946 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_tag_request.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_tag_request.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -39,12 +40,12 @@ typedef struct plc4c_plc4x_read_write_plc4x_tag_request plc4c_plc4x_read_write_p
 // Create an empty NULL-struct
 plc4c_plc4x_read_write_plc4x_tag_request plc4c_plc4x_read_write_plc4x_tag_request_null();
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_request_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_request** message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_request_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_request** message);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_request_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_request* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_request_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_request* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_request_length_in_bytes(plc4c_plc4x_read_write_plc4x_tag_request* message);
+uint16_t plc4c_plc4x_read_write_plc4x_tag_request_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_request* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_request_length_in_bits(plc4c_plc4x_read_write_plc4x_tag_request* message);
+uint16_t plc4c_plc4x_read_write_plc4x_tag_request_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_request* message);
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_TAG_REQUEST_H_
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_tag_response.h b/plc4c/generated-sources/plc4x/include/plc4x_tag_response.h
index bbbf9fdac0..7a9cd36d80 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_tag_response.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_tag_response.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -41,12 +42,12 @@ typedef struct plc4c_plc4x_read_write_plc4x_tag_response plc4c_plc4x_read_write_
 // Create an empty NULL-struct
 plc4c_plc4x_read_write_plc4x_tag_response plc4c_plc4x_read_write_plc4x_tag_response_null();
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_response** message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_response** message);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_response* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_response* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_response_length_in_bytes(plc4c_plc4x_read_write_plc4x_tag_response* message);
+uint16_t plc4c_plc4x_read_write_plc4x_tag_response_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_response* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_response_length_in_bits(plc4c_plc4x_read_write_plc4x_tag_response* message);
+uint16_t plc4c_plc4x_read_write_plc4x_tag_response_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_response* message);
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_TAG_RESPONSE_H_
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_tag_value_request.h b/plc4c/generated-sources/plc4x/include/plc4x_tag_value_request.h
index 07362a90fa..850961c51b 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_tag_value_request.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_tag_value_request.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -43,12 +44,12 @@ typedef struct plc4c_plc4x_read_write_plc4x_tag_value_request plc4c_plc4x_read_w
 // Create an empty NULL-struct
 plc4c_plc4x_read_write_plc4x_tag_value_request plc4c_plc4x_read_write_plc4x_tag_value_request_null();
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_value_request** message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_value_request** message);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_value_request* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_value_request* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bytes(plc4c_plc4x_read_write_plc4x_tag_value_request* message);
+uint16_t plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_value_request* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bits(plc4c_plc4x_read_write_plc4x_tag_value_request* message);
+uint16_t plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_value_request* message);
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_TAG_VALUE_REQUEST_H_
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_tag_value_response.h b/plc4c/generated-sources/plc4x/include/plc4x_tag_value_response.h
index 4c43b42d21..35ec2bfb5d 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_tag_value_response.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_tag_value_response.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -45,12 +46,12 @@ typedef struct plc4c_plc4x_read_write_plc4x_tag_value_response plc4c_plc4x_read_
 // Create an empty NULL-struct
 plc4c_plc4x_read_write_plc4x_tag_value_response plc4c_plc4x_read_write_plc4x_tag_value_response_null();
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_value_response** message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_value_response** message);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_value_response* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_value_response* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bytes(plc4c_plc4x_read_write_plc4x_tag_value_response* message);
+uint16_t plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_value_response* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bits(plc4c_plc4x_read_write_plc4x_tag_value_response* message);
+uint16_t plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_value_response* message);
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_TAG_VALUE_RESPONSE_H_
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_value.h b/plc4c/generated-sources/plc4x/include/plc4x_value.h
index 23d7a02d8c..8843a13fb1 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_value.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_value.h
@@ -21,6 +21,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -28,12 +29,12 @@
 
 // Code generated by code-generation. DO NOT EDIT.
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_value_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_value_type valueType, plc4c_data** data_item);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_value_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_value_type valueType, plc4c_data** data_item);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_value_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_value_type valueType, plc4c_data** data_item);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_value_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_value_type valueType, plc4c_data** data_item);
 
-uint16_t plc4c_plc4x_read_write_plc4x_value_length_in_bytes(plc4c_data* data_item, plc4c_plc4x_read_write_plc4x_value_type valueType);
+uint16_t plc4c_plc4x_read_write_plc4x_value_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item, plc4c_plc4x_read_write_plc4x_value_type valueType);
 
-uint16_t plc4c_plc4x_read_write_plc4x_value_length_in_bits(plc4c_data* data_item, plc4c_plc4x_read_write_plc4x_value_type valueType);
+uint16_t plc4c_plc4x_read_write_plc4x_value_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item, plc4c_plc4x_read_write_plc4x_value_type valueType);
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_VALUE_H_
diff --git a/plc4c/generated-sources/plc4x/include/plc4x_value_type.h b/plc4c/generated-sources/plc4x/include/plc4x_value_type.h
index e5536525a4..47e3c08cee 100644
--- a/plc4c/generated-sources/plc4x/include/plc4x_value_type.h
+++ b/plc4c/generated-sources/plc4x/include/plc4x_value_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -66,9 +67,9 @@ typedef enum plc4c_plc4x_read_write_plc4x_value_type plc4c_plc4x_read_write_plc4
 // Get an empty NULL-struct
 plc4c_plc4x_read_write_plc4x_value_type plc4c_plc4x_read_write_plc4x_value_type_null();
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_value_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_value_type* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_value_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_value_type* message);
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_value_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_value_type* message);
+plc4c_return_code plc4c_plc4x_read_write_plc4x_value_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_value_type* message);
 
 plc4c_plc4x_read_write_plc4x_value_type plc4c_plc4x_read_write_plc4x_value_type_for_value(uint8_t value);
 
@@ -78,9 +79,9 @@ int plc4c_plc4x_read_write_plc4x_value_type_num_values();
 
 plc4c_plc4x_read_write_plc4x_value_type plc4c_plc4x_read_write_plc4x_value_type_value_for_index(int index);
 
-uint16_t plc4c_plc4x_read_write_plc4x_value_type_length_in_bytes(plc4c_plc4x_read_write_plc4x_value_type* message);
+uint16_t plc4c_plc4x_read_write_plc4x_value_type_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_value_type* message);
 
-uint16_t plc4c_plc4x_read_write_plc4x_value_type_length_in_bits(plc4c_plc4x_read_write_plc4x_value_type* message);
+uint16_t plc4c_plc4x_read_write_plc4x_value_type_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_value_type* message);
 
 
 #endif  // PLC4C_PLC4X_READ_WRITE_PLC4X_VALUE_TYPE_H_
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_constants.c b/plc4c/generated-sources/plc4x/src/plc4x_constants.c
index 4273a94565..72a5bcca30 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_constants.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_constants.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_plc4x_static.h>
 
@@ -33,7 +34,7 @@ uint16_t PLC4C_PLC4X_READ_WRITE_PLC4X_CONSTANTS_PLC4X_TCP_DEFAULT_PORT() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_constants_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_constants** _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_constants_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_constants** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -57,7 +58,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_constants_parse(plc4c_spi_read_bu
   return OK;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_constants_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_constants* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_constants_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_constants* _message) {
   plc4c_return_code _res = OK;
 
   // Const Field (plc4xTcpDefaultPort)
@@ -66,11 +67,11 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_constants_serialize(plc4c_spi_wri
   return OK;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_constants_length_in_bytes(plc4c_plc4x_read_write_plc4x_constants* _message) {
-  return plc4c_plc4x_read_write_plc4x_constants_length_in_bits(_message) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_constants_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_constants* _message) {
+  return plc4c_plc4x_read_write_plc4x_constants_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_constants_length_in_bits(plc4c_plc4x_read_write_plc4x_constants* _message) {
+uint16_t plc4c_plc4x_read_write_plc4x_constants_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_constants* _message) {
   uint16_t lengthInBits = 0;
 
   // Const Field (plc4xTcpDefaultPort)
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_message.c b/plc4c/generated-sources/plc4x/src/plc4x_message.c
index 7aa12acf9f..6980d1b813 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_message.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_message.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_plc4x_static.h>
 
@@ -64,7 +65,7 @@ uint8_t PLC4C_PLC4X_READ_WRITE_PLC4X_MESSAGE_VERSION() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_message_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_message** _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_message_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_message** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -101,7 +102,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_message_parse(plc4c_spi_read_buff
   (*_message)->request_id = requestId;
   // Discriminator Field (requestType)
   plc4c_plc4x_read_write_plc4x_request_type requestType;
-  _res = plc4c_plc4x_read_write_plc4x_request_type_parse(readBuffer, &requestType);
+  _res = plc4c_plc4x_read_write_plc4x_request_type_parse(ctx, readBuffer, &requestType);
   if(_res != OK) {
     return _res;
   }
@@ -140,7 +141,7 @@ if( requestType == plc4c_plc4x_read_write_plc4x_request_type_CONNECT_RESPONSE )
 
   // Simple Field (responseCode)
   plc4c_plc4x_read_write_plc4x_response_code responseCode;
-  _res = plc4c_plc4x_read_write_plc4x_response_code_parse(readBuffer, (void*) &responseCode);
+  _res = plc4c_plc4x_read_write_plc4x_response_code_parse(ctx, readBuffer, (void*) &responseCode);
   if(_res != OK) {
     return _res;
   }
@@ -178,7 +179,7 @@ if( requestType == plc4c_plc4x_read_write_plc4x_request_type_READ_REQUEST ) { /*
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_plc4x_read_write_plc4x_tag_request* _value = NULL;
-      _res = plc4c_plc4x_read_write_plc4x_tag_request_parse(readBuffer, (void*) &_value);
+      _res = plc4c_plc4x_read_write_plc4x_tag_request_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -201,7 +202,7 @@ if( requestType == plc4c_plc4x_read_write_plc4x_request_type_READ_RESPONSE ) { /
 
   // Simple Field (responseCode)
   plc4c_plc4x_read_write_plc4x_response_code responseCode;
-  _res = plc4c_plc4x_read_write_plc4x_response_code_parse(readBuffer, (void*) &responseCode);
+  _res = plc4c_plc4x_read_write_plc4x_response_code_parse(ctx, readBuffer, (void*) &responseCode);
   if(_res != OK) {
     return _res;
   }
@@ -228,7 +229,7 @@ if( requestType == plc4c_plc4x_read_write_plc4x_request_type_READ_RESPONSE ) { /
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_plc4x_read_write_plc4x_tag_value_response* _value = NULL;
-      _res = plc4c_plc4x_read_write_plc4x_tag_value_response_parse(readBuffer, (void*) &_value);
+      _res = plc4c_plc4x_read_write_plc4x_tag_value_response_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -269,7 +270,7 @@ if( requestType == plc4c_plc4x_read_write_plc4x_request_type_WRITE_REQUEST ) { /
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_plc4x_read_write_plc4x_tag_value_request* _value = NULL;
-      _res = plc4c_plc4x_read_write_plc4x_tag_value_request_parse(readBuffer, (void*) &_value);
+      _res = plc4c_plc4x_read_write_plc4x_tag_value_request_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -292,7 +293,7 @@ if( requestType == plc4c_plc4x_read_write_plc4x_request_type_WRITE_RESPONSE ) {
 
   // Simple Field (responseCode)
   plc4c_plc4x_read_write_plc4x_response_code responseCode;
-  _res = plc4c_plc4x_read_write_plc4x_response_code_parse(readBuffer, (void*) &responseCode);
+  _res = plc4c_plc4x_read_write_plc4x_response_code_parse(ctx, readBuffer, (void*) &responseCode);
   if(_res != OK) {
     return _res;
   }
@@ -319,7 +320,7 @@ if( requestType == plc4c_plc4x_read_write_plc4x_request_type_WRITE_RESPONSE ) {
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_plc4x_read_write_plc4x_tag_response* _value = NULL;
-      _res = plc4c_plc4x_read_write_plc4x_tag_response_parse(readBuffer, (void*) &_value);
+      _res = plc4c_plc4x_read_write_plc4x_tag_response_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -332,14 +333,14 @@ if( requestType == plc4c_plc4x_read_write_plc4x_request_type_WRITE_RESPONSE ) {
   return OK;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_message* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_message* _message) {
   plc4c_return_code _res = OK;
 
   // Const Field (version)
   plc4c_spi_write_unsigned_byte(writeBuffer, 8, PLC4C_PLC4X_READ_WRITE_PLC4X_MESSAGE_VERSION());
 
   // Implicit Field (packetLength) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
-  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, plc4c_plc4x_read_write_plc4x_message_length_in_bytes(_message));
+  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, plc4c_plc4x_read_write_plc4x_message_length_in_bytes(ctx, _message));
   if(_res != OK) {
     return _res;
   }
@@ -352,7 +353,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4c_spi_write
 
   // Enumerated Discriminator Field (requestType)
   plc4c_plc4x_read_write_plc4x_request_type _requestType = plc4c_plc4x_read_write_plc4x_message_get_discriminator(_message->_type).requestType;
-  _res = plc4c_plc4x_read_write_plc4x_request_type_serialize(writeBuffer, &_requestType);
+  _res = plc4c_plc4x_read_write_plc4x_request_type_serialize(ctx, writeBuffer, &_requestType);
   if(_res != OK) {
     return _res;
   }
@@ -384,7 +385,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4c_spi_write
   }
 
   // Simple Field (responseCode)
-  _res = plc4c_plc4x_read_write_plc4x_response_code_serialize(writeBuffer, &_message->plc4x_connect_response_response_code);
+  _res = plc4c_plc4x_read_write_plc4x_response_code_serialize(ctx, writeBuffer, &_message->plc4x_connect_response_response_code);
   if(_res != OK) {
     return _res;
   }
@@ -411,7 +412,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4c_spi_write
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_plc4x_read_write_plc4x_tag_request* _value = (plc4c_plc4x_read_write_plc4x_tag_request*) plc4c_utils_list_get_value(_message->plc4x_read_request_tags, curItem);
-      _res = plc4c_plc4x_read_write_plc4x_tag_request_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_plc4x_read_write_plc4x_tag_request_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -429,7 +430,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4c_spi_write
   }
 
   // Simple Field (responseCode)
-  _res = plc4c_plc4x_read_write_plc4x_response_code_serialize(writeBuffer, &_message->plc4x_read_response_response_code);
+  _res = plc4c_plc4x_read_write_plc4x_response_code_serialize(ctx, writeBuffer, &_message->plc4x_read_response_response_code);
   if(_res != OK) {
     return _res;
   }
@@ -446,7 +447,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4c_spi_write
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_plc4x_read_write_plc4x_tag_value_response* _value = (plc4c_plc4x_read_write_plc4x_tag_value_response*) plc4c_utils_list_get_value(_message->plc4x_read_response_tags, curItem);
-      _res = plc4c_plc4x_read_write_plc4x_tag_value_response_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_plc4x_read_write_plc4x_tag_value_response_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -475,7 +476,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4c_spi_write
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_plc4x_read_write_plc4x_tag_value_request* _value = (plc4c_plc4x_read_write_plc4x_tag_value_request*) plc4c_utils_list_get_value(_message->plc4x_write_request_tags, curItem);
-      _res = plc4c_plc4x_read_write_plc4x_tag_value_request_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_plc4x_read_write_plc4x_tag_value_request_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -493,7 +494,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4c_spi_write
   }
 
   // Simple Field (responseCode)
-  _res = plc4c_plc4x_read_write_plc4x_response_code_serialize(writeBuffer, &_message->plc4x_write_response_response_code);
+  _res = plc4c_plc4x_read_write_plc4x_response_code_serialize(ctx, writeBuffer, &_message->plc4x_write_response_response_code);
   if(_res != OK) {
     return _res;
   }
@@ -510,7 +511,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4c_spi_write
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_plc4x_read_write_plc4x_tag_response* _value = (plc4c_plc4x_read_write_plc4x_tag_response*) plc4c_utils_list_get_value(_message->plc4x_write_response_tags, curItem);
-      _res = plc4c_plc4x_read_write_plc4x_tag_response_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_plc4x_read_write_plc4x_tag_response_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -524,11 +525,11 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_message_serialize(plc4c_spi_write
   return OK;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bytes(plc4c_plc4x_read_write_plc4x_message* _message) {
-  return plc4c_plc4x_read_write_plc4x_message_length_in_bits(_message) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_message* _message) {
+  return plc4c_plc4x_read_write_plc4x_message_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bits(plc4c_plc4x_read_write_plc4x_message* _message) {
+uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_message* _message) {
   uint16_t lengthInBits = 0;
 
   // Const Field (version)
@@ -563,7 +564,7 @@ uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bits(plc4c_plc4x_read_wr
 
 
   // Simple field (responseCode)
-  lengthInBits += plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(&_message->plc4x_connect_response_response_code);
+  lengthInBits += plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(ctx, &_message->plc4x_connect_response_response_code);
 
       break;
     }
@@ -581,7 +582,7 @@ uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bits(plc4c_plc4x_read_wr
   if(_message->plc4x_read_request_tags != NULL) {
     plc4c_list_element* curElement = _message->plc4x_read_request_tags->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_plc4x_read_write_plc4x_tag_request_length_in_bits((plc4c_plc4x_read_write_plc4x_tag_request*) curElement->value);
+      lengthInBits += plc4c_plc4x_read_write_plc4x_tag_request_length_in_bits(ctx, (plc4c_plc4x_read_write_plc4x_tag_request*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -595,7 +596,7 @@ uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bits(plc4c_plc4x_read_wr
 
 
   // Simple field (responseCode)
-  lengthInBits += plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(&_message->plc4x_read_response_response_code);
+  lengthInBits += plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(ctx, &_message->plc4x_read_response_response_code);
 
 
   // Implicit Field (numTags)
@@ -606,7 +607,7 @@ uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bits(plc4c_plc4x_read_wr
   if(_message->plc4x_read_response_tags != NULL) {
     plc4c_list_element* curElement = _message->plc4x_read_response_tags->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bits((plc4c_plc4x_read_write_plc4x_tag_value_response*) curElement->value);
+      lengthInBits += plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bits(ctx, (plc4c_plc4x_read_write_plc4x_tag_value_response*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -627,7 +628,7 @@ uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bits(plc4c_plc4x_read_wr
   if(_message->plc4x_write_request_tags != NULL) {
     plc4c_list_element* curElement = _message->plc4x_write_request_tags->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bits((plc4c_plc4x_read_write_plc4x_tag_value_request*) curElement->value);
+      lengthInBits += plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bits(ctx, (plc4c_plc4x_read_write_plc4x_tag_value_request*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -641,7 +642,7 @@ uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bits(plc4c_plc4x_read_wr
 
 
   // Simple field (responseCode)
-  lengthInBits += plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(&_message->plc4x_write_response_response_code);
+  lengthInBits += plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(ctx, &_message->plc4x_write_response_response_code);
 
 
   // Implicit Field (numTags)
@@ -652,7 +653,7 @@ uint16_t plc4c_plc4x_read_write_plc4x_message_length_in_bits(plc4c_plc4x_read_wr
   if(_message->plc4x_write_response_tags != NULL) {
     plc4c_list_element* curElement = _message->plc4x_write_response_tags->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_plc4x_read_write_plc4x_tag_response_length_in_bits((plc4c_plc4x_read_write_plc4x_tag_response*) curElement->value);
+      lengthInBits += plc4c_plc4x_read_write_plc4x_tag_response_length_in_bits(ctx, (plc4c_plc4x_read_write_plc4x_tag_response*) curElement->value);
       curElement = curElement->next;
     }
   }
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_request_type.c b/plc4c/generated-sources/plc4x/src/plc4x_request_type.c
index d74e702d79..88c5d06c3d 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_request_type.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_request_type.c
@@ -33,7 +33,7 @@ plc4c_plc4x_read_write_plc4x_request_type plc4c_plc4x_read_write_plc4x_request_t
 }
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_request_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_request_type* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_request_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_request_type* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_request_type_parse(plc4c_spi_read
     return _res;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_request_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_request_type* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_request_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_request_type* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
@@ -148,10 +148,10 @@ plc4c_plc4x_read_write_plc4x_request_type plc4c_plc4x_read_write_plc4x_request_t
     }
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_request_type_length_in_bytes(plc4c_plc4x_read_write_plc4x_request_type* _message) {
-    return plc4c_plc4x_read_write_plc4x_request_type_length_in_bits(_message) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_request_type_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_request_type* _message) {
+    return plc4c_plc4x_read_write_plc4x_request_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_request_type_length_in_bits(plc4c_plc4x_read_write_plc4x_request_type* _message) {
+uint16_t plc4c_plc4x_read_write_plc4x_request_type_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_request_type* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_response_code.c b/plc4c/generated-sources/plc4x/src/plc4x_response_code.c
index 4f37fad5de..44c51ec575 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_response_code.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_response_code.c
@@ -33,7 +33,7 @@ plc4c_plc4x_read_write_plc4x_response_code plc4c_plc4x_read_write_plc4x_response
 }
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_response_code_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_response_code* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_response_code_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_response_code* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_response_code_parse(plc4c_spi_rea
     return _res;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_response_code_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_response_code* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_response_code_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_response_code* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
@@ -142,10 +142,10 @@ plc4c_plc4x_read_write_plc4x_response_code plc4c_plc4x_read_write_plc4x_response
     }
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_response_code_length_in_bytes(plc4c_plc4x_read_write_plc4x_response_code* _message) {
-    return plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(_message) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_response_code_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_response_code* _message) {
+    return plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(plc4c_plc4x_read_write_plc4x_response_code* _message) {
+uint16_t plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_response_code* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_subscription_type.c b/plc4c/generated-sources/plc4x/src/plc4x_subscription_type.c
index 29535bf63a..0de0b88283 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_subscription_type.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_subscription_type.c
@@ -33,7 +33,7 @@ plc4c_plc4x_read_write_plc4x_subscription_type plc4c_plc4x_read_write_plc4x_subs
 }
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_subscription_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_subscription_type* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_subscription_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_subscription_type* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_subscription_type_parse(plc4c_spi
     return _res;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_subscription_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_subscription_type* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_subscription_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_subscription_type* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
@@ -94,10 +94,10 @@ plc4c_plc4x_read_write_plc4x_subscription_type plc4c_plc4x_read_write_plc4x_subs
     }
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_subscription_type_length_in_bytes(plc4c_plc4x_read_write_plc4x_subscription_type* _message) {
-    return plc4c_plc4x_read_write_plc4x_subscription_type_length_in_bits(_message) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_subscription_type_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_subscription_type* _message) {
+    return plc4c_plc4x_read_write_plc4x_subscription_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_subscription_type_length_in_bits(plc4c_plc4x_read_write_plc4x_subscription_type* _message) {
+uint16_t plc4c_plc4x_read_write_plc4x_subscription_type_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_subscription_type* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_tag.c b/plc4c/generated-sources/plc4x/src/plc4x_tag.c
index 4c29dd2519..d7a280ae19 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_tag.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_tag.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_plc4x_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag** _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -70,7 +71,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_parse(plc4c_spi_read_buffer*
   return OK;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag* _message) {
   plc4c_return_code _res = OK;
 
   // Implicit Field (nameLen) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
@@ -100,11 +101,11 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_serialize(plc4c_spi_write_buf
   return OK;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_length_in_bytes(plc4c_plc4x_read_write_plc4x_tag* _message) {
-  return plc4c_plc4x_read_write_plc4x_tag_length_in_bits(_message) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_tag_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag* _message) {
+  return plc4c_plc4x_read_write_plc4x_tag_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_length_in_bits(plc4c_plc4x_read_write_plc4x_tag* _message) {
+uint16_t plc4c_plc4x_read_write_plc4x_tag_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag* _message) {
   uint16_t lengthInBits = 0;
 
   // Implicit Field (nameLen)
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_tag_request.c b/plc4c/generated-sources/plc4x/src/plc4x_tag_request.c
index ddeac84a60..2b62b50448 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_tag_request.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_tag_request.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_plc4x_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_request_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_request** _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_request_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_request** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -39,7 +40,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_request_parse(plc4c_spi_read_
 
   // Simple Field (tag)
   plc4c_plc4x_read_write_plc4x_tag* tag;
-  _res = plc4c_plc4x_read_write_plc4x_tag_parse(readBuffer, (void*) &tag);
+  _res = plc4c_plc4x_read_write_plc4x_tag_parse(ctx, readBuffer, (void*) &tag);
   if(_res != OK) {
     return _res;
   }
@@ -48,11 +49,11 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_request_parse(plc4c_spi_read_
   return OK;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_request_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_request* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_request_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_request* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (tag)
-  _res = plc4c_plc4x_read_write_plc4x_tag_serialize(writeBuffer, _message->tag);
+  _res = plc4c_plc4x_read_write_plc4x_tag_serialize(ctx, writeBuffer, _message->tag);
   if(_res != OK) {
     return _res;
   }
@@ -60,15 +61,15 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_request_serialize(plc4c_spi_w
   return OK;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_request_length_in_bytes(plc4c_plc4x_read_write_plc4x_tag_request* _message) {
-  return plc4c_plc4x_read_write_plc4x_tag_request_length_in_bits(_message) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_tag_request_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_request* _message) {
+  return plc4c_plc4x_read_write_plc4x_tag_request_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_request_length_in_bits(plc4c_plc4x_read_write_plc4x_tag_request* _message) {
+uint16_t plc4c_plc4x_read_write_plc4x_tag_request_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_request* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (tag)
-  lengthInBits += plc4c_plc4x_read_write_plc4x_tag_length_in_bits(_message->tag);
+  lengthInBits += plc4c_plc4x_read_write_plc4x_tag_length_in_bits(ctx, _message->tag);
 
   return lengthInBits;
 }
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_tag_response.c b/plc4c/generated-sources/plc4x/src/plc4x_tag_response.c
index f80630a265..5a88d47b73 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_tag_response.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_tag_response.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_plc4x_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_response** _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_response** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -39,7 +40,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_parse(plc4c_spi_read
 
   // Simple Field (tag)
   plc4c_plc4x_read_write_plc4x_tag* tag;
-  _res = plc4c_plc4x_read_write_plc4x_tag_parse(readBuffer, (void*) &tag);
+  _res = plc4c_plc4x_read_write_plc4x_tag_parse(ctx, readBuffer, (void*) &tag);
   if(_res != OK) {
     return _res;
   }
@@ -47,7 +48,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_parse(plc4c_spi_read
 
   // Simple Field (responseCode)
   plc4c_plc4x_read_write_plc4x_response_code responseCode;
-  _res = plc4c_plc4x_read_write_plc4x_response_code_parse(readBuffer, (void*) &responseCode);
+  _res = plc4c_plc4x_read_write_plc4x_response_code_parse(ctx, readBuffer, (void*) &responseCode);
   if(_res != OK) {
     return _res;
   }
@@ -56,17 +57,17 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_parse(plc4c_spi_read
   return OK;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_response* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_response* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (tag)
-  _res = plc4c_plc4x_read_write_plc4x_tag_serialize(writeBuffer, _message->tag);
+  _res = plc4c_plc4x_read_write_plc4x_tag_serialize(ctx, writeBuffer, _message->tag);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (responseCode)
-  _res = plc4c_plc4x_read_write_plc4x_response_code_serialize(writeBuffer, &_message->response_code);
+  _res = plc4c_plc4x_read_write_plc4x_response_code_serialize(ctx, writeBuffer, &_message->response_code);
   if(_res != OK) {
     return _res;
   }
@@ -74,18 +75,18 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_response_serialize(plc4c_spi_
   return OK;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_response_length_in_bytes(plc4c_plc4x_read_write_plc4x_tag_response* _message) {
-  return plc4c_plc4x_read_write_plc4x_tag_response_length_in_bits(_message) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_tag_response_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_response* _message) {
+  return plc4c_plc4x_read_write_plc4x_tag_response_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_response_length_in_bits(plc4c_plc4x_read_write_plc4x_tag_response* _message) {
+uint16_t plc4c_plc4x_read_write_plc4x_tag_response_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_response* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (tag)
-  lengthInBits += plc4c_plc4x_read_write_plc4x_tag_length_in_bits(_message->tag);
+  lengthInBits += plc4c_plc4x_read_write_plc4x_tag_length_in_bits(ctx, _message->tag);
 
   // Simple field (responseCode)
-  lengthInBits += plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(&_message->response_code);
+  lengthInBits += plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(ctx, &_message->response_code);
 
   return lengthInBits;
 }
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_tag_value_request.c b/plc4c/generated-sources/plc4x/src/plc4x_tag_value_request.c
index 84c772420c..bbbe21159e 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_tag_value_request.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_tag_value_request.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_plc4x_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_value_request** _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_value_request** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -39,7 +40,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_parse(plc4c_spi
 
   // Simple Field (tag)
   plc4c_plc4x_read_write_plc4x_tag* tag;
-  _res = plc4c_plc4x_read_write_plc4x_tag_parse(readBuffer, (void*) &tag);
+  _res = plc4c_plc4x_read_write_plc4x_tag_parse(ctx, readBuffer, (void*) &tag);
   if(_res != OK) {
     return _res;
   }
@@ -47,7 +48,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_parse(plc4c_spi
 
   // Simple Field (valueType)
   plc4c_plc4x_read_write_plc4x_value_type valueType;
-  _res = plc4c_plc4x_read_write_plc4x_value_type_parse(readBuffer, (void*) &valueType);
+  _res = plc4c_plc4x_read_write_plc4x_value_type_parse(ctx, readBuffer, (void*) &valueType);
   if(_res != OK) {
     return _res;
   }
@@ -56,7 +57,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_parse(plc4c_spi
   // Optional Field (value) (Can be skipped, if a given expression evaluates to false)
   plc4c_data* value = NULL;
   if((valueType) != (plc4c_plc4x_read_write_plc4x_value_type_NULL)) {
-    _res = plc4c_plc4x_read_write_plc4x_value_parse(readBuffer, valueType, &value);
+    _res = plc4c_plc4x_read_write_plc4x_value_parse(ctx, readBuffer, valueType, &value);
     if(_res != OK) {
       return _res;
     }
@@ -68,24 +69,24 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_parse(plc4c_spi
   return OK;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_value_request* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_value_request* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (tag)
-  _res = plc4c_plc4x_read_write_plc4x_tag_serialize(writeBuffer, _message->tag);
+  _res = plc4c_plc4x_read_write_plc4x_tag_serialize(ctx, writeBuffer, _message->tag);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (valueType)
-  _res = plc4c_plc4x_read_write_plc4x_value_type_serialize(writeBuffer, &_message->value_type);
+  _res = plc4c_plc4x_read_write_plc4x_value_type_serialize(ctx, writeBuffer, &_message->value_type);
   if(_res != OK) {
     return _res;
   }
 
   // Optional Field (value)
   if(_message->value != NULL) {
-    _res = plc4c_plc4x_read_write_plc4x_value_serialize(writeBuffer, _message->value_type, &_message->value);
+    _res = plc4c_plc4x_read_write_plc4x_value_serialize(ctx, writeBuffer, _message->value_type, &_message->value);
     if(_res != OK) {
       return _res;
     }
@@ -94,22 +95,22 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_request_serialize(plc4c
   return OK;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bytes(plc4c_plc4x_read_write_plc4x_tag_value_request* _message) {
-  return plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bits(_message) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_value_request* _message) {
+  return plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bits(plc4c_plc4x_read_write_plc4x_tag_value_request* _message) {
+uint16_t plc4c_plc4x_read_write_plc4x_tag_value_request_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_value_request* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (tag)
-  lengthInBits += plc4c_plc4x_read_write_plc4x_tag_length_in_bits(_message->tag);
+  lengthInBits += plc4c_plc4x_read_write_plc4x_tag_length_in_bits(ctx, _message->tag);
 
   // Simple field (valueType)
-  lengthInBits += plc4c_plc4x_read_write_plc4x_value_type_length_in_bits(&_message->value_type);
+  lengthInBits += plc4c_plc4x_read_write_plc4x_value_type_length_in_bits(ctx, &_message->value_type);
 
   // Optional Field (value)
   if(_message->value != NULL) {
-    lengthInBits += plc4c_plc4x_read_write_plc4x_value_length_in_bits(_message->value, _message->value_type);
+    lengthInBits += plc4c_plc4x_read_write_plc4x_value_length_in_bits(ctx, _message->value, _message->value_type);
   }
 
   return lengthInBits;
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_tag_value_response.c b/plc4c/generated-sources/plc4x/src/plc4x_tag_value_response.c
index 52ffa3c819..5cde8bf1d3 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_tag_value_response.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_tag_value_response.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_plc4x_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_value_response** _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_tag_value_response** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -39,7 +40,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_parse(plc4c_sp
 
   // Simple Field (tag)
   plc4c_plc4x_read_write_plc4x_tag* tag;
-  _res = plc4c_plc4x_read_write_plc4x_tag_parse(readBuffer, (void*) &tag);
+  _res = plc4c_plc4x_read_write_plc4x_tag_parse(ctx, readBuffer, (void*) &tag);
   if(_res != OK) {
     return _res;
   }
@@ -47,7 +48,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_parse(plc4c_sp
 
   // Simple Field (responseCode)
   plc4c_plc4x_read_write_plc4x_response_code responseCode;
-  _res = plc4c_plc4x_read_write_plc4x_response_code_parse(readBuffer, (void*) &responseCode);
+  _res = plc4c_plc4x_read_write_plc4x_response_code_parse(ctx, readBuffer, (void*) &responseCode);
   if(_res != OK) {
     return _res;
   }
@@ -55,7 +56,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_parse(plc4c_sp
 
   // Simple Field (valueType)
   plc4c_plc4x_read_write_plc4x_value_type valueType;
-  _res = plc4c_plc4x_read_write_plc4x_value_type_parse(readBuffer, (void*) &valueType);
+  _res = plc4c_plc4x_read_write_plc4x_value_type_parse(ctx, readBuffer, (void*) &valueType);
   if(_res != OK) {
     return _res;
   }
@@ -64,7 +65,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_parse(plc4c_sp
   // Optional Field (value) (Can be skipped, if a given expression evaluates to false)
   plc4c_data* value = NULL;
   if((valueType) != (plc4c_plc4x_read_write_plc4x_value_type_NULL)) {
-    _res = plc4c_plc4x_read_write_plc4x_value_parse(readBuffer, valueType, &value);
+    _res = plc4c_plc4x_read_write_plc4x_value_parse(ctx, readBuffer, valueType, &value);
     if(_res != OK) {
       return _res;
     }
@@ -76,30 +77,30 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_parse(plc4c_sp
   return OK;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_value_response* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_tag_value_response* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (tag)
-  _res = plc4c_plc4x_read_write_plc4x_tag_serialize(writeBuffer, _message->tag);
+  _res = plc4c_plc4x_read_write_plc4x_tag_serialize(ctx, writeBuffer, _message->tag);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (responseCode)
-  _res = plc4c_plc4x_read_write_plc4x_response_code_serialize(writeBuffer, &_message->response_code);
+  _res = plc4c_plc4x_read_write_plc4x_response_code_serialize(ctx, writeBuffer, &_message->response_code);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (valueType)
-  _res = plc4c_plc4x_read_write_plc4x_value_type_serialize(writeBuffer, &_message->value_type);
+  _res = plc4c_plc4x_read_write_plc4x_value_type_serialize(ctx, writeBuffer, &_message->value_type);
   if(_res != OK) {
     return _res;
   }
 
   // Optional Field (value)
   if(_message->value != NULL) {
-    _res = plc4c_plc4x_read_write_plc4x_value_serialize(writeBuffer, _message->value_type, &_message->value);
+    _res = plc4c_plc4x_read_write_plc4x_value_serialize(ctx, writeBuffer, _message->value_type, &_message->value);
     if(_res != OK) {
       return _res;
     }
@@ -108,25 +109,25 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_tag_value_response_serialize(plc4
   return OK;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bytes(plc4c_plc4x_read_write_plc4x_tag_value_response* _message) {
-  return plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bits(_message) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_value_response* _message) {
+  return plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bits(plc4c_plc4x_read_write_plc4x_tag_value_response* _message) {
+uint16_t plc4c_plc4x_read_write_plc4x_tag_value_response_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_tag_value_response* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (tag)
-  lengthInBits += plc4c_plc4x_read_write_plc4x_tag_length_in_bits(_message->tag);
+  lengthInBits += plc4c_plc4x_read_write_plc4x_tag_length_in_bits(ctx, _message->tag);
 
   // Simple field (responseCode)
-  lengthInBits += plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(&_message->response_code);
+  lengthInBits += plc4c_plc4x_read_write_plc4x_response_code_length_in_bits(ctx, &_message->response_code);
 
   // Simple field (valueType)
-  lengthInBits += plc4c_plc4x_read_write_plc4x_value_type_length_in_bits(&_message->value_type);
+  lengthInBits += plc4c_plc4x_read_write_plc4x_value_type_length_in_bits(ctx, &_message->value_type);
 
   // Optional Field (value)
   if(_message->value != NULL) {
-    lengthInBits += plc4c_plc4x_read_write_plc4x_value_length_in_bits(_message->value, _message->value_type);
+    lengthInBits += plc4c_plc4x_read_write_plc4x_value_length_in_bits(ctx, _message->value, _message->value_type);
   }
 
   return lengthInBits;
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_value.c b/plc4c/generated-sources/plc4x/src/plc4x_value.c
index b464bd1bc5..f2ca4e097c 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_value.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_value.c
@@ -31,7 +31,7 @@
 // Code generated by code-generation. DO NOT EDIT.
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_value_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_value_type valueType, plc4c_data** data_item) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_value_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_value_type valueType, plc4c_data** data_item) {
     uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
     uint16_t curPos;
     plc4c_return_code _res = OK;
@@ -329,7 +329,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_value_parse(plc4c_spi_read_buffer
   return OK;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_value_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_value_type valueType, plc4c_data** data_item) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_value_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_value_type valueType, plc4c_data** data_item) {
   plc4c_return_code _res = OK;
         if(valueType == plc4c_plc4x_read_write_plc4x_value_type_BOOL) { /* BOOL */
 
@@ -513,11 +513,11 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_value_serialize(plc4c_spi_write_b
   return OK;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_value_length_in_bytes(plc4c_data* data_item, plc4c_plc4x_read_write_plc4x_value_type value_type) {
-  return plc4c_plc4x_read_write_plc4x_value_length_in_bits(data_item, value_type) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_value_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item, plc4c_plc4x_read_write_plc4x_value_type value_type) {
+  return plc4c_plc4x_read_write_plc4x_value_length_in_bits(ctx, data_item, value_type) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_value_length_in_bits(plc4c_data* data_item, plc4c_plc4x_read_write_plc4x_value_type valueType) {
+uint16_t plc4c_plc4x_read_write_plc4x_value_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item, plc4c_plc4x_read_write_plc4x_value_type valueType) {
   uint16_t lengthInBits = 0;
     if(valueType == plc4c_plc4x_read_write_plc4x_value_type_BOOL) { /* BOOL */
 
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_value_type.c b/plc4c/generated-sources/plc4x/src/plc4x_value_type.c
index 0e3096f7f0..8cac0bd6cc 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_value_type.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_value_type.c
@@ -33,7 +33,7 @@ plc4c_plc4x_read_write_plc4x_value_type plc4c_plc4x_read_write_plc4x_value_type_
 }
 
 // Parse function.
-plc4c_return_code plc4c_plc4x_read_write_plc4x_value_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_value_type* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_value_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_plc4x_read_write_plc4x_value_type* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_plc4x_read_write_plc4x_value_type_parse(plc4c_spi_read_b
     return _res;
 }
 
-plc4c_return_code plc4c_plc4x_read_write_plc4x_value_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_value_type* _message) {
+plc4c_return_code plc4c_plc4x_read_write_plc4x_value_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_plc4x_read_write_plc4x_value_type* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
@@ -262,10 +262,10 @@ plc4c_plc4x_read_write_plc4x_value_type plc4c_plc4x_read_write_plc4x_value_type_
     }
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_value_type_length_in_bytes(plc4c_plc4x_read_write_plc4x_value_type* _message) {
-    return plc4c_plc4x_read_write_plc4x_value_type_length_in_bits(_message) / 8;
+uint16_t plc4c_plc4x_read_write_plc4x_value_type_length_in_bytes(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_value_type* _message) {
+    return plc4c_plc4x_read_write_plc4x_value_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_plc4x_read_write_plc4x_value_type_length_in_bits(plc4c_plc4x_read_write_plc4x_value_type* _message) {
+uint16_t plc4c_plc4x_read_write_plc4x_value_type_length_in_bits(plc4x_spi_context ctx, plc4c_plc4x_read_write_plc4x_value_type* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/plc4x/test/ParserSerializerTestsuite.c b/plc4c/generated-sources/plc4x/test/ParserSerializerTestsuite.c
index f5e2e33d8d..8de04bad81 100644
--- a/plc4c/generated-sources/plc4x/test/ParserSerializerTestsuite.c
+++ b/plc4c/generated-sources/plc4x/test/ParserSerializerTestsuite.c
@@ -47,7 +47,7 @@ void parser_serializer_test_plc4x_read_write_connection_request() {
     }
 
     plc4c_plc4x_read_write_plc4x_message* message = NULL;
-    return_code = plc4c_plc4x_read_write_plc4x_message_parse(read_buffer, &message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -58,7 +58,7 @@ void parser_serializer_test_plc4x_read_write_connection_request() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(write_buffer, message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -84,7 +84,7 @@ void parser_serializer_test_plc4x_read_write_connection_response() {
     }
 
     plc4c_plc4x_read_write_plc4x_message* message = NULL;
-    return_code = plc4c_plc4x_read_write_plc4x_message_parse(read_buffer, &message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -95,7 +95,7 @@ void parser_serializer_test_plc4x_read_write_connection_response() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(write_buffer, message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -121,7 +121,7 @@ void parser_serializer_test_plc4x_read_write_read_request_single_item() {
     }
 
     plc4c_plc4x_read_write_plc4x_message* message = NULL;
-    return_code = plc4c_plc4x_read_write_plc4x_message_parse(read_buffer, &message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -132,7 +132,7 @@ void parser_serializer_test_plc4x_read_write_read_request_single_item() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(write_buffer, message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -158,7 +158,7 @@ void parser_serializer_test_plc4x_read_write_read_response_single_item() {
     }
 
     plc4c_plc4x_read_write_plc4x_message* message = NULL;
-    return_code = plc4c_plc4x_read_write_plc4x_message_parse(read_buffer, &message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -169,7 +169,7 @@ void parser_serializer_test_plc4x_read_write_read_response_single_item() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(write_buffer, message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -195,7 +195,7 @@ void parser_serializer_test_plc4x_read_write_read_request_multiple_items() {
     }
 
     plc4c_plc4x_read_write_plc4x_message* message = NULL;
-    return_code = plc4c_plc4x_read_write_plc4x_message_parse(read_buffer, &message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -206,7 +206,7 @@ void parser_serializer_test_plc4x_read_write_read_request_multiple_items() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(write_buffer, message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -232,7 +232,7 @@ void parser_serializer_test_plc4x_read_write_read_response_multiple_items() {
     }
 
     plc4c_plc4x_read_write_plc4x_message* message = NULL;
-    return_code = plc4c_plc4x_read_write_plc4x_message_parse(read_buffer, &message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -243,7 +243,7 @@ void parser_serializer_test_plc4x_read_write_read_response_multiple_items() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(write_buffer, message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -269,7 +269,7 @@ void parser_serializer_test_plc4x_read_write_write_request() {
     }
 
     plc4c_plc4x_read_write_plc4x_message* message = NULL;
-    return_code = plc4c_plc4x_read_write_plc4x_message_parse(read_buffer, &message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -280,7 +280,7 @@ void parser_serializer_test_plc4x_read_write_write_request() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(write_buffer, message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -306,7 +306,7 @@ void parser_serializer_test_plc4x_read_write_write_response() {
     }
 
     plc4c_plc4x_read_write_plc4x_message* message = NULL;
-    return_code = plc4c_plc4x_read_write_plc4x_message_parse(read_buffer, &message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -317,7 +317,7 @@ void parser_serializer_test_plc4x_read_write_write_response() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(write_buffer, message);
+    return_code = plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
diff --git a/plc4c/generated-sources/s7/include/alarm_message_ack_object_push_type.h b/plc4c/generated-sources/s7/include/alarm_message_ack_object_push_type.h
index d67234d5d2..e250aa1af6 100644
--- a/plc4c/generated-sources/s7/include/alarm_message_ack_object_push_type.h
+++ b/plc4c/generated-sources/s7/include/alarm_message_ack_object_push_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -49,12 +50,12 @@ typedef struct plc4c_s7_read_write_alarm_message_ack_object_push_type plc4c_s7_r
 // Create an empty NULL-struct
 plc4c_s7_read_write_alarm_message_ack_object_push_type plc4c_s7_read_write_alarm_message_ack_object_push_type_null();
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_object_push_type** message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_object_push_type** message);
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_object_push_type* message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_object_push_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bytes(plc4c_s7_read_write_alarm_message_ack_object_push_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_object_push_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bits(plc4c_s7_read_write_alarm_message_ack_object_push_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_object_push_type* message);
 
 #endif  // PLC4C_S7_READ_WRITE_ALARM_MESSAGE_ACK_OBJECT_PUSH_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/alarm_message_ack_push_type.h b/plc4c/generated-sources/s7/include/alarm_message_ack_push_type.h
index 00bbb18061..bd6e9fb81e 100644
--- a/plc4c/generated-sources/s7/include/alarm_message_ack_push_type.h
+++ b/plc4c/generated-sources/s7/include/alarm_message_ack_push_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -43,12 +44,12 @@ typedef struct plc4c_s7_read_write_alarm_message_ack_push_type plc4c_s7_read_wri
 // Create an empty NULL-struct
 plc4c_s7_read_write_alarm_message_ack_push_type plc4c_s7_read_write_alarm_message_ack_push_type_null();
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_push_type** message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_push_type** message);
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_push_type* message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_push_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bytes(plc4c_s7_read_write_alarm_message_ack_push_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_push_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bits(plc4c_s7_read_write_alarm_message_ack_push_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_push_type* message);
 
 #endif  // PLC4C_S7_READ_WRITE_ALARM_MESSAGE_ACK_PUSH_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/alarm_message_ack_response_type.h b/plc4c/generated-sources/s7/include/alarm_message_ack_response_type.h
index 84d9ab720f..138cfe2da8 100644
--- a/plc4c/generated-sources/s7/include/alarm_message_ack_response_type.h
+++ b/plc4c/generated-sources/s7/include/alarm_message_ack_response_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -40,12 +41,12 @@ typedef struct plc4c_s7_read_write_alarm_message_ack_response_type plc4c_s7_read
 // Create an empty NULL-struct
 plc4c_s7_read_write_alarm_message_ack_response_type plc4c_s7_read_write_alarm_message_ack_response_type_null();
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_response_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_response_type** message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_response_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_response_type** message);
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_response_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_response_type* message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_response_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_response_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_response_type_length_in_bytes(plc4c_s7_read_write_alarm_message_ack_response_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_ack_response_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_response_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_response_type_length_in_bits(plc4c_s7_read_write_alarm_message_ack_response_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_ack_response_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_response_type* message);
 
 #endif  // PLC4C_S7_READ_WRITE_ALARM_MESSAGE_ACK_RESPONSE_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/alarm_message_ack_type.h b/plc4c/generated-sources/s7/include/alarm_message_ack_type.h
index ae0967b092..1c64caa9c0 100644
--- a/plc4c/generated-sources/s7/include/alarm_message_ack_type.h
+++ b/plc4c/generated-sources/s7/include/alarm_message_ack_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -41,12 +42,12 @@ typedef struct plc4c_s7_read_write_alarm_message_ack_type plc4c_s7_read_write_al
 // Create an empty NULL-struct
 plc4c_s7_read_write_alarm_message_ack_type plc4c_s7_read_write_alarm_message_ack_type_null();
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_type** message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_type** message);
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_type* message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_type_length_in_bytes(plc4c_s7_read_write_alarm_message_ack_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_ack_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_type_length_in_bits(plc4c_s7_read_write_alarm_message_ack_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_ack_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_type* message);
 
 #endif  // PLC4C_S7_READ_WRITE_ALARM_MESSAGE_ACK_TYPE_H_
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 3cba1fc451..e6de056dd9 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
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -50,12 +51,12 @@ typedef struct plc4c_s7_read_write_alarm_message_object_ack_type plc4c_s7_read_w
 // Create an empty NULL-struct
 plc4c_s7_read_write_alarm_message_object_ack_type plc4c_s7_read_write_alarm_message_object_ack_type_null();
 
-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);
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_object_ack_type** message);
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_ack_type* message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_ack_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bytes(plc4c_s7_read_write_alarm_message_object_ack_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_ack_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits(plc4c_s7_read_write_alarm_message_object_ack_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_ack_type* message);
 
 #endif  // PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/alarm_message_object_push_type.h b/plc4c/generated-sources/s7/include/alarm_message_object_push_type.h
index da8d35ddbd..314346e3b1 100644
--- a/plc4c/generated-sources/s7/include/alarm_message_object_push_type.h
+++ b/plc4c/generated-sources/s7/include/alarm_message_object_push_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -53,12 +54,12 @@ typedef struct plc4c_s7_read_write_alarm_message_object_push_type plc4c_s7_read_
 // Create an empty NULL-struct
 plc4c_s7_read_write_alarm_message_object_push_type plc4c_s7_read_write_alarm_message_object_push_type_null();
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_object_push_type** message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_object_push_type** message);
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_push_type* message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_push_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_object_push_type_length_in_bytes(plc4c_s7_read_write_alarm_message_object_push_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_object_push_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_push_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_object_push_type_length_in_bits(plc4c_s7_read_write_alarm_message_object_push_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_object_push_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_push_type* message);
 
 #endif  // PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_PUSH_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/alarm_message_object_query_type.h b/plc4c/generated-sources/s7/include/alarm_message_object_query_type.h
index b91512b48d..f0c40f7896 100644
--- a/plc4c/generated-sources/s7/include/alarm_message_object_query_type.h
+++ b/plc4c/generated-sources/s7/include/alarm_message_object_query_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -52,12 +53,12 @@ typedef struct plc4c_s7_read_write_alarm_message_object_query_type plc4c_s7_read
 // Create an empty NULL-struct
 plc4c_s7_read_write_alarm_message_object_query_type plc4c_s7_read_write_alarm_message_object_query_type_null();
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_object_query_type** message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_object_query_type** message);
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_query_type* message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_query_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_object_query_type_length_in_bytes(plc4c_s7_read_write_alarm_message_object_query_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_object_query_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_query_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_object_query_type_length_in_bits(plc4c_s7_read_write_alarm_message_object_query_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_object_query_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_query_type* message);
 
 #endif  // PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_QUERY_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/alarm_message_push_type.h b/plc4c/generated-sources/s7/include/alarm_message_push_type.h
index 3ac4c2c6d9..9317fb2927 100644
--- a/plc4c/generated-sources/s7/include/alarm_message_push_type.h
+++ b/plc4c/generated-sources/s7/include/alarm_message_push_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -43,12 +44,12 @@ typedef struct plc4c_s7_read_write_alarm_message_push_type plc4c_s7_read_write_a
 // Create an empty NULL-struct
 plc4c_s7_read_write_alarm_message_push_type plc4c_s7_read_write_alarm_message_push_type_null();
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_push_type** message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_push_type** message);
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_push_type* message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_push_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_push_type_length_in_bytes(plc4c_s7_read_write_alarm_message_push_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_push_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_push_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_push_type_length_in_bits(plc4c_s7_read_write_alarm_message_push_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_push_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_push_type* message);
 
 #endif  // PLC4C_S7_READ_WRITE_ALARM_MESSAGE_PUSH_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/alarm_message_query_type.h b/plc4c/generated-sources/s7/include/alarm_message_query_type.h
index f19ed61176..72b61be50a 100644
--- a/plc4c/generated-sources/s7/include/alarm_message_query_type.h
+++ b/plc4c/generated-sources/s7/include/alarm_message_query_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -49,12 +50,12 @@ typedef struct plc4c_s7_read_write_alarm_message_query_type plc4c_s7_read_write_
 // Create an empty NULL-struct
 plc4c_s7_read_write_alarm_message_query_type plc4c_s7_read_write_alarm_message_query_type_null();
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_query_type** message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_query_type** message);
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_query_type* message);
+plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_query_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_query_type_length_in_bytes(plc4c_s7_read_write_alarm_message_query_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_query_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_query_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_message_query_type_length_in_bits(plc4c_s7_read_write_alarm_message_query_type* message);
+uint16_t plc4c_s7_read_write_alarm_message_query_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_query_type* message);
 
 #endif  // PLC4C_S7_READ_WRITE_ALARM_MESSAGE_QUERY_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/alarm_state_type.h b/plc4c/generated-sources/s7/include/alarm_state_type.h
index ad39212263..8399ab0158 100644
--- a/plc4c/generated-sources/s7/include/alarm_state_type.h
+++ b/plc4c/generated-sources/s7/include/alarm_state_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -41,9 +42,9 @@ typedef enum plc4c_s7_read_write_alarm_state_type plc4c_s7_read_write_alarm_stat
 // Get an empty NULL-struct
 plc4c_s7_read_write_alarm_state_type plc4c_s7_read_write_alarm_state_type_null();
 
-plc4c_return_code plc4c_s7_read_write_alarm_state_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_state_type* message);
+plc4c_return_code plc4c_s7_read_write_alarm_state_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_state_type* message);
 
-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 plc4c_s7_read_write_alarm_state_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_state_type* message);
 
 plc4c_s7_read_write_alarm_state_type plc4c_s7_read_write_alarm_state_type_for_value(uint8_t value);
 
@@ -53,9 +54,9 @@ int plc4c_s7_read_write_alarm_state_type_num_values();
 
 plc4c_s7_read_write_alarm_state_type plc4c_s7_read_write_alarm_state_type_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_alarm_state_type_length_in_bytes(plc4c_s7_read_write_alarm_state_type* message);
+uint16_t plc4c_s7_read_write_alarm_state_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_state_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_state_type_length_in_bits(plc4c_s7_read_write_alarm_state_type* message);
+uint16_t plc4c_s7_read_write_alarm_state_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_state_type* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_ALARM_STATE_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/alarm_type.h b/plc4c/generated-sources/s7/include/alarm_type.h
index a822188c65..4961defc24 100644
--- a/plc4c/generated-sources/s7/include/alarm_type.h
+++ b/plc4c/generated-sources/s7/include/alarm_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -38,9 +39,9 @@ typedef enum plc4c_s7_read_write_alarm_type plc4c_s7_read_write_alarm_type;
 // Get an empty NULL-struct
 plc4c_s7_read_write_alarm_type plc4c_s7_read_write_alarm_type_null();
 
-plc4c_return_code plc4c_s7_read_write_alarm_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_type* message);
+plc4c_return_code plc4c_s7_read_write_alarm_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_type* message);
 
-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 plc4c_s7_read_write_alarm_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_type* message);
 
 plc4c_s7_read_write_alarm_type plc4c_s7_read_write_alarm_type_for_value(uint8_t value);
 
@@ -50,9 +51,9 @@ int plc4c_s7_read_write_alarm_type_num_values();
 
 plc4c_s7_read_write_alarm_type plc4c_s7_read_write_alarm_type_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_alarm_type_length_in_bytes(plc4c_s7_read_write_alarm_type* message);
+uint16_t plc4c_s7_read_write_alarm_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_type* message);
 
-uint16_t plc4c_s7_read_write_alarm_type_length_in_bits(plc4c_s7_read_write_alarm_type* message);
+uint16_t plc4c_s7_read_write_alarm_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_type* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_ALARM_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/associated_value_type.h b/plc4c/generated-sources/s7/include/associated_value_type.h
index 59e1786748..2ae734cd11 100644
--- a/plc4c/generated-sources/s7/include/associated_value_type.h
+++ b/plc4c/generated-sources/s7/include/associated_value_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -43,12 +44,12 @@ typedef struct plc4c_s7_read_write_associated_value_type plc4c_s7_read_write_ass
 // Create an empty NULL-struct
 plc4c_s7_read_write_associated_value_type plc4c_s7_read_write_associated_value_type_null();
 
-plc4c_return_code plc4c_s7_read_write_associated_value_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_associated_value_type** message);
+plc4c_return_code plc4c_s7_read_write_associated_value_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_associated_value_type** message);
 
-plc4c_return_code plc4c_s7_read_write_associated_value_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_associated_value_type* message);
+plc4c_return_code plc4c_s7_read_write_associated_value_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_associated_value_type* message);
 
-uint16_t plc4c_s7_read_write_associated_value_type_length_in_bytes(plc4c_s7_read_write_associated_value_type* message);
+uint16_t plc4c_s7_read_write_associated_value_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_associated_value_type* message);
 
-uint16_t plc4c_s7_read_write_associated_value_type_length_in_bits(plc4c_s7_read_write_associated_value_type* message);
+uint16_t plc4c_s7_read_write_associated_value_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_associated_value_type* message);
 
 #endif  // PLC4C_S7_READ_WRITE_ASSOCIATED_VALUE_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/cotp_packet.h b/plc4c/generated-sources/s7/include/cotp_packet.h
index ef3a840035..a69c986a8c 100644
--- a/plc4c/generated-sources/s7/include/cotp_packet.h
+++ b/plc4c/generated-sources/s7/include/cotp_packet.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -92,12 +93,12 @@ typedef struct plc4c_s7_read_write_cotp_packet plc4c_s7_read_write_cotp_packet;
 // Create an empty NULL-struct
 plc4c_s7_read_write_cotp_packet plc4c_s7_read_write_cotp_packet_null();
 
-plc4c_return_code plc4c_s7_read_write_cotp_packet_parse(plc4c_spi_read_buffer* readBuffer, uint16_t cotpLen, plc4c_s7_read_write_cotp_packet** message);
+plc4c_return_code plc4c_s7_read_write_cotp_packet_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint16_t cotpLen, plc4c_s7_read_write_cotp_packet** message);
 
-plc4c_return_code plc4c_s7_read_write_cotp_packet_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_packet* message);
+plc4c_return_code plc4c_s7_read_write_cotp_packet_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_packet* message);
 
-uint16_t plc4c_s7_read_write_cotp_packet_length_in_bytes(plc4c_s7_read_write_cotp_packet* message);
+uint16_t plc4c_s7_read_write_cotp_packet_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_packet* message);
 
-uint16_t plc4c_s7_read_write_cotp_packet_length_in_bits(plc4c_s7_read_write_cotp_packet* message);
+uint16_t plc4c_s7_read_write_cotp_packet_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_packet* message);
 
 #endif  // PLC4C_S7_READ_WRITE_COTP_PACKET_H_
diff --git a/plc4c/generated-sources/s7/include/cotp_parameter.h b/plc4c/generated-sources/s7/include/cotp_parameter.h
index 15a836ec13..6b310ef403 100644
--- a/plc4c/generated-sources/s7/include/cotp_parameter.h
+++ b/plc4c/generated-sources/s7/include/cotp_parameter.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -75,12 +76,12 @@ typedef struct plc4c_s7_read_write_cotp_parameter plc4c_s7_read_write_cotp_param
 // Create an empty NULL-struct
 plc4c_s7_read_write_cotp_parameter plc4c_s7_read_write_cotp_parameter_null();
 
-plc4c_return_code plc4c_s7_read_write_cotp_parameter_parse(plc4c_spi_read_buffer* readBuffer, uint8_t rest, plc4c_s7_read_write_cotp_parameter** message);
+plc4c_return_code plc4c_s7_read_write_cotp_parameter_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint8_t rest, plc4c_s7_read_write_cotp_parameter** message);
 
-plc4c_return_code plc4c_s7_read_write_cotp_parameter_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_parameter* message);
+plc4c_return_code plc4c_s7_read_write_cotp_parameter_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_parameter* message);
 
-uint16_t plc4c_s7_read_write_cotp_parameter_length_in_bytes(plc4c_s7_read_write_cotp_parameter* message);
+uint16_t plc4c_s7_read_write_cotp_parameter_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_parameter* message);
 
-uint16_t plc4c_s7_read_write_cotp_parameter_length_in_bits(plc4c_s7_read_write_cotp_parameter* message);
+uint16_t plc4c_s7_read_write_cotp_parameter_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_parameter* message);
 
 #endif  // PLC4C_S7_READ_WRITE_COTP_PARAMETER_H_
diff --git a/plc4c/generated-sources/s7/include/cotp_protocol_class.h b/plc4c/generated-sources/s7/include/cotp_protocol_class.h
index 5fd0e8072a..939fbe73b6 100644
--- a/plc4c/generated-sources/s7/include/cotp_protocol_class.h
+++ b/plc4c/generated-sources/s7/include/cotp_protocol_class.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -40,9 +41,9 @@ typedef enum plc4c_s7_read_write_cotp_protocol_class plc4c_s7_read_write_cotp_pr
 // Get an empty NULL-struct
 plc4c_s7_read_write_cotp_protocol_class plc4c_s7_read_write_cotp_protocol_class_null();
 
-plc4c_return_code plc4c_s7_read_write_cotp_protocol_class_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cotp_protocol_class* message);
+plc4c_return_code plc4c_s7_read_write_cotp_protocol_class_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cotp_protocol_class* message);
 
-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 plc4c_s7_read_write_cotp_protocol_class_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_protocol_class* message);
 
 plc4c_s7_read_write_cotp_protocol_class plc4c_s7_read_write_cotp_protocol_class_for_value(uint8_t value);
 
@@ -52,9 +53,9 @@ int plc4c_s7_read_write_cotp_protocol_class_num_values();
 
 plc4c_s7_read_write_cotp_protocol_class plc4c_s7_read_write_cotp_protocol_class_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_cotp_protocol_class_length_in_bytes(plc4c_s7_read_write_cotp_protocol_class* message);
+uint16_t plc4c_s7_read_write_cotp_protocol_class_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_protocol_class* message);
 
-uint16_t plc4c_s7_read_write_cotp_protocol_class_length_in_bits(plc4c_s7_read_write_cotp_protocol_class* message);
+uint16_t plc4c_s7_read_write_cotp_protocol_class_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_protocol_class* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_COTP_PROTOCOL_CLASS_H_
diff --git a/plc4c/generated-sources/s7/include/cotp_tpdu_size.h b/plc4c/generated-sources/s7/include/cotp_tpdu_size.h
index 3aae78e1aa..9c11ca65bd 100644
--- a/plc4c/generated-sources/s7/include/cotp_tpdu_size.h
+++ b/plc4c/generated-sources/s7/include/cotp_tpdu_size.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -42,9 +43,9 @@ typedef enum plc4c_s7_read_write_cotp_tpdu_size plc4c_s7_read_write_cotp_tpdu_si
 // Get an empty NULL-struct
 plc4c_s7_read_write_cotp_tpdu_size plc4c_s7_read_write_cotp_tpdu_size_null();
 
-plc4c_return_code plc4c_s7_read_write_cotp_tpdu_size_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cotp_tpdu_size* message);
+plc4c_return_code plc4c_s7_read_write_cotp_tpdu_size_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cotp_tpdu_size* message);
 
-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 plc4c_s7_read_write_cotp_tpdu_size_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_tpdu_size* message);
 
 plc4c_s7_read_write_cotp_tpdu_size plc4c_s7_read_write_cotp_tpdu_size_for_value(uint8_t value);
 
@@ -57,9 +58,9 @@ plc4c_s7_read_write_cotp_tpdu_size plc4c_s7_read_write_cotp_tpdu_size_value_for_
 uint16_t plc4c_s7_read_write_cotp_tpdu_size_get_size_in_bytes(plc4c_s7_read_write_cotp_tpdu_size value);
 plc4c_s7_read_write_cotp_tpdu_size plc4c_s7_read_write_cotp_tpdu_size_get_first_enum_for_field_size_in_bytes(uint16_t value);
 
-uint16_t plc4c_s7_read_write_cotp_tpdu_size_length_in_bytes(plc4c_s7_read_write_cotp_tpdu_size* message);
+uint16_t plc4c_s7_read_write_cotp_tpdu_size_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_tpdu_size* message);
 
-uint16_t plc4c_s7_read_write_cotp_tpdu_size_length_in_bits(plc4c_s7_read_write_cotp_tpdu_size* message);
+uint16_t plc4c_s7_read_write_cotp_tpdu_size_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_tpdu_size* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_COTP_TPDU_SIZE_H_
diff --git a/plc4c/generated-sources/s7/include/cpu_subscribe_events.h b/plc4c/generated-sources/s7/include/cpu_subscribe_events.h
index 29e051abc7..072f5892db 100644
--- a/plc4c/generated-sources/s7/include/cpu_subscribe_events.h
+++ b/plc4c/generated-sources/s7/include/cpu_subscribe_events.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -39,9 +40,9 @@ typedef enum plc4c_s7_read_write_cpu_subscribe_events plc4c_s7_read_write_cpu_su
 // Get an empty NULL-struct
 plc4c_s7_read_write_cpu_subscribe_events plc4c_s7_read_write_cpu_subscribe_events_null();
 
-plc4c_return_code plc4c_s7_read_write_cpu_subscribe_events_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cpu_subscribe_events* message);
+plc4c_return_code plc4c_s7_read_write_cpu_subscribe_events_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cpu_subscribe_events* message);
 
-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 plc4c_s7_read_write_cpu_subscribe_events_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cpu_subscribe_events* message);
 
 plc4c_s7_read_write_cpu_subscribe_events plc4c_s7_read_write_cpu_subscribe_events_for_value(uint8_t value);
 
@@ -51,9 +52,9 @@ int plc4c_s7_read_write_cpu_subscribe_events_num_values();
 
 plc4c_s7_read_write_cpu_subscribe_events plc4c_s7_read_write_cpu_subscribe_events_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_cpu_subscribe_events_length_in_bytes(plc4c_s7_read_write_cpu_subscribe_events* message);
+uint16_t plc4c_s7_read_write_cpu_subscribe_events_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_cpu_subscribe_events* message);
 
-uint16_t plc4c_s7_read_write_cpu_subscribe_events_length_in_bits(plc4c_s7_read_write_cpu_subscribe_events* message);
+uint16_t plc4c_s7_read_write_cpu_subscribe_events_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_cpu_subscribe_events* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_CPU_SUBSCRIBE_EVENTS_H_
diff --git a/plc4c/generated-sources/s7/include/data_item.h b/plc4c/generated-sources/s7/include/data_item.h
index 3974923a86..32893bb96b 100644
--- a/plc4c/generated-sources/s7/include/data_item.h
+++ b/plc4c/generated-sources/s7/include/data_item.h
@@ -21,18 +21,19 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
 
 // Code generated by code-generation. DO NOT EDIT.
 
-plc4c_return_code plc4c_s7_read_write_data_item_parse(plc4c_spi_read_buffer* readBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item);
+plc4c_return_code plc4c_s7_read_write_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item);
 
-plc4c_return_code plc4c_s7_read_write_data_item_serialize(plc4c_spi_write_buffer* writeBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item);
+plc4c_return_code plc4c_s7_read_write_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item);
 
-uint16_t plc4c_s7_read_write_data_item_length_in_bytes(plc4c_data* data_item, char* dataProtocolId, int32_t stringLength);
+uint16_t plc4c_s7_read_write_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item, char* dataProtocolId, int32_t stringLength);
 
-uint16_t plc4c_s7_read_write_data_item_length_in_bits(plc4c_data* data_item, char* dataProtocolId, int32_t stringLength);
+uint16_t plc4c_s7_read_write_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item, char* dataProtocolId, int32_t stringLength);
 
 #endif  // PLC4C_S7_READ_WRITE_DATA_ITEM_H_
diff --git a/plc4c/generated-sources/s7/include/data_transport_error_code.h b/plc4c/generated-sources/s7/include/data_transport_error_code.h
index 212ad46472..16d16a5f7f 100644
--- a/plc4c/generated-sources/s7/include/data_transport_error_code.h
+++ b/plc4c/generated-sources/s7/include/data_transport_error_code.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -41,9 +42,9 @@ typedef enum plc4c_s7_read_write_data_transport_error_code plc4c_s7_read_write_d
 // Get an empty NULL-struct
 plc4c_s7_read_write_data_transport_error_code plc4c_s7_read_write_data_transport_error_code_null();
 
-plc4c_return_code plc4c_s7_read_write_data_transport_error_code_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_data_transport_error_code* message);
+plc4c_return_code plc4c_s7_read_write_data_transport_error_code_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_data_transport_error_code* message);
 
-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 plc4c_s7_read_write_data_transport_error_code_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_data_transport_error_code* message);
 
 plc4c_s7_read_write_data_transport_error_code plc4c_s7_read_write_data_transport_error_code_for_value(uint8_t value);
 
@@ -53,9 +54,9 @@ int plc4c_s7_read_write_data_transport_error_code_num_values();
 
 plc4c_s7_read_write_data_transport_error_code plc4c_s7_read_write_data_transport_error_code_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_data_transport_error_code_length_in_bytes(plc4c_s7_read_write_data_transport_error_code* message);
+uint16_t plc4c_s7_read_write_data_transport_error_code_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_data_transport_error_code* message);
 
-uint16_t plc4c_s7_read_write_data_transport_error_code_length_in_bits(plc4c_s7_read_write_data_transport_error_code* message);
+uint16_t plc4c_s7_read_write_data_transport_error_code_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_data_transport_error_code* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_DATA_TRANSPORT_ERROR_CODE_H_
diff --git a/plc4c/generated-sources/s7/include/data_transport_size.h b/plc4c/generated-sources/s7/include/data_transport_size.h
index c9c818ee50..e6e4ab2e89 100644
--- a/plc4c/generated-sources/s7/include/data_transport_size.h
+++ b/plc4c/generated-sources/s7/include/data_transport_size.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -42,9 +43,9 @@ typedef enum plc4c_s7_read_write_data_transport_size plc4c_s7_read_write_data_tr
 // Get an empty NULL-struct
 plc4c_s7_read_write_data_transport_size plc4c_s7_read_write_data_transport_size_null();
 
-plc4c_return_code plc4c_s7_read_write_data_transport_size_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_data_transport_size* message);
+plc4c_return_code plc4c_s7_read_write_data_transport_size_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_data_transport_size* message);
 
-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 plc4c_s7_read_write_data_transport_size_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_data_transport_size* message);
 
 plc4c_s7_read_write_data_transport_size plc4c_s7_read_write_data_transport_size_for_value(uint8_t value);
 
@@ -57,9 +58,9 @@ plc4c_s7_read_write_data_transport_size plc4c_s7_read_write_data_transport_size_
 bool plc4c_s7_read_write_data_transport_size_get_size_in_bits(plc4c_s7_read_write_data_transport_size value);
 plc4c_s7_read_write_data_transport_size plc4c_s7_read_write_data_transport_size_get_first_enum_for_field_size_in_bits(bool value);
 
-uint16_t plc4c_s7_read_write_data_transport_size_length_in_bytes(plc4c_s7_read_write_data_transport_size* message);
+uint16_t plc4c_s7_read_write_data_transport_size_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_data_transport_size* message);
 
-uint16_t plc4c_s7_read_write_data_transport_size_length_in_bits(plc4c_s7_read_write_data_transport_size* message);
+uint16_t plc4c_s7_read_write_data_transport_size_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_data_transport_size* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_DATA_TRANSPORT_SIZE_H_
diff --git a/plc4c/generated-sources/s7/include/date_and_time.h b/plc4c/generated-sources/s7/include/date_and_time.h
index 899c7eef46..b68af7a6e7 100644
--- a/plc4c/generated-sources/s7/include/date_and_time.h
+++ b/plc4c/generated-sources/s7/include/date_and_time.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -45,12 +46,12 @@ typedef struct plc4c_s7_read_write_date_and_time plc4c_s7_read_write_date_and_ti
 // Create an empty NULL-struct
 plc4c_s7_read_write_date_and_time plc4c_s7_read_write_date_and_time_null();
 
-plc4c_return_code plc4c_s7_read_write_date_and_time_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_date_and_time** message);
+plc4c_return_code plc4c_s7_read_write_date_and_time_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_date_and_time** message);
 
-plc4c_return_code plc4c_s7_read_write_date_and_time_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_date_and_time* message);
+plc4c_return_code plc4c_s7_read_write_date_and_time_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_date_and_time* message);
 
-uint16_t plc4c_s7_read_write_date_and_time_length_in_bytes(plc4c_s7_read_write_date_and_time* message);
+uint16_t plc4c_s7_read_write_date_and_time_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_date_and_time* message);
 
-uint16_t plc4c_s7_read_write_date_and_time_length_in_bits(plc4c_s7_read_write_date_and_time* message);
+uint16_t plc4c_s7_read_write_date_and_time_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_date_and_time* message);
 
 #endif  // PLC4C_S7_READ_WRITE_DATE_AND_TIME_H_
diff --git a/plc4c/generated-sources/s7/include/device_group.h b/plc4c/generated-sources/s7/include/device_group.h
index fb6d21b1a8..ebef37bf12 100644
--- a/plc4c/generated-sources/s7/include/device_group.h
+++ b/plc4c/generated-sources/s7/include/device_group.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -38,9 +39,9 @@ typedef enum plc4c_s7_read_write_device_group plc4c_s7_read_write_device_group;
 // Get an empty NULL-struct
 plc4c_s7_read_write_device_group plc4c_s7_read_write_device_group_null();
 
-plc4c_return_code plc4c_s7_read_write_device_group_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_device_group* message);
+plc4c_return_code plc4c_s7_read_write_device_group_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_device_group* message);
 
-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 plc4c_s7_read_write_device_group_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_device_group* message);
 
 plc4c_s7_read_write_device_group plc4c_s7_read_write_device_group_for_value(uint8_t value);
 
@@ -50,9 +51,9 @@ int plc4c_s7_read_write_device_group_num_values();
 
 plc4c_s7_read_write_device_group plc4c_s7_read_write_device_group_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_device_group_length_in_bytes(plc4c_s7_read_write_device_group* message);
+uint16_t plc4c_s7_read_write_device_group_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_device_group* message);
 
-uint16_t plc4c_s7_read_write_device_group_length_in_bits(plc4c_s7_read_write_device_group* message);
+uint16_t plc4c_s7_read_write_device_group_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_device_group* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_DEVICE_GROUP_H_
diff --git a/plc4c/generated-sources/s7/include/event_type.h b/plc4c/generated-sources/s7/include/event_type.h
index 17e028b5cb..17f1499ddd 100644
--- a/plc4c/generated-sources/s7/include/event_type.h
+++ b/plc4c/generated-sources/s7/include/event_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -39,9 +40,9 @@ typedef enum plc4c_s7_read_write_event_type plc4c_s7_read_write_event_type;
 // Get an empty NULL-struct
 plc4c_s7_read_write_event_type plc4c_s7_read_write_event_type_null();
 
-plc4c_return_code plc4c_s7_read_write_event_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_event_type* message);
+plc4c_return_code plc4c_s7_read_write_event_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_event_type* message);
 
-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 plc4c_s7_read_write_event_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_event_type* message);
 
 plc4c_s7_read_write_event_type plc4c_s7_read_write_event_type_for_value(uint8_t value);
 
@@ -51,9 +52,9 @@ int plc4c_s7_read_write_event_type_num_values();
 
 plc4c_s7_read_write_event_type plc4c_s7_read_write_event_type_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_event_type_length_in_bytes(plc4c_s7_read_write_event_type* message);
+uint16_t plc4c_s7_read_write_event_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_event_type* message);
 
-uint16_t plc4c_s7_read_write_event_type_length_in_bits(plc4c_s7_read_write_event_type* message);
+uint16_t plc4c_s7_read_write_event_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_event_type* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_EVENT_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/memory_area.h b/plc4c/generated-sources/s7/include/memory_area.h
index 71170d2178..dbde651c93 100644
--- a/plc4c/generated-sources/s7/include/memory_area.h
+++ b/plc4c/generated-sources/s7/include/memory_area.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -44,9 +45,9 @@ typedef enum plc4c_s7_read_write_memory_area plc4c_s7_read_write_memory_area;
 // Get an empty NULL-struct
 plc4c_s7_read_write_memory_area plc4c_s7_read_write_memory_area_null();
 
-plc4c_return_code plc4c_s7_read_write_memory_area_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_memory_area* message);
+plc4c_return_code plc4c_s7_read_write_memory_area_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_memory_area* message);
 
-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 plc4c_s7_read_write_memory_area_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_memory_area* message);
 
 plc4c_s7_read_write_memory_area plc4c_s7_read_write_memory_area_for_value(uint8_t value);
 
@@ -59,9 +60,9 @@ plc4c_s7_read_write_memory_area plc4c_s7_read_write_memory_area_value_for_index(
 char* plc4c_s7_read_write_memory_area_get_short_name(plc4c_s7_read_write_memory_area value);
 plc4c_s7_read_write_memory_area plc4c_s7_read_write_memory_area_get_first_enum_for_field_short_name(char* value);
 
-uint16_t plc4c_s7_read_write_memory_area_length_in_bytes(plc4c_s7_read_write_memory_area* message);
+uint16_t plc4c_s7_read_write_memory_area_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_memory_area* message);
 
-uint16_t plc4c_s7_read_write_memory_area_length_in_bits(plc4c_s7_read_write_memory_area* message);
+uint16_t plc4c_s7_read_write_memory_area_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_memory_area* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_MEMORY_AREA_H_
diff --git a/plc4c/generated-sources/s7/include/mode_transition_type.h b/plc4c/generated-sources/s7/include/mode_transition_type.h
index 3c77fc059c..16446a1513 100644
--- a/plc4c/generated-sources/s7/include/mode_transition_type.h
+++ b/plc4c/generated-sources/s7/include/mode_transition_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -44,9 +45,9 @@ typedef enum plc4c_s7_read_write_mode_transition_type plc4c_s7_read_write_mode_t
 // Get an empty NULL-struct
 plc4c_s7_read_write_mode_transition_type plc4c_s7_read_write_mode_transition_type_null();
 
-plc4c_return_code plc4c_s7_read_write_mode_transition_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_mode_transition_type* message);
+plc4c_return_code plc4c_s7_read_write_mode_transition_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_mode_transition_type* message);
 
-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 plc4c_s7_read_write_mode_transition_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_mode_transition_type* message);
 
 plc4c_s7_read_write_mode_transition_type plc4c_s7_read_write_mode_transition_type_for_value(uint8_t value);
 
@@ -56,9 +57,9 @@ int plc4c_s7_read_write_mode_transition_type_num_values();
 
 plc4c_s7_read_write_mode_transition_type plc4c_s7_read_write_mode_transition_type_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_mode_transition_type_length_in_bytes(plc4c_s7_read_write_mode_transition_type* message);
+uint16_t plc4c_s7_read_write_mode_transition_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_mode_transition_type* message);
 
-uint16_t plc4c_s7_read_write_mode_transition_type_length_in_bits(plc4c_s7_read_write_mode_transition_type* message);
+uint16_t plc4c_s7_read_write_mode_transition_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_mode_transition_type* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_MODE_TRANSITION_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/query_type.h b/plc4c/generated-sources/s7/include/query_type.h
index 100c2ffc5d..ea2a789c7f 100644
--- a/plc4c/generated-sources/s7/include/query_type.h
+++ b/plc4c/generated-sources/s7/include/query_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -38,9 +39,9 @@ typedef enum plc4c_s7_read_write_query_type plc4c_s7_read_write_query_type;
 // Get an empty NULL-struct
 plc4c_s7_read_write_query_type plc4c_s7_read_write_query_type_null();
 
-plc4c_return_code plc4c_s7_read_write_query_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_query_type* message);
+plc4c_return_code plc4c_s7_read_write_query_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_query_type* message);
 
-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 plc4c_s7_read_write_query_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_query_type* message);
 
 plc4c_s7_read_write_query_type plc4c_s7_read_write_query_type_for_value(uint8_t value);
 
@@ -50,9 +51,9 @@ int plc4c_s7_read_write_query_type_num_values();
 
 plc4c_s7_read_write_query_type plc4c_s7_read_write_query_type_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_query_type_length_in_bytes(plc4c_s7_read_write_query_type* message);
+uint16_t plc4c_s7_read_write_query_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_query_type* message);
 
-uint16_t plc4c_s7_read_write_query_type_length_in_bits(plc4c_s7_read_write_query_type* message);
+uint16_t plc4c_s7_read_write_query_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_query_type* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_QUERY_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/s7_address.h b/plc4c/generated-sources/s7/include/s7_address.h
index de31361fac..fe6ccaf9ab 100644
--- a/plc4c/generated-sources/s7/include/s7_address.h
+++ b/plc4c/generated-sources/s7/include/s7_address.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -65,12 +66,12 @@ typedef struct plc4c_s7_read_write_s7_address plc4c_s7_read_write_s7_address;
 // Create an empty NULL-struct
 plc4c_s7_read_write_s7_address plc4c_s7_read_write_s7_address_null();
 
-plc4c_return_code plc4c_s7_read_write_s7_address_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_address** message);
+plc4c_return_code plc4c_s7_read_write_s7_address_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_address** message);
 
-plc4c_return_code plc4c_s7_read_write_s7_address_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_address* message);
+plc4c_return_code plc4c_s7_read_write_s7_address_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_address* message);
 
-uint16_t plc4c_s7_read_write_s7_address_length_in_bytes(plc4c_s7_read_write_s7_address* message);
+uint16_t plc4c_s7_read_write_s7_address_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_address* message);
 
-uint16_t plc4c_s7_read_write_s7_address_length_in_bits(plc4c_s7_read_write_s7_address* message);
+uint16_t plc4c_s7_read_write_s7_address_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_address* message);
 
 #endif  // PLC4C_S7_READ_WRITE_S7_ADDRESS_H_
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 d5a7836d45..0d2bf0d43e 100644
--- a/plc4c/generated-sources/s7/include/s7_data_alarm_message.h
+++ b/plc4c/generated-sources/s7/include/s7_data_alarm_message.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -78,12 +79,12 @@ typedef struct plc4c_s7_read_write_s7_data_alarm_message plc4c_s7_read_write_s7_
 // Create an empty NULL-struct
 plc4c_s7_read_write_s7_data_alarm_message plc4c_s7_read_write_s7_data_alarm_message_null();
 
-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);
+plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint8_t cpuFunctionType, plc4c_s7_read_write_s7_data_alarm_message** message);
 
-plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_data_alarm_message* message);
+plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_data_alarm_message* message);
 
-uint16_t plc4c_s7_read_write_s7_data_alarm_message_length_in_bytes(plc4c_s7_read_write_s7_data_alarm_message* message);
+uint16_t plc4c_s7_read_write_s7_data_alarm_message_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_data_alarm_message* message);
 
-uint16_t plc4c_s7_read_write_s7_data_alarm_message_length_in_bits(plc4c_s7_read_write_s7_data_alarm_message* message);
+uint16_t plc4c_s7_read_write_s7_data_alarm_message_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_data_alarm_message* message);
 
 #endif  // PLC4C_S7_READ_WRITE_S7_DATA_ALARM_MESSAGE_H_
diff --git a/plc4c/generated-sources/s7/include/s7_message.h b/plc4c/generated-sources/s7/include/s7_message.h
index accf9c5f3c..9cfd107d3e 100644
--- a/plc4c/generated-sources/s7/include/s7_message.h
+++ b/plc4c/generated-sources/s7/include/s7_message.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -75,12 +76,12 @@ typedef struct plc4c_s7_read_write_s7_message plc4c_s7_read_write_s7_message;
 // Create an empty NULL-struct
 plc4c_s7_read_write_s7_message plc4c_s7_read_write_s7_message_null();
 
-plc4c_return_code plc4c_s7_read_write_s7_message_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_message** message);
+plc4c_return_code plc4c_s7_read_write_s7_message_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_message** message);
 
-plc4c_return_code plc4c_s7_read_write_s7_message_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_message* message);
+plc4c_return_code plc4c_s7_read_write_s7_message_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_message* message);
 
-uint16_t plc4c_s7_read_write_s7_message_length_in_bytes(plc4c_s7_read_write_s7_message* message);
+uint16_t plc4c_s7_read_write_s7_message_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_message* message);
 
-uint16_t plc4c_s7_read_write_s7_message_length_in_bits(plc4c_s7_read_write_s7_message* message);
+uint16_t plc4c_s7_read_write_s7_message_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_message* message);
 
 #endif  // PLC4C_S7_READ_WRITE_S7_MESSAGE_H_
diff --git a/plc4c/generated-sources/s7/include/s7_parameter.h b/plc4c/generated-sources/s7/include/s7_parameter.h
index 04a6ea10db..53819e6e0d 100644
--- a/plc4c/generated-sources/s7/include/s7_parameter.h
+++ b/plc4c/generated-sources/s7/include/s7_parameter.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -91,12 +92,12 @@ typedef struct plc4c_s7_read_write_s7_parameter plc4c_s7_read_write_s7_parameter
 // Create an empty NULL-struct
 plc4c_s7_read_write_s7_parameter plc4c_s7_read_write_s7_parameter_null();
 
-plc4c_return_code plc4c_s7_read_write_s7_parameter_parse(plc4c_spi_read_buffer* readBuffer, uint8_t messageType, plc4c_s7_read_write_s7_parameter** message);
+plc4c_return_code plc4c_s7_read_write_s7_parameter_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint8_t messageType, plc4c_s7_read_write_s7_parameter** message);
 
-plc4c_return_code plc4c_s7_read_write_s7_parameter_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_parameter* message);
+plc4c_return_code plc4c_s7_read_write_s7_parameter_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_parameter* message);
 
-uint16_t plc4c_s7_read_write_s7_parameter_length_in_bytes(plc4c_s7_read_write_s7_parameter* message);
+uint16_t plc4c_s7_read_write_s7_parameter_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_parameter* message);
 
-uint16_t plc4c_s7_read_write_s7_parameter_length_in_bits(plc4c_s7_read_write_s7_parameter* message);
+uint16_t plc4c_s7_read_write_s7_parameter_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_parameter* message);
 
 #endif  // PLC4C_S7_READ_WRITE_S7_PARAMETER_H_
diff --git a/plc4c/generated-sources/s7/include/s7_parameter_user_data_item.h b/plc4c/generated-sources/s7/include/s7_parameter_user_data_item.h
index 4739fb1626..f2800bda58 100644
--- a/plc4c/generated-sources/s7/include/s7_parameter_user_data_item.h
+++ b/plc4c/generated-sources/s7/include/s7_parameter_user_data_item.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -65,12 +66,12 @@ typedef struct plc4c_s7_read_write_s7_parameter_user_data_item plc4c_s7_read_wri
 // Create an empty NULL-struct
 plc4c_s7_read_write_s7_parameter_user_data_item plc4c_s7_read_write_s7_parameter_user_data_item_null();
 
-plc4c_return_code plc4c_s7_read_write_s7_parameter_user_data_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_parameter_user_data_item** message);
+plc4c_return_code plc4c_s7_read_write_s7_parameter_user_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_parameter_user_data_item** message);
 
-plc4c_return_code plc4c_s7_read_write_s7_parameter_user_data_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_parameter_user_data_item* message);
+plc4c_return_code plc4c_s7_read_write_s7_parameter_user_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_parameter_user_data_item* message);
 
-uint16_t plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bytes(plc4c_s7_read_write_s7_parameter_user_data_item* message);
+uint16_t plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_parameter_user_data_item* message);
 
-uint16_t plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bits(plc4c_s7_read_write_s7_parameter_user_data_item* message);
+uint16_t plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_parameter_user_data_item* message);
 
 #endif  // PLC4C_S7_READ_WRITE_S7_PARAMETER_USER_DATA_ITEM_H_
diff --git a/plc4c/generated-sources/s7/include/s7_payload.h b/plc4c/generated-sources/s7/include/s7_payload.h
index c2257ae95c..7d83809afc 100644
--- a/plc4c/generated-sources/s7/include/s7_payload.h
+++ b/plc4c/generated-sources/s7/include/s7_payload.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -75,12 +76,12 @@ typedef struct plc4c_s7_read_write_s7_payload plc4c_s7_read_write_s7_payload;
 // Create an empty NULL-struct
 plc4c_s7_read_write_s7_payload plc4c_s7_read_write_s7_payload_null();
 
-plc4c_return_code plc4c_s7_read_write_s7_payload_parse(plc4c_spi_read_buffer* readBuffer, uint8_t messageType, plc4c_s7_read_write_s7_parameter* parameter, plc4c_s7_read_write_s7_payload** message);
+plc4c_return_code plc4c_s7_read_write_s7_payload_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint8_t messageType, plc4c_s7_read_write_s7_parameter* parameter, plc4c_s7_read_write_s7_payload** message);
 
-plc4c_return_code plc4c_s7_read_write_s7_payload_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_payload* message);
+plc4c_return_code plc4c_s7_read_write_s7_payload_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_payload* message);
 
-uint16_t plc4c_s7_read_write_s7_payload_length_in_bytes(plc4c_s7_read_write_s7_payload* message);
+uint16_t plc4c_s7_read_write_s7_payload_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_payload* message);
 
-uint16_t plc4c_s7_read_write_s7_payload_length_in_bits(plc4c_s7_read_write_s7_payload* message);
+uint16_t plc4c_s7_read_write_s7_payload_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_payload* message);
 
 #endif  // PLC4C_S7_READ_WRITE_S7_PAYLOAD_H_
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 2b0089a260..b3e1862207 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
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -170,12 +171,12 @@ typedef struct plc4c_s7_read_write_s7_payload_user_data_item plc4c_s7_read_write
 // Create an empty NULL-struct
 plc4c_s7_read_write_s7_payload_user_data_item plc4c_s7_read_write_s7_payload_user_data_item_null();
 
-plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_parse(plc4c_spi_read_buffer* readBuffer, uint8_t cpuFunctionType, uint8_t cpuSubfunction, plc4c_s7_read_write_s7_payload_user_data_item** message);
+plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint8_t cpuFunctionType, uint8_t cpuSubfunction, plc4c_s7_read_write_s7_payload_user_data_item** message);
 
-plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_payload_user_data_item* message);
+plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_payload_user_data_item* message);
 
-uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bytes(plc4c_s7_read_write_s7_payload_user_data_item* message);
+uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_payload_user_data_item* message);
 
-uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_read_write_s7_payload_user_data_item* message);
+uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_payload_user_data_item* message);
 
 #endif  // PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_H_
diff --git a/plc4c/generated-sources/s7/include/s7_var_payload_data_item.h b/plc4c/generated-sources/s7/include/s7_var_payload_data_item.h
index 9e6f8f4fcc..5cfd0cb147 100644
--- a/plc4c/generated-sources/s7/include/s7_var_payload_data_item.h
+++ b/plc4c/generated-sources/s7/include/s7_var_payload_data_item.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -42,12 +43,12 @@ typedef struct plc4c_s7_read_write_s7_var_payload_data_item plc4c_s7_read_write_
 // Create an empty NULL-struct
 plc4c_s7_read_write_s7_var_payload_data_item plc4c_s7_read_write_s7_var_payload_data_item_null();
 
-plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_payload_data_item** message);
+plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_payload_data_item** message);
 
-plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_payload_data_item* message);
+plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_payload_data_item* message);
 
-uint16_t plc4c_s7_read_write_s7_var_payload_data_item_length_in_bytes(plc4c_s7_read_write_s7_var_payload_data_item* message);
+uint16_t plc4c_s7_read_write_s7_var_payload_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_payload_data_item* message);
 
-uint16_t plc4c_s7_read_write_s7_var_payload_data_item_length_in_bits(plc4c_s7_read_write_s7_var_payload_data_item* message);
+uint16_t plc4c_s7_read_write_s7_var_payload_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_payload_data_item* message);
 
 #endif  // PLC4C_S7_READ_WRITE_S7_VAR_PAYLOAD_DATA_ITEM_H_
diff --git a/plc4c/generated-sources/s7/include/s7_var_payload_status_item.h b/plc4c/generated-sources/s7/include/s7_var_payload_status_item.h
index de644c5a68..b18702b4ed 100644
--- a/plc4c/generated-sources/s7/include/s7_var_payload_status_item.h
+++ b/plc4c/generated-sources/s7/include/s7_var_payload_status_item.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -39,12 +40,12 @@ typedef struct plc4c_s7_read_write_s7_var_payload_status_item plc4c_s7_read_writ
 // Create an empty NULL-struct
 plc4c_s7_read_write_s7_var_payload_status_item plc4c_s7_read_write_s7_var_payload_status_item_null();
 
-plc4c_return_code plc4c_s7_read_write_s7_var_payload_status_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_payload_status_item** message);
+plc4c_return_code plc4c_s7_read_write_s7_var_payload_status_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_payload_status_item** message);
 
-plc4c_return_code plc4c_s7_read_write_s7_var_payload_status_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_payload_status_item* message);
+plc4c_return_code plc4c_s7_read_write_s7_var_payload_status_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_payload_status_item* message);
 
-uint16_t plc4c_s7_read_write_s7_var_payload_status_item_length_in_bytes(plc4c_s7_read_write_s7_var_payload_status_item* message);
+uint16_t plc4c_s7_read_write_s7_var_payload_status_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_payload_status_item* message);
 
-uint16_t plc4c_s7_read_write_s7_var_payload_status_item_length_in_bits(plc4c_s7_read_write_s7_var_payload_status_item* message);
+uint16_t plc4c_s7_read_write_s7_var_payload_status_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_payload_status_item* message);
 
 #endif  // PLC4C_S7_READ_WRITE_S7_VAR_PAYLOAD_STATUS_ITEM_H_
diff --git a/plc4c/generated-sources/s7/include/s7_var_request_parameter_item.h b/plc4c/generated-sources/s7/include/s7_var_request_parameter_item.h
index a1e2608f3d..af5c2e5c7f 100644
--- a/plc4c/generated-sources/s7/include/s7_var_request_parameter_item.h
+++ b/plc4c/generated-sources/s7/include/s7_var_request_parameter_item.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -59,12 +60,12 @@ typedef struct plc4c_s7_read_write_s7_var_request_parameter_item plc4c_s7_read_w
 // Create an empty NULL-struct
 plc4c_s7_read_write_s7_var_request_parameter_item plc4c_s7_read_write_s7_var_request_parameter_item_null();
 
-plc4c_return_code plc4c_s7_read_write_s7_var_request_parameter_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_request_parameter_item** message);
+plc4c_return_code plc4c_s7_read_write_s7_var_request_parameter_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_request_parameter_item** message);
 
-plc4c_return_code plc4c_s7_read_write_s7_var_request_parameter_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_request_parameter_item* message);
+plc4c_return_code plc4c_s7_read_write_s7_var_request_parameter_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_request_parameter_item* message);
 
-uint16_t plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bytes(plc4c_s7_read_write_s7_var_request_parameter_item* message);
+uint16_t plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_request_parameter_item* message);
 
-uint16_t plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bits(plc4c_s7_read_write_s7_var_request_parameter_item* message);
+uint16_t plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_request_parameter_item* message);
 
 #endif  // PLC4C_S7_READ_WRITE_S7_VAR_REQUEST_PARAMETER_ITEM_H_
diff --git a/plc4c/generated-sources/s7/include/state.h b/plc4c/generated-sources/s7/include/state.h
index 163da2876f..4b69c6625f 100644
--- a/plc4c/generated-sources/s7/include/state.h
+++ b/plc4c/generated-sources/s7/include/state.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -45,12 +46,12 @@ typedef struct plc4c_s7_read_write_state plc4c_s7_read_write_state;
 // Create an empty NULL-struct
 plc4c_s7_read_write_state plc4c_s7_read_write_state_null();
 
-plc4c_return_code plc4c_s7_read_write_state_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_state** message);
+plc4c_return_code plc4c_s7_read_write_state_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_state** message);
 
-plc4c_return_code plc4c_s7_read_write_state_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_state* message);
+plc4c_return_code plc4c_s7_read_write_state_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_state* message);
 
-uint16_t plc4c_s7_read_write_state_length_in_bytes(plc4c_s7_read_write_state* message);
+uint16_t plc4c_s7_read_write_state_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_state* message);
 
-uint16_t plc4c_s7_read_write_state_length_in_bits(plc4c_s7_read_write_state* message);
+uint16_t plc4c_s7_read_write_state_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_state* message);
 
 #endif  // PLC4C_S7_READ_WRITE_STATE_H_
diff --git a/plc4c/generated-sources/s7/include/syntax_id_type.h b/plc4c/generated-sources/s7/include/syntax_id_type.h
index f0a31fafee..4259b0ab06 100644
--- a/plc4c/generated-sources/s7/include/syntax_id_type.h
+++ b/plc4c/generated-sources/s7/include/syntax_id_type.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -48,9 +49,9 @@ typedef enum plc4c_s7_read_write_syntax_id_type plc4c_s7_read_write_syntax_id_ty
 // Get an empty NULL-struct
 plc4c_s7_read_write_syntax_id_type plc4c_s7_read_write_syntax_id_type_null();
 
-plc4c_return_code plc4c_s7_read_write_syntax_id_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_syntax_id_type* message);
+plc4c_return_code plc4c_s7_read_write_syntax_id_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_syntax_id_type* message);
 
-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 plc4c_s7_read_write_syntax_id_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_syntax_id_type* message);
 
 plc4c_s7_read_write_syntax_id_type plc4c_s7_read_write_syntax_id_type_for_value(uint8_t value);
 
@@ -60,9 +61,9 @@ int plc4c_s7_read_write_syntax_id_type_num_values();
 
 plc4c_s7_read_write_syntax_id_type plc4c_s7_read_write_syntax_id_type_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_syntax_id_type_length_in_bytes(plc4c_s7_read_write_syntax_id_type* message);
+uint16_t plc4c_s7_read_write_syntax_id_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_syntax_id_type* message);
 
-uint16_t plc4c_s7_read_write_syntax_id_type_length_in_bits(plc4c_s7_read_write_syntax_id_type* message);
+uint16_t plc4c_s7_read_write_syntax_id_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_syntax_id_type* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_SYNTAX_ID_TYPE_H_
diff --git a/plc4c/generated-sources/s7/include/szl_data_tree_item.h b/plc4c/generated-sources/s7/include/szl_data_tree_item.h
index ddb23e0e72..0418245203 100644
--- a/plc4c/generated-sources/s7/include/szl_data_tree_item.h
+++ b/plc4c/generated-sources/s7/include/szl_data_tree_item.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -42,12 +43,12 @@ typedef struct plc4c_s7_read_write_szl_data_tree_item plc4c_s7_read_write_szl_da
 // Create an empty NULL-struct
 plc4c_s7_read_write_szl_data_tree_item plc4c_s7_read_write_szl_data_tree_item_null();
 
-plc4c_return_code plc4c_s7_read_write_szl_data_tree_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_data_tree_item** message);
+plc4c_return_code plc4c_s7_read_write_szl_data_tree_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_data_tree_item** message);
 
-plc4c_return_code plc4c_s7_read_write_szl_data_tree_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_data_tree_item* message);
+plc4c_return_code plc4c_s7_read_write_szl_data_tree_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_data_tree_item* message);
 
-uint16_t plc4c_s7_read_write_szl_data_tree_item_length_in_bytes(plc4c_s7_read_write_szl_data_tree_item* message);
+uint16_t plc4c_s7_read_write_szl_data_tree_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_szl_data_tree_item* message);
 
-uint16_t plc4c_s7_read_write_szl_data_tree_item_length_in_bits(plc4c_s7_read_write_szl_data_tree_item* message);
+uint16_t plc4c_s7_read_write_szl_data_tree_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_szl_data_tree_item* message);
 
 #endif  // PLC4C_S7_READ_WRITE_SZL_DATA_TREE_ITEM_H_
diff --git a/plc4c/generated-sources/s7/include/szl_id.h b/plc4c/generated-sources/s7/include/szl_id.h
index 8b68a578ce..d6d559cf91 100644
--- a/plc4c/generated-sources/s7/include/szl_id.h
+++ b/plc4c/generated-sources/s7/include/szl_id.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -42,12 +43,12 @@ typedef struct plc4c_s7_read_write_szl_id plc4c_s7_read_write_szl_id;
 // Create an empty NULL-struct
 plc4c_s7_read_write_szl_id plc4c_s7_read_write_szl_id_null();
 
-plc4c_return_code plc4c_s7_read_write_szl_id_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_id** message);
+plc4c_return_code plc4c_s7_read_write_szl_id_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_id** message);
 
-plc4c_return_code plc4c_s7_read_write_szl_id_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_id* message);
+plc4c_return_code plc4c_s7_read_write_szl_id_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_id* message);
 
-uint16_t plc4c_s7_read_write_szl_id_length_in_bytes(plc4c_s7_read_write_szl_id* message);
+uint16_t plc4c_s7_read_write_szl_id_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_szl_id* message);
 
-uint16_t plc4c_s7_read_write_szl_id_length_in_bits(plc4c_s7_read_write_szl_id* message);
+uint16_t plc4c_s7_read_write_szl_id_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_szl_id* message);
 
 #endif  // PLC4C_S7_READ_WRITE_SZL_ID_H_
diff --git a/plc4c/generated-sources/s7/include/szl_module_type_class.h b/plc4c/generated-sources/s7/include/szl_module_type_class.h
index e516433c64..a8e014edfe 100644
--- a/plc4c/generated-sources/s7/include/szl_module_type_class.h
+++ b/plc4c/generated-sources/s7/include/szl_module_type_class.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -39,9 +40,9 @@ typedef enum plc4c_s7_read_write_szl_module_type_class plc4c_s7_read_write_szl_m
 // Get an empty NULL-struct
 plc4c_s7_read_write_szl_module_type_class plc4c_s7_read_write_szl_module_type_class_null();
 
-plc4c_return_code plc4c_s7_read_write_szl_module_type_class_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_module_type_class* message);
+plc4c_return_code plc4c_s7_read_write_szl_module_type_class_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_module_type_class* message);
 
-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 plc4c_s7_read_write_szl_module_type_class_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_module_type_class* message);
 
 plc4c_s7_read_write_szl_module_type_class plc4c_s7_read_write_szl_module_type_class_for_value(uint8_t value);
 
@@ -51,9 +52,9 @@ int plc4c_s7_read_write_szl_module_type_class_num_values();
 
 plc4c_s7_read_write_szl_module_type_class plc4c_s7_read_write_szl_module_type_class_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_szl_module_type_class_length_in_bytes(plc4c_s7_read_write_szl_module_type_class* message);
+uint16_t plc4c_s7_read_write_szl_module_type_class_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_szl_module_type_class* message);
 
-uint16_t plc4c_s7_read_write_szl_module_type_class_length_in_bits(plc4c_s7_read_write_szl_module_type_class* message);
+uint16_t plc4c_s7_read_write_szl_module_type_class_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_szl_module_type_class* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_SZL_MODULE_TYPE_CLASS_H_
diff --git a/plc4c/generated-sources/s7/include/szl_sublist.h b/plc4c/generated-sources/s7/include/szl_sublist.h
index 1518b6a978..7a9ca77b24 100644
--- a/plc4c/generated-sources/s7/include/szl_sublist.h
+++ b/plc4c/generated-sources/s7/include/szl_sublist.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -54,9 +55,9 @@ typedef enum plc4c_s7_read_write_szl_sublist plc4c_s7_read_write_szl_sublist;
 // Get an empty NULL-struct
 plc4c_s7_read_write_szl_sublist plc4c_s7_read_write_szl_sublist_null();
 
-plc4c_return_code plc4c_s7_read_write_szl_sublist_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_sublist* message);
+plc4c_return_code plc4c_s7_read_write_szl_sublist_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_sublist* message);
 
-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 plc4c_s7_read_write_szl_sublist_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_sublist* message);
 
 plc4c_s7_read_write_szl_sublist plc4c_s7_read_write_szl_sublist_for_value(uint8_t value);
 
@@ -66,9 +67,9 @@ int plc4c_s7_read_write_szl_sublist_num_values();
 
 plc4c_s7_read_write_szl_sublist plc4c_s7_read_write_szl_sublist_value_for_index(int index);
 
-uint16_t plc4c_s7_read_write_szl_sublist_length_in_bytes(plc4c_s7_read_write_szl_sublist* message);
+uint16_t plc4c_s7_read_write_szl_sublist_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_szl_sublist* message);
 
-uint16_t plc4c_s7_read_write_szl_sublist_length_in_bits(plc4c_s7_read_write_szl_sublist* message);
+uint16_t plc4c_s7_read_write_szl_sublist_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_szl_sublist* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_SZL_SUBLIST_H_
diff --git a/plc4c/generated-sources/s7/include/tpkt_packet.h b/plc4c/generated-sources/s7/include/tpkt_packet.h
index 6a20085d9a..eccb508d7a 100644
--- a/plc4c/generated-sources/s7/include/tpkt_packet.h
+++ b/plc4c/generated-sources/s7/include/tpkt_packet.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 #include <plc4c/utils/list.h>
@@ -43,12 +44,12 @@ typedef struct plc4c_s7_read_write_tpkt_packet plc4c_s7_read_write_tpkt_packet;
 // Create an empty NULL-struct
 plc4c_s7_read_write_tpkt_packet plc4c_s7_read_write_tpkt_packet_null();
 
-plc4c_return_code plc4c_s7_read_write_tpkt_packet_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_tpkt_packet** message);
+plc4c_return_code plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_tpkt_packet** message);
 
-plc4c_return_code plc4c_s7_read_write_tpkt_packet_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_tpkt_packet* message);
+plc4c_return_code plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_tpkt_packet* message);
 
-uint16_t plc4c_s7_read_write_tpkt_packet_length_in_bytes(plc4c_s7_read_write_tpkt_packet* message);
+uint16_t plc4c_s7_read_write_tpkt_packet_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_tpkt_packet* message);
 
-uint16_t plc4c_s7_read_write_tpkt_packet_length_in_bits(plc4c_s7_read_write_tpkt_packet* message);
+uint16_t plc4c_s7_read_write_tpkt_packet_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_tpkt_packet* message);
 
 #endif  // PLC4C_S7_READ_WRITE_TPKT_PACKET_H_
diff --git a/plc4c/generated-sources/s7/include/transport_size.h b/plc4c/generated-sources/s7/include/transport_size.h
index ee8030282a..636bdfe63c 100644
--- a/plc4c/generated-sources/s7/include/transport_size.h
+++ b/plc4c/generated-sources/s7/include/transport_size.h
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/read_buffer.h>
 #include <plc4c/spi/write_buffer.h>
 
@@ -62,9 +63,9 @@ typedef enum plc4c_s7_read_write_transport_size plc4c_s7_read_write_transport_si
 // Get an empty NULL-struct
 plc4c_s7_read_write_transport_size plc4c_s7_read_write_transport_size_null();
 
-plc4c_return_code plc4c_s7_read_write_transport_size_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_transport_size* message);
+plc4c_return_code plc4c_s7_read_write_transport_size_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_transport_size* message);
 
-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 plc4c_s7_read_write_transport_size_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_transport_size* message);
 
 plc4c_s7_read_write_transport_size plc4c_s7_read_write_transport_size_for_value(uint8_t value);
 
@@ -107,9 +108,9 @@ plc4c_s7_read_write_transport_size plc4c_s7_read_write_transport_size_get_first_
 plc4c_s7_read_write_transport_size plc4c_s7_read_write_transport_size_get_base_type(plc4c_s7_read_write_transport_size value);
 plc4c_s7_read_write_transport_size plc4c_s7_read_write_transport_size_get_first_enum_for_field_base_type(plc4c_s7_read_write_transport_size value);
 
-uint16_t plc4c_s7_read_write_transport_size_length_in_bytes(plc4c_s7_read_write_transport_size* message);
+uint16_t plc4c_s7_read_write_transport_size_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_transport_size* message);
 
-uint16_t plc4c_s7_read_write_transport_size_length_in_bits(plc4c_s7_read_write_transport_size* message);
+uint16_t plc4c_s7_read_write_transport_size_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_transport_size* message);
 
 
 #endif  // PLC4C_S7_READ_WRITE_TRANSPORT_SIZE_H_
diff --git a/plc4c/generated-sources/s7/src/alarm_message_ack_object_push_type.c b/plc4c/generated-sources/s7/src/alarm_message_ack_object_push_type.c
index a90da43e23..670e1aa0fc 100644
--- a/plc4c/generated-sources/s7/src/alarm_message_ack_object_push_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_message_ack_object_push_type.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -33,7 +34,7 @@ uint8_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_ACK_OBJECT_PUSH_TYPE_VARIABLE_SPEC() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_object_push_type** _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_object_push_type** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -64,7 +65,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_parse(p
 
   // Simple Field (syntaxId)
   plc4c_s7_read_write_syntax_id_type syntaxId;
-  _res = plc4c_s7_read_write_syntax_id_type_parse(readBuffer, (void*) &syntaxId);
+  _res = plc4c_s7_read_write_syntax_id_type_parse(ctx, readBuffer, (void*) &syntaxId);
   if(_res != OK) {
     return _res;
   }
@@ -88,7 +89,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_parse(p
 
   // Simple Field (ackStateGoing)
   plc4c_s7_read_write_state* ackStateGoing;
-  _res = plc4c_s7_read_write_state_parse(readBuffer, (void*) &ackStateGoing);
+  _res = plc4c_s7_read_write_state_parse(ctx, readBuffer, (void*) &ackStateGoing);
   if(_res != OK) {
     return _res;
   }
@@ -96,7 +97,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_parse(p
 
   // Simple Field (ackStateComing)
   plc4c_s7_read_write_state* ackStateComing;
-  _res = plc4c_s7_read_write_state_parse(readBuffer, (void*) &ackStateComing);
+  _res = plc4c_s7_read_write_state_parse(ctx, readBuffer, (void*) &ackStateComing);
   if(_res != OK) {
     return _res;
   }
@@ -105,7 +106,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_parse(p
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_object_push_type* _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_object_push_type* _message) {
   plc4c_return_code _res = OK;
 
   // Const Field (variableSpec)
@@ -118,7 +119,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_seriali
   }
 
   // Simple Field (syntaxId)
-  _res = plc4c_s7_read_write_syntax_id_type_serialize(writeBuffer, &_message->syntax_id);
+  _res = plc4c_s7_read_write_syntax_id_type_serialize(ctx, writeBuffer, &_message->syntax_id);
   if(_res != OK) {
     return _res;
   }
@@ -136,13 +137,13 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_seriali
   }
 
   // Simple Field (ackStateGoing)
-  _res = plc4c_s7_read_write_state_serialize(writeBuffer, _message->ack_state_going);
+  _res = plc4c_s7_read_write_state_serialize(ctx, writeBuffer, _message->ack_state_going);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (ackStateComing)
-  _res = plc4c_s7_read_write_state_serialize(writeBuffer, _message->ack_state_coming);
+  _res = plc4c_s7_read_write_state_serialize(ctx, writeBuffer, _message->ack_state_coming);
   if(_res != OK) {
     return _res;
   }
@@ -150,11 +151,11 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_object_push_type_seriali
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bytes(plc4c_s7_read_write_alarm_message_ack_object_push_type* _message) {
-  return plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_object_push_type* _message) {
+  return plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bits(plc4c_s7_read_write_alarm_message_ack_object_push_type* _message) {
+uint16_t plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_object_push_type* _message) {
   uint16_t lengthInBits = 0;
 
   // Const Field (variableSpec)
@@ -164,7 +165,7 @@ uint16_t plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bits(p
   lengthInBits += 8;
 
   // Simple field (syntaxId)
-  lengthInBits += plc4c_s7_read_write_syntax_id_type_length_in_bits(&_message->syntax_id);
+  lengthInBits += plc4c_s7_read_write_syntax_id_type_length_in_bits(ctx, &_message->syntax_id);
 
   // Simple field (numberOfValues)
   lengthInBits += 8;
@@ -173,10 +174,10 @@ uint16_t plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bits(p
   lengthInBits += 32;
 
   // Simple field (ackStateGoing)
-  lengthInBits += plc4c_s7_read_write_state_length_in_bits(_message->ack_state_going);
+  lengthInBits += plc4c_s7_read_write_state_length_in_bits(ctx, _message->ack_state_going);
 
   // Simple field (ackStateComing)
-  lengthInBits += plc4c_s7_read_write_state_length_in_bits(_message->ack_state_coming);
+  lengthInBits += plc4c_s7_read_write_state_length_in_bits(ctx, _message->ack_state_coming);
 
   return lengthInBits;
 }
diff --git a/plc4c/generated-sources/s7/src/alarm_message_ack_push_type.c b/plc4c/generated-sources/s7/src/alarm_message_ack_push_type.c
index 0a6e96f326..db88722415 100644
--- a/plc4c/generated-sources/s7/src/alarm_message_ack_push_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_message_ack_push_type.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_push_type** _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_push_type** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -39,7 +40,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_parse(plc4c_sp
 
   // Simple Field (TimeStamp)
   plc4c_s7_read_write_date_and_time* TimeStamp;
-  _res = plc4c_s7_read_write_date_and_time_parse(readBuffer, (void*) &TimeStamp);
+  _res = plc4c_s7_read_write_date_and_time_parse(ctx, readBuffer, (void*) &TimeStamp);
   if(_res != OK) {
     return _res;
   }
@@ -73,7 +74,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_parse(plc4c_sp
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_alarm_message_ack_object_push_type* _value = NULL;
-      _res = plc4c_s7_read_write_alarm_message_ack_object_push_type_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_alarm_message_ack_object_push_type_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -85,11 +86,11 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_parse(plc4c_sp
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_push_type* _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_push_type* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (TimeStamp)
-  _res = plc4c_s7_read_write_date_and_time_serialize(writeBuffer, _message->time_stamp);
+  _res = plc4c_s7_read_write_date_and_time_serialize(ctx, writeBuffer, _message->time_stamp);
   if(_res != OK) {
     return _res;
   }
@@ -112,7 +113,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_serialize(plc4
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_alarm_message_ack_object_push_type* _value = (plc4c_s7_read_write_alarm_message_ack_object_push_type*) plc4c_utils_list_get_value(_message->message_objects, curItem);
-      _res = plc4c_s7_read_write_alarm_message_ack_object_push_type_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_alarm_message_ack_object_push_type_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -122,15 +123,15 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_push_type_serialize(plc4
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bytes(plc4c_s7_read_write_alarm_message_ack_push_type* _message) {
-  return plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_push_type* _message) {
+  return plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bits(plc4c_s7_read_write_alarm_message_ack_push_type* _message) {
+uint16_t plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_push_type* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (TimeStamp)
-  lengthInBits += plc4c_s7_read_write_date_and_time_length_in_bits(_message->time_stamp);
+  lengthInBits += plc4c_s7_read_write_date_and_time_length_in_bits(ctx, _message->time_stamp);
 
   // Simple field (functionId)
   lengthInBits += 8;
@@ -142,7 +143,7 @@ uint16_t plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bits(plc4c_s7
   if(_message->message_objects != NULL) {
     plc4c_list_element* curElement = _message->message_objects->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bits((plc4c_s7_read_write_alarm_message_ack_object_push_type*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_alarm_message_ack_object_push_type_length_in_bits(ctx, (plc4c_s7_read_write_alarm_message_ack_object_push_type*) curElement->value);
       curElement = curElement->next;
     }
   }
diff --git a/plc4c/generated-sources/s7/src/alarm_message_ack_response_type.c b/plc4c/generated-sources/s7/src/alarm_message_ack_response_type.c
index 336cdf8d14..b7239cde39 100644
--- a/plc4c/generated-sources/s7/src/alarm_message_ack_response_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_message_ack_response_type.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_response_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_response_type** _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_response_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_response_type** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -77,7 +78,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_response_type_parse(plc4
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_response_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_response_type* _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_response_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_response_type* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (functionId)
@@ -105,11 +106,11 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_response_type_serialize(
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_response_type_length_in_bytes(plc4c_s7_read_write_alarm_message_ack_response_type* _message) {
-  return plc4c_s7_read_write_alarm_message_ack_response_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_alarm_message_ack_response_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_response_type* _message) {
+  return plc4c_s7_read_write_alarm_message_ack_response_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_response_type_length_in_bits(plc4c_s7_read_write_alarm_message_ack_response_type* _message) {
+uint16_t plc4c_s7_read_write_alarm_message_ack_response_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_response_type* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (functionId)
diff --git a/plc4c/generated-sources/s7/src/alarm_message_ack_type.c b/plc4c/generated-sources/s7/src/alarm_message_ack_type.c
index a58ad4d941..cf62bbe32b 100644
--- a/plc4c/generated-sources/s7/src/alarm_message_ack_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_message_ack_type.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_type** _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_ack_type** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -65,7 +66,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_parse(plc4c_spi_rea
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_alarm_message_object_ack_type* _value = NULL;
-      _res = plc4c_s7_read_write_alarm_message_object_ack_type_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_alarm_message_object_ack_type_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -77,7 +78,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_parse(plc4c_spi_rea
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_type* _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_ack_type* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (functionId)
@@ -98,7 +99,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_serialize(plc4c_spi
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_alarm_message_object_ack_type* _value = (plc4c_s7_read_write_alarm_message_object_ack_type*) plc4c_utils_list_get_value(_message->message_objects, curItem);
-      _res = plc4c_s7_read_write_alarm_message_object_ack_type_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_alarm_message_object_ack_type_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -108,11 +109,11 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_ack_type_serialize(plc4c_spi
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_type_length_in_bytes(plc4c_s7_read_write_alarm_message_ack_type* _message) {
-  return plc4c_s7_read_write_alarm_message_ack_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_alarm_message_ack_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_type* _message) {
+  return plc4c_s7_read_write_alarm_message_ack_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_ack_type_length_in_bits(plc4c_s7_read_write_alarm_message_ack_type* _message) {
+uint16_t plc4c_s7_read_write_alarm_message_ack_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_ack_type* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (functionId)
@@ -125,7 +126,7 @@ uint16_t plc4c_s7_read_write_alarm_message_ack_type_length_in_bits(plc4c_s7_read
   if(_message->message_objects != NULL) {
     plc4c_list_element* curElement = _message->message_objects->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits((plc4c_s7_read_write_alarm_message_object_ack_type*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits(ctx, (plc4c_s7_read_write_alarm_message_object_ack_type*) curElement->value);
       curElement = curElement->next;
     }
   }
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 65e54e8085..9f6728e733 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
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -37,7 +38,7 @@ uint8_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_LENGTH() {
 }
 
 // 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) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_object_ack_type** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -71,7 +72,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_parse(plc4c_
 
   // Simple Field (syntaxId)
   plc4c_s7_read_write_syntax_id_type syntaxId;
-  _res = plc4c_s7_read_write_syntax_id_type_parse(readBuffer, (void*) &syntaxId);
+  _res = plc4c_s7_read_write_syntax_id_type_parse(ctx, readBuffer, (void*) &syntaxId);
   if(_res != OK) {
     return _res;
   }
@@ -95,7 +96,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_parse(plc4c_
 
   // Simple Field (ackStateGoing)
   plc4c_s7_read_write_state* ackStateGoing;
-  _res = plc4c_s7_read_write_state_parse(readBuffer, (void*) &ackStateGoing);
+  _res = plc4c_s7_read_write_state_parse(ctx, readBuffer, (void*) &ackStateGoing);
   if(_res != OK) {
     return _res;
   }
@@ -103,7 +104,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_parse(plc4c_
 
   // Simple Field (ackStateComing)
   plc4c_s7_read_write_state* ackStateComing;
-  _res = plc4c_s7_read_write_state_parse(readBuffer, (void*) &ackStateComing);
+  _res = plc4c_s7_read_write_state_parse(ctx, readBuffer, (void*) &ackStateComing);
   if(_res != OK) {
     return _res;
   }
@@ -112,7 +113,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_parse(plc4c_
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_ack_type* _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_ack_type* _message) {
   plc4c_return_code _res = OK;
 
   // Const Field (variableSpec)
@@ -122,7 +123,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_serialize(pl
   plc4c_spi_write_unsigned_byte(writeBuffer, 8, PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_ACK_TYPE_LENGTH());
 
   // Simple Field (syntaxId)
-  _res = plc4c_s7_read_write_syntax_id_type_serialize(writeBuffer, &_message->syntax_id);
+  _res = plc4c_s7_read_write_syntax_id_type_serialize(ctx, writeBuffer, &_message->syntax_id);
   if(_res != OK) {
     return _res;
   }
@@ -140,13 +141,13 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_serialize(pl
   }
 
   // Simple Field (ackStateGoing)
-  _res = plc4c_s7_read_write_state_serialize(writeBuffer, _message->ack_state_going);
+  _res = plc4c_s7_read_write_state_serialize(ctx, writeBuffer, _message->ack_state_going);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (ackStateComing)
-  _res = plc4c_s7_read_write_state_serialize(writeBuffer, _message->ack_state_coming);
+  _res = plc4c_s7_read_write_state_serialize(ctx, writeBuffer, _message->ack_state_coming);
   if(_res != OK) {
     return _res;
   }
@@ -154,11 +155,11 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_ack_type_serialize(pl
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bytes(plc4c_s7_read_write_alarm_message_object_ack_type* _message) {
-  return plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_ack_type* _message) {
+  return plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits(plc4c_s7_read_write_alarm_message_object_ack_type* _message) {
+uint16_t plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_ack_type* _message) {
   uint16_t lengthInBits = 0;
 
   // Const Field (variableSpec)
@@ -168,7 +169,7 @@ uint16_t plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits(plc4c_
   lengthInBits += 8;
 
   // Simple field (syntaxId)
-  lengthInBits += plc4c_s7_read_write_syntax_id_type_length_in_bits(&_message->syntax_id);
+  lengthInBits += plc4c_s7_read_write_syntax_id_type_length_in_bits(ctx, &_message->syntax_id);
 
   // Simple field (numberOfValues)
   lengthInBits += 8;
@@ -177,10 +178,10 @@ uint16_t plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits(plc4c_
   lengthInBits += 32;
 
   // Simple field (ackStateGoing)
-  lengthInBits += plc4c_s7_read_write_state_length_in_bits(_message->ack_state_going);
+  lengthInBits += plc4c_s7_read_write_state_length_in_bits(ctx, _message->ack_state_going);
 
   // Simple field (ackStateComing)
-  lengthInBits += plc4c_s7_read_write_state_length_in_bits(_message->ack_state_coming);
+  lengthInBits += plc4c_s7_read_write_state_length_in_bits(ctx, _message->ack_state_coming);
 
   return lengthInBits;
 }
diff --git a/plc4c/generated-sources/s7/src/alarm_message_object_push_type.c b/plc4c/generated-sources/s7/src/alarm_message_object_push_type.c
index da6cc81d0a..2402cee4d1 100644
--- a/plc4c/generated-sources/s7/src/alarm_message_object_push_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_message_object_push_type.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -33,7 +34,7 @@ uint8_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_PUSH_TYPE_VARIABLE_SPEC() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_object_push_type** _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_object_push_type** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -64,7 +65,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_parse(plc4c
 
   // Simple Field (syntaxId)
   plc4c_s7_read_write_syntax_id_type syntaxId;
-  _res = plc4c_s7_read_write_syntax_id_type_parse(readBuffer, (void*) &syntaxId);
+  _res = plc4c_s7_read_write_syntax_id_type_parse(ctx, readBuffer, (void*) &syntaxId);
   if(_res != OK) {
     return _res;
   }
@@ -88,7 +89,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_parse(plc4c
 
   // Simple Field (eventState)
   plc4c_s7_read_write_state* eventState;
-  _res = plc4c_s7_read_write_state_parse(readBuffer, (void*) &eventState);
+  _res = plc4c_s7_read_write_state_parse(ctx, readBuffer, (void*) &eventState);
   if(_res != OK) {
     return _res;
   }
@@ -96,7 +97,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_parse(plc4c
 
   // Simple Field (localState)
   plc4c_s7_read_write_state* localState;
-  _res = plc4c_s7_read_write_state_parse(readBuffer, (void*) &localState);
+  _res = plc4c_s7_read_write_state_parse(ctx, readBuffer, (void*) &localState);
   if(_res != OK) {
     return _res;
   }
@@ -104,7 +105,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_parse(plc4c
 
   // Simple Field (ackStateGoing)
   plc4c_s7_read_write_state* ackStateGoing;
-  _res = plc4c_s7_read_write_state_parse(readBuffer, (void*) &ackStateGoing);
+  _res = plc4c_s7_read_write_state_parse(ctx, readBuffer, (void*) &ackStateGoing);
   if(_res != OK) {
     return _res;
   }
@@ -112,7 +113,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_parse(plc4c
 
   // Simple Field (ackStateComing)
   plc4c_s7_read_write_state* ackStateComing;
-  _res = plc4c_s7_read_write_state_parse(readBuffer, (void*) &ackStateComing);
+  _res = plc4c_s7_read_write_state_parse(ctx, readBuffer, (void*) &ackStateComing);
   if(_res != OK) {
     return _res;
   }
@@ -130,7 +131,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_parse(plc4c
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_associated_value_type* _value = NULL;
-      _res = plc4c_s7_read_write_associated_value_type_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_associated_value_type_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -142,7 +143,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_parse(plc4c
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_push_type* _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_push_type* _message) {
   plc4c_return_code _res = OK;
 
   // Const Field (variableSpec)
@@ -155,7 +156,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_serialize(p
   }
 
   // Simple Field (syntaxId)
-  _res = plc4c_s7_read_write_syntax_id_type_serialize(writeBuffer, &_message->syntax_id);
+  _res = plc4c_s7_read_write_syntax_id_type_serialize(ctx, writeBuffer, &_message->syntax_id);
   if(_res != OK) {
     return _res;
   }
@@ -173,25 +174,25 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_serialize(p
   }
 
   // Simple Field (eventState)
-  _res = plc4c_s7_read_write_state_serialize(writeBuffer, _message->event_state);
+  _res = plc4c_s7_read_write_state_serialize(ctx, writeBuffer, _message->event_state);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (localState)
-  _res = plc4c_s7_read_write_state_serialize(writeBuffer, _message->local_state);
+  _res = plc4c_s7_read_write_state_serialize(ctx, writeBuffer, _message->local_state);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (ackStateGoing)
-  _res = plc4c_s7_read_write_state_serialize(writeBuffer, _message->ack_state_going);
+  _res = plc4c_s7_read_write_state_serialize(ctx, writeBuffer, _message->ack_state_going);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (ackStateComing)
-  _res = plc4c_s7_read_write_state_serialize(writeBuffer, _message->ack_state_coming);
+  _res = plc4c_s7_read_write_state_serialize(ctx, writeBuffer, _message->ack_state_coming);
   if(_res != OK) {
     return _res;
   }
@@ -202,7 +203,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_serialize(p
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_associated_value_type* _value = (plc4c_s7_read_write_associated_value_type*) plc4c_utils_list_get_value(_message->associated_values, curItem);
-      _res = plc4c_s7_read_write_associated_value_type_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_associated_value_type_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -212,11 +213,11 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_push_type_serialize(p
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_object_push_type_length_in_bytes(plc4c_s7_read_write_alarm_message_object_push_type* _message) {
-  return plc4c_s7_read_write_alarm_message_object_push_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_alarm_message_object_push_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_push_type* _message) {
+  return plc4c_s7_read_write_alarm_message_object_push_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_object_push_type_length_in_bits(plc4c_s7_read_write_alarm_message_object_push_type* _message) {
+uint16_t plc4c_s7_read_write_alarm_message_object_push_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_push_type* _message) {
   uint16_t lengthInBits = 0;
 
   // Const Field (variableSpec)
@@ -226,7 +227,7 @@ uint16_t plc4c_s7_read_write_alarm_message_object_push_type_length_in_bits(plc4c
   lengthInBits += 8;
 
   // Simple field (syntaxId)
-  lengthInBits += plc4c_s7_read_write_syntax_id_type_length_in_bits(&_message->syntax_id);
+  lengthInBits += plc4c_s7_read_write_syntax_id_type_length_in_bits(ctx, &_message->syntax_id);
 
   // Simple field (numberOfValues)
   lengthInBits += 8;
@@ -235,22 +236,22 @@ uint16_t plc4c_s7_read_write_alarm_message_object_push_type_length_in_bits(plc4c
   lengthInBits += 32;
 
   // Simple field (eventState)
-  lengthInBits += plc4c_s7_read_write_state_length_in_bits(_message->event_state);
+  lengthInBits += plc4c_s7_read_write_state_length_in_bits(ctx, _message->event_state);
 
   // Simple field (localState)
-  lengthInBits += plc4c_s7_read_write_state_length_in_bits(_message->local_state);
+  lengthInBits += plc4c_s7_read_write_state_length_in_bits(ctx, _message->local_state);
 
   // Simple field (ackStateGoing)
-  lengthInBits += plc4c_s7_read_write_state_length_in_bits(_message->ack_state_going);
+  lengthInBits += plc4c_s7_read_write_state_length_in_bits(ctx, _message->ack_state_going);
 
   // Simple field (ackStateComing)
-  lengthInBits += plc4c_s7_read_write_state_length_in_bits(_message->ack_state_coming);
+  lengthInBits += plc4c_s7_read_write_state_length_in_bits(ctx, _message->ack_state_coming);
 
   // Array field
   if(_message->associated_values != NULL) {
     plc4c_list_element* curElement = _message->associated_values->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_associated_value_type_length_in_bits((plc4c_s7_read_write_associated_value_type*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_associated_value_type_length_in_bits(ctx, (plc4c_s7_read_write_associated_value_type*) curElement->value);
       curElement = curElement->next;
     }
   }
diff --git a/plc4c/generated-sources/s7/src/alarm_message_object_query_type.c b/plc4c/generated-sources/s7/src/alarm_message_object_query_type.c
index eaef734e5f..9637c9bf44 100644
--- a/plc4c/generated-sources/s7/src/alarm_message_object_query_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_message_object_query_type.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -33,7 +34,7 @@ uint8_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_QUERY_TYPE_VARIABLE_SPEC() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_object_query_type** _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_object_query_type** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -76,7 +77,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4
 
   // Simple Field (eventState)
   plc4c_s7_read_write_state* eventState;
-  _res = plc4c_s7_read_write_state_parse(readBuffer, (void*) &eventState);
+  _res = plc4c_s7_read_write_state_parse(ctx, readBuffer, (void*) &eventState);
   if(_res != OK) {
     return _res;
   }
@@ -84,7 +85,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4
 
   // Simple Field (ackStateGoing)
   plc4c_s7_read_write_state* ackStateGoing;
-  _res = plc4c_s7_read_write_state_parse(readBuffer, (void*) &ackStateGoing);
+  _res = plc4c_s7_read_write_state_parse(ctx, readBuffer, (void*) &ackStateGoing);
   if(_res != OK) {
     return _res;
   }
@@ -92,7 +93,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4
 
   // Simple Field (ackStateComing)
   plc4c_s7_read_write_state* ackStateComing;
-  _res = plc4c_s7_read_write_state_parse(readBuffer, (void*) &ackStateComing);
+  _res = plc4c_s7_read_write_state_parse(ctx, readBuffer, (void*) &ackStateComing);
   if(_res != OK) {
     return _res;
   }
@@ -100,7 +101,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4
 
   // Simple Field (timeComing)
   plc4c_s7_read_write_date_and_time* timeComing;
-  _res = plc4c_s7_read_write_date_and_time_parse(readBuffer, (void*) &timeComing);
+  _res = plc4c_s7_read_write_date_and_time_parse(ctx, readBuffer, (void*) &timeComing);
   if(_res != OK) {
     return _res;
   }
@@ -108,7 +109,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4
 
   // Simple Field (valueComing)
   plc4c_s7_read_write_associated_value_type* valueComing;
-  _res = plc4c_s7_read_write_associated_value_type_parse(readBuffer, (void*) &valueComing);
+  _res = plc4c_s7_read_write_associated_value_type_parse(ctx, readBuffer, (void*) &valueComing);
   if(_res != OK) {
     return _res;
   }
@@ -116,7 +117,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4
 
   // Simple Field (timeGoing)
   plc4c_s7_read_write_date_and_time* timeGoing;
-  _res = plc4c_s7_read_write_date_and_time_parse(readBuffer, (void*) &timeGoing);
+  _res = plc4c_s7_read_write_date_and_time_parse(ctx, readBuffer, (void*) &timeGoing);
   if(_res != OK) {
     return _res;
   }
@@ -124,7 +125,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4
 
   // Simple Field (valueGoing)
   plc4c_s7_read_write_associated_value_type* valueGoing;
-  _res = plc4c_s7_read_write_associated_value_type_parse(readBuffer, (void*) &valueGoing);
+  _res = plc4c_s7_read_write_associated_value_type_parse(ctx, readBuffer, (void*) &valueGoing);
   if(_res != OK) {
     return _res;
   }
@@ -133,7 +134,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_parse(plc4
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_query_type* _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_object_query_type* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (lengthDataset)
@@ -152,43 +153,43 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_serialize(
   plc4c_spi_write_unsigned_byte(writeBuffer, 8, PLC4C_S7_READ_WRITE_ALARM_MESSAGE_OBJECT_QUERY_TYPE_VARIABLE_SPEC());
 
   // Simple Field (eventState)
-  _res = plc4c_s7_read_write_state_serialize(writeBuffer, _message->event_state);
+  _res = plc4c_s7_read_write_state_serialize(ctx, writeBuffer, _message->event_state);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (ackStateGoing)
-  _res = plc4c_s7_read_write_state_serialize(writeBuffer, _message->ack_state_going);
+  _res = plc4c_s7_read_write_state_serialize(ctx, writeBuffer, _message->ack_state_going);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (ackStateComing)
-  _res = plc4c_s7_read_write_state_serialize(writeBuffer, _message->ack_state_coming);
+  _res = plc4c_s7_read_write_state_serialize(ctx, writeBuffer, _message->ack_state_coming);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (timeComing)
-  _res = plc4c_s7_read_write_date_and_time_serialize(writeBuffer, _message->time_coming);
+  _res = plc4c_s7_read_write_date_and_time_serialize(ctx, writeBuffer, _message->time_coming);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (valueComing)
-  _res = plc4c_s7_read_write_associated_value_type_serialize(writeBuffer, _message->value_coming);
+  _res = plc4c_s7_read_write_associated_value_type_serialize(ctx, writeBuffer, _message->value_coming);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (timeGoing)
-  _res = plc4c_s7_read_write_date_and_time_serialize(writeBuffer, _message->time_going);
+  _res = plc4c_s7_read_write_date_and_time_serialize(ctx, writeBuffer, _message->time_going);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (valueGoing)
-  _res = plc4c_s7_read_write_associated_value_type_serialize(writeBuffer, _message->value_going);
+  _res = plc4c_s7_read_write_associated_value_type_serialize(ctx, writeBuffer, _message->value_going);
   if(_res != OK) {
     return _res;
   }
@@ -196,11 +197,11 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_object_query_type_serialize(
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_object_query_type_length_in_bytes(plc4c_s7_read_write_alarm_message_object_query_type* _message) {
-  return plc4c_s7_read_write_alarm_message_object_query_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_alarm_message_object_query_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_query_type* _message) {
+  return plc4c_s7_read_write_alarm_message_object_query_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_object_query_type_length_in_bits(plc4c_s7_read_write_alarm_message_object_query_type* _message) {
+uint16_t plc4c_s7_read_write_alarm_message_object_query_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_object_query_type* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (lengthDataset)
@@ -213,25 +214,25 @@ uint16_t plc4c_s7_read_write_alarm_message_object_query_type_length_in_bits(plc4
   lengthInBits += 8;
 
   // Simple field (eventState)
-  lengthInBits += plc4c_s7_read_write_state_length_in_bits(_message->event_state);
+  lengthInBits += plc4c_s7_read_write_state_length_in_bits(ctx, _message->event_state);
 
   // Simple field (ackStateGoing)
-  lengthInBits += plc4c_s7_read_write_state_length_in_bits(_message->ack_state_going);
+  lengthInBits += plc4c_s7_read_write_state_length_in_bits(ctx, _message->ack_state_going);
 
   // Simple field (ackStateComing)
-  lengthInBits += plc4c_s7_read_write_state_length_in_bits(_message->ack_state_coming);
+  lengthInBits += plc4c_s7_read_write_state_length_in_bits(ctx, _message->ack_state_coming);
 
   // Simple field (timeComing)
-  lengthInBits += plc4c_s7_read_write_date_and_time_length_in_bits(_message->time_coming);
+  lengthInBits += plc4c_s7_read_write_date_and_time_length_in_bits(ctx, _message->time_coming);
 
   // Simple field (valueComing)
-  lengthInBits += plc4c_s7_read_write_associated_value_type_length_in_bits(_message->value_coming);
+  lengthInBits += plc4c_s7_read_write_associated_value_type_length_in_bits(ctx, _message->value_coming);
 
   // Simple field (timeGoing)
-  lengthInBits += plc4c_s7_read_write_date_and_time_length_in_bits(_message->time_going);
+  lengthInBits += plc4c_s7_read_write_date_and_time_length_in_bits(ctx, _message->time_going);
 
   // Simple field (valueGoing)
-  lengthInBits += plc4c_s7_read_write_associated_value_type_length_in_bits(_message->value_going);
+  lengthInBits += plc4c_s7_read_write_associated_value_type_length_in_bits(ctx, _message->value_going);
 
   return lengthInBits;
 }
diff --git a/plc4c/generated-sources/s7/src/alarm_message_push_type.c b/plc4c/generated-sources/s7/src/alarm_message_push_type.c
index 865d825546..2c48105a3a 100644
--- a/plc4c/generated-sources/s7/src/alarm_message_push_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_message_push_type.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_push_type** _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_push_type** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -39,7 +40,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_parse(plc4c_spi_re
 
   // Simple Field (TimeStamp)
   plc4c_s7_read_write_date_and_time* TimeStamp;
-  _res = plc4c_s7_read_write_date_and_time_parse(readBuffer, (void*) &TimeStamp);
+  _res = plc4c_s7_read_write_date_and_time_parse(ctx, readBuffer, (void*) &TimeStamp);
   if(_res != OK) {
     return _res;
   }
@@ -73,7 +74,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_parse(plc4c_spi_re
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_alarm_message_object_push_type* _value = NULL;
-      _res = plc4c_s7_read_write_alarm_message_object_push_type_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_alarm_message_object_push_type_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -85,11 +86,11 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_parse(plc4c_spi_re
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_push_type* _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_push_type* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (TimeStamp)
-  _res = plc4c_s7_read_write_date_and_time_serialize(writeBuffer, _message->time_stamp);
+  _res = plc4c_s7_read_write_date_and_time_serialize(ctx, writeBuffer, _message->time_stamp);
   if(_res != OK) {
     return _res;
   }
@@ -112,7 +113,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_serialize(plc4c_sp
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_alarm_message_object_push_type* _value = (plc4c_s7_read_write_alarm_message_object_push_type*) plc4c_utils_list_get_value(_message->message_objects, curItem);
-      _res = plc4c_s7_read_write_alarm_message_object_push_type_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_alarm_message_object_push_type_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -122,15 +123,15 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_push_type_serialize(plc4c_sp
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_push_type_length_in_bytes(plc4c_s7_read_write_alarm_message_push_type* _message) {
-  return plc4c_s7_read_write_alarm_message_push_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_alarm_message_push_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_push_type* _message) {
+  return plc4c_s7_read_write_alarm_message_push_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_push_type_length_in_bits(plc4c_s7_read_write_alarm_message_push_type* _message) {
+uint16_t plc4c_s7_read_write_alarm_message_push_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_push_type* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (TimeStamp)
-  lengthInBits += plc4c_s7_read_write_date_and_time_length_in_bits(_message->time_stamp);
+  lengthInBits += plc4c_s7_read_write_date_and_time_length_in_bits(ctx, _message->time_stamp);
 
   // Simple field (functionId)
   lengthInBits += 8;
@@ -142,7 +143,7 @@ uint16_t plc4c_s7_read_write_alarm_message_push_type_length_in_bits(plc4c_s7_rea
   if(_message->message_objects != NULL) {
     plc4c_list_element* curElement = _message->message_objects->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_alarm_message_object_push_type_length_in_bits((plc4c_s7_read_write_alarm_message_object_push_type*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_alarm_message_object_push_type_length_in_bits(ctx, (plc4c_s7_read_write_alarm_message_object_push_type*) curElement->value);
       curElement = curElement->next;
     }
   }
diff --git a/plc4c/generated-sources/s7/src/alarm_message_query_type.c b/plc4c/generated-sources/s7/src/alarm_message_query_type.c
index ce9023e1c5..9f889e618d 100644
--- a/plc4c/generated-sources/s7/src/alarm_message_query_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_message_query_type.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -33,7 +34,7 @@ uint16_t PLC4C_S7_READ_WRITE_ALARM_MESSAGE_QUERY_TYPE_DATA_LENGTH() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_query_type** _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_message_query_type** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -61,7 +62,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_parse(plc4c_spi_r
 
   // Simple Field (returnCode)
   plc4c_s7_read_write_data_transport_error_code returnCode;
-  _res = plc4c_s7_read_write_data_transport_error_code_parse(readBuffer, (void*) &returnCode);
+  _res = plc4c_s7_read_write_data_transport_error_code_parse(ctx, readBuffer, (void*) &returnCode);
   if(_res != OK) {
     return _res;
   }
@@ -69,7 +70,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_parse(plc4c_spi_r
 
   // Simple Field (transportSize)
   plc4c_s7_read_write_data_transport_size transportSize;
-  _res = plc4c_s7_read_write_data_transport_size_parse(readBuffer, (void*) &transportSize);
+  _res = plc4c_s7_read_write_data_transport_size_parse(ctx, readBuffer, (void*) &transportSize);
   if(_res != OK) {
     return _res;
   }
@@ -98,7 +99,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_parse(plc4c_spi_r
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_alarm_message_object_query_type* _value = NULL;
-      _res = plc4c_s7_read_write_alarm_message_object_query_type_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_alarm_message_object_query_type_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -110,7 +111,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_parse(plc4c_spi_r
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_query_type* _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_alarm_message_query_type* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (functionId)
@@ -126,13 +127,13 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_serialize(plc4c_s
   }
 
   // Simple Field (returnCode)
-  _res = plc4c_s7_read_write_data_transport_error_code_serialize(writeBuffer, &_message->return_code);
+  _res = plc4c_s7_read_write_data_transport_error_code_serialize(ctx, writeBuffer, &_message->return_code);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (transportSize)
-  _res = plc4c_s7_read_write_data_transport_size_serialize(writeBuffer, &_message->transport_size);
+  _res = plc4c_s7_read_write_data_transport_size_serialize(ctx, writeBuffer, &_message->transport_size);
   if(_res != OK) {
     return _res;
   }
@@ -146,7 +147,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_serialize(plc4c_s
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_alarm_message_object_query_type* _value = (plc4c_s7_read_write_alarm_message_object_query_type*) plc4c_utils_list_get_value(_message->message_objects, curItem);
-      _res = plc4c_s7_read_write_alarm_message_object_query_type_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_alarm_message_object_query_type_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -156,11 +157,11 @@ plc4c_return_code plc4c_s7_read_write_alarm_message_query_type_serialize(plc4c_s
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_query_type_length_in_bytes(plc4c_s7_read_write_alarm_message_query_type* _message) {
-  return plc4c_s7_read_write_alarm_message_query_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_alarm_message_query_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_query_type* _message) {
+  return plc4c_s7_read_write_alarm_message_query_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_alarm_message_query_type_length_in_bits(plc4c_s7_read_write_alarm_message_query_type* _message) {
+uint16_t plc4c_s7_read_write_alarm_message_query_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_message_query_type* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (functionId)
@@ -170,10 +171,10 @@ uint16_t plc4c_s7_read_write_alarm_message_query_type_length_in_bits(plc4c_s7_re
   lengthInBits += 8;
 
   // Simple field (returnCode)
-  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(&_message->return_code);
+  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(ctx, &_message->return_code);
 
   // Simple field (transportSize)
-  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(&_message->transport_size);
+  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(ctx, &_message->transport_size);
 
   // Const Field (DataLength)
   lengthInBits += 16;
@@ -182,7 +183,7 @@ uint16_t plc4c_s7_read_write_alarm_message_query_type_length_in_bits(plc4c_s7_re
   if(_message->message_objects != NULL) {
     plc4c_list_element* curElement = _message->message_objects->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_alarm_message_object_query_type_length_in_bits((plc4c_s7_read_write_alarm_message_object_query_type*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_alarm_message_object_query_type_length_in_bits(ctx, (plc4c_s7_read_write_alarm_message_object_query_type*) curElement->value);
       curElement = curElement->next;
     }
   }
diff --git a/plc4c/generated-sources/s7/src/alarm_state_type.c b/plc4c/generated-sources/s7/src/alarm_state_type.c
index 7cbe023f21..39b84f4513 100644
--- a/plc4c/generated-sources/s7/src/alarm_state_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_state_type.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_alarm_state_type plc4c_s7_read_write_alarm_state_type_null()
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_alarm_state_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_state_type* _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_state_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_state_type* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_state_type_parse(plc4c_spi_read_buff
     return _res;
 }
 
-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 plc4c_s7_read_write_alarm_state_type_serialize(plc4x_spi_context ctx, 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);
@@ -112,10 +112,10 @@ plc4c_s7_read_write_alarm_state_type plc4c_s7_read_write_alarm_state_type_value_
     }
 }
 
-uint16_t plc4c_s7_read_write_alarm_state_type_length_in_bytes(plc4c_s7_read_write_alarm_state_type* _message) {
-    return plc4c_s7_read_write_alarm_state_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_alarm_state_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_state_type* _message) {
+    return plc4c_s7_read_write_alarm_state_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_alarm_state_type_length_in_bits(plc4c_s7_read_write_alarm_state_type* _message) {
+uint16_t plc4c_s7_read_write_alarm_state_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_state_type* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/alarm_type.c b/plc4c/generated-sources/s7/src/alarm_type.c
index 69dca481ff..2a17cf5470 100644
--- a/plc4c/generated-sources/s7/src/alarm_type.c
+++ b/plc4c/generated-sources/s7/src/alarm_type.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_alarm_type plc4c_s7_read_write_alarm_type_null() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_alarm_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_type* _message) {
+plc4c_return_code plc4c_s7_read_write_alarm_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_alarm_type* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_alarm_type_parse(plc4c_spi_read_buffer* re
     return _res;
 }
 
-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 plc4c_s7_read_write_alarm_type_serialize(plc4x_spi_context ctx, 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);
@@ -94,10 +94,10 @@ plc4c_s7_read_write_alarm_type plc4c_s7_read_write_alarm_type_value_for_index(in
     }
 }
 
-uint16_t plc4c_s7_read_write_alarm_type_length_in_bytes(plc4c_s7_read_write_alarm_type* _message) {
-    return plc4c_s7_read_write_alarm_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_alarm_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_type* _message) {
+    return plc4c_s7_read_write_alarm_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_alarm_type_length_in_bits(plc4c_s7_read_write_alarm_type* _message) {
+uint16_t plc4c_s7_read_write_alarm_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_alarm_type* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/associated_value_type.c b/plc4c/generated-sources/s7/src/associated_value_type.c
index 82eb78a6c7..bc69a3cd55 100644
--- a/plc4c/generated-sources/s7/src/associated_value_type.c
+++ b/plc4c/generated-sources/s7/src/associated_value_type.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_associated_value_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_associated_value_type** _message) {
+plc4c_return_code plc4c_s7_read_write_associated_value_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_associated_value_type** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -39,7 +40,7 @@ plc4c_return_code plc4c_s7_read_write_associated_value_type_parse(plc4c_spi_read
 
   // Simple Field (returnCode)
   plc4c_s7_read_write_data_transport_error_code returnCode;
-  _res = plc4c_s7_read_write_data_transport_error_code_parse(readBuffer, (void*) &returnCode);
+  _res = plc4c_s7_read_write_data_transport_error_code_parse(ctx, readBuffer, (void*) &returnCode);
   if(_res != OK) {
     return _res;
   }
@@ -47,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_associated_value_type_parse(plc4c_spi_read
 
   // Simple Field (transportSize)
   plc4c_s7_read_write_data_transport_size transportSize;
-  _res = plc4c_s7_read_write_data_transport_size_parse(readBuffer, (void*) &transportSize);
+  _res = plc4c_s7_read_write_data_transport_size_parse(ctx, readBuffer, (void*) &transportSize);
   if(_res != OK) {
     return _res;
   }
@@ -81,17 +82,17 @@ plc4c_return_code plc4c_s7_read_write_associated_value_type_parse(plc4c_spi_read
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_associated_value_type_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_associated_value_type* _message) {
+plc4c_return_code plc4c_s7_read_write_associated_value_type_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_associated_value_type* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (returnCode)
-  _res = plc4c_s7_read_write_data_transport_error_code_serialize(writeBuffer, &_message->return_code);
+  _res = plc4c_s7_read_write_data_transport_error_code_serialize(ctx, writeBuffer, &_message->return_code);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (transportSize)
-  _res = plc4c_s7_read_write_data_transport_size_serialize(writeBuffer, &_message->transport_size);
+  _res = plc4c_s7_read_write_data_transport_size_serialize(ctx, writeBuffer, &_message->transport_size);
   if(_res != OK) {
     return _res;
   }
@@ -115,18 +116,18 @@ plc4c_return_code plc4c_s7_read_write_associated_value_type_serialize(plc4c_spi_
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_associated_value_type_length_in_bytes(plc4c_s7_read_write_associated_value_type* _message) {
-  return plc4c_s7_read_write_associated_value_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_associated_value_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_associated_value_type* _message) {
+  return plc4c_s7_read_write_associated_value_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_associated_value_type_length_in_bits(plc4c_s7_read_write_associated_value_type* _message) {
+uint16_t plc4c_s7_read_write_associated_value_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_associated_value_type* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (returnCode)
-  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(&_message->return_code);
+  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(ctx, &_message->return_code);
 
   // Simple field (transportSize)
-  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(&_message->transport_size);
+  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(ctx, &_message->transport_size);
 
   // Manual Field (valueLength)
   lengthInBits += 16;
diff --git a/plc4c/generated-sources/s7/src/cotp_packet.c b/plc4c/generated-sources/s7/src/cotp_packet.c
index a14e421526..f4beea82df 100644
--- a/plc4c/generated-sources/s7/src/cotp_packet.c
+++ b/plc4c/generated-sources/s7/src/cotp_packet.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -58,7 +59,7 @@ plc4c_s7_read_write_cotp_packet plc4c_s7_read_write_cotp_packet_null() {
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_cotp_packet_parse(plc4c_spi_read_buffer* readBuffer, uint16_t cotpLen, plc4c_s7_read_write_cotp_packet** _message) {
+plc4c_return_code plc4c_s7_read_write_cotp_packet_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint16_t cotpLen, plc4c_s7_read_write_cotp_packet** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -127,7 +128,7 @@ if( tpduCode == 0xE0 ) { /* COTPPacketConnectionRequest */
 
   // Simple Field (protocolClass)
   plc4c_s7_read_write_cotp_protocol_class protocolClass;
-  _res = plc4c_s7_read_write_cotp_protocol_class_parse(readBuffer, (void*) &protocolClass);
+  _res = plc4c_s7_read_write_cotp_protocol_class_parse(ctx, readBuffer, (void*) &protocolClass);
   if(_res != OK) {
     return _res;
   }
@@ -156,7 +157,7 @@ if( tpduCode == 0xD0 ) { /* COTPPacketConnectionResponse */
 
   // Simple Field (protocolClass)
   plc4c_s7_read_write_cotp_protocol_class protocolClass;
-  _res = plc4c_s7_read_write_cotp_protocol_class_parse(readBuffer, (void*) &protocolClass);
+  _res = plc4c_s7_read_write_cotp_protocol_class_parse(ctx, readBuffer, (void*) &protocolClass);
   if(_res != OK) {
     return _res;
   }
@@ -185,7 +186,7 @@ if( tpduCode == 0x80 ) { /* COTPPacketDisconnectRequest */
 
   // Simple Field (protocolClass)
   plc4c_s7_read_write_cotp_protocol_class protocolClass;
-  _res = plc4c_s7_read_write_cotp_protocol_class_parse(readBuffer, (void*) &protocolClass);
+  _res = plc4c_s7_read_write_cotp_protocol_class_parse(ctx, readBuffer, (void*) &protocolClass);
   if(_res != OK) {
     return _res;
   }
@@ -244,7 +245,7 @@ if( tpduCode == 0x70 ) { /* COTPPacketTpduError */
     uint8_t parametersEndPos = plc4c_spi_read_get_pos(readBuffer) + _parametersLength;
     while(plc4c_spi_read_get_pos(readBuffer) < parametersEndPos) {
       plc4c_s7_read_write_cotp_parameter* _value = NULL;
-      _res = plc4c_s7_read_write_cotp_parameter_parse(readBuffer, (((headerLength) + (1))) - ((plc4c_spi_read_get_pos(readBuffer) - startPos)), (void*) &_value);
+      _res = plc4c_s7_read_write_cotp_parameter_parse(ctx, readBuffer, (((headerLength) + (1))) - ((plc4c_spi_read_get_pos(readBuffer) - startPos)), (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -256,7 +257,7 @@ if( tpduCode == 0x70 ) { /* COTPPacketTpduError */
   // Optional Field (payload) (Can be skipped, if a given expression evaluates to false)
   plc4c_s7_read_write_s7_message* payload = NULL;
   if(((plc4c_spi_read_get_pos(readBuffer) - startPos)) < (cotpLen)) {
-    _res = plc4c_s7_read_write_s7_message_parse(readBuffer, &payload);
+    _res = plc4c_s7_read_write_s7_message_parse(ctx, readBuffer, &payload);
     if(_res != OK) {
       return _res;
     }
@@ -268,11 +269,11 @@ if( tpduCode == 0x70 ) { /* COTPPacketTpduError */
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_cotp_packet_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_packet* _message) {
+plc4c_return_code plc4c_s7_read_write_cotp_packet_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_packet* _message) {
   plc4c_return_code _res = OK;
 
   // Implicit Field (headerLength) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
-  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (plc4c_s7_read_write_cotp_packet_length_in_bytes(_message)) - ((((((((_message->payload) != (NULL))) ? plc4c_s7_read_write_s7_message_length_in_bytes(_message->payload) : 0))) + (1))));
+  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (plc4c_s7_read_write_cotp_packet_length_in_bytes(ctx, _message)) - ((((((((_message->payload) != (NULL))) ? plc4c_s7_read_write_s7_message_length_in_bytes(ctx, _message->payload) : 0))) + (1))));
   if(_res != OK) {
     return _res;
   }
@@ -313,7 +314,7 @@ plc4c_return_code plc4c_s7_read_write_cotp_packet_serialize(plc4c_spi_write_buff
   }
 
   // Simple Field (protocolClass)
-  _res = plc4c_s7_read_write_cotp_protocol_class_serialize(writeBuffer, &_message->cotp_packet_connection_request_protocol_class);
+  _res = plc4c_s7_read_write_cotp_protocol_class_serialize(ctx, writeBuffer, &_message->cotp_packet_connection_request_protocol_class);
   if(_res != OK) {
     return _res;
   }
@@ -335,7 +336,7 @@ plc4c_return_code plc4c_s7_read_write_cotp_packet_serialize(plc4c_spi_write_buff
   }
 
   // Simple Field (protocolClass)
-  _res = plc4c_s7_read_write_cotp_protocol_class_serialize(writeBuffer, &_message->cotp_packet_connection_response_protocol_class);
+  _res = plc4c_s7_read_write_cotp_protocol_class_serialize(ctx, writeBuffer, &_message->cotp_packet_connection_response_protocol_class);
   if(_res != OK) {
     return _res;
   }
@@ -357,7 +358,7 @@ plc4c_return_code plc4c_s7_read_write_cotp_packet_serialize(plc4c_spi_write_buff
   }
 
   // Simple Field (protocolClass)
-  _res = plc4c_s7_read_write_cotp_protocol_class_serialize(writeBuffer, &_message->cotp_packet_disconnect_request_protocol_class);
+  _res = plc4c_s7_read_write_cotp_protocol_class_serialize(ctx, writeBuffer, &_message->cotp_packet_disconnect_request_protocol_class);
   if(_res != OK) {
     return _res;
   }
@@ -404,7 +405,7 @@ plc4c_return_code plc4c_s7_read_write_cotp_packet_serialize(plc4c_spi_write_buff
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_cotp_parameter* _value = (plc4c_s7_read_write_cotp_parameter*) plc4c_utils_list_get_value(_message->parameters, curItem);
-      _res = plc4c_s7_read_write_cotp_parameter_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_cotp_parameter_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -413,7 +414,7 @@ plc4c_return_code plc4c_s7_read_write_cotp_packet_serialize(plc4c_spi_write_buff
 
   // Optional Field (payload)
   if(_message->payload != NULL) {
-    _res = plc4c_s7_read_write_s7_message_serialize(writeBuffer, _message->payload);
+    _res = plc4c_s7_read_write_s7_message_serialize(ctx, writeBuffer, _message->payload);
     if(_res != OK) {
       return _res;
     }
@@ -422,11 +423,11 @@ plc4c_return_code plc4c_s7_read_write_cotp_packet_serialize(plc4c_spi_write_buff
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_cotp_packet_length_in_bytes(plc4c_s7_read_write_cotp_packet* _message) {
-  return plc4c_s7_read_write_cotp_packet_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_cotp_packet_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_packet* _message) {
+  return plc4c_s7_read_write_cotp_packet_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_cotp_packet_length_in_bits(plc4c_s7_read_write_cotp_packet* _message) {
+uint16_t plc4c_s7_read_write_cotp_packet_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_packet* _message) {
   uint16_t lengthInBits = 0;
 
   // Implicit Field (headerLength)
@@ -459,7 +460,7 @@ uint16_t plc4c_s7_read_write_cotp_packet_length_in_bits(plc4c_s7_read_write_cotp
 
 
   // Simple field (protocolClass)
-  lengthInBits += plc4c_s7_read_write_cotp_protocol_class_length_in_bits(&_message->cotp_packet_connection_request_protocol_class);
+  lengthInBits += plc4c_s7_read_write_cotp_protocol_class_length_in_bits(ctx, &_message->cotp_packet_connection_request_protocol_class);
 
       break;
     }
@@ -474,7 +475,7 @@ uint16_t plc4c_s7_read_write_cotp_packet_length_in_bits(plc4c_s7_read_write_cotp
 
 
   // Simple field (protocolClass)
-  lengthInBits += plc4c_s7_read_write_cotp_protocol_class_length_in_bits(&_message->cotp_packet_connection_response_protocol_class);
+  lengthInBits += plc4c_s7_read_write_cotp_protocol_class_length_in_bits(ctx, &_message->cotp_packet_connection_response_protocol_class);
 
       break;
     }
@@ -489,7 +490,7 @@ uint16_t plc4c_s7_read_write_cotp_packet_length_in_bits(plc4c_s7_read_write_cotp
 
 
   // Simple field (protocolClass)
-  lengthInBits += plc4c_s7_read_write_cotp_protocol_class_length_in_bits(&_message->cotp_packet_disconnect_request_protocol_class);
+  lengthInBits += plc4c_s7_read_write_cotp_protocol_class_length_in_bits(ctx, &_message->cotp_packet_disconnect_request_protocol_class);
 
       break;
     }
@@ -521,14 +522,14 @@ uint16_t plc4c_s7_read_write_cotp_packet_length_in_bits(plc4c_s7_read_write_cotp
   if(_message->parameters != NULL) {
     plc4c_list_element* curElement = _message->parameters->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_cotp_parameter_length_in_bits((plc4c_s7_read_write_cotp_parameter*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_cotp_parameter_length_in_bits(ctx, (plc4c_s7_read_write_cotp_parameter*) curElement->value);
       curElement = curElement->next;
     }
   }
 
   // Optional Field (payload)
   if(_message->payload != NULL) {
-    lengthInBits += plc4c_s7_read_write_s7_message_length_in_bits(_message->payload);
+    lengthInBits += plc4c_s7_read_write_s7_message_length_in_bits(ctx, _message->payload);
   }
 
   return lengthInBits;
diff --git a/plc4c/generated-sources/s7/src/cotp_parameter.c b/plc4c/generated-sources/s7/src/cotp_parameter.c
index 6321e0982f..48c298a2d2 100644
--- a/plc4c/generated-sources/s7/src/cotp_parameter.c
+++ b/plc4c/generated-sources/s7/src/cotp_parameter.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -56,7 +57,7 @@ plc4c_s7_read_write_cotp_parameter plc4c_s7_read_write_cotp_parameter_null() {
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_cotp_parameter_parse(plc4c_spi_read_buffer* readBuffer, uint8_t rest, plc4c_s7_read_write_cotp_parameter** _message) {
+plc4c_return_code plc4c_s7_read_write_cotp_parameter_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint8_t rest, plc4c_s7_read_write_cotp_parameter** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -87,7 +88,7 @@ if( parameterType == 0xC0 ) { /* COTPParameterTpduSize */
 
   // Simple Field (tpduSize)
   plc4c_s7_read_write_cotp_tpdu_size tpduSize;
-  _res = plc4c_s7_read_write_cotp_tpdu_size_parse(readBuffer, (void*) &tpduSize);
+  _res = plc4c_s7_read_write_cotp_tpdu_size_parse(ctx, readBuffer, (void*) &tpduSize);
   if(_res != OK) {
     return _res;
   }
@@ -154,14 +155,14 @@ if( parameterType == 0xE0 ) { /* COTPParameterDisconnectAdditionalInformation */
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_cotp_parameter_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_parameter* _message) {
+plc4c_return_code plc4c_s7_read_write_cotp_parameter_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_parameter* _message) {
   plc4c_return_code _res = OK;
 
   // Discriminator Field (parameterType)
   plc4c_spi_write_unsigned_byte(writeBuffer, 8, plc4c_s7_read_write_cotp_parameter_get_discriminator(_message->_type).parameterType);
 
   // Implicit Field (parameterLength) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
-  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (plc4c_s7_read_write_cotp_parameter_length_in_bytes(_message)) - (2));
+  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (plc4c_s7_read_write_cotp_parameter_length_in_bytes(ctx, _message)) - (2));
   if(_res != OK) {
     return _res;
   }
@@ -171,7 +172,7 @@ plc4c_return_code plc4c_s7_read_write_cotp_parameter_serialize(plc4c_spi_write_b
     case plc4c_s7_read_write_cotp_parameter_type_plc4c_s7_read_write_cotp_parameter_tpdu_size: {
 
   // Simple Field (tpduSize)
-  _res = plc4c_s7_read_write_cotp_tpdu_size_serialize(writeBuffer, &_message->cotp_parameter_tpdu_size_tpdu_size);
+  _res = plc4c_s7_read_write_cotp_tpdu_size_serialize(ctx, writeBuffer, &_message->cotp_parameter_tpdu_size_tpdu_size);
   if(_res != OK) {
     return _res;
   }
@@ -227,11 +228,11 @@ plc4c_return_code plc4c_s7_read_write_cotp_parameter_serialize(plc4c_spi_write_b
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_cotp_parameter_length_in_bytes(plc4c_s7_read_write_cotp_parameter* _message) {
-  return plc4c_s7_read_write_cotp_parameter_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_cotp_parameter_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_parameter* _message) {
+  return plc4c_s7_read_write_cotp_parameter_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_cotp_parameter_length_in_bits(plc4c_s7_read_write_cotp_parameter* _message) {
+uint16_t plc4c_s7_read_write_cotp_parameter_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_parameter* _message) {
   uint16_t lengthInBits = 0;
 
   // Discriminator Field (parameterType)
@@ -245,7 +246,7 @@ uint16_t plc4c_s7_read_write_cotp_parameter_length_in_bits(plc4c_s7_read_write_c
     case plc4c_s7_read_write_cotp_parameter_type_plc4c_s7_read_write_cotp_parameter_tpdu_size: {
 
   // Simple field (tpduSize)
-  lengthInBits += plc4c_s7_read_write_cotp_tpdu_size_length_in_bits(&_message->cotp_parameter_tpdu_size_tpdu_size);
+  lengthInBits += plc4c_s7_read_write_cotp_tpdu_size_length_in_bits(ctx, &_message->cotp_parameter_tpdu_size_tpdu_size);
 
       break;
     }
diff --git a/plc4c/generated-sources/s7/src/cotp_protocol_class.c b/plc4c/generated-sources/s7/src/cotp_protocol_class.c
index 15267b6f7c..444f30fdd7 100644
--- a/plc4c/generated-sources/s7/src/cotp_protocol_class.c
+++ b/plc4c/generated-sources/s7/src/cotp_protocol_class.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_cotp_protocol_class plc4c_s7_read_write_cotp_protocol_class_
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_cotp_protocol_class_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cotp_protocol_class* _message) {
+plc4c_return_code plc4c_s7_read_write_cotp_protocol_class_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cotp_protocol_class* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_cotp_protocol_class_parse(plc4c_spi_read_b
     return _res;
 }
 
-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 plc4c_s7_read_write_cotp_protocol_class_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_protocol_class* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
@@ -106,10 +106,10 @@ plc4c_s7_read_write_cotp_protocol_class plc4c_s7_read_write_cotp_protocol_class_
     }
 }
 
-uint16_t plc4c_s7_read_write_cotp_protocol_class_length_in_bytes(plc4c_s7_read_write_cotp_protocol_class* _message) {
-    return plc4c_s7_read_write_cotp_protocol_class_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_cotp_protocol_class_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_protocol_class* _message) {
+    return plc4c_s7_read_write_cotp_protocol_class_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_cotp_protocol_class_length_in_bits(plc4c_s7_read_write_cotp_protocol_class* _message) {
+uint16_t plc4c_s7_read_write_cotp_protocol_class_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_protocol_class* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/cotp_tpdu_size.c b/plc4c/generated-sources/s7/src/cotp_tpdu_size.c
index 1a58fb3ee8..3816cab30f 100644
--- a/plc4c/generated-sources/s7/src/cotp_tpdu_size.c
+++ b/plc4c/generated-sources/s7/src/cotp_tpdu_size.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_cotp_tpdu_size plc4c_s7_read_write_cotp_tpdu_size_null() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_cotp_tpdu_size_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cotp_tpdu_size* _message) {
+plc4c_return_code plc4c_s7_read_write_cotp_tpdu_size_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cotp_tpdu_size* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_cotp_tpdu_size_parse(plc4c_spi_read_buffer
     return _res;
 }
 
-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 plc4c_s7_read_write_cotp_tpdu_size_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_cotp_tpdu_size* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
@@ -176,10 +176,10 @@ plc4c_s7_read_write_cotp_tpdu_size plc4c_s7_read_write_cotp_tpdu_size_get_first_
     }
 }
 
-uint16_t plc4c_s7_read_write_cotp_tpdu_size_length_in_bytes(plc4c_s7_read_write_cotp_tpdu_size* _message) {
-    return plc4c_s7_read_write_cotp_tpdu_size_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_cotp_tpdu_size_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_tpdu_size* _message) {
+    return plc4c_s7_read_write_cotp_tpdu_size_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_cotp_tpdu_size_length_in_bits(plc4c_s7_read_write_cotp_tpdu_size* _message) {
+uint16_t plc4c_s7_read_write_cotp_tpdu_size_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_cotp_tpdu_size* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/cpu_subscribe_events.c b/plc4c/generated-sources/s7/src/cpu_subscribe_events.c
index c4673bc18f..c5ca2fb52c 100644
--- a/plc4c/generated-sources/s7/src/cpu_subscribe_events.c
+++ b/plc4c/generated-sources/s7/src/cpu_subscribe_events.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_cpu_subscribe_events plc4c_s7_read_write_cpu_subscribe_event
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_cpu_subscribe_events_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cpu_subscribe_events* _message) {
+plc4c_return_code plc4c_s7_read_write_cpu_subscribe_events_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_cpu_subscribe_events* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_cpu_subscribe_events_parse(plc4c_spi_read_
     return _res;
 }
 
-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 plc4c_s7_read_write_cpu_subscribe_events_serialize(plc4x_spi_context ctx, 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);
@@ -100,10 +100,10 @@ plc4c_s7_read_write_cpu_subscribe_events plc4c_s7_read_write_cpu_subscribe_event
     }
 }
 
-uint16_t plc4c_s7_read_write_cpu_subscribe_events_length_in_bytes(plc4c_s7_read_write_cpu_subscribe_events* _message) {
-    return plc4c_s7_read_write_cpu_subscribe_events_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_cpu_subscribe_events_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_cpu_subscribe_events* _message) {
+    return plc4c_s7_read_write_cpu_subscribe_events_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_cpu_subscribe_events_length_in_bits(plc4c_s7_read_write_cpu_subscribe_events* _message) {
+uint16_t plc4c_s7_read_write_cpu_subscribe_events_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_cpu_subscribe_events* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/data_item.c b/plc4c/generated-sources/s7/src/data_item.c
index 6f4a261e64..c0e09c4108 100644
--- a/plc4c/generated-sources/s7/src/data_item.c
+++ b/plc4c/generated-sources/s7/src/data_item.c
@@ -31,7 +31,7 @@
 // Code generated by code-generation. DO NOT EDIT.
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_data_item_parse(plc4c_spi_read_buffer* readBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item) {
+plc4c_return_code plc4c_s7_read_write_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item) {
     uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
     uint16_t curPos;
     plc4c_return_code _res = OK;
@@ -390,7 +390,7 @@ plc4c_return_code plc4c_s7_read_write_data_item_parse(plc4c_spi_read_buffer* rea
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_data_item_serialize(plc4c_spi_write_buffer* writeBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item) {
+plc4c_return_code plc4c_s7_read_write_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item) {
   plc4c_return_code _res = OK;
         if(strcmp(dataProtocolId, "IEC61131_BOOL") == 0) { /* BOOL */
 
@@ -607,11 +607,11 @@ plc4c_return_code plc4c_s7_read_write_data_item_serialize(plc4c_spi_write_buffer
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_data_item_length_in_bytes(plc4c_data* data_item, char* data_protocol_id, int32_t string_length) {
-  return plc4c_s7_read_write_data_item_length_in_bits(data_item, data_protocol_id, string_length) / 8;
+uint16_t plc4c_s7_read_write_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item, char* data_protocol_id, int32_t string_length) {
+  return plc4c_s7_read_write_data_item_length_in_bits(ctx, data_item, data_protocol_id, string_length) / 8;
 }
 
-uint16_t plc4c_s7_read_write_data_item_length_in_bits(plc4c_data* data_item, char* dataProtocolId, int32_t stringLength) {
+uint16_t plc4c_s7_read_write_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item, char* dataProtocolId, int32_t stringLength) {
   uint16_t lengthInBits = 0;
     if(strcmp(dataProtocolId, "IEC61131_BOOL") == 0) { /* BOOL */
 
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 2cc3796ee8..ec2677f7b6 100644
--- a/plc4c/generated-sources/s7/src/data_transport_error_code.c
+++ b/plc4c/generated-sources/s7/src/data_transport_error_code.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_data_transport_error_code plc4c_s7_read_write_data_transport
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_data_transport_error_code_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_data_transport_error_code* _message) {
+plc4c_return_code plc4c_s7_read_write_data_transport_error_code_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_data_transport_error_code* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_data_transport_error_code_parse(plc4c_spi_
     return _res;
 }
 
-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 plc4c_s7_read_write_data_transport_error_code_serialize(plc4x_spi_context ctx, 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);
@@ -112,10 +112,10 @@ plc4c_s7_read_write_data_transport_error_code plc4c_s7_read_write_data_transport
     }
 }
 
-uint16_t plc4c_s7_read_write_data_transport_error_code_length_in_bytes(plc4c_s7_read_write_data_transport_error_code* _message) {
-    return plc4c_s7_read_write_data_transport_error_code_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_data_transport_error_code_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_data_transport_error_code* _message) {
+    return plc4c_s7_read_write_data_transport_error_code_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_data_transport_error_code_length_in_bits(plc4c_s7_read_write_data_transport_error_code* _message) {
+uint16_t plc4c_s7_read_write_data_transport_error_code_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_data_transport_error_code* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/data_transport_size.c b/plc4c/generated-sources/s7/src/data_transport_size.c
index 532ec432fa..c5196e7827 100644
--- a/plc4c/generated-sources/s7/src/data_transport_size.c
+++ b/plc4c/generated-sources/s7/src/data_transport_size.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_data_transport_size plc4c_s7_read_write_data_transport_size_
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_data_transport_size_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_data_transport_size* _message) {
+plc4c_return_code plc4c_s7_read_write_data_transport_size_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_data_transport_size* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_data_transport_size_parse(plc4c_spi_read_b
     return _res;
 }
 
-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 plc4c_s7_read_write_data_transport_size_serialize(plc4x_spi_context ctx, 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);
@@ -155,10 +155,10 @@ plc4c_s7_read_write_data_transport_size plc4c_s7_read_write_data_transport_size_
         }
 }
 
-uint16_t plc4c_s7_read_write_data_transport_size_length_in_bytes(plc4c_s7_read_write_data_transport_size* _message) {
-    return plc4c_s7_read_write_data_transport_size_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_data_transport_size_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_data_transport_size* _message) {
+    return plc4c_s7_read_write_data_transport_size_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_data_transport_size_length_in_bits(plc4c_s7_read_write_data_transport_size* _message) {
+uint16_t plc4c_s7_read_write_data_transport_size_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_data_transport_size* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/date_and_time.c b/plc4c/generated-sources/s7/src/date_and_time.c
index 7b397778a1..400a79a4f9 100644
--- a/plc4c/generated-sources/s7/src/date_and_time.c
+++ b/plc4c/generated-sources/s7/src/date_and_time.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_date_and_time_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_date_and_time** _message) {
+plc4c_return_code plc4c_s7_read_write_date_and_time_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_date_and_time** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -76,7 +77,7 @@ plc4c_return_code plc4c_s7_read_write_date_and_time_parse(plc4c_spi_read_buffer*
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_date_and_time_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_date_and_time* _message) {
+plc4c_return_code plc4c_s7_read_write_date_and_time_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_date_and_time* _message) {
   plc4c_return_code _res = OK;
 
   // Manual Field (year)  {
@@ -130,11 +131,11 @@ plc4c_return_code plc4c_s7_read_write_date_and_time_serialize(plc4c_spi_write_bu
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_date_and_time_length_in_bytes(plc4c_s7_read_write_date_and_time* _message) {
-  return plc4c_s7_read_write_date_and_time_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_date_and_time_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_date_and_time* _message) {
+  return plc4c_s7_read_write_date_and_time_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_date_and_time_length_in_bits(plc4c_s7_read_write_date_and_time* _message) {
+uint16_t plc4c_s7_read_write_date_and_time_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_date_and_time* _message) {
   uint16_t lengthInBits = 0;
 
   // Manual Field (year)
diff --git a/plc4c/generated-sources/s7/src/device_group.c b/plc4c/generated-sources/s7/src/device_group.c
index cf73ad21f7..39fabfef8f 100644
--- a/plc4c/generated-sources/s7/src/device_group.c
+++ b/plc4c/generated-sources/s7/src/device_group.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_device_group plc4c_s7_read_write_device_group_null() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_device_group_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_device_group* _message) {
+plc4c_return_code plc4c_s7_read_write_device_group_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_device_group* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_device_group_parse(plc4c_spi_read_buffer*
     return _res;
 }
 
-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 plc4c_s7_read_write_device_group_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_device_group* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
@@ -94,10 +94,10 @@ plc4c_s7_read_write_device_group plc4c_s7_read_write_device_group_value_for_inde
     }
 }
 
-uint16_t plc4c_s7_read_write_device_group_length_in_bytes(plc4c_s7_read_write_device_group* _message) {
-    return plc4c_s7_read_write_device_group_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_device_group_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_device_group* _message) {
+    return plc4c_s7_read_write_device_group_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_device_group_length_in_bits(plc4c_s7_read_write_device_group* _message) {
+uint16_t plc4c_s7_read_write_device_group_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_device_group* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/event_type.c b/plc4c/generated-sources/s7/src/event_type.c
index 9084f271c0..f6bc3d3239 100644
--- a/plc4c/generated-sources/s7/src/event_type.c
+++ b/plc4c/generated-sources/s7/src/event_type.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_event_type plc4c_s7_read_write_event_type_null() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_event_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_event_type* _message) {
+plc4c_return_code plc4c_s7_read_write_event_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_event_type* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_event_type_parse(plc4c_spi_read_buffer* re
     return _res;
 }
 
-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 plc4c_s7_read_write_event_type_serialize(plc4x_spi_context ctx, 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);
@@ -100,10 +100,10 @@ plc4c_s7_read_write_event_type plc4c_s7_read_write_event_type_value_for_index(in
     }
 }
 
-uint16_t plc4c_s7_read_write_event_type_length_in_bytes(plc4c_s7_read_write_event_type* _message) {
-    return plc4c_s7_read_write_event_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_event_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_event_type* _message) {
+    return plc4c_s7_read_write_event_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_event_type_length_in_bits(plc4c_s7_read_write_event_type* _message) {
+uint16_t plc4c_s7_read_write_event_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_event_type* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/memory_area.c b/plc4c/generated-sources/s7/src/memory_area.c
index a27f9ddeb3..3e37ab7510 100644
--- a/plc4c/generated-sources/s7/src/memory_area.c
+++ b/plc4c/generated-sources/s7/src/memory_area.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_memory_area plc4c_s7_read_write_memory_area_null() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_memory_area_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_memory_area* _message) {
+plc4c_return_code plc4c_s7_read_write_memory_area_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_memory_area* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_memory_area_parse(plc4c_spi_read_buffer* r
     return _res;
 }
 
-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 plc4c_s7_read_write_memory_area_serialize(plc4x_spi_context ctx, 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);
@@ -195,10 +195,10 @@ plc4c_s7_read_write_memory_area plc4c_s7_read_write_memory_area_get_first_enum_f
     }
 }
 
-uint16_t plc4c_s7_read_write_memory_area_length_in_bytes(plc4c_s7_read_write_memory_area* _message) {
-    return plc4c_s7_read_write_memory_area_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_memory_area_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_memory_area* _message) {
+    return plc4c_s7_read_write_memory_area_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_memory_area_length_in_bits(plc4c_s7_read_write_memory_area* _message) {
+uint16_t plc4c_s7_read_write_memory_area_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_memory_area* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/mode_transition_type.c b/plc4c/generated-sources/s7/src/mode_transition_type.c
index 9467590e4f..4bdd09442b 100644
--- a/plc4c/generated-sources/s7/src/mode_transition_type.c
+++ b/plc4c/generated-sources/s7/src/mode_transition_type.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_mode_transition_type plc4c_s7_read_write_mode_transition_typ
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_mode_transition_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_mode_transition_type* _message) {
+plc4c_return_code plc4c_s7_read_write_mode_transition_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_mode_transition_type* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_mode_transition_type_parse(plc4c_spi_read_
     return _res;
 }
 
-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 plc4c_s7_read_write_mode_transition_type_serialize(plc4x_spi_context ctx, 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);
@@ -130,10 +130,10 @@ plc4c_s7_read_write_mode_transition_type plc4c_s7_read_write_mode_transition_typ
     }
 }
 
-uint16_t plc4c_s7_read_write_mode_transition_type_length_in_bytes(plc4c_s7_read_write_mode_transition_type* _message) {
-    return plc4c_s7_read_write_mode_transition_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_mode_transition_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_mode_transition_type* _message) {
+    return plc4c_s7_read_write_mode_transition_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_mode_transition_type_length_in_bits(plc4c_s7_read_write_mode_transition_type* _message) {
+uint16_t plc4c_s7_read_write_mode_transition_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_mode_transition_type* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/query_type.c b/plc4c/generated-sources/s7/src/query_type.c
index 5beeb1fbe5..be9652adb3 100644
--- a/plc4c/generated-sources/s7/src/query_type.c
+++ b/plc4c/generated-sources/s7/src/query_type.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_query_type plc4c_s7_read_write_query_type_null() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_query_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_query_type* _message) {
+plc4c_return_code plc4c_s7_read_write_query_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_query_type* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_query_type_parse(plc4c_spi_read_buffer* re
     return _res;
 }
 
-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 plc4c_s7_read_write_query_type_serialize(plc4x_spi_context ctx, 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);
@@ -94,10 +94,10 @@ plc4c_s7_read_write_query_type plc4c_s7_read_write_query_type_value_for_index(in
     }
 }
 
-uint16_t plc4c_s7_read_write_query_type_length_in_bytes(plc4c_s7_read_write_query_type* _message) {
-    return plc4c_s7_read_write_query_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_query_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_query_type* _message) {
+    return plc4c_s7_read_write_query_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_query_type_length_in_bits(plc4c_s7_read_write_query_type* _message) {
+uint16_t plc4c_s7_read_write_query_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_query_type* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/s7_address.c b/plc4c/generated-sources/s7/src/s7_address.c
index 2e8c138b5d..1a4ba053b2 100644
--- a/plc4c/generated-sources/s7/src/s7_address.c
+++ b/plc4c/generated-sources/s7/src/s7_address.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -48,7 +49,7 @@ plc4c_s7_read_write_s7_address plc4c_s7_read_write_s7_address_null() {
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_s7_address_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_address** _message) {
+plc4c_return_code plc4c_s7_read_write_s7_address_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_address** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -103,7 +104,7 @@ if( addressType == 0x10 ) { /* S7AddressAny */
 
   // Simple Field (area)
   plc4c_s7_read_write_memory_area area;
-  _res = plc4c_s7_read_write_memory_area_parse(readBuffer, (void*) &area);
+  _res = plc4c_s7_read_write_memory_area_parse(ctx, readBuffer, (void*) &area);
   if(_res != OK) {
     return _res;
   }
@@ -144,7 +145,7 @@ if( addressType == 0x10 ) { /* S7AddressAny */
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_s7_address_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_address* _message) {
+plc4c_return_code plc4c_s7_read_write_s7_address_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_address* _message) {
   plc4c_return_code _res = OK;
 
   // Discriminator Field (addressType)
@@ -173,7 +174,7 @@ plc4c_return_code plc4c_s7_read_write_s7_address_serialize(plc4c_spi_write_buffe
   }
 
   // Simple Field (area)
-  _res = plc4c_s7_read_write_memory_area_serialize(writeBuffer, &_message->s7_address_any_area);
+  _res = plc4c_s7_read_write_memory_area_serialize(ctx, writeBuffer, &_message->s7_address_any_area);
   if(_res != OK) {
     return _res;
   }
@@ -203,11 +204,11 @@ plc4c_return_code plc4c_s7_read_write_s7_address_serialize(plc4c_spi_write_buffe
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_s7_address_length_in_bytes(plc4c_s7_read_write_s7_address* _message) {
-  return plc4c_s7_read_write_s7_address_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_s7_address_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_address* _message) {
+  return plc4c_s7_read_write_s7_address_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_s7_address_length_in_bits(plc4c_s7_read_write_s7_address* _message) {
+uint16_t plc4c_s7_read_write_s7_address_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_address* _message) {
   uint16_t lengthInBits = 0;
 
   // Discriminator Field (addressType)
@@ -230,7 +231,7 @@ uint16_t plc4c_s7_read_write_s7_address_length_in_bits(plc4c_s7_read_write_s7_ad
 
 
   // Simple field (area)
-  lengthInBits += plc4c_s7_read_write_memory_area_length_in_bits(&_message->s7_address_any_area);
+  lengthInBits += plc4c_s7_read_write_memory_area_length_in_bits(ctx, &_message->s7_address_any_area);
 
 
   // Reserved Field (reserved)
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 36be8d04ac..c263e6162d 100644
--- a/plc4c/generated-sources/s7/src/s7_data_alarm_message.c
+++ b/plc4c/generated-sources/s7/src/s7_data_alarm_message.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -68,7 +69,7 @@ uint8_t PLC4C_S7_READ_WRITE_S7_MESSAGE_OBJECT_REQUEST_LENGTH() {
 }
 
 // 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) {
+plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint8_t cpuFunctionType, plc4c_s7_read_write_s7_data_alarm_message** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -130,7 +131,7 @@ if( cpuFunctionType == 0x04 ) { /* S7MessageObjectRequest */
 
   // Simple Field (syntaxId)
   plc4c_s7_read_write_syntax_id_type syntaxId;
-  _res = plc4c_s7_read_write_syntax_id_type_parse(readBuffer, (void*) &syntaxId);
+  _res = plc4c_s7_read_write_syntax_id_type_parse(ctx, readBuffer, (void*) &syntaxId);
   if(_res != OK) {
     return _res;
   }
@@ -152,7 +153,7 @@ if( cpuFunctionType == 0x04 ) { /* S7MessageObjectRequest */
 
   // Simple Field (queryType)
   plc4c_s7_read_write_query_type queryType;
-  _res = plc4c_s7_read_write_query_type_parse(readBuffer, (void*) &queryType);
+  _res = plc4c_s7_read_write_query_type_parse(ctx, readBuffer, (void*) &queryType);
   if(_res != OK) {
     return _res;
   }
@@ -174,7 +175,7 @@ if( cpuFunctionType == 0x04 ) { /* S7MessageObjectRequest */
 
   // Simple Field (alarmType)
   plc4c_s7_read_write_alarm_type alarmType;
-  _res = plc4c_s7_read_write_alarm_type_parse(readBuffer, (void*) &alarmType);
+  _res = plc4c_s7_read_write_alarm_type_parse(ctx, readBuffer, (void*) &alarmType);
   if(_res != OK) {
     return _res;
   }
@@ -185,7 +186,7 @@ if( cpuFunctionType == 0x08 ) { /* S7MessageObjectResponse */
 
   // Simple Field (returnCode)
   plc4c_s7_read_write_data_transport_error_code returnCode;
-  _res = plc4c_s7_read_write_data_transport_error_code_parse(readBuffer, (void*) &returnCode);
+  _res = plc4c_s7_read_write_data_transport_error_code_parse(ctx, readBuffer, (void*) &returnCode);
   if(_res != OK) {
     return _res;
   }
@@ -194,7 +195,7 @@ if( cpuFunctionType == 0x08 ) { /* S7MessageObjectResponse */
 
   // Simple Field (transportSize)
   plc4c_s7_read_write_data_transport_size transportSize;
-  _res = plc4c_s7_read_write_data_transport_size_parse(readBuffer, (void*) &transportSize);
+  _res = plc4c_s7_read_write_data_transport_size_parse(ctx, readBuffer, (void*) &transportSize);
   if(_res != OK) {
     return _res;
   }
@@ -217,7 +218,7 @@ if( cpuFunctionType == 0x08 ) { /* S7MessageObjectResponse */
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_data_alarm_message* _message) {
+plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_data_alarm_message* _message) {
   plc4c_return_code _res = OK;
 
   // Const Field (functionId)
@@ -237,7 +238,7 @@ plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_serialize(plc4c_spi_
   plc4c_spi_write_unsigned_byte(writeBuffer, 8, PLC4C_S7_READ_WRITE_S7_MESSAGE_OBJECT_REQUEST_LENGTH());
 
   // Simple Field (syntaxId)
-  _res = plc4c_s7_read_write_syntax_id_type_serialize(writeBuffer, &_message->s7_message_object_request_syntax_id);
+  _res = plc4c_s7_read_write_syntax_id_type_serialize(ctx, writeBuffer, &_message->s7_message_object_request_syntax_id);
   if(_res != OK) {
     return _res;
   }
@@ -249,7 +250,7 @@ plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_serialize(plc4c_spi_
   }
 
   // Simple Field (queryType)
-  _res = plc4c_s7_read_write_query_type_serialize(writeBuffer, &_message->s7_message_object_request_query_type);
+  _res = plc4c_s7_read_write_query_type_serialize(ctx, writeBuffer, &_message->s7_message_object_request_query_type);
   if(_res != OK) {
     return _res;
   }
@@ -261,7 +262,7 @@ plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_serialize(plc4c_spi_
   }
 
   // Simple Field (alarmType)
-  _res = plc4c_s7_read_write_alarm_type_serialize(writeBuffer, &_message->s7_message_object_request_alarm_type);
+  _res = plc4c_s7_read_write_alarm_type_serialize(ctx, writeBuffer, &_message->s7_message_object_request_alarm_type);
   if(_res != OK) {
     return _res;
   }
@@ -271,13 +272,13 @@ plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_serialize(plc4c_spi_
     case plc4c_s7_read_write_s7_data_alarm_message_type_plc4c_s7_read_write_s7_message_object_response: {
 
   // Simple Field (returnCode)
-  _res = plc4c_s7_read_write_data_transport_error_code_serialize(writeBuffer, &_message->s7_message_object_response_return_code);
+  _res = plc4c_s7_read_write_data_transport_error_code_serialize(ctx, writeBuffer, &_message->s7_message_object_response_return_code);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (transportSize)
-  _res = plc4c_s7_read_write_data_transport_size_serialize(writeBuffer, &_message->s7_message_object_response_transport_size);
+  _res = plc4c_s7_read_write_data_transport_size_serialize(ctx, writeBuffer, &_message->s7_message_object_response_transport_size);
   if(_res != OK) {
     return _res;
   }
@@ -295,11 +296,11 @@ plc4c_return_code plc4c_s7_read_write_s7_data_alarm_message_serialize(plc4c_spi_
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_s7_data_alarm_message_length_in_bytes(plc4c_s7_read_write_s7_data_alarm_message* _message) {
-  return plc4c_s7_read_write_s7_data_alarm_message_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_s7_data_alarm_message_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_data_alarm_message* _message) {
+  return plc4c_s7_read_write_s7_data_alarm_message_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_s7_data_alarm_message_length_in_bits(plc4c_s7_read_write_s7_data_alarm_message* _message) {
+uint16_t plc4c_s7_read_write_s7_data_alarm_message_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_data_alarm_message* _message) {
   uint16_t lengthInBits = 0;
 
   // Const Field (functionId)
@@ -321,7 +322,7 @@ uint16_t plc4c_s7_read_write_s7_data_alarm_message_length_in_bits(plc4c_s7_read_
 
 
   // Simple field (syntaxId)
-  lengthInBits += plc4c_s7_read_write_syntax_id_type_length_in_bits(&_message->s7_message_object_request_syntax_id);
+  lengthInBits += plc4c_s7_read_write_syntax_id_type_length_in_bits(ctx, &_message->s7_message_object_request_syntax_id);
 
 
   // Reserved Field (reserved)
@@ -329,7 +330,7 @@ uint16_t plc4c_s7_read_write_s7_data_alarm_message_length_in_bits(plc4c_s7_read_
 
 
   // Simple field (queryType)
-  lengthInBits += plc4c_s7_read_write_query_type_length_in_bits(&_message->s7_message_object_request_query_type);
+  lengthInBits += plc4c_s7_read_write_query_type_length_in_bits(ctx, &_message->s7_message_object_request_query_type);
 
 
   // Reserved Field (reserved)
@@ -337,18 +338,18 @@ uint16_t plc4c_s7_read_write_s7_data_alarm_message_length_in_bits(plc4c_s7_read_
 
 
   // Simple field (alarmType)
-  lengthInBits += plc4c_s7_read_write_alarm_type_length_in_bits(&_message->s7_message_object_request_alarm_type);
+  lengthInBits += plc4c_s7_read_write_alarm_type_length_in_bits(ctx, &_message->s7_message_object_request_alarm_type);
 
       break;
     }
     case plc4c_s7_read_write_s7_data_alarm_message_type_plc4c_s7_read_write_s7_message_object_response: {
 
   // Simple field (returnCode)
-  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(&_message->s7_message_object_response_return_code);
+  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(ctx, &_message->s7_message_object_response_return_code);
 
 
   // Simple field (transportSize)
-  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(&_message->s7_message_object_response_transport_size);
+  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(ctx, &_message->s7_message_object_response_transport_size);
 
 
   // Reserved Field (reserved)
diff --git a/plc4c/generated-sources/s7/src/s7_message.c b/plc4c/generated-sources/s7/src/s7_message.c
index 053244f34e..8941276518 100644
--- a/plc4c/generated-sources/s7/src/s7_message.c
+++ b/plc4c/generated-sources/s7/src/s7_message.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -60,7 +61,7 @@ uint8_t PLC4C_S7_READ_WRITE_S7_MESSAGE_PROTOCOL_ID() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_s7_message_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_message** _message) {
+plc4c_return_code plc4c_s7_read_write_s7_message_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_message** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -174,7 +175,7 @@ if( messageType == 0x07 ) { /* S7MessageUserData */
   // Optional Field (parameter) (Can be skipped, if a given expression evaluates to false)
   plc4c_s7_read_write_s7_parameter* parameter = NULL;
   if((parameterLength) > (0)) {
-    _res = plc4c_s7_read_write_s7_parameter_parse(readBuffer, messageType, &parameter);
+    _res = plc4c_s7_read_write_s7_parameter_parse(ctx, readBuffer, messageType, &parameter);
     if(_res != OK) {
       return _res;
     }
@@ -186,7 +187,7 @@ if( messageType == 0x07 ) { /* S7MessageUserData */
   // Optional Field (payload) (Can be skipped, if a given expression evaluates to false)
   plc4c_s7_read_write_s7_payload* payload = NULL;
   if((payloadLength) > (0)) {
-    _res = plc4c_s7_read_write_s7_payload_parse(readBuffer, messageType, parameter, &payload);
+    _res = plc4c_s7_read_write_s7_payload_parse(ctx, readBuffer, messageType, parameter, &payload);
     if(_res != OK) {
       return _res;
     }
@@ -198,7 +199,7 @@ if( messageType == 0x07 ) { /* S7MessageUserData */
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_s7_message_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_message* _message) {
+plc4c_return_code plc4c_s7_read_write_s7_message_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_message* _message) {
   plc4c_return_code _res = OK;
 
   // Const Field (protocolId)
@@ -220,13 +221,13 @@ plc4c_return_code plc4c_s7_read_write_s7_message_serialize(plc4c_spi_write_buffe
   }
 
   // Implicit Field (parameterLength) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
-  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, (((_message->parameter) != (NULL)) ? plc4c_s7_read_write_s7_parameter_length_in_bytes(_message->parameter) : 0));
+  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, (((_message->parameter) != (NULL)) ? plc4c_s7_read_write_s7_parameter_length_in_bytes(ctx, _message->parameter) : 0));
   if(_res != OK) {
     return _res;
   }
 
   // Implicit Field (payloadLength) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
-  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, (((_message->payload) != (NULL)) ? plc4c_s7_read_write_s7_payload_length_in_bytes(_message->payload) : 0));
+  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, (((_message->payload) != (NULL)) ? plc4c_s7_read_write_s7_payload_length_in_bytes(ctx, _message->payload) : 0));
   if(_res != OK) {
     return _res;
   }
@@ -277,7 +278,7 @@ plc4c_return_code plc4c_s7_read_write_s7_message_serialize(plc4c_spi_write_buffe
 
   // Optional Field (parameter)
   if(_message->parameter != NULL) {
-    _res = plc4c_s7_read_write_s7_parameter_serialize(writeBuffer, _message->parameter);
+    _res = plc4c_s7_read_write_s7_parameter_serialize(ctx, writeBuffer, _message->parameter);
     if(_res != OK) {
       return _res;
     }
@@ -285,7 +286,7 @@ plc4c_return_code plc4c_s7_read_write_s7_message_serialize(plc4c_spi_write_buffe
 
   // Optional Field (payload)
   if(_message->payload != NULL) {
-    _res = plc4c_s7_read_write_s7_payload_serialize(writeBuffer, _message->payload);
+    _res = plc4c_s7_read_write_s7_payload_serialize(ctx, writeBuffer, _message->payload);
     if(_res != OK) {
       return _res;
     }
@@ -294,11 +295,11 @@ plc4c_return_code plc4c_s7_read_write_s7_message_serialize(plc4c_spi_write_buffe
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_s7_message_length_in_bytes(plc4c_s7_read_write_s7_message* _message) {
-  return plc4c_s7_read_write_s7_message_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_s7_message_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_message* _message) {
+  return plc4c_s7_read_write_s7_message_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_s7_message_length_in_bits(plc4c_s7_read_write_s7_message* _message) {
+uint16_t plc4c_s7_read_write_s7_message_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_message* _message) {
   uint16_t lengthInBits = 0;
 
   // Const Field (protocolId)
@@ -355,12 +356,12 @@ uint16_t plc4c_s7_read_write_s7_message_length_in_bits(plc4c_s7_read_write_s7_me
 
   // Optional Field (parameter)
   if(_message->parameter != NULL) {
-    lengthInBits += plc4c_s7_read_write_s7_parameter_length_in_bits(_message->parameter);
+    lengthInBits += plc4c_s7_read_write_s7_parameter_length_in_bits(ctx, _message->parameter);
   }
 
   // Optional Field (payload)
   if(_message->payload != NULL) {
-    lengthInBits += plc4c_s7_read_write_s7_payload_length_in_bits(_message->payload);
+    lengthInBits += plc4c_s7_read_write_s7_payload_length_in_bits(ctx, _message->payload);
   }
 
   return lengthInBits;
diff --git a/plc4c/generated-sources/s7/src/s7_parameter.c b/plc4c/generated-sources/s7/src/s7_parameter.c
index 457e14deed..00f4b9255b 100644
--- a/plc4c/generated-sources/s7/src/s7_parameter.c
+++ b/plc4c/generated-sources/s7/src/s7_parameter.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -60,7 +61,7 @@ plc4c_s7_read_write_s7_parameter plc4c_s7_read_write_s7_parameter_null() {
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_s7_parameter_parse(plc4c_spi_read_buffer* readBuffer, uint8_t messageType, plc4c_s7_read_write_s7_parameter** _message) {
+plc4c_return_code plc4c_s7_read_write_s7_parameter_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint8_t messageType, plc4c_s7_read_write_s7_parameter** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -144,7 +145,7 @@ if( ( parameterType == 0x04 ) && ( messageType == 0x01 ) ) { /* S7ParameterReadV
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_var_request_parameter_item* _value = NULL;
-      _res = plc4c_s7_read_write_s7_var_request_parameter_item_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_s7_var_request_parameter_item_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -187,7 +188,7 @@ if( ( parameterType == 0x05 ) && ( messageType == 0x01 ) ) { /* S7ParameterWrite
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_var_request_parameter_item* _value = NULL;
-      _res = plc4c_s7_read_write_s7_var_request_parameter_item_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_s7_var_request_parameter_item_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -230,7 +231,7 @@ if( ( parameterType == 0x00 ) && ( messageType == 0x07 ) ) { /* S7ParameterUserD
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_parameter_user_data_item* _value = NULL;
-      _res = plc4c_s7_read_write_s7_parameter_user_data_item_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_s7_parameter_user_data_item_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -311,7 +312,7 @@ if( ( parameterType == 0x01 ) && ( messageType == 0x07 ) ) { /* S7ParameterModeT
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_s7_parameter_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_parameter* _message) {
+plc4c_return_code plc4c_s7_read_write_s7_parameter_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_parameter* _message) {
   plc4c_return_code _res = OK;
 
   // Discriminator Field (parameterType)
@@ -361,7 +362,7 @@ plc4c_return_code plc4c_s7_read_write_s7_parameter_serialize(plc4c_spi_write_buf
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_var_request_parameter_item* _value = (plc4c_s7_read_write_s7_var_request_parameter_item*) plc4c_utils_list_get_value(_message->s7_parameter_read_var_request_items, curItem);
-      _res = plc4c_s7_read_write_s7_var_request_parameter_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_s7_var_request_parameter_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -394,7 +395,7 @@ plc4c_return_code plc4c_s7_read_write_s7_parameter_serialize(plc4c_spi_write_buf
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_var_request_parameter_item* _value = (plc4c_s7_read_write_s7_var_request_parameter_item*) plc4c_utils_list_get_value(_message->s7_parameter_write_var_request_items, curItem);
-      _res = plc4c_s7_read_write_s7_var_request_parameter_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_s7_var_request_parameter_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -427,7 +428,7 @@ plc4c_return_code plc4c_s7_read_write_s7_parameter_serialize(plc4c_spi_write_buf
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_parameter_user_data_item* _value = (plc4c_s7_read_write_s7_parameter_user_data_item*) plc4c_utils_list_get_value(_message->s7_parameter_user_data_items, curItem);
-      _res = plc4c_s7_read_write_s7_parameter_user_data_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_s7_parameter_user_data_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -445,7 +446,7 @@ plc4c_return_code plc4c_s7_read_write_s7_parameter_serialize(plc4c_spi_write_buf
   }
 
   // Implicit Field (itemLength) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
-  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (plc4c_s7_read_write_s7_parameter_length_in_bytes(_message)) - (2));
+  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (plc4c_s7_read_write_s7_parameter_length_in_bytes(ctx, _message)) - (2));
   if(_res != OK) {
     return _res;
   }
@@ -487,11 +488,11 @@ plc4c_return_code plc4c_s7_read_write_s7_parameter_serialize(plc4c_spi_write_buf
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_s7_parameter_length_in_bytes(plc4c_s7_read_write_s7_parameter* _message) {
-  return plc4c_s7_read_write_s7_parameter_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_s7_parameter_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_parameter* _message) {
+  return plc4c_s7_read_write_s7_parameter_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_s7_parameter_length_in_bits(plc4c_s7_read_write_s7_parameter* _message) {
+uint16_t plc4c_s7_read_write_s7_parameter_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_parameter* _message) {
   uint16_t lengthInBits = 0;
 
   // Discriminator Field (parameterType)
@@ -528,7 +529,7 @@ uint16_t plc4c_s7_read_write_s7_parameter_length_in_bits(plc4c_s7_read_write_s7_
   if(_message->s7_parameter_read_var_request_items != NULL) {
     plc4c_list_element* curElement = _message->s7_parameter_read_var_request_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bits((plc4c_s7_read_write_s7_var_request_parameter_item*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bits(ctx, (plc4c_s7_read_write_s7_var_request_parameter_item*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -552,7 +553,7 @@ uint16_t plc4c_s7_read_write_s7_parameter_length_in_bits(plc4c_s7_read_write_s7_
   if(_message->s7_parameter_write_var_request_items != NULL) {
     plc4c_list_element* curElement = _message->s7_parameter_write_var_request_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bits((plc4c_s7_read_write_s7_var_request_parameter_item*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bits(ctx, (plc4c_s7_read_write_s7_var_request_parameter_item*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -576,7 +577,7 @@ uint16_t plc4c_s7_read_write_s7_parameter_length_in_bits(plc4c_s7_read_write_s7_
   if(_message->s7_parameter_user_data_items != NULL) {
     plc4c_list_element* curElement = _message->s7_parameter_user_data_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bits((plc4c_s7_read_write_s7_parameter_user_data_item*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bits(ctx, (plc4c_s7_read_write_s7_parameter_user_data_item*) curElement->value);
       curElement = curElement->next;
     }
   }
diff --git a/plc4c/generated-sources/s7/src/s7_parameter_user_data_item.c b/plc4c/generated-sources/s7/src/s7_parameter_user_data_item.c
index 64a09cbab2..076c6c83b2 100644
--- a/plc4c/generated-sources/s7/src/s7_parameter_user_data_item.c
+++ b/plc4c/generated-sources/s7/src/s7_parameter_user_data_item.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -48,7 +49,7 @@ plc4c_s7_read_write_s7_parameter_user_data_item plc4c_s7_read_write_s7_parameter
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_s7_parameter_user_data_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_parameter_user_data_item** _message) {
+plc4c_return_code plc4c_s7_read_write_s7_parameter_user_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_parameter_user_data_item** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -180,7 +181,7 @@ if( itemType == 0x12 ) { /* S7ParameterUserDataItemCPUFunctions */
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_s7_parameter_user_data_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_parameter_user_data_item* _message) {
+plc4c_return_code plc4c_s7_read_write_s7_parameter_user_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_parameter_user_data_item* _message) {
   plc4c_return_code _res = OK;
 
   // Discriminator Field (itemType)
@@ -191,7 +192,7 @@ plc4c_return_code plc4c_s7_read_write_s7_parameter_user_data_item_serialize(plc4
     case plc4c_s7_read_write_s7_parameter_user_data_item_type_plc4c_s7_read_write_s7_parameter_user_data_item_cpu_functions: {
 
   // Implicit Field (itemLength) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
-  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bytes(_message)) - (2));
+  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, (plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bytes(ctx, _message)) - (2));
   if(_res != OK) {
     return _res;
   }
@@ -257,11 +258,11 @@ plc4c_return_code plc4c_s7_read_write_s7_parameter_user_data_item_serialize(plc4
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bytes(plc4c_s7_read_write_s7_parameter_user_data_item* _message) {
-  return plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_parameter_user_data_item* _message) {
+  return plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bits(plc4c_s7_read_write_s7_parameter_user_data_item* _message) {
+uint16_t plc4c_s7_read_write_s7_parameter_user_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_parameter_user_data_item* _message) {
   uint16_t lengthInBits = 0;
 
   // Discriminator Field (itemType)
diff --git a/plc4c/generated-sources/s7/src/s7_payload.c b/plc4c/generated-sources/s7/src/s7_payload.c
index bce8a551e5..7fdcc9825e 100644
--- a/plc4c/generated-sources/s7/src/s7_payload.c
+++ b/plc4c/generated-sources/s7/src/s7_payload.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -54,7 +55,7 @@ plc4c_s7_read_write_s7_payload plc4c_s7_read_write_s7_payload_null() {
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_s7_payload_parse(plc4c_spi_read_buffer* readBuffer, uint8_t messageType, plc4c_s7_read_write_s7_parameter* parameter, plc4c_s7_read_write_s7_payload** _message) {
+plc4c_return_code plc4c_s7_read_write_s7_payload_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint8_t messageType, plc4c_s7_read_write_s7_parameter* parameter, plc4c_s7_read_write_s7_payload** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -80,7 +81,7 @@ if( ( plc4c_s7_read_write_s7_parameter_get_discriminator(parameter->_type).param
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_var_payload_data_item* _value = NULL;
-      _res = plc4c_s7_read_write_s7_var_payload_data_item_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_s7_var_payload_data_item_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -104,7 +105,7 @@ if( ( plc4c_s7_read_write_s7_parameter_get_discriminator(parameter->_type).param
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_var_payload_data_item* _value = NULL;
-      _res = plc4c_s7_read_write_s7_var_payload_data_item_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_s7_var_payload_data_item_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -128,7 +129,7 @@ if( ( plc4c_s7_read_write_s7_parameter_get_discriminator(parameter->_type).param
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_var_payload_status_item* _value = NULL;
-      _res = plc4c_s7_read_write_s7_var_payload_status_item_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_s7_var_payload_status_item_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -152,7 +153,7 @@ if( ( plc4c_s7_read_write_s7_parameter_get_discriminator(parameter->_type).param
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_payload_user_data_item* _value = NULL;
-      _res = plc4c_s7_read_write_s7_payload_user_data_item_parse(readBuffer, ((plc4c_s7_read_write_s7_parameter_user_data_item*) (plc4c_utils_list_get_value(((plc4c_s7_read_write_s7_parameter*) (parameter))->s7_parameter_user_data_items, 0)))->s7_parameter_user_data_item_cpu_functions_cpu_function_type, ((plc4c_s7_read_write_s7_parameter_user_data_item*) (plc4c_utils_list_get_value(((plc4c_s7_read_write_s7_parameter*) (parameter))->s7_parameter_user_data_items, 0)))->s7_parameter_user_da [...]
+      _res = plc4c_s7_read_write_s7_payload_user_data_item_parse(ctx, readBuffer, ((plc4c_s7_read_write_s7_parameter_user_data_item*) (plc4c_utils_list_get_value(((plc4c_s7_read_write_s7_parameter*) (parameter))->s7_parameter_user_data_items, 0)))->s7_parameter_user_data_item_cpu_functions_cpu_function_type, ((plc4c_s7_read_write_s7_parameter_user_data_item*) (plc4c_utils_list_get_value(((plc4c_s7_read_write_s7_parameter*) (parameter))->s7_parameter_user_data_items, 0)))->s7_parameter_us [...]
       if(_res != OK) {
         return _res;
       }
@@ -165,7 +166,7 @@ if( ( plc4c_s7_read_write_s7_parameter_get_discriminator(parameter->_type).param
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_s7_payload_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_payload* _message) {
+plc4c_return_code plc4c_s7_read_write_s7_payload_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_payload* _message) {
   plc4c_return_code _res = OK;
 
   // Switch Field (Depending on the current type, serialize the subtype elements)
@@ -178,7 +179,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_serialize(plc4c_spi_write_buffe
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_var_payload_data_item* _value = (plc4c_s7_read_write_s7_var_payload_data_item*) plc4c_utils_list_get_value(_message->s7_payload_read_var_response_items, curItem);
-      _res = plc4c_s7_read_write_s7_var_payload_data_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_s7_var_payload_data_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -195,7 +196,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_serialize(plc4c_spi_write_buffe
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_var_payload_data_item* _value = (plc4c_s7_read_write_s7_var_payload_data_item*) plc4c_utils_list_get_value(_message->s7_payload_write_var_request_items, curItem);
-      _res = plc4c_s7_read_write_s7_var_payload_data_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_s7_var_payload_data_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -212,7 +213,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_serialize(plc4c_spi_write_buffe
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_var_payload_status_item* _value = (plc4c_s7_read_write_s7_var_payload_status_item*) plc4c_utils_list_get_value(_message->s7_payload_write_var_response_items, curItem);
-      _res = plc4c_s7_read_write_s7_var_payload_status_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_s7_var_payload_status_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -229,7 +230,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_serialize(plc4c_spi_write_buffe
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_s7_payload_user_data_item* _value = (plc4c_s7_read_write_s7_payload_user_data_item*) plc4c_utils_list_get_value(_message->s7_payload_user_data_items, curItem);
-      _res = plc4c_s7_read_write_s7_payload_user_data_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_s7_payload_user_data_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -243,11 +244,11 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_serialize(plc4c_spi_write_buffe
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_s7_payload_length_in_bytes(plc4c_s7_read_write_s7_payload* _message) {
-  return plc4c_s7_read_write_s7_payload_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_s7_payload_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_payload* _message) {
+  return plc4c_s7_read_write_s7_payload_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_s7_payload_length_in_bits(plc4c_s7_read_write_s7_payload* _message) {
+uint16_t plc4c_s7_read_write_s7_payload_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_payload* _message) {
   uint16_t lengthInBits = 0;
 
   // Depending on the current type, add the length of sub-type elements ...
@@ -258,7 +259,7 @@ uint16_t plc4c_s7_read_write_s7_payload_length_in_bits(plc4c_s7_read_write_s7_pa
   if(_message->s7_payload_read_var_response_items != NULL) {
     plc4c_list_element* curElement = _message->s7_payload_read_var_response_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_s7_var_payload_data_item_length_in_bits((plc4c_s7_read_write_s7_var_payload_data_item*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_s7_var_payload_data_item_length_in_bits(ctx, (plc4c_s7_read_write_s7_var_payload_data_item*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -271,7 +272,7 @@ uint16_t plc4c_s7_read_write_s7_payload_length_in_bits(plc4c_s7_read_write_s7_pa
   if(_message->s7_payload_write_var_request_items != NULL) {
     plc4c_list_element* curElement = _message->s7_payload_write_var_request_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_s7_var_payload_data_item_length_in_bits((plc4c_s7_read_write_s7_var_payload_data_item*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_s7_var_payload_data_item_length_in_bits(ctx, (plc4c_s7_read_write_s7_var_payload_data_item*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -284,7 +285,7 @@ uint16_t plc4c_s7_read_write_s7_payload_length_in_bits(plc4c_s7_read_write_s7_pa
   if(_message->s7_payload_write_var_response_items != NULL) {
     plc4c_list_element* curElement = _message->s7_payload_write_var_response_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_s7_var_payload_status_item_length_in_bits((plc4c_s7_read_write_s7_var_payload_status_item*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_s7_var_payload_status_item_length_in_bits(ctx, (plc4c_s7_read_write_s7_var_payload_status_item*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -297,7 +298,7 @@ uint16_t plc4c_s7_read_write_s7_payload_length_in_bits(plc4c_s7_read_write_s7_pa
   if(_message->s7_payload_user_data_items != NULL) {
     plc4c_list_element* curElement = _message->s7_payload_user_data_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits((plc4c_s7_read_write_s7_payload_user_data_item*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(ctx, (plc4c_s7_read_write_s7_payload_user_data_item*) curElement->value);
       curElement = curElement->next;
     }
   }
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 6699d5bb81..7b61934da5 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
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -112,7 +113,7 @@ uint8_t PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_R
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_parse(plc4c_spi_read_buffer* readBuffer, uint8_t cpuFunctionType, uint8_t cpuSubfunction, plc4c_s7_read_write_s7_payload_user_data_item** _message) {
+plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, uint8_t cpuFunctionType, uint8_t cpuSubfunction, plc4c_s7_read_write_s7_payload_user_data_item** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -124,7 +125,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_parse(plc4c_spi_
 
   // Simple Field (returnCode)
   plc4c_s7_read_write_data_transport_error_code returnCode;
-  _res = plc4c_s7_read_write_data_transport_error_code_parse(readBuffer, (void*) &returnCode);
+  _res = plc4c_s7_read_write_data_transport_error_code_parse(ctx, readBuffer, (void*) &returnCode);
   if(_res != OK) {
     return _res;
   }
@@ -132,7 +133,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_parse(plc4c_spi_
 
   // Simple Field (transportSize)
   plc4c_s7_read_write_data_transport_size transportSize;
-  _res = plc4c_s7_read_write_data_transport_size_parse(readBuffer, (void*) &transportSize);
+  _res = plc4c_s7_read_write_data_transport_size_parse(ctx, readBuffer, (void*) &transportSize);
   if(_res != OK) {
     return _res;
   }
@@ -205,7 +206,7 @@ if( ( cpuFunctionType == 0x00 ) && ( cpuSubfunction == 0x03 ) ) { /* S7PayloadDi
 
   // Simple Field (TimeStamp)
   plc4c_s7_read_write_date_and_time* TimeStamp;
-  _res = plc4c_s7_read_write_date_and_time_parse(readBuffer, (void*) &TimeStamp);
+  _res = plc4c_s7_read_write_date_and_time_parse(ctx, readBuffer, (void*) &TimeStamp);
   if(_res != OK) {
     return _res;
   }
@@ -216,7 +217,7 @@ if( ( cpuFunctionType == 0x00 ) && ( cpuSubfunction == 0x05 ) ) { /* S7PayloadAl
 
   // Simple Field (alarmMessage)
   plc4c_s7_read_write_alarm_message_push_type* alarmMessage;
-  _res = plc4c_s7_read_write_alarm_message_push_type_parse(readBuffer, (void*) &alarmMessage);
+  _res = plc4c_s7_read_write_alarm_message_push_type_parse(ctx, readBuffer, (void*) &alarmMessage);
   if(_res != OK) {
     return _res;
   }
@@ -227,7 +228,7 @@ if( ( cpuFunctionType == 0x00 ) && ( cpuSubfunction == 0x06 ) ) { /* S7PayloadNo
 
   // Simple Field (alarmMessage)
   plc4c_s7_read_write_alarm_message_push_type* alarmMessage;
-  _res = plc4c_s7_read_write_alarm_message_push_type_parse(readBuffer, (void*) &alarmMessage);
+  _res = plc4c_s7_read_write_alarm_message_push_type_parse(ctx, readBuffer, (void*) &alarmMessage);
   if(_res != OK) {
     return _res;
   }
@@ -238,7 +239,7 @@ if( ( cpuFunctionType == 0x00 ) && ( cpuSubfunction == 0x0c ) ) { /* S7PayloadAl
 
   // Simple Field (alarmMessage)
   plc4c_s7_read_write_alarm_message_ack_push_type* alarmMessage;
-  _res = plc4c_s7_read_write_alarm_message_ack_push_type_parse(readBuffer, (void*) &alarmMessage);
+  _res = plc4c_s7_read_write_alarm_message_ack_push_type_parse(ctx, readBuffer, (void*) &alarmMessage);
   if(_res != OK) {
     return _res;
   }
@@ -249,7 +250,7 @@ if( ( cpuFunctionType == 0x00 ) && ( cpuSubfunction == 0x11 ) ) { /* S7PayloadAl
 
   // Simple Field (alarmMessage)
   plc4c_s7_read_write_alarm_message_push_type* alarmMessage;
-  _res = plc4c_s7_read_write_alarm_message_push_type_parse(readBuffer, (void*) &alarmMessage);
+  _res = plc4c_s7_read_write_alarm_message_push_type_parse(ctx, readBuffer, (void*) &alarmMessage);
   if(_res != OK) {
     return _res;
   }
@@ -260,7 +261,7 @@ if( ( cpuFunctionType == 0x00 ) && ( cpuSubfunction == 0x12 ) ) { /* S7PayloadAl
 
   // Simple Field (alarmMessage)
   plc4c_s7_read_write_alarm_message_push_type* alarmMessage;
-  _res = plc4c_s7_read_write_alarm_message_push_type_parse(readBuffer, (void*) &alarmMessage);
+  _res = plc4c_s7_read_write_alarm_message_push_type_parse(ctx, readBuffer, (void*) &alarmMessage);
   if(_res != OK) {
     return _res;
   }
@@ -271,7 +272,7 @@ if( ( cpuFunctionType == 0x00 ) && ( cpuSubfunction == 0x13 ) ) { /* S7PayloadAl
 
   // Simple Field (alarmMessage)
   plc4c_s7_read_write_alarm_message_push_type* alarmMessage;
-  _res = plc4c_s7_read_write_alarm_message_push_type_parse(readBuffer, (void*) &alarmMessage);
+  _res = plc4c_s7_read_write_alarm_message_push_type_parse(ctx, readBuffer, (void*) &alarmMessage);
   if(_res != OK) {
     return _res;
   }
@@ -282,7 +283,7 @@ if( ( cpuFunctionType == 0x00 ) && ( cpuSubfunction == 0x16 ) ) { /* S7PayloadNo
 
   // Simple Field (alarmMessage)
   plc4c_s7_read_write_alarm_message_push_type* alarmMessage;
-  _res = plc4c_s7_read_write_alarm_message_push_type_parse(readBuffer, (void*) &alarmMessage);
+  _res = plc4c_s7_read_write_alarm_message_push_type_parse(ctx, readBuffer, (void*) &alarmMessage);
   if(_res != OK) {
     return _res;
   }
@@ -293,7 +294,7 @@ if( ( cpuFunctionType == 0x04 ) && ( cpuSubfunction == 0x01 ) ) { /* S7PayloadUs
 
   // Simple Field (szlId)
   plc4c_s7_read_write_szl_id* szlId;
-  _res = plc4c_s7_read_write_szl_id_parse(readBuffer, (void*) &szlId);
+  _res = plc4c_s7_read_write_szl_id_parse(ctx, readBuffer, (void*) &szlId);
   if(_res != OK) {
     return _res;
   }
@@ -313,7 +314,7 @@ if( ( cpuFunctionType == 0x08 ) && ( cpuSubfunction == 0x01 ) ) { /* S7PayloadUs
 
   // Simple Field (szlId)
   plc4c_s7_read_write_szl_id* szlId;
-  _res = plc4c_s7_read_write_szl_id_parse(readBuffer, (void*) &szlId);
+  _res = plc4c_s7_read_write_szl_id_parse(ctx, readBuffer, (void*) &szlId);
   if(_res != OK) {
     return _res;
   }
@@ -361,7 +362,7 @@ if( ( cpuFunctionType == 0x08 ) && ( cpuSubfunction == 0x01 ) ) { /* S7PayloadUs
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_szl_data_tree_item* _value = NULL;
-      _res = plc4c_s7_read_write_szl_data_tree_item_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_szl_data_tree_item_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -407,7 +408,7 @@ if( ( cpuFunctionType == 0x04 ) && ( cpuSubfunction == 0x02 ) ) { /* S7PayloadUs
   // Optional Field (Alarmtype) (Can be skipped, if a given expression evaluates to false)
   plc4c_s7_read_write_alarm_state_type* Alarmtype = NULL;
   if((Subscription) >= (128)) {
-    _res = plc4c_s7_read_write_alarm_state_type_parse(readBuffer, &Alarmtype);
+    _res = plc4c_s7_read_write_alarm_state_type_parse(ctx, readBuffer, &Alarmtype);
     if(_res != OK) {
       return _res;
     }
@@ -480,7 +481,7 @@ if( ( cpuFunctionType == 0x08 ) && ( cpuSubfunction == 0x02 ) && ( dataLength ==
 
   // Simple Field (alarmType)
   plc4c_s7_read_write_alarm_type alarmType;
-  _res = plc4c_s7_read_write_alarm_type_parse(readBuffer, (void*) &alarmType);
+  _res = plc4c_s7_read_write_alarm_type_parse(ctx, readBuffer, (void*) &alarmType);
   if(_res != OK) {
     return _res;
   }
@@ -536,7 +537,7 @@ if( ( cpuFunctionType == 0x04 ) && ( cpuSubfunction == 0x0b ) ) { /* S7PayloadUs
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_alarm_message_object_ack_type* _value = NULL;
-      _res = plc4c_s7_read_write_alarm_message_object_ack_type_parse(readBuffer, (void*) &_value);
+      _res = plc4c_s7_read_write_alarm_message_object_ack_type_parse(ctx, readBuffer, (void*) &_value);
       if(_res != OK) {
         return _res;
       }
@@ -639,7 +640,7 @@ if( ( cpuFunctionType == 0x04 ) && ( cpuSubfunction == 0x13 ) ) { /* S7PayloadUs
 
   // Simple Field (syntaxId)
   plc4c_s7_read_write_syntax_id_type syntaxId;
-  _res = plc4c_s7_read_write_syntax_id_type_parse(readBuffer, (void*) &syntaxId);
+  _res = plc4c_s7_read_write_syntax_id_type_parse(ctx, readBuffer, (void*) &syntaxId);
   if(_res != OK) {
     return _res;
   }
@@ -661,7 +662,7 @@ if( ( cpuFunctionType == 0x04 ) && ( cpuSubfunction == 0x13 ) ) { /* S7PayloadUs
 
   // Simple Field (queryType)
   plc4c_s7_read_write_query_type queryType;
-  _res = plc4c_s7_read_write_query_type_parse(readBuffer, (void*) &queryType);
+  _res = plc4c_s7_read_write_query_type_parse(ctx, readBuffer, (void*) &queryType);
   if(_res != OK) {
     return _res;
   }
@@ -683,7 +684,7 @@ if( ( cpuFunctionType == 0x04 ) && ( cpuSubfunction == 0x13 ) ) { /* S7PayloadUs
 
   // Simple Field (alarmType)
   plc4c_s7_read_write_alarm_type alarmType;
-  _res = plc4c_s7_read_write_alarm_type_parse(readBuffer, (void*) &alarmType);
+  _res = plc4c_s7_read_write_alarm_type_parse(ctx, readBuffer, (void*) &alarmType);
   if(_res != OK) {
     return _res;
   }
@@ -718,7 +719,7 @@ if( ( cpuFunctionType == 0x08 ) && ( cpuSubfunction == 0x13 ) ) { /* S7PayloadUs
 
   // Simple Field (pudicfReturnCode)
   plc4c_s7_read_write_data_transport_error_code pudicfReturnCode;
-  _res = plc4c_s7_read_write_data_transport_error_code_parse(readBuffer, (void*) &pudicfReturnCode);
+  _res = plc4c_s7_read_write_data_transport_error_code_parse(ctx, readBuffer, (void*) &pudicfReturnCode);
   if(_res != OK) {
     return _res;
   }
@@ -727,7 +728,7 @@ if( ( cpuFunctionType == 0x08 ) && ( cpuSubfunction == 0x13 ) ) { /* S7PayloadUs
 
   // Simple Field (pudicftransportSize)
   plc4c_s7_read_write_data_transport_size pudicftransportSize;
-  _res = plc4c_s7_read_write_data_transport_size_parse(readBuffer, (void*) &pudicftransportSize);
+  _res = plc4c_s7_read_write_data_transport_size_parse(ctx, readBuffer, (void*) &pudicftransportSize);
   if(_res != OK) {
     return _res;
   }
@@ -750,23 +751,23 @@ if( ( cpuFunctionType == 0x08 ) && ( cpuSubfunction == 0x13 ) ) { /* S7PayloadUs
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_payload_user_data_item* _message) {
+plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_payload_user_data_item* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (returnCode)
-  _res = plc4c_s7_read_write_data_transport_error_code_serialize(writeBuffer, &_message->return_code);
+  _res = plc4c_s7_read_write_data_transport_error_code_serialize(ctx, writeBuffer, &_message->return_code);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (transportSize)
-  _res = plc4c_s7_read_write_data_transport_size_serialize(writeBuffer, &_message->transport_size);
+  _res = plc4c_s7_read_write_data_transport_size_serialize(ctx, writeBuffer, &_message->transport_size);
   if(_res != OK) {
     return _res;
   }
 
   // Implicit Field (dataLength) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
-  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, (plc4c_s7_read_write_s7_payload_user_data_item_length_in_bytes(_message)) - (4));
+  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, (plc4c_s7_read_write_s7_payload_user_data_item_length_in_bytes(ctx, _message)) - (4));
   if(_res != OK) {
     return _res;
   }
@@ -812,7 +813,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
   }
 
   // Simple Field (TimeStamp)
-  _res = plc4c_s7_read_write_date_and_time_serialize(writeBuffer, _message->s7_payload_diagnostic_message_time_stamp);
+  _res = plc4c_s7_read_write_date_and_time_serialize(ctx, writeBuffer, _message->s7_payload_diagnostic_message_time_stamp);
   if(_res != OK) {
     return _res;
   }
@@ -822,7 +823,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_alarm8: {
 
   // Simple Field (alarmMessage)
-  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(writeBuffer, _message->s7_payload_alarm8_alarm_message);
+  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(ctx, writeBuffer, _message->s7_payload_alarm8_alarm_message);
   if(_res != OK) {
     return _res;
   }
@@ -832,7 +833,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_notify: {
 
   // Simple Field (alarmMessage)
-  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(writeBuffer, _message->s7_payload_notify_alarm_message);
+  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(ctx, writeBuffer, _message->s7_payload_notify_alarm_message);
   if(_res != OK) {
     return _res;
   }
@@ -842,7 +843,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_alarm_ack_ind: {
 
   // Simple Field (alarmMessage)
-  _res = plc4c_s7_read_write_alarm_message_ack_push_type_serialize(writeBuffer, _message->s7_payload_alarm_ack_ind_alarm_message);
+  _res = plc4c_s7_read_write_alarm_message_ack_push_type_serialize(ctx, writeBuffer, _message->s7_payload_alarm_ack_ind_alarm_message);
   if(_res != OK) {
     return _res;
   }
@@ -852,7 +853,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_alarm_sq: {
 
   // Simple Field (alarmMessage)
-  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(writeBuffer, _message->s7_payload_alarm_sq_alarm_message);
+  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(ctx, writeBuffer, _message->s7_payload_alarm_sq_alarm_message);
   if(_res != OK) {
     return _res;
   }
@@ -862,7 +863,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_alarm_s: {
 
   // Simple Field (alarmMessage)
-  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(writeBuffer, _message->s7_payload_alarm_s_alarm_message);
+  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(ctx, writeBuffer, _message->s7_payload_alarm_s_alarm_message);
   if(_res != OK) {
     return _res;
   }
@@ -872,7 +873,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_alarm_sc: {
 
   // Simple Field (alarmMessage)
-  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(writeBuffer, _message->s7_payload_alarm_sc_alarm_message);
+  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(ctx, writeBuffer, _message->s7_payload_alarm_sc_alarm_message);
   if(_res != OK) {
     return _res;
   }
@@ -882,7 +883,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_notify8: {
 
   // Simple Field (alarmMessage)
-  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(writeBuffer, _message->s7_payload_notify8_alarm_message);
+  _res = plc4c_s7_read_write_alarm_message_push_type_serialize(ctx, writeBuffer, _message->s7_payload_notify8_alarm_message);
   if(_res != OK) {
     return _res;
   }
@@ -892,7 +893,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_user_data_item_cpu_function_read_szl_request: {
 
   // Simple Field (szlId)
-  _res = plc4c_s7_read_write_szl_id_serialize(writeBuffer, _message->s7_payload_user_data_item_cpu_function_read_szl_request_szl_id);
+  _res = plc4c_s7_read_write_szl_id_serialize(ctx, writeBuffer, _message->s7_payload_user_data_item_cpu_function_read_szl_request_szl_id);
   if(_res != OK) {
     return _res;
   }
@@ -908,7 +909,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_user_data_item_cpu_function_read_szl_response: {
 
   // Simple Field (szlId)
-  _res = plc4c_s7_read_write_szl_id_serialize(writeBuffer, _message->s7_payload_user_data_item_cpu_function_read_szl_response_szl_id);
+  _res = plc4c_s7_read_write_szl_id_serialize(ctx, writeBuffer, _message->s7_payload_user_data_item_cpu_function_read_szl_response_szl_id);
   if(_res != OK) {
     return _res;
   }
@@ -934,7 +935,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_szl_data_tree_item* _value = (plc4c_s7_read_write_szl_data_tree_item*) plc4c_utils_list_get_value(_message->s7_payload_user_data_item_cpu_function_read_szl_response_items, curItem);
-      _res = plc4c_s7_read_write_szl_data_tree_item_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_szl_data_tree_item_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -965,7 +966,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
 
   // Optional Field (Alarmtype)
   if(_message->s7_payload_user_data_item_cpu_function_msg_subscription_alarmtype != NULL) {
-    _res = plc4c_s7_read_write_alarm_state_type_serialize(writeBuffer, &_message->s7_payload_user_data_item_cpu_function_msg_subscription_alarmtype);
+    _res = plc4c_s7_read_write_alarm_state_type_serialize(ctx, writeBuffer, &_message->s7_payload_user_data_item_cpu_function_msg_subscription_alarmtype);
     if(_res != OK) {
       return _res;
     }
@@ -1016,7 +1017,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
   }
 
   // Simple Field (alarmType)
-  _res = plc4c_s7_read_write_alarm_type_serialize(writeBuffer, &_message->s7_payload_user_data_item_cpu_function_msg_subscription_alarm_response_alarm_type);
+  _res = plc4c_s7_read_write_alarm_type_serialize(ctx, writeBuffer, &_message->s7_payload_user_data_item_cpu_function_msg_subscription_alarm_response_alarm_type);
   if(_res != OK) {
     return _res;
   }
@@ -1055,7 +1056,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
     for(int curItem = 0; curItem < itemCount; curItem++) {
       bool lastItem = curItem == (itemCount - 1);
       plc4c_s7_read_write_alarm_message_object_ack_type* _value = (plc4c_s7_read_write_alarm_message_object_ack_type*) plc4c_utils_list_get_value(_message->s7_payload_user_data_item_cpu_function_alarm_ack_message_objects, curItem);
-      _res = plc4c_s7_read_write_alarm_message_object_ack_type_serialize(writeBuffer, (void*) _value);
+      _res = plc4c_s7_read_write_alarm_message_object_ack_type_serialize(ctx, writeBuffer, (void*) _value);
       if(_res != OK) {
         return _res;
       }
@@ -1105,7 +1106,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
   plc4c_spi_write_unsigned_byte(writeBuffer, 8, PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_LENGTH());
 
   // Simple Field (syntaxId)
-  _res = plc4c_s7_read_write_syntax_id_type_serialize(writeBuffer, &_message->s7_payload_user_data_item_cpu_function_alarm_query_syntax_id);
+  _res = plc4c_s7_read_write_syntax_id_type_serialize(ctx, writeBuffer, &_message->s7_payload_user_data_item_cpu_function_alarm_query_syntax_id);
   if(_res != OK) {
     return _res;
   }
@@ -1117,7 +1118,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
   }
 
   // Simple Field (queryType)
-  _res = plc4c_s7_read_write_query_type_serialize(writeBuffer, &_message->s7_payload_user_data_item_cpu_function_alarm_query_query_type);
+  _res = plc4c_s7_read_write_query_type_serialize(ctx, writeBuffer, &_message->s7_payload_user_data_item_cpu_function_alarm_query_query_type);
   if(_res != OK) {
     return _res;
   }
@@ -1129,7 +1130,7 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
   }
 
   // Simple Field (alarmType)
-  _res = plc4c_s7_read_write_alarm_type_serialize(writeBuffer, &_message->s7_payload_user_data_item_cpu_function_alarm_query_alarm_type);
+  _res = plc4c_s7_read_write_alarm_type_serialize(ctx, writeBuffer, &_message->s7_payload_user_data_item_cpu_function_alarm_query_alarm_type);
   if(_res != OK) {
     return _res;
   }
@@ -1145,13 +1146,13 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
   plc4c_spi_write_unsigned_byte(writeBuffer, 8, PLC4C_S7_READ_WRITE_S7_PAYLOAD_USER_DATA_ITEM_CPU_FUNCTION_ALARM_QUERY_RESPONSE_NUMBER_MESSAGE_OBJ());
 
   // Simple Field (pudicfReturnCode)
-  _res = plc4c_s7_read_write_data_transport_error_code_serialize(writeBuffer, &_message->s7_payload_user_data_item_cpu_function_alarm_query_response_pudicf_return_code);
+  _res = plc4c_s7_read_write_data_transport_error_code_serialize(ctx, writeBuffer, &_message->s7_payload_user_data_item_cpu_function_alarm_query_response_pudicf_return_code);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (pudicftransportSize)
-  _res = plc4c_s7_read_write_data_transport_size_serialize(writeBuffer, &_message->s7_payload_user_data_item_cpu_function_alarm_query_response_pudicftransport_size);
+  _res = plc4c_s7_read_write_data_transport_size_serialize(ctx, writeBuffer, &_message->s7_payload_user_data_item_cpu_function_alarm_query_response_pudicftransport_size);
   if(_res != OK) {
     return _res;
   }
@@ -1169,18 +1170,18 @@ plc4c_return_code plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4c_
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bytes(plc4c_s7_read_write_s7_payload_user_data_item* _message) {
-  return plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_payload_user_data_item* _message) {
+  return plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_read_write_s7_payload_user_data_item* _message) {
+uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_payload_user_data_item* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (returnCode)
-  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(&_message->return_code);
+  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(ctx, &_message->return_code);
 
   // Simple field (transportSize)
-  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(&_message->transport_size);
+  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(ctx, &_message->transport_size);
 
   // Implicit Field (dataLength)
   lengthInBits += 16;
@@ -1214,63 +1215,63 @@ uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_r
 
 
   // Simple field (TimeStamp)
-  lengthInBits += plc4c_s7_read_write_date_and_time_length_in_bits(_message->s7_payload_diagnostic_message_time_stamp);
+  lengthInBits += plc4c_s7_read_write_date_and_time_length_in_bits(ctx, _message->s7_payload_diagnostic_message_time_stamp);
 
       break;
     }
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_alarm8: {
 
   // Simple field (alarmMessage)
-  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(_message->s7_payload_alarm8_alarm_message);
+  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(ctx, _message->s7_payload_alarm8_alarm_message);
 
       break;
     }
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_notify: {
 
   // Simple field (alarmMessage)
-  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(_message->s7_payload_notify_alarm_message);
+  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(ctx, _message->s7_payload_notify_alarm_message);
 
       break;
     }
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_alarm_ack_ind: {
 
   // Simple field (alarmMessage)
-  lengthInBits += plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bits(_message->s7_payload_alarm_ack_ind_alarm_message);
+  lengthInBits += plc4c_s7_read_write_alarm_message_ack_push_type_length_in_bits(ctx, _message->s7_payload_alarm_ack_ind_alarm_message);
 
       break;
     }
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_alarm_sq: {
 
   // Simple field (alarmMessage)
-  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(_message->s7_payload_alarm_sq_alarm_message);
+  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(ctx, _message->s7_payload_alarm_sq_alarm_message);
 
       break;
     }
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_alarm_s: {
 
   // Simple field (alarmMessage)
-  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(_message->s7_payload_alarm_s_alarm_message);
+  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(ctx, _message->s7_payload_alarm_s_alarm_message);
 
       break;
     }
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_alarm_sc: {
 
   // Simple field (alarmMessage)
-  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(_message->s7_payload_alarm_sc_alarm_message);
+  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(ctx, _message->s7_payload_alarm_sc_alarm_message);
 
       break;
     }
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_notify8: {
 
   // Simple field (alarmMessage)
-  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(_message->s7_payload_notify8_alarm_message);
+  lengthInBits += plc4c_s7_read_write_alarm_message_push_type_length_in_bits(ctx, _message->s7_payload_notify8_alarm_message);
 
       break;
     }
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_user_data_item_cpu_function_read_szl_request: {
 
   // Simple field (szlId)
-  lengthInBits += plc4c_s7_read_write_szl_id_length_in_bits(_message->s7_payload_user_data_item_cpu_function_read_szl_request_szl_id);
+  lengthInBits += plc4c_s7_read_write_szl_id_length_in_bits(ctx, _message->s7_payload_user_data_item_cpu_function_read_szl_request_szl_id);
 
 
   // Simple field (szlIndex)
@@ -1281,7 +1282,7 @@ uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_r
     case plc4c_s7_read_write_s7_payload_user_data_item_type_plc4c_s7_read_write_s7_payload_user_data_item_cpu_function_read_szl_response: {
 
   // Simple field (szlId)
-  lengthInBits += plc4c_s7_read_write_szl_id_length_in_bits(_message->s7_payload_user_data_item_cpu_function_read_szl_response_szl_id);
+  lengthInBits += plc4c_s7_read_write_szl_id_length_in_bits(ctx, _message->s7_payload_user_data_item_cpu_function_read_szl_response_szl_id);
 
 
   // Simple field (szlIndex)
@@ -1300,7 +1301,7 @@ uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_r
   if(_message->s7_payload_user_data_item_cpu_function_read_szl_response_items != NULL) {
     plc4c_list_element* curElement = _message->s7_payload_user_data_item_cpu_function_read_szl_response_items->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_szl_data_tree_item_length_in_bits((plc4c_s7_read_write_szl_data_tree_item*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_szl_data_tree_item_length_in_bits(ctx, (plc4c_s7_read_write_szl_data_tree_item*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -1323,7 +1324,7 @@ uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_r
 
   // Optional Field (Alarmtype)
   if(_message->s7_payload_user_data_item_cpu_function_msg_subscription_alarmtype != NULL) {
-    lengthInBits += plc4c_s7_read_write_alarm_state_type_length_in_bits(_message->s7_payload_user_data_item_cpu_function_msg_subscription_alarmtype);
+    lengthInBits += plc4c_s7_read_write_alarm_state_type_length_in_bits(ctx, _message->s7_payload_user_data_item_cpu_function_msg_subscription_alarmtype);
   }
 
 
@@ -1360,7 +1361,7 @@ uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_r
 
 
   // Simple field (alarmType)
-  lengthInBits += plc4c_s7_read_write_alarm_type_length_in_bits(&_message->s7_payload_user_data_item_cpu_function_msg_subscription_alarm_response_alarm_type);
+  lengthInBits += plc4c_s7_read_write_alarm_type_length_in_bits(ctx, &_message->s7_payload_user_data_item_cpu_function_msg_subscription_alarm_response_alarm_type);
 
 
   // Simple field (reserved02)
@@ -1386,7 +1387,7 @@ uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_r
   if(_message->s7_payload_user_data_item_cpu_function_alarm_ack_message_objects != NULL) {
     plc4c_list_element* curElement = _message->s7_payload_user_data_item_cpu_function_alarm_ack_message_objects->tail;
     while (curElement != NULL) {
-      lengthInBits += plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits((plc4c_s7_read_write_alarm_message_object_ack_type*) curElement->value);
+      lengthInBits += plc4c_s7_read_write_alarm_message_object_ack_type_length_in_bits(ctx, (plc4c_s7_read_write_alarm_message_object_ack_type*) curElement->value);
       curElement = curElement->next;
     }
   }
@@ -1427,7 +1428,7 @@ uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_r
 
 
   // Simple field (syntaxId)
-  lengthInBits += plc4c_s7_read_write_syntax_id_type_length_in_bits(&_message->s7_payload_user_data_item_cpu_function_alarm_query_syntax_id);
+  lengthInBits += plc4c_s7_read_write_syntax_id_type_length_in_bits(ctx, &_message->s7_payload_user_data_item_cpu_function_alarm_query_syntax_id);
 
 
   // Reserved Field (reserved)
@@ -1435,7 +1436,7 @@ uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_r
 
 
   // Simple field (queryType)
-  lengthInBits += plc4c_s7_read_write_query_type_length_in_bits(&_message->s7_payload_user_data_item_cpu_function_alarm_query_query_type);
+  lengthInBits += plc4c_s7_read_write_query_type_length_in_bits(ctx, &_message->s7_payload_user_data_item_cpu_function_alarm_query_query_type);
 
 
   // Reserved Field (reserved)
@@ -1443,7 +1444,7 @@ uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_r
 
 
   // Simple field (alarmType)
-  lengthInBits += plc4c_s7_read_write_alarm_type_length_in_bits(&_message->s7_payload_user_data_item_cpu_function_alarm_query_alarm_type);
+  lengthInBits += plc4c_s7_read_write_alarm_type_length_in_bits(ctx, &_message->s7_payload_user_data_item_cpu_function_alarm_query_alarm_type);
 
       break;
     }
@@ -1458,11 +1459,11 @@ uint16_t plc4c_s7_read_write_s7_payload_user_data_item_length_in_bits(plc4c_s7_r
 
 
   // Simple field (pudicfReturnCode)
-  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(&_message->s7_payload_user_data_item_cpu_function_alarm_query_response_pudicf_return_code);
+  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(ctx, &_message->s7_payload_user_data_item_cpu_function_alarm_query_response_pudicf_return_code);
 
 
   // Simple field (pudicftransportSize)
-  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(&_message->s7_payload_user_data_item_cpu_function_alarm_query_response_pudicftransport_size);
+  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(ctx, &_message->s7_payload_user_data_item_cpu_function_alarm_query_response_pudicftransport_size);
 
 
   // Reserved Field (reserved)
diff --git a/plc4c/generated-sources/s7/src/s7_var_payload_data_item.c b/plc4c/generated-sources/s7/src/s7_var_payload_data_item.c
index 0086a684b4..990daa4502 100644
--- a/plc4c/generated-sources/s7/src/s7_var_payload_data_item.c
+++ b/plc4c/generated-sources/s7/src/s7_var_payload_data_item.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_payload_data_item** _message) {
+plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_payload_data_item** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -39,7 +40,7 @@ plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_parse(plc4c_spi_r
 
   // Simple Field (returnCode)
   plc4c_s7_read_write_data_transport_error_code returnCode;
-  _res = plc4c_s7_read_write_data_transport_error_code_parse(readBuffer, (void*) &returnCode);
+  _res = plc4c_s7_read_write_data_transport_error_code_parse(ctx, readBuffer, (void*) &returnCode);
   if(_res != OK) {
     return _res;
   }
@@ -47,7 +48,7 @@ plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_parse(plc4c_spi_r
 
   // Simple Field (transportSize)
   plc4c_s7_read_write_data_transport_size transportSize;
-  _res = plc4c_s7_read_write_data_transport_size_parse(readBuffer, (void*) &transportSize);
+  _res = plc4c_s7_read_write_data_transport_size_parse(ctx, readBuffer, (void*) &transportSize);
   if(_res != OK) {
     return _res;
   }
@@ -83,7 +84,7 @@ plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_parse(plc4c_spi_r
 
   // Padding Field (padding)
   {
-    int _timesPadding = (int) ((plc4c_spi_read_has_more(readBuffer, 8)) && (((plc4c_spi_evaluation_helper_count(data)) % (2))));
+    int _timesPadding = (int) ((plc4c_spi_read_has_more(readBuffer, 8)) && ((((!(plc4x_spi_context_get_last_item_from_context(ctx)))) ? ((plc4c_spi_evaluation_helper_count(data)) % (2)) : 0)));
     while (_timesPadding-- > 0) {
       // Just read the padding data and ignore it
       uint8_t _paddingValue = 0;
@@ -97,17 +98,17 @@ plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_parse(plc4c_spi_r
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_payload_data_item* _message) {
+plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_payload_data_item* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (returnCode)
-  _res = plc4c_s7_read_write_data_transport_error_code_serialize(writeBuffer, &_message->return_code);
+  _res = plc4c_s7_read_write_data_transport_error_code_serialize(ctx, writeBuffer, &_message->return_code);
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (transportSize)
-  _res = plc4c_s7_read_write_data_transport_size_serialize(writeBuffer, &_message->transport_size);
+  _res = plc4c_s7_read_write_data_transport_size_serialize(ctx, writeBuffer, &_message->transport_size);
   if(_res != OK) {
     return _res;
   }
@@ -130,7 +131,7 @@ plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_serialize(plc4c_s
 
   // Padding Field (padding)
   {
-    int _timesPadding = (int) (((plc4c_spi_evaluation_helper_count(_message->data)) % (2)));
+    int _timesPadding = (int) ((((!(plc4x_spi_context_get_last_item_from_context(ctx)))) ? ((plc4c_spi_evaluation_helper_count(_message->data)) % (2)) : 0));
     while (_timesPadding-- > 0) {
       // Just output the default padding data
       _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, 0x00);
@@ -143,18 +144,18 @@ plc4c_return_code plc4c_s7_read_write_s7_var_payload_data_item_serialize(plc4c_s
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_s7_var_payload_data_item_length_in_bytes(plc4c_s7_read_write_s7_var_payload_data_item* _message) {
-  return plc4c_s7_read_write_s7_var_payload_data_item_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_s7_var_payload_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_payload_data_item* _message) {
+  return plc4c_s7_read_write_s7_var_payload_data_item_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_s7_var_payload_data_item_length_in_bits(plc4c_s7_read_write_s7_var_payload_data_item* _message) {
+uint16_t plc4c_s7_read_write_s7_var_payload_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_payload_data_item* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (returnCode)
-  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(&_message->return_code);
+  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(ctx, &_message->return_code);
 
   // Simple field (transportSize)
-  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(&_message->transport_size);
+  lengthInBits += plc4c_s7_read_write_data_transport_size_length_in_bits(ctx, &_message->transport_size);
 
   // Implicit Field (dataLength)
   lengthInBits += 16;
@@ -163,7 +164,7 @@ uint16_t plc4c_s7_read_write_s7_var_payload_data_item_length_in_bits(plc4c_s7_re
   lengthInBits += 8 * plc4c_utils_list_size(_message->data);
 
   // Padding Field (padding)
-  int _needsPadding = (int) (((plc4c_spi_evaluation_helper_count(_message->data)) % (2)));
+  int _needsPadding = (int) ((((!(plc4x_spi_context_get_last_item_from_context(ctx)))) ? ((plc4c_spi_evaluation_helper_count(_message->data)) % (2)) : 0));
   while(_needsPadding-- > 0) {
     lengthInBits += 8;
   }
diff --git a/plc4c/generated-sources/s7/src/s7_var_payload_status_item.c b/plc4c/generated-sources/s7/src/s7_var_payload_status_item.c
index a8d0eaff1c..9a31ce9598 100644
--- a/plc4c/generated-sources/s7/src/s7_var_payload_status_item.c
+++ b/plc4c/generated-sources/s7/src/s7_var_payload_status_item.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_s7_var_payload_status_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_payload_status_item** _message) {
+plc4c_return_code plc4c_s7_read_write_s7_var_payload_status_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_payload_status_item** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -39,7 +40,7 @@ plc4c_return_code plc4c_s7_read_write_s7_var_payload_status_item_parse(plc4c_spi
 
   // Simple Field (returnCode)
   plc4c_s7_read_write_data_transport_error_code returnCode;
-  _res = plc4c_s7_read_write_data_transport_error_code_parse(readBuffer, (void*) &returnCode);
+  _res = plc4c_s7_read_write_data_transport_error_code_parse(ctx, readBuffer, (void*) &returnCode);
   if(_res != OK) {
     return _res;
   }
@@ -48,11 +49,11 @@ plc4c_return_code plc4c_s7_read_write_s7_var_payload_status_item_parse(plc4c_spi
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_s7_var_payload_status_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_payload_status_item* _message) {
+plc4c_return_code plc4c_s7_read_write_s7_var_payload_status_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_payload_status_item* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (returnCode)
-  _res = plc4c_s7_read_write_data_transport_error_code_serialize(writeBuffer, &_message->return_code);
+  _res = plc4c_s7_read_write_data_transport_error_code_serialize(ctx, writeBuffer, &_message->return_code);
   if(_res != OK) {
     return _res;
   }
@@ -60,15 +61,15 @@ plc4c_return_code plc4c_s7_read_write_s7_var_payload_status_item_serialize(plc4c
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_s7_var_payload_status_item_length_in_bytes(plc4c_s7_read_write_s7_var_payload_status_item* _message) {
-  return plc4c_s7_read_write_s7_var_payload_status_item_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_s7_var_payload_status_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_payload_status_item* _message) {
+  return plc4c_s7_read_write_s7_var_payload_status_item_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_s7_var_payload_status_item_length_in_bits(plc4c_s7_read_write_s7_var_payload_status_item* _message) {
+uint16_t plc4c_s7_read_write_s7_var_payload_status_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_payload_status_item* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (returnCode)
-  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(&_message->return_code);
+  lengthInBits += plc4c_s7_read_write_data_transport_error_code_length_in_bits(ctx, &_message->return_code);
 
   return lengthInBits;
 }
diff --git a/plc4c/generated-sources/s7/src/s7_var_request_parameter_item.c b/plc4c/generated-sources/s7/src/s7_var_request_parameter_item.c
index 922cd989be..c8bb3efd31 100644
--- a/plc4c/generated-sources/s7/src/s7_var_request_parameter_item.c
+++ b/plc4c/generated-sources/s7/src/s7_var_request_parameter_item.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -48,7 +49,7 @@ plc4c_s7_read_write_s7_var_request_parameter_item plc4c_s7_read_write_s7_var_req
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_s7_var_request_parameter_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_request_parameter_item** _message) {
+plc4c_return_code plc4c_s7_read_write_s7_var_request_parameter_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_s7_var_request_parameter_item** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -80,7 +81,7 @@ if( itemType == 0x12 ) { /* S7VarRequestParameterItemAddress */
 
   // Simple Field (address)
   plc4c_s7_read_write_s7_address* address;
-  _res = plc4c_s7_read_write_s7_address_parse(readBuffer, (void*) &address);
+  _res = plc4c_s7_read_write_s7_address_parse(ctx, readBuffer, (void*) &address);
   if(_res != OK) {
     return _res;
   }
@@ -90,7 +91,7 @@ if( itemType == 0x12 ) { /* S7VarRequestParameterItemAddress */
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_s7_var_request_parameter_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_request_parameter_item* _message) {
+plc4c_return_code plc4c_s7_read_write_s7_var_request_parameter_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_s7_var_request_parameter_item* _message) {
   plc4c_return_code _res = OK;
 
   // Discriminator Field (itemType)
@@ -101,13 +102,13 @@ plc4c_return_code plc4c_s7_read_write_s7_var_request_parameter_item_serialize(pl
     case plc4c_s7_read_write_s7_var_request_parameter_item_type_plc4c_s7_read_write_s7_var_request_parameter_item_address: {
 
   // Implicit Field (itemLength) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
-  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, plc4c_s7_read_write_s7_address_length_in_bytes(_message->s7_var_request_parameter_item_address_address));
+  _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, plc4c_s7_read_write_s7_address_length_in_bytes(ctx, _message->s7_var_request_parameter_item_address_address));
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (address)
-  _res = plc4c_s7_read_write_s7_address_serialize(writeBuffer, _message->s7_var_request_parameter_item_address_address);
+  _res = plc4c_s7_read_write_s7_address_serialize(ctx, writeBuffer, _message->s7_var_request_parameter_item_address_address);
   if(_res != OK) {
     return _res;
   }
@@ -119,11 +120,11 @@ plc4c_return_code plc4c_s7_read_write_s7_var_request_parameter_item_serialize(pl
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bytes(plc4c_s7_read_write_s7_var_request_parameter_item* _message) {
-  return plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_request_parameter_item* _message) {
+  return plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bits(plc4c_s7_read_write_s7_var_request_parameter_item* _message) {
+uint16_t plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_s7_var_request_parameter_item* _message) {
   uint16_t lengthInBits = 0;
 
   // Discriminator Field (itemType)
@@ -138,7 +139,7 @@ uint16_t plc4c_s7_read_write_s7_var_request_parameter_item_length_in_bits(plc4c_
 
 
   // Simple field (address)
-  lengthInBits += plc4c_s7_read_write_s7_address_length_in_bits(_message->s7_var_request_parameter_item_address_address);
+  lengthInBits += plc4c_s7_read_write_s7_address_length_in_bits(ctx, _message->s7_var_request_parameter_item_address_address);
 
       break;
     }
diff --git a/plc4c/generated-sources/s7/src/state.c b/plc4c/generated-sources/s7/src/state.c
index f6d77b9641..66caf261b5 100644
--- a/plc4c/generated-sources/s7/src/state.c
+++ b/plc4c/generated-sources/s7/src/state.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_state_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_state** _message) {
+plc4c_return_code plc4c_s7_read_write_state_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_state** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -104,7 +105,7 @@ plc4c_return_code plc4c_s7_read_write_state_parse(plc4c_spi_read_buffer* readBuf
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_state_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_state* _message) {
+plc4c_return_code plc4c_s7_read_write_state_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_state* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (SIG_8)
@@ -158,11 +159,11 @@ plc4c_return_code plc4c_s7_read_write_state_serialize(plc4c_spi_write_buffer* wr
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_state_length_in_bytes(plc4c_s7_read_write_state* _message) {
-  return plc4c_s7_read_write_state_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_state_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_state* _message) {
+  return plc4c_s7_read_write_state_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_state_length_in_bits(plc4c_s7_read_write_state* _message) {
+uint16_t plc4c_s7_read_write_state_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_state* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (SIG_8)
diff --git a/plc4c/generated-sources/s7/src/syntax_id_type.c b/plc4c/generated-sources/s7/src/syntax_id_type.c
index 3618cfcabb..d5627d2b31 100644
--- a/plc4c/generated-sources/s7/src/syntax_id_type.c
+++ b/plc4c/generated-sources/s7/src/syntax_id_type.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_syntax_id_type plc4c_s7_read_write_syntax_id_type_null() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_syntax_id_type_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_syntax_id_type* _message) {
+plc4c_return_code plc4c_s7_read_write_syntax_id_type_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_syntax_id_type* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_syntax_id_type_parse(plc4c_spi_read_buffer
     return _res;
 }
 
-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 plc4c_s7_read_write_syntax_id_type_serialize(plc4x_spi_context ctx, 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);
@@ -154,10 +154,10 @@ plc4c_s7_read_write_syntax_id_type plc4c_s7_read_write_syntax_id_type_value_for_
     }
 }
 
-uint16_t plc4c_s7_read_write_syntax_id_type_length_in_bytes(plc4c_s7_read_write_syntax_id_type* _message) {
-    return plc4c_s7_read_write_syntax_id_type_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_syntax_id_type_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_syntax_id_type* _message) {
+    return plc4c_s7_read_write_syntax_id_type_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_syntax_id_type_length_in_bits(plc4c_s7_read_write_syntax_id_type* _message) {
+uint16_t plc4c_s7_read_write_syntax_id_type_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_syntax_id_type* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/szl_data_tree_item.c b/plc4c/generated-sources/s7/src/szl_data_tree_item.c
index eb3a93d111..1b91e658a7 100644
--- a/plc4c/generated-sources/s7/src/szl_data_tree_item.c
+++ b/plc4c/generated-sources/s7/src/szl_data_tree_item.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_szl_data_tree_item_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_data_tree_item** _message) {
+plc4c_return_code plc4c_s7_read_write_szl_data_tree_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_data_tree_item** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -93,7 +94,7 @@ plc4c_return_code plc4c_s7_read_write_szl_data_tree_item_parse(plc4c_spi_read_bu
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_szl_data_tree_item_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_data_tree_item* _message) {
+plc4c_return_code plc4c_s7_read_write_szl_data_tree_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_data_tree_item* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (itemIndex)
@@ -133,11 +134,11 @@ plc4c_return_code plc4c_s7_read_write_szl_data_tree_item_serialize(plc4c_spi_wri
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_szl_data_tree_item_length_in_bytes(plc4c_s7_read_write_szl_data_tree_item* _message) {
-  return plc4c_s7_read_write_szl_data_tree_item_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_szl_data_tree_item_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_szl_data_tree_item* _message) {
+  return plc4c_s7_read_write_szl_data_tree_item_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_szl_data_tree_item_length_in_bits(plc4c_s7_read_write_szl_data_tree_item* _message) {
+uint16_t plc4c_s7_read_write_szl_data_tree_item_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_szl_data_tree_item* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (itemIndex)
diff --git a/plc4c/generated-sources/s7/src/szl_id.c b/plc4c/generated-sources/s7/src/szl_id.c
index b96bb064c5..80b4412e27 100644
--- a/plc4c/generated-sources/s7/src/szl_id.c
+++ b/plc4c/generated-sources/s7/src/szl_id.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -27,7 +28,7 @@
 
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_szl_id_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_id** _message) {
+plc4c_return_code plc4c_s7_read_write_szl_id_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_id** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -39,7 +40,7 @@ plc4c_return_code plc4c_s7_read_write_szl_id_parse(plc4c_spi_read_buffer* readBu
 
   // Simple Field (typeClass)
   plc4c_s7_read_write_szl_module_type_class typeClass;
-  _res = plc4c_s7_read_write_szl_module_type_class_parse(readBuffer, (void*) &typeClass);
+  _res = plc4c_s7_read_write_szl_module_type_class_parse(ctx, readBuffer, (void*) &typeClass);
   if(_res != OK) {
     return _res;
   }
@@ -55,7 +56,7 @@ plc4c_return_code plc4c_s7_read_write_szl_id_parse(plc4c_spi_read_buffer* readBu
 
   // Simple Field (sublistList)
   plc4c_s7_read_write_szl_sublist sublistList;
-  _res = plc4c_s7_read_write_szl_sublist_parse(readBuffer, (void*) &sublistList);
+  _res = plc4c_s7_read_write_szl_sublist_parse(ctx, readBuffer, (void*) &sublistList);
   if(_res != OK) {
     return _res;
   }
@@ -64,11 +65,11 @@ plc4c_return_code plc4c_s7_read_write_szl_id_parse(plc4c_spi_read_buffer* readBu
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_szl_id_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_id* _message) {
+plc4c_return_code plc4c_s7_read_write_szl_id_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_szl_id* _message) {
   plc4c_return_code _res = OK;
 
   // Simple Field (typeClass)
-  _res = plc4c_s7_read_write_szl_module_type_class_serialize(writeBuffer, &_message->type_class);
+  _res = plc4c_s7_read_write_szl_module_type_class_serialize(ctx, writeBuffer, &_message->type_class);
   if(_res != OK) {
     return _res;
   }
@@ -80,7 +81,7 @@ plc4c_return_code plc4c_s7_read_write_szl_id_serialize(plc4c_spi_write_buffer* w
   }
 
   // Simple Field (sublistList)
-  _res = plc4c_s7_read_write_szl_sublist_serialize(writeBuffer, &_message->sublist_list);
+  _res = plc4c_s7_read_write_szl_sublist_serialize(ctx, writeBuffer, &_message->sublist_list);
   if(_res != OK) {
     return _res;
   }
@@ -88,21 +89,21 @@ plc4c_return_code plc4c_s7_read_write_szl_id_serialize(plc4c_spi_write_buffer* w
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_szl_id_length_in_bytes(plc4c_s7_read_write_szl_id* _message) {
-  return plc4c_s7_read_write_szl_id_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_szl_id_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_szl_id* _message) {
+  return plc4c_s7_read_write_szl_id_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_szl_id_length_in_bits(plc4c_s7_read_write_szl_id* _message) {
+uint16_t plc4c_s7_read_write_szl_id_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_szl_id* _message) {
   uint16_t lengthInBits = 0;
 
   // Simple field (typeClass)
-  lengthInBits += plc4c_s7_read_write_szl_module_type_class_length_in_bits(&_message->type_class);
+  lengthInBits += plc4c_s7_read_write_szl_module_type_class_length_in_bits(ctx, &_message->type_class);
 
   // Simple field (sublistExtract)
   lengthInBits += 4;
 
   // Simple field (sublistList)
-  lengthInBits += plc4c_s7_read_write_szl_sublist_length_in_bits(&_message->sublist_list);
+  lengthInBits += plc4c_s7_read_write_szl_sublist_length_in_bits(ctx, &_message->sublist_list);
 
   return lengthInBits;
 }
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 8e6bc4e425..e06da3c865 100644
--- a/plc4c/generated-sources/s7/src/szl_module_type_class.c
+++ b/plc4c/generated-sources/s7/src/szl_module_type_class.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_szl_module_type_class plc4c_s7_read_write_szl_module_type_cl
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_szl_module_type_class_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_module_type_class* _message) {
+plc4c_return_code plc4c_s7_read_write_szl_module_type_class_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_module_type_class* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_szl_module_type_class_parse(plc4c_spi_read
     return _res;
 }
 
-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 plc4c_s7_read_write_szl_module_type_class_serialize(plc4x_spi_context ctx, 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);
@@ -100,10 +100,10 @@ plc4c_s7_read_write_szl_module_type_class plc4c_s7_read_write_szl_module_type_cl
     }
 }
 
-uint16_t plc4c_s7_read_write_szl_module_type_class_length_in_bytes(plc4c_s7_read_write_szl_module_type_class* _message) {
-    return plc4c_s7_read_write_szl_module_type_class_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_szl_module_type_class_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_szl_module_type_class* _message) {
+    return plc4c_s7_read_write_szl_module_type_class_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_szl_module_type_class_length_in_bits(plc4c_s7_read_write_szl_module_type_class* _message) {
+uint16_t plc4c_s7_read_write_szl_module_type_class_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_szl_module_type_class* _message) {
     return 4;
 }
diff --git a/plc4c/generated-sources/s7/src/szl_sublist.c b/plc4c/generated-sources/s7/src/szl_sublist.c
index 2075187d93..bff7d586e4 100644
--- a/plc4c/generated-sources/s7/src/szl_sublist.c
+++ b/plc4c/generated-sources/s7/src/szl_sublist.c
@@ -33,7 +33,7 @@ plc4c_s7_read_write_szl_sublist plc4c_s7_read_write_szl_sublist_null() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_szl_sublist_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_sublist* _message) {
+plc4c_return_code plc4c_s7_read_write_szl_sublist_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_szl_sublist* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -43,7 +43,7 @@ plc4c_return_code plc4c_s7_read_write_szl_sublist_parse(plc4c_spi_read_buffer* r
     return _res;
 }
 
-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 plc4c_s7_read_write_szl_sublist_serialize(plc4x_spi_context ctx, 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);
@@ -190,10 +190,10 @@ plc4c_s7_read_write_szl_sublist plc4c_s7_read_write_szl_sublist_value_for_index(
     }
 }
 
-uint16_t plc4c_s7_read_write_szl_sublist_length_in_bytes(plc4c_s7_read_write_szl_sublist* _message) {
-    return plc4c_s7_read_write_szl_sublist_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_szl_sublist_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_szl_sublist* _message) {
+    return plc4c_s7_read_write_szl_sublist_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_szl_sublist_length_in_bits(plc4c_s7_read_write_szl_sublist* _message) {
+uint16_t plc4c_s7_read_write_szl_sublist_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_szl_sublist* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/src/tpkt_packet.c b/plc4c/generated-sources/s7/src/tpkt_packet.c
index b3bb271da4..f816172c84 100644
--- a/plc4c/generated-sources/s7/src/tpkt_packet.c
+++ b/plc4c/generated-sources/s7/src/tpkt_packet.c
@@ -18,6 +18,7 @@
  */
 
 #include <stdio.h>
+#include <plc4c/spi/context.h>
 #include <plc4c/spi/evaluation_helper.h>
 #include <plc4c/driver_s7_static.h>
 
@@ -33,7 +34,7 @@ uint8_t PLC4C_S7_READ_WRITE_TPKT_PACKET_PROTOCOL_ID() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_tpkt_packet_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_tpkt_packet** _message) {
+plc4c_return_code plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_tpkt_packet** _message) {
   uint16_t startPos = plc4c_spi_read_get_pos(readBuffer);
   plc4c_return_code _res = OK;
 
@@ -75,7 +76,7 @@ plc4c_return_code plc4c_s7_read_write_tpkt_packet_parse(plc4c_spi_read_buffer* r
 
   // Simple Field (payload)
   plc4c_s7_read_write_cotp_packet* payload;
-  _res = plc4c_s7_read_write_cotp_packet_parse(readBuffer, (len) - (4), (void*) &payload);
+  _res = plc4c_s7_read_write_cotp_packet_parse(ctx, readBuffer, (len) - (4), (void*) &payload);
   if(_res != OK) {
     return _res;
   }
@@ -84,7 +85,7 @@ plc4c_return_code plc4c_s7_read_write_tpkt_packet_parse(plc4c_spi_read_buffer* r
   return OK;
 }
 
-plc4c_return_code plc4c_s7_read_write_tpkt_packet_serialize(plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_tpkt_packet* _message) {
+plc4c_return_code plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_tpkt_packet* _message) {
   plc4c_return_code _res = OK;
 
   // Const Field (protocolId)
@@ -97,13 +98,13 @@ plc4c_return_code plc4c_s7_read_write_tpkt_packet_serialize(plc4c_spi_write_buff
   }
 
   // Implicit Field (len) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
-  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, (plc4c_s7_read_write_cotp_packet_length_in_bytes(_message->payload)) + (4));
+  _res = plc4c_spi_write_unsigned_short(writeBuffer, 16, (plc4c_s7_read_write_cotp_packet_length_in_bytes(ctx, _message->payload)) + (4));
   if(_res != OK) {
     return _res;
   }
 
   // Simple Field (payload)
-  _res = plc4c_s7_read_write_cotp_packet_serialize(writeBuffer, _message->payload);
+  _res = plc4c_s7_read_write_cotp_packet_serialize(ctx, writeBuffer, _message->payload);
   if(_res != OK) {
     return _res;
   }
@@ -111,11 +112,11 @@ plc4c_return_code plc4c_s7_read_write_tpkt_packet_serialize(plc4c_spi_write_buff
   return OK;
 }
 
-uint16_t plc4c_s7_read_write_tpkt_packet_length_in_bytes(plc4c_s7_read_write_tpkt_packet* _message) {
-  return plc4c_s7_read_write_tpkt_packet_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_tpkt_packet_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_tpkt_packet* _message) {
+  return plc4c_s7_read_write_tpkt_packet_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_tpkt_packet_length_in_bits(plc4c_s7_read_write_tpkt_packet* _message) {
+uint16_t plc4c_s7_read_write_tpkt_packet_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_tpkt_packet* _message) {
   uint16_t lengthInBits = 0;
 
   // Const Field (protocolId)
@@ -128,7 +129,7 @@ uint16_t plc4c_s7_read_write_tpkt_packet_length_in_bits(plc4c_s7_read_write_tpkt
   lengthInBits += 16;
 
   // Simple field (payload)
-  lengthInBits += plc4c_s7_read_write_cotp_packet_length_in_bits(_message->payload);
+  lengthInBits += plc4c_s7_read_write_cotp_packet_length_in_bits(ctx, _message->payload);
 
   return lengthInBits;
 }
diff --git a/plc4c/generated-sources/s7/src/transport_size.c b/plc4c/generated-sources/s7/src/transport_size.c
index d7e50f7020..b681e48047 100644
--- a/plc4c/generated-sources/s7/src/transport_size.c
+++ b/plc4c/generated-sources/s7/src/transport_size.c
@@ -34,7 +34,7 @@ plc4c_s7_read_write_transport_size plc4c_s7_read_write_transport_size_null() {
 }
 
 // Parse function.
-plc4c_return_code plc4c_s7_read_write_transport_size_parse(plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_transport_size* _message) {
+plc4c_return_code plc4c_s7_read_write_transport_size_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, plc4c_s7_read_write_transport_size* _message) {
     plc4c_return_code _res = OK;
 
     uint8_t value;
@@ -44,7 +44,7 @@ plc4c_return_code plc4c_s7_read_write_transport_size_parse(plc4c_spi_read_buffer
     return _res;
 }
 
-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 plc4c_s7_read_write_transport_size_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, plc4c_s7_read_write_transport_size* _message) {
     plc4c_return_code _res = OK;
 
     _res = plc4c_spi_write_unsigned_byte(writeBuffer, 8, *_message);
@@ -1436,10 +1436,10 @@ plc4c_s7_read_write_transport_size plc4c_s7_read_write_transport_size_get_first_
     }
 }
 
-uint16_t plc4c_s7_read_write_transport_size_length_in_bytes(plc4c_s7_read_write_transport_size* _message) {
-    return plc4c_s7_read_write_transport_size_length_in_bits(_message) / 8;
+uint16_t plc4c_s7_read_write_transport_size_length_in_bytes(plc4x_spi_context ctx, plc4c_s7_read_write_transport_size* _message) {
+    return plc4c_s7_read_write_transport_size_length_in_bits(ctx, _message) / 8;
 }
 
-uint16_t plc4c_s7_read_write_transport_size_length_in_bits(plc4c_s7_read_write_transport_size* _message) {
+uint16_t plc4c_s7_read_write_transport_size_length_in_bits(plc4x_spi_context ctx, plc4c_s7_read_write_transport_size* _message) {
     return 8;
 }
diff --git a/plc4c/generated-sources/s7/test/ParserSerializerTestsuite.c b/plc4c/generated-sources/s7/test/ParserSerializerTestsuite.c
index 38275a193a..26401e79df 100644
--- a/plc4c/generated-sources/s7/test/ParserSerializerTestsuite.c
+++ b/plc4c/generated-sources/s7/test/ParserSerializerTestsuite.c
@@ -47,7 +47,7 @@ void parser_serializer_test_s7_read_write_cotp_connection_request() {
     }
 
     plc4c_s7_read_write_tpkt_packet* message = NULL;
-    return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+    return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -58,7 +58,7 @@ void parser_serializer_test_s7_read_write_cotp_connection_request() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+    return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -84,7 +84,7 @@ void parser_serializer_test_s7_read_write_cotp_connection_response() {
     }
 
     plc4c_s7_read_write_tpkt_packet* message = NULL;
-    return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+    return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -95,7 +95,7 @@ void parser_serializer_test_s7_read_write_cotp_connection_response() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+    return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -121,7 +121,7 @@ void parser_serializer_test_s7_read_write_s7_setup_communication_request() {
     }
 
     plc4c_s7_read_write_tpkt_packet* message = NULL;
-    return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+    return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -132,7 +132,7 @@ void parser_serializer_test_s7_read_write_s7_setup_communication_request() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+    return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -158,7 +158,7 @@ void parser_serializer_test_s7_read_write_s7_setup_communication_response() {
     }
 
     plc4c_s7_read_write_tpkt_packet* message = NULL;
-    return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+    return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -169,7 +169,7 @@ void parser_serializer_test_s7_read_write_s7_setup_communication_response() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+    return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -195,7 +195,7 @@ void parser_serializer_test_s7_read_write_s7_read_plc_type_request() {
     }
 
     plc4c_s7_read_write_tpkt_packet* message = NULL;
-    return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+    return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -206,7 +206,7 @@ void parser_serializer_test_s7_read_write_s7_read_plc_type_request() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+    return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -232,7 +232,7 @@ void parser_serializer_test_s7_read_write_s7_read_plc_type_response() {
     }
 
     plc4c_s7_read_write_tpkt_packet* message = NULL;
-    return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+    return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -243,7 +243,7 @@ void parser_serializer_test_s7_read_write_s7_read_plc_type_response() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+    return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -269,7 +269,7 @@ void parser_serializer_test_s7_read_write_s7_read_request() {
     }
 
     plc4c_s7_read_write_tpkt_packet* message = NULL;
-    return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+    return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -280,7 +280,7 @@ void parser_serializer_test_s7_read_write_s7_read_request() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+    return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -306,7 +306,7 @@ void parser_serializer_test_s7_read_write_s7_read_response() {
     }
 
     plc4c_s7_read_write_tpkt_packet* message = NULL;
-    return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+    return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -317,7 +317,7 @@ void parser_serializer_test_s7_read_write_s7_read_response() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+    return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -343,7 +343,7 @@ void parser_serializer_test_s7_read_write_s7_read_error_response() {
     }
 
     plc4c_s7_read_write_tpkt_packet* message = NULL;
-    return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+    return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -354,7 +354,7 @@ void parser_serializer_test_s7_read_write_s7_read_error_response() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+    return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -380,7 +380,7 @@ void parser_serializer_test_s7_read_write_s7_write_request() {
     }
 
     plc4c_s7_read_write_tpkt_packet* message = NULL;
-    return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+    return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -391,7 +391,7 @@ void parser_serializer_test_s7_read_write_s7_write_request() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+    return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
@@ -417,7 +417,7 @@ void parser_serializer_test_s7_read_write_s7_write_response() {
     }
 
     plc4c_s7_read_write_tpkt_packet* message = NULL;
-    return_code = plc4c_s7_read_write_tpkt_packet_parse(read_buffer, &message);
+    return_code = plc4c_s7_read_write_tpkt_packet_parse(plc4x_spi_context_background(), read_buffer, &message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error parsing packet");
     }
@@ -428,7 +428,7 @@ void parser_serializer_test_s7_read_write_s7_write_response() {
         TEST_FAIL_MESSAGE("Error writing to buffer");
     }
 
-    return_code = plc4c_s7_read_write_tpkt_packet_serialize(write_buffer, message);
+    return_code = plc4c_s7_read_write_tpkt_packet_serialize(plc4x_spi_context_background(), write_buffer, message);
     if (return_code != OK) {
         TEST_FAIL_MESSAGE("Error serializing");
     }
diff --git a/plc4c/spi/CMakeLists.txt b/plc4c/spi/CMakeLists.txt
index d43e521015..4cd5c01c58 100644
--- a/plc4c/spi/CMakeLists.txt
+++ b/plc4c/spi/CMakeLists.txt
@@ -21,6 +21,7 @@ add_library(plc4c-spi
         src/utils/list.c
         src/utils/queue.c
         src/connection.c
+        src/context.c
         src/data.c
         src/evaluation_helper.c
         src/read.c
diff --git a/plc4c/spi/include/plc4c/spi/context.h b/plc4c/spi/include/plc4c/spi/context.h
new file mode 100644
index 0000000000..5d7c451c40
--- /dev/null
+++ b/plc4c/spi/include/plc4c/spi/context.h
@@ -0,0 +1,42 @@
+/*
+* 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.
+*/
+
+#ifndef PLC4C_CONTEXT_H
+#define PLC4C_CONTEXT_H
+
+#include <stdint.h>
+#include <stdbool.h>
+
+struct plc4x_spi_context {
+  uint16_t numItems;
+  uint16_t curItem;
+};
+typedef struct plc4x_spi_context plc4x_spi_context;
+
+plc4x_spi_context plc4x_spi_context_background();
+
+plc4x_spi_context plc4x_spi_context_create_array_context(plc4x_spi_context context, uint16_t numItems, uint16_t curItem);
+
+uint16_t plc4x_spi_context_get_num_items_from_context(plc4x_spi_context ctx);
+
+uint16_t plc4x_spi_context_get_cur_item_from_context(plc4x_spi_context ctx);
+
+bool plc4x_spi_context_get_last_item_from_context(plc4x_spi_context ctx);
+
+#endif  // PLC4C_CONTEXT_H
diff --git a/plc4c/spi/src/context.c b/plc4c/spi/src/context.c
new file mode 100644
index 0000000000..006de958c3
--- /dev/null
+++ b/plc4c/spi/src/context.c
@@ -0,0 +1,46 @@
+/*
+* 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.
+*/
+
+#include "plc4c/spi/context.h"
+
+plc4x_spi_context plc4x_spi_context_background() {
+  plc4x_spi_context ctx = {};
+  return ctx;
+}
+
+plc4x_spi_context plc4x_spi_context_create_array_context(plc4x_spi_context context, uint16_t numItems, uint16_t curItem) {
+  // TODO: In general we would be taking the parent context and copying it over to the new, but currently we only have these settings, so there's no point in doing that.
+  plc4x_spi_context ctx = {
+      .numItems = numItems,
+      .curItem = curItem
+  };
+  return ctx;
+}
+
+uint16_t plc4x_spi_context_get_num_items_from_context(plc4x_spi_context ctx) {
+  return ctx.numItems;
+}
+
+uint16_t plc4x_spi_context_get_cur_item_from_context(plc4x_spi_context ctx) {
+  return ctx.curItem;
+}
+
+bool plc4x_spi_context_get_last_item_from_context(plc4x_spi_context ctx) {
+  return ctx.curItem == (ctx.numItems - 1);
+}
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/DataItem.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/DataItem.py
index cfdf84055f..a0397bf828 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/DataItem.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/DataItem.py
@@ -44,7 +44,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # BOOL
-
             # Reserved Field (Compartmentalized so the "reserved" variable can't leak)
             reserved: c_uint16 = read_buffer.readUnsignedInt("", 15)
             if reserved != c_uint16(0x0000):
@@ -82,7 +81,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # BYTE
-
             # Reserved Field (Compartmentalized so the "reserved" variable can't leak)
             reserved: c_uint8 = read_buffer.readUnsignedShort("", 8)
             if reserved != c_uint8(0x00):
@@ -116,19 +114,16 @@ class DataItem:
 
             return PlcList(value)
         if EvaluationHelper.equals(data_type, ModbusDataType.WORD):  # WORD
-
             # Simple Field (value)
             value: c_uint16 = read_buffer.readUnsignedInt("", 16)
 
             return PlcWORD(value)
         if EvaluationHelper.equals(data_type, ModbusDataType.DWORD):  # DWORD
-
             # Simple Field (value)
             value: c_uint32 = read_buffer.readUnsignedLong("", 32)
 
             return PlcDWORD(value)
         if EvaluationHelper.equals(data_type, ModbusDataType.LWORD):  # LWORD
-
             # Simple Field (value)
             value: c_uint64 = read_buffer.readUnsignedBigInteger("", 64)
 
@@ -138,7 +133,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # SINT
-
             # Reserved Field (Compartmentalized so the "reserved" variable can't leak)
             reserved: c_uint8 = read_buffer.readUnsignedShort("", 8)
             if reserved != c_uint8(0x00):
@@ -176,7 +170,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # INT
-
             # Simple Field (value)
             value: c_int16 = read_buffer.readShort("", 16)
 
@@ -203,7 +196,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # DINT
-
             # Simple Field (value)
             value: c_int32 = read_buffer.readInt("", 32)
 
@@ -230,7 +222,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # LINT
-
             # Simple Field (value)
             value: c_int64 = read_buffer.readLong("", 64)
 
@@ -257,7 +248,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # USINT
-
             # Reserved Field (Compartmentalized so the "reserved" variable can't leak)
             reserved: c_uint8 = read_buffer.readUnsignedShort("", 8)
             if reserved != c_uint8(0x00):
@@ -295,7 +285,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # UINT
-
             # Simple Field (value)
             value: c_uint16 = read_buffer.readUnsignedInt("", 16)
 
@@ -322,7 +311,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # UDINT
-
             # Simple Field (value)
             value: c_uint32 = read_buffer.readUnsignedLong("", 32)
 
@@ -349,7 +337,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # ULINT
-
             # Simple Field (value)
             value: c_uint64 = read_buffer.readUnsignedBigInteger("", 64)
 
@@ -378,7 +365,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # REAL
-
             # Simple Field (value)
             value: c_float = read_buffer.readFloat("", 32)
 
@@ -405,7 +391,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # LREAL
-
             # Simple Field (value)
             value: c_double = read_buffer.readDouble("", 64)
 
@@ -432,7 +417,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # CHAR
-
             # Simple Field (value)
             value: str = read_buffer.readString("", 8, "UTF-8")
 
@@ -459,7 +443,6 @@ class DataItem:
         ) and EvaluationHelper.equals(
             number_of_values, 1
         ):  # WCHAR
-
             # Simple Field (value)
             value: str = read_buffer.readString("", 16, "UTF-16")
 
@@ -507,14 +490,12 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # BOOL
-
             # Reserved Field
             writeBuffer.writeUnsignedInt("", 15, c_uint16(0x0000).intValue())
             # Simple Field (value)
             value: c_bool = _value.getC_bool()
             writeBuffer.writeBit("", bool((value)))
         if EvaluationHelper.equals(dataType, ModbusDataType.BOOL):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -526,14 +507,12 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # BYTE
-
             # Reserved Field
             writeBuffer.writeUnsignedShort("", 8, c_uint8(0x00).shortValue())
             # Simple Field (value)
             value: c_uint8 = _value.getC_uint8()
             writeBuffer.writeUnsignedShort("", 8, (value).shortValue())
         if EvaluationHelper.equals(dataType, ModbusDataType.BYTE):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -541,17 +520,14 @@ class DataItem:
                 writeBuffer.writeBit("", bool((value)))
 
         if EvaluationHelper.equals(dataType, ModbusDataType.WORD):  # WORD
-
             # Simple Field (value)
             value: c_uint16 = _value.getC_uint16()
             writeBuffer.writeUnsignedInt("", 16, (value).intValue())
         if EvaluationHelper.equals(dataType, ModbusDataType.DWORD):  # DWORD
-
             # Simple Field (value)
             value: c_uint32 = _value.getC_uint32()
             writeBuffer.writeUnsignedLong("", 32, (value).longValue())
         if EvaluationHelper.equals(dataType, ModbusDataType.LWORD):  # LWORD
-
             # Simple Field (value)
             value: c_uint64 = _value.getC_uint64()
             writeBuffer.writeUnsignedBigInteger("", 64, (value))
@@ -560,14 +536,12 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # SINT
-
             # Reserved Field
             writeBuffer.writeUnsignedShort("", 8, c_uint8(0x00).shortValue())
             # Simple Field (value)
             value: c_int8 = _value.getC_int8()
             writeBuffer.writeSignedByte("", 8, (value).byteValue())
         if EvaluationHelper.equals(dataType, ModbusDataType.SINT):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -579,12 +553,10 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # INT
-
             # Simple Field (value)
             value: c_int16 = _value.getC_int16()
             writeBuffer.writeShort("", 16, (value).shortValue())
         if EvaluationHelper.equals(dataType, ModbusDataType.INT):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -596,12 +568,10 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # DINT
-
             # Simple Field (value)
             value: c_int32 = _value.getC_int32()
             writeBuffer.writeInt("", 32, (value).intValue())
         if EvaluationHelper.equals(dataType, ModbusDataType.DINT):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -613,12 +583,10 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # LINT
-
             # Simple Field (value)
             value: c_int64 = _value.getC_int64()
             writeBuffer.writeLong("", 64, (value).longValue())
         if EvaluationHelper.equals(dataType, ModbusDataType.LINT):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -630,14 +598,12 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # USINT
-
             # Reserved Field
             writeBuffer.writeUnsignedShort("", 8, c_uint8(0x00).shortValue())
             # Simple Field (value)
             value: c_uint8 = _value.getC_uint8()
             writeBuffer.writeUnsignedShort("", 8, (value).shortValue())
         if EvaluationHelper.equals(dataType, ModbusDataType.USINT):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -649,12 +615,10 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # UINT
-
             # Simple Field (value)
             value: c_uint16 = _value.getC_uint16()
             writeBuffer.writeUnsignedInt("", 16, (value).intValue())
         if EvaluationHelper.equals(dataType, ModbusDataType.UINT):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -666,12 +630,10 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # UDINT
-
             # Simple Field (value)
             value: c_uint32 = _value.getC_uint32()
             writeBuffer.writeUnsignedLong("", 32, (value).longValue())
         if EvaluationHelper.equals(dataType, ModbusDataType.UDINT):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -683,12 +645,10 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # ULINT
-
             # Simple Field (value)
             value: c_uint64 = _value.getC_uint64()
             writeBuffer.writeUnsignedBigInteger("", 64, (value))
         if EvaluationHelper.equals(dataType, ModbusDataType.ULINT):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -700,12 +660,10 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # REAL
-
             # Simple Field (value)
             value: c_float = _value.getC_float()
             writeBuffer.writeFloat("", 32, (value))
         if EvaluationHelper.equals(dataType, ModbusDataType.REAL):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -717,12 +675,10 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # LREAL
-
             # Simple Field (value)
             value: c_double = _value.getC_double()
             writeBuffer.writeDouble("", 64, (value))
         if EvaluationHelper.equals(dataType, ModbusDataType.LREAL):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -734,12 +690,10 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # CHAR
-
             # Simple Field (value)
             value: str = _value.getStr()
             writeBuffer.writeString("", 8, "UTF-8", (String)(value))
         if EvaluationHelper.equals(dataType, ModbusDataType.CHAR):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -751,12 +705,10 @@ class DataItem:
         ) and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # WCHAR
-
             # Simple Field (value)
             value: str = _value.getStr()
             writeBuffer.writeString("", 16, "UTF-16", (String)(value))
         if EvaluationHelper.equals(dataType, ModbusDataType.WCHAR):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusADU.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusADU.py
index 2228744263..13cbf20db8 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusADU.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusADU.py
@@ -109,13 +109,10 @@ class ModbusADU(ABC, PlcMessage):
         # Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
         builder: ModbusADUBuilder = None
         if EvaluationHelper.equals(driverType, DriverType.MODBUS_TCP):
-
             builder = ModbusTcpADU.staticParseBuilder(read_buffer, driverType, response)
         if EvaluationHelper.equals(driverType, DriverType.MODBUS_RTU):
-
             builder = ModbusRtuADU.staticParseBuilder(read_buffer, driverType, response)
         if EvaluationHelper.equals(driverType, DriverType.MODBUS_ASCII):
-
             builder = ModbusAsciiADU.staticParseBuilder(
                 read_buffer, driverType, response
             )
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDU.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDU.py
index a5baef2b42..df8afc62c1 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDU.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDU.py
@@ -127,14 +127,12 @@ class ModbusPDU(ABC, PlcMessage):
         # Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
         builder: ModbusPDUBuilder = None
         if EvaluationHelper.equals(errorFlag, c_bool(True)):
-
             builder = ModbusPDUError.staticParseBuilder(read_buffer, response)
         if (
             EvaluationHelper.equals(errorFlag, c_bool(False))
             and EvaluationHelper.equals(functionFlag, c_uint8(0x02))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUReadDiscreteInputsRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -143,7 +141,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x02))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUReadDiscreteInputsResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -152,7 +149,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x01))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUReadCoilsRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -161,7 +157,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x01))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUReadCoilsResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -170,7 +165,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x05))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUWriteSingleCoilRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -179,7 +173,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x05))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUWriteSingleCoilResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -188,7 +181,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x0F))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUWriteMultipleCoilsRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -197,7 +189,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x0F))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUWriteMultipleCoilsResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -206,7 +197,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x04))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUReadInputRegistersRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -215,7 +205,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x04))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUReadInputRegistersResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -224,7 +213,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x03))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUReadHoldingRegistersRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -233,7 +221,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x03))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUReadHoldingRegistersResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -242,7 +229,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x06))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUWriteSingleRegisterRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -251,7 +237,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x06))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUWriteSingleRegisterResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -260,7 +245,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x10))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUWriteMultipleHoldingRegistersRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -269,7 +253,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x10))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUWriteMultipleHoldingRegistersResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -278,7 +261,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x17))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = (
                 ModbusPDUReadWriteMultipleHoldingRegistersRequest.staticParseBuilder(
                     read_buffer, response
@@ -289,7 +271,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x17))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = (
                 ModbusPDUReadWriteMultipleHoldingRegistersResponse.staticParseBuilder(
                     read_buffer, response
@@ -300,7 +281,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x16))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUMaskWriteHoldingRegisterRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -309,7 +289,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x16))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUMaskWriteHoldingRegisterResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -318,7 +297,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x18))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUReadFifoQueueRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -327,7 +305,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x18))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUReadFifoQueueResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -336,7 +313,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x14))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUReadFileRecordRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -345,7 +321,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x14))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUReadFileRecordResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -354,7 +329,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x15))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUWriteFileRecordRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -363,7 +337,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x15))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUWriteFileRecordResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -372,7 +345,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x07))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUReadExceptionStatusRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -381,7 +353,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x07))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUReadExceptionStatusResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -390,7 +361,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x08))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUDiagnosticRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -399,7 +369,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x08))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUDiagnosticResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -408,7 +377,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x0B))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUGetComEventCounterRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -417,7 +385,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x0B))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUGetComEventCounterResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -426,7 +393,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x0C))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUGetComEventLogRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -435,7 +401,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x0C))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUGetComEventLogResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -444,7 +409,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x11))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUReportServerIdRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -453,7 +417,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x11))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUReportServerIdResponse.staticParseBuilder(
                 read_buffer, response
             )
@@ -462,7 +425,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x2B))
             and EvaluationHelper.equals(response, c_bool(False))
         ):
-
             builder = ModbusPDUReadDeviceIdentificationRequest.staticParseBuilder(
                 read_buffer, response
             )
@@ -471,7 +433,6 @@ class ModbusPDU(ABC, PlcMessage):
             and EvaluationHelper.equals(functionFlag, c_uint8(0x2B))
             and EvaluationHelper.equals(response, c_bool(True))
         ):
-
             builder = ModbusPDUReadDeviceIdentificationResponse.staticParseBuilder(
                 read_buffer, response
             )
diff --git a/sandbox/plc4py/plc4py/protocols/simulated/readwrite/DataItem.py b/sandbox/plc4py/plc4py/protocols/simulated/readwrite/DataItem.py
index 0e794d4c3a..1843b14718 100644
--- a/sandbox/plc4py/plc4py/protocols/simulated/readwrite/DataItem.py
+++ b/sandbox/plc4py/plc4py/protocols/simulated/readwrite/DataItem.py
@@ -41,7 +41,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_bool") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # BOOL
-
             # Simple Field (value)
             value: c_bool = read_buffer.readBit("")
 
@@ -66,7 +65,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_byte") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # BYTE
-
             # Simple Field (value)
             value: c_uint8 = read_buffer.readUnsignedShort("", 8)
 
@@ -91,7 +89,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_word") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # WORD
-
             # Simple Field (value)
             value: c_uint16 = read_buffer.readUnsignedInt("", 16)
 
@@ -116,7 +113,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_dword") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # DWORD
-
             # Simple Field (value)
             value: c_uint32 = read_buffer.readUnsignedLong("", 32)
 
@@ -141,7 +137,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_lword") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # LWORD
-
             # Simple Field (value)
             value: c_uint64 = read_buffer.readUnsignedBigInteger("", 64)
 
@@ -168,7 +163,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_sint") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # SINT
-
             # Simple Field (value)
             value: c_int8 = read_buffer.readSignedByte("", 8)
 
@@ -193,7 +187,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_int") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # INT
-
             # Simple Field (value)
             value: c_int16 = read_buffer.readShort("", 16)
 
@@ -218,7 +211,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_dint") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # DINT
-
             # Simple Field (value)
             value: c_int32 = read_buffer.readInt("", 32)
 
@@ -243,7 +235,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_lint") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # LINT
-
             # Simple Field (value)
             value: c_int64 = read_buffer.readLong("", 64)
 
@@ -268,7 +259,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_usint") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # USINT
-
             # Simple Field (value)
             value: c_uint8 = read_buffer.readUnsignedShort("", 8)
 
@@ -293,7 +283,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_uint") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # UINT
-
             # Simple Field (value)
             value: c_uint16 = read_buffer.readUnsignedInt("", 16)
 
@@ -318,7 +307,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_udint") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # UDINT
-
             # Simple Field (value)
             value: c_uint32 = read_buffer.readUnsignedLong("", 32)
 
@@ -343,7 +331,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_ulint") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # ULINT
-
             # Simple Field (value)
             value: c_uint64 = read_buffer.readUnsignedBigInteger("", 64)
 
@@ -370,7 +357,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_real") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # REAL
-
             # Simple Field (value)
             value: c_float = read_buffer.readFloat("", 32)
 
@@ -395,7 +381,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_lreal") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # LREAL
-
             # Simple Field (value)
             value: c_double = read_buffer.readDouble("", 64)
 
@@ -420,7 +405,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_char") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # CHAR
-
             # Simple Field (value)
             value: str = read_buffer.readString("", 8, "UTF-8")
 
@@ -445,7 +429,6 @@ class DataItem:
         if EvaluationHelper.equals(data_type, "_wchar") and EvaluationHelper.equals(
             number_of_values, 1
         ):  # WCHAR
-
             # Simple Field (value)
             value: str = read_buffer.readString("", 16, "UTF-16")
 
@@ -468,13 +451,11 @@ class DataItem:
 
             return PlcList(value)
         if EvaluationHelper.equals(data_type, "_string"):  # STRING
-
             # Simple Field (value)
             value: str = read_buffer.readString("", 255, "UTF-8")
 
             return PlcSTRING(value)
         if EvaluationHelper.equals(data_type, "_wstring"):  # STRING
-
             # Simple Field (value)
             value: str = read_buffer.readString("", 255, "UTF-16")
 
@@ -503,12 +484,10 @@ class DataItem:
         if EvaluationHelper.equals(dataType, "BOOL") and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # BOOL
-
             # Simple Field (value)
             value: c_bool = _value.getC_bool()
             writeBuffer.writeBit("", bool((value)))
         if EvaluationHelper.equals(dataType, "BOOL"):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -518,12 +497,10 @@ class DataItem:
         if EvaluationHelper.equals(dataType, "BYTE") and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # BYTE
-
             # Simple Field (value)
             value: c_uint8 = _value.getC_uint8()
             writeBuffer.writeUnsignedShort("", 8, (value).shortValue())
         if EvaluationHelper.equals(dataType, "BYTE"):  # List
-
             values: PlcList = _value
 
             for val in values.getList():
@@ -533,12 +510,10 @@ class DataItem:
         if EvaluationHelper.equals(dataType, "WORD") and EvaluationHelper.equals(
             numberOfValues, 1
         ):  # WORD
-
... 203 lines suppressed ...