You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by hu...@apache.org on 2023/05/22 04:19:38 UTC

[plc4x] 02/03: feat(plc4py): remove start_pos variable as it never gets used.

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

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

commit df766ac02551d364283e75d8fe432548fbbacf6b
Author: Ben Hutcheson <be...@gmail.com>
AuthorDate: Mon May 22 06:07:50 2023 +0200

    feat(plc4py): remove start_pos variable as it never gets used.
---
 .../resources/templates/python/complex-type-template.python.ftlh     | 5 +++++
 sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusADU.py        | 1 -
 sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusAsciiADU.py   | 1 -
 sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusConstants.py  | 1 -
 .../protocols/modbus/readwrite/ModbusDeviceInformationObject.py      | 1 -
 sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDU.py        | 1 -
 .../plc4py/protocols/modbus/readwrite/ModbusPDUDiagnosticRequest.py  | 1 -
 .../plc4py/protocols/modbus/readwrite/ModbusPDUDiagnosticResponse.py | 1 -
 sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUError.py   | 1 -
 .../protocols/modbus/readwrite/ModbusPDUGetComEventCounterRequest.py | 1 -
 .../modbus/readwrite/ModbusPDUGetComEventCounterResponse.py          | 1 -
 .../protocols/modbus/readwrite/ModbusPDUGetComEventLogRequest.py     | 1 -
 .../protocols/modbus/readwrite/ModbusPDUGetComEventLogResponse.py    | 1 -
 .../modbus/readwrite/ModbusPDUMaskWriteHoldingRegisterRequest.py     | 1 -
 .../modbus/readwrite/ModbusPDUMaskWriteHoldingRegisterResponse.py    | 1 -
 .../plc4py/protocols/modbus/readwrite/ModbusPDUReadCoilsRequest.py   | 1 -
 .../plc4py/protocols/modbus/readwrite/ModbusPDUReadCoilsResponse.py  | 1 -
 .../modbus/readwrite/ModbusPDUReadDeviceIdentificationRequest.py     | 1 -
 .../modbus/readwrite/ModbusPDUReadDeviceIdentificationResponse.py    | 1 -
 .../protocols/modbus/readwrite/ModbusPDUReadDiscreteInputsRequest.py | 1 -
 .../modbus/readwrite/ModbusPDUReadDiscreteInputsResponse.py          | 1 -
 .../modbus/readwrite/ModbusPDUReadExceptionStatusRequest.py          | 1 -
 .../modbus/readwrite/ModbusPDUReadExceptionStatusResponse.py         | 1 -
 .../protocols/modbus/readwrite/ModbusPDUReadFifoQueueRequest.py      | 1 -
 .../protocols/modbus/readwrite/ModbusPDUReadFifoQueueResponse.py     | 1 -
 .../protocols/modbus/readwrite/ModbusPDUReadFileRecordRequest.py     | 1 -
 .../protocols/modbus/readwrite/ModbusPDUReadFileRecordRequestItem.py | 1 -
 .../protocols/modbus/readwrite/ModbusPDUReadFileRecordResponse.py    | 1 -
 .../modbus/readwrite/ModbusPDUReadFileRecordResponseItem.py          | 1 -
 .../modbus/readwrite/ModbusPDUReadHoldingRegistersRequest.py         | 1 -
 .../modbus/readwrite/ModbusPDUReadHoldingRegistersResponse.py        | 1 -
 .../protocols/modbus/readwrite/ModbusPDUReadInputRegistersRequest.py | 1 -
 .../modbus/readwrite/ModbusPDUReadInputRegistersResponse.py          | 1 -
 .../readwrite/ModbusPDUReadWriteMultipleHoldingRegistersRequest.py   | 1 -
 .../readwrite/ModbusPDUReadWriteMultipleHoldingRegistersResponse.py  | 1 -
 .../protocols/modbus/readwrite/ModbusPDUReportServerIdRequest.py     | 1 -
 .../protocols/modbus/readwrite/ModbusPDUReportServerIdResponse.py    | 1 -
 .../protocols/modbus/readwrite/ModbusPDUWriteFileRecordRequest.py    | 1 -
 .../modbus/readwrite/ModbusPDUWriteFileRecordRequestItem.py          | 1 -
 .../protocols/modbus/readwrite/ModbusPDUWriteFileRecordResponse.py   | 1 -
 .../modbus/readwrite/ModbusPDUWriteFileRecordResponseItem.py         | 1 -
 .../protocols/modbus/readwrite/ModbusPDUWriteMultipleCoilsRequest.py | 1 -
 .../modbus/readwrite/ModbusPDUWriteMultipleCoilsResponse.py          | 1 -
 .../readwrite/ModbusPDUWriteMultipleHoldingRegistersRequest.py       | 1 -
 .../readwrite/ModbusPDUWriteMultipleHoldingRegistersResponse.py      | 1 -
 .../protocols/modbus/readwrite/ModbusPDUWriteSingleCoilRequest.py    | 1 -
 .../protocols/modbus/readwrite/ModbusPDUWriteSingleCoilResponse.py   | 1 -
 .../modbus/readwrite/ModbusPDUWriteSingleRegisterRequest.py          | 1 -
 .../modbus/readwrite/ModbusPDUWriteSingleRegisterResponse.py         | 1 -
 sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusRtuADU.py     | 1 -
 sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusTcpADU.py     | 1 -
 sandbox/plc4py/plc4py/protocols/simulated/readwrite/Dummy.py         | 1 -
 52 files changed, 5 insertions(+), 51 deletions(-)

diff --git a/code-generation/language-python/src/main/resources/templates/python/complex-type-template.python.ftlh b/code-generation/language-python/src/main/resources/templates/python/complex-type-template.python.ftlh
index 57bc9d9125..064f5cf683 100644
--- a/code-generation/language-python/src/main/resources/templates/python/complex-type-template.python.ftlh
+++ b/code-generation/language-python/src/main/resources/templates/python/complex-type-template.python.ftlh
@@ -208,6 +208,9 @@ class ${type.name}<#if type.isDiscriminatedParentTypeDefinition()></#if>(<#if ty
         <#if helper.hasFieldOfType("unknown")>
         raise SerializationException("Unknown field not serializable")
         <#else>
+        <#if helper.requiresStartPos() || helper.requiresCurPos()>
+            start_pos: int = write_buffer.get_pos()
+        </#if>
         write_buffer.push_context("${type.name}")
             <#assign reservedFieldIndex=0>
             <#list type.fields as field>
@@ -562,7 +565,9 @@ class ${type.name}<#if type.isDiscriminatedParentTypeDefinition()></#if>(<#if ty
     @staticmethod
     def <#if type.isDiscriminatedChildTypeDefinition()>static_parse_builder<#else>static_parse_context</#if>(read_buffer: ReadBuffer<#if hasParserArguments>, ${parserArgumentList}</#if>):
         read_buffer.pull_context("${type.name}")
+        <#if helper.requiresStartPos() || helper.requiresCurPos()>
         start_pos: int = read_buffer.get_pos()
+        </#if>
         cur_pos: int = 0
     <#assign reservedFieldIndex=0>
     <#list type.fields as field>
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusADU.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusADU.py
index b7bc5d523f..87acb937ba 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusADU.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusADU.py
@@ -100,7 +100,6 @@ class ModbusADU(ABC, PlcMessage):
         read_buffer: ReadBuffer, driver_type: DriverType, response: c_bool
     ):
         read_buffer.pull_context("ModbusADU")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         # Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusAsciiADU.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusAsciiADU.py
index a876b5b283..ecb9751c31 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusAsciiADU.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusAsciiADU.py
@@ -83,7 +83,6 @@ class ModbusAsciiADU(PlcMessage, ModbusADU):
         read_buffer: ReadBuffer, driver_type: DriverType, response: c_bool
     ):
         read_buffer.pull_context("ModbusAsciiADU")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         address: c_uint8 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusConstants.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusConstants.py
index 4d81ef37ce..78ef88ea4e 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusConstants.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusConstants.py
@@ -60,7 +60,6 @@ class ModbusConstants(PlcMessage):
     @staticmethod
     def static_parse_context(read_buffer: ReadBuffer):
         read_buffer.pull_context("ModbusConstants")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         modbus_tcp_default_port: c_uint16 = read_const_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusDeviceInformationObject.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusDeviceInformationObject.py
index be204bbeff..c89af3035d 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusDeviceInformationObject.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusDeviceInformationObject.py
@@ -75,7 +75,6 @@ class ModbusDeviceInformationObject(PlcMessage):
     @staticmethod
     def static_parse_context(read_buffer: ReadBuffer):
         read_buffer.pull_context("ModbusDeviceInformationObject")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         object_id: c_uint8 = read_simple_field("objectId", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDU.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDU.py
index 32a0e07d9b..dc02491e15 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDU.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDU.py
@@ -108,7 +108,6 @@ class ModbusPDU(ABC, PlcMessage):
     @staticmethod
     def static_parse_context(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDU")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         error_flag: c_bool = read_discriminator_field("errorFlag", read_boolean)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUDiagnosticRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUDiagnosticRequest.py
index db922ae022..11a82a20b6 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUDiagnosticRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUDiagnosticRequest.py
@@ -70,7 +70,6 @@ class ModbusPDUDiagnosticRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUDiagnosticRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         sub_function: c_uint16 = read_simple_field("subFunction", read_unsigned_int)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUDiagnosticResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUDiagnosticResponse.py
index 6f37a12efc..86ac9c9b00 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUDiagnosticResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUDiagnosticResponse.py
@@ -70,7 +70,6 @@ class ModbusPDUDiagnosticResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUDiagnosticResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         sub_function: c_uint16 = read_simple_field("subFunction", read_unsigned_int)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUError.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUError.py
index 92e7af183f..634269a396 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUError.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUError.py
@@ -65,7 +65,6 @@ class ModbusPDUError(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUError")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         exception_code: ModbusErrorCode = read_enum_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventCounterRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventCounterRequest.py
index fe92fdc1a4..1394f6fad6 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventCounterRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventCounterRequest.py
@@ -55,7 +55,6 @@ class ModbusPDUGetComEventCounterRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUGetComEventCounterRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         read_buffer.close_context("ModbusPDUGetComEventCounterRequest")
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventCounterResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventCounterResponse.py
index fbab3ac361..fbf96c45b2 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventCounterResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventCounterResponse.py
@@ -70,7 +70,6 @@ class ModbusPDUGetComEventCounterResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUGetComEventCounterResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         status: c_uint16 = read_simple_field("status", read_unsigned_int)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventLogRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventLogRequest.py
index 2e30b89000..30dbc6c4cb 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventLogRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventLogRequest.py
@@ -55,7 +55,6 @@ class ModbusPDUGetComEventLogRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUGetComEventLogRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         read_buffer.close_context("ModbusPDUGetComEventLogRequest")
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventLogResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventLogResponse.py
index cbfbe1119c..aa475d53a2 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventLogResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUGetComEventLogResponse.py
@@ -97,7 +97,6 @@ class ModbusPDUGetComEventLogResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUGetComEventLogResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint8 = read_implicit_field("byteCount", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUMaskWriteHoldingRegisterRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUMaskWriteHoldingRegisterRequest.py
index b597ac1693..b735b389ec 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUMaskWriteHoldingRegisterRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUMaskWriteHoldingRegisterRequest.py
@@ -79,7 +79,6 @@ class ModbusPDUMaskWriteHoldingRegisterRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUMaskWriteHoldingRegisterRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         reference_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUMaskWriteHoldingRegisterResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUMaskWriteHoldingRegisterResponse.py
index e64e567087..7f04297428 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUMaskWriteHoldingRegisterResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUMaskWriteHoldingRegisterResponse.py
@@ -79,7 +79,6 @@ class ModbusPDUMaskWriteHoldingRegisterResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUMaskWriteHoldingRegisterResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         reference_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadCoilsRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadCoilsRequest.py
index d29c08d29e..376318df85 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadCoilsRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadCoilsRequest.py
@@ -72,7 +72,6 @@ class ModbusPDUReadCoilsRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadCoilsRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         starting_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadCoilsResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadCoilsResponse.py
index 0c4f7fd82b..7d0786fefa 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadCoilsResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadCoilsResponse.py
@@ -72,7 +72,6 @@ class ModbusPDUReadCoilsResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadCoilsResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint8 = read_implicit_field("byteCount", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDeviceIdentificationRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDeviceIdentificationRequest.py
index b7379b41a9..b9feff3c82 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDeviceIdentificationRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDeviceIdentificationRequest.py
@@ -83,7 +83,6 @@ class ModbusPDUReadDeviceIdentificationRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadDeviceIdentificationRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         mei_type: c_uint8 = read_const_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDeviceIdentificationResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDeviceIdentificationResponse.py
index be019e3537..a7bd3d97b0 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDeviceIdentificationResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDeviceIdentificationResponse.py
@@ -146,7 +146,6 @@ class ModbusPDUReadDeviceIdentificationResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadDeviceIdentificationResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         mei_type: c_uint8 = read_const_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDiscreteInputsRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDiscreteInputsRequest.py
index f8ae679ebc..ddc6ac3511 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDiscreteInputsRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDiscreteInputsRequest.py
@@ -72,7 +72,6 @@ class ModbusPDUReadDiscreteInputsRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadDiscreteInputsRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         starting_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDiscreteInputsResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDiscreteInputsResponse.py
index d6c0d241d0..1b2c954469 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDiscreteInputsResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadDiscreteInputsResponse.py
@@ -72,7 +72,6 @@ class ModbusPDUReadDiscreteInputsResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadDiscreteInputsResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint8 = read_implicit_field("byteCount", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadExceptionStatusRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadExceptionStatusRequest.py
index a0b3e267dd..ea09c7eb9b 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadExceptionStatusRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadExceptionStatusRequest.py
@@ -55,7 +55,6 @@ class ModbusPDUReadExceptionStatusRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadExceptionStatusRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         read_buffer.close_context("ModbusPDUReadExceptionStatusRequest")
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadExceptionStatusResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadExceptionStatusResponse.py
index e5dc4c045c..85b512dcfb 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadExceptionStatusResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadExceptionStatusResponse.py
@@ -62,7 +62,6 @@ class ModbusPDUReadExceptionStatusResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadExceptionStatusResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         value: c_uint8 = read_simple_field("value", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFifoQueueRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFifoQueueRequest.py
index 205fb893ea..978fdd0749 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFifoQueueRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFifoQueueRequest.py
@@ -65,7 +65,6 @@ class ModbusPDUReadFifoQueueRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadFifoQueueRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         fifo_pointer_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFifoQueueResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFifoQueueResponse.py
index e71093ab16..9481d03474 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFifoQueueResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFifoQueueResponse.py
@@ -85,7 +85,6 @@ class ModbusPDUReadFifoQueueResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadFifoQueueResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint16 = read_implicit_field("byteCount", read_unsigned_int)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordRequest.py
index fc64b514b7..3c91667d49 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordRequest.py
@@ -76,7 +76,6 @@ class ModbusPDUReadFileRecordRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadFileRecordRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint8 = read_implicit_field("byteCount", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordRequestItem.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordRequestItem.py
index 17881ed40d..254549f696 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordRequestItem.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordRequestItem.py
@@ -86,7 +86,6 @@ class ModbusPDUReadFileRecordRequestItem(PlcMessage):
     @staticmethod
     def static_parse_context(read_buffer: ReadBuffer):
         read_buffer.pull_context("ModbusPDUReadFileRecordRequestItem")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         reference_type: c_uint8 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordResponse.py
index ba830b786b..5b8d1d109c 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordResponse.py
@@ -76,7 +76,6 @@ class ModbusPDUReadFileRecordResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadFileRecordResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint8 = read_implicit_field("byteCount", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordResponseItem.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordResponseItem.py
index ed965fcc26..f779cef97e 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordResponseItem.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadFileRecordResponseItem.py
@@ -78,7 +78,6 @@ class ModbusPDUReadFileRecordResponseItem(PlcMessage):
     @staticmethod
     def static_parse_context(read_buffer: ReadBuffer):
         read_buffer.pull_context("ModbusPDUReadFileRecordResponseItem")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         data_length: c_uint8 = read_implicit_field("dataLength", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadHoldingRegistersRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadHoldingRegistersRequest.py
index b736977458..7fc8df324f 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadHoldingRegistersRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadHoldingRegistersRequest.py
@@ -72,7 +72,6 @@ class ModbusPDUReadHoldingRegistersRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadHoldingRegistersRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         starting_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadHoldingRegistersResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadHoldingRegistersResponse.py
index 484e90a60b..3f9148d552 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadHoldingRegistersResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadHoldingRegistersResponse.py
@@ -72,7 +72,6 @@ class ModbusPDUReadHoldingRegistersResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadHoldingRegistersResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint8 = read_implicit_field("byteCount", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadInputRegistersRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadInputRegistersRequest.py
index bb3e62478e..97727f8662 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadInputRegistersRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadInputRegistersRequest.py
@@ -72,7 +72,6 @@ class ModbusPDUReadInputRegistersRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadInputRegistersRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         starting_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadInputRegistersResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadInputRegistersResponse.py
index aa4a26d1b1..6a8ee80bc2 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadInputRegistersResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadInputRegistersResponse.py
@@ -72,7 +72,6 @@ class ModbusPDUReadInputRegistersResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadInputRegistersResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint8 = read_implicit_field("byteCount", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadWriteMultipleHoldingRegistersRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadWriteMultipleHoldingRegistersRequest.py
index 24aa94be28..471dc66f9e 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadWriteMultipleHoldingRegistersRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadWriteMultipleHoldingRegistersRequest.py
@@ -109,7 +109,6 @@ class ModbusPDUReadWriteMultipleHoldingRegistersRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadWriteMultipleHoldingRegistersRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         read_starting_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadWriteMultipleHoldingRegistersResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadWriteMultipleHoldingRegistersResponse.py
index 104542d04c..c105cdb2f1 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadWriteMultipleHoldingRegistersResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReadWriteMultipleHoldingRegistersResponse.py
@@ -72,7 +72,6 @@ class ModbusPDUReadWriteMultipleHoldingRegistersResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReadWriteMultipleHoldingRegistersResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint8 = read_implicit_field("byteCount", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReportServerIdRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReportServerIdRequest.py
index 1b560041f0..00a022319d 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReportServerIdRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReportServerIdRequest.py
@@ -55,7 +55,6 @@ class ModbusPDUReportServerIdRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReportServerIdRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         read_buffer.close_context("ModbusPDUReportServerIdRequest")
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReportServerIdResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReportServerIdResponse.py
index e0930a539f..9f57aa0785 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReportServerIdResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUReportServerIdResponse.py
@@ -72,7 +72,6 @@ class ModbusPDUReportServerIdResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUReportServerIdResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint8 = read_implicit_field("byteCount", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordRequest.py
index bbc5f43916..7aad45e8f8 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordRequest.py
@@ -76,7 +76,6 @@ class ModbusPDUWriteFileRecordRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUWriteFileRecordRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint8 = read_implicit_field("byteCount", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordRequestItem.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordRequestItem.py
index 80cb2f0523..4fb1933481 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordRequestItem.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordRequestItem.py
@@ -95,7 +95,6 @@ class ModbusPDUWriteFileRecordRequestItem(PlcMessage):
     @staticmethod
     def static_parse_context(read_buffer: ReadBuffer):
         read_buffer.pull_context("ModbusPDUWriteFileRecordRequestItem")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         reference_type: c_uint8 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordResponse.py
index 4a78e7b1a9..7ce8bd2271 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordResponse.py
@@ -76,7 +76,6 @@ class ModbusPDUWriteFileRecordResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUWriteFileRecordResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         byte_count: c_uint8 = read_implicit_field("byteCount", read_unsigned_short)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordResponseItem.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordResponseItem.py
index c1b95a8934..cf9ed86653 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordResponseItem.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteFileRecordResponseItem.py
@@ -94,7 +94,6 @@ class ModbusPDUWriteFileRecordResponseItem(PlcMessage):
     @staticmethod
     def static_parse_context(read_buffer: ReadBuffer):
         read_buffer.pull_context("ModbusPDUWriteFileRecordResponseItem")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         reference_type: c_uint8 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleCoilsRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleCoilsRequest.py
index b1219b2a77..838c421251 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleCoilsRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleCoilsRequest.py
@@ -89,7 +89,6 @@ class ModbusPDUWriteMultipleCoilsRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUWriteMultipleCoilsRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         starting_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleCoilsResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleCoilsResponse.py
index 123d3d1d1b..d49f3893ad 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleCoilsResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleCoilsResponse.py
@@ -72,7 +72,6 @@ class ModbusPDUWriteMultipleCoilsResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUWriteMultipleCoilsResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         starting_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleHoldingRegistersRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleHoldingRegistersRequest.py
index ca7e09c94b..e2105afdca 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleHoldingRegistersRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleHoldingRegistersRequest.py
@@ -89,7 +89,6 @@ class ModbusPDUWriteMultipleHoldingRegistersRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUWriteMultipleHoldingRegistersRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         starting_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleHoldingRegistersResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleHoldingRegistersResponse.py
index 2f993448cd..82c8a15391 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleHoldingRegistersResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteMultipleHoldingRegistersResponse.py
@@ -72,7 +72,6 @@ class ModbusPDUWriteMultipleHoldingRegistersResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUWriteMultipleHoldingRegistersResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         starting_address: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleCoilRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleCoilRequest.py
index 2e9e535835..03b4fb6e65 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleCoilRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleCoilRequest.py
@@ -70,7 +70,6 @@ class ModbusPDUWriteSingleCoilRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUWriteSingleCoilRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         address: c_uint16 = read_simple_field("address", read_unsigned_int)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleCoilResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleCoilResponse.py
index 0be5666288..27b1ae3150 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleCoilResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleCoilResponse.py
@@ -70,7 +70,6 @@ class ModbusPDUWriteSingleCoilResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUWriteSingleCoilResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         address: c_uint16 = read_simple_field("address", read_unsigned_int)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleRegisterRequest.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleRegisterRequest.py
index 081099c05f..99f074d461 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleRegisterRequest.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleRegisterRequest.py
@@ -70,7 +70,6 @@ class ModbusPDUWriteSingleRegisterRequest(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUWriteSingleRegisterRequest")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         address: c_uint16 = read_simple_field("address", read_unsigned_int)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleRegisterResponse.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleRegisterResponse.py
index fdaac0981d..4cb1d40a05 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleRegisterResponse.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusPDUWriteSingleRegisterResponse.py
@@ -70,7 +70,6 @@ class ModbusPDUWriteSingleRegisterResponse(PlcMessage, ModbusPDU):
     @staticmethod
     def static_parse_builder(read_buffer: ReadBuffer, response: c_bool):
         read_buffer.pull_context("ModbusPDUWriteSingleRegisterResponse")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         address: c_uint16 = read_simple_field("address", read_unsigned_int)
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusRtuADU.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusRtuADU.py
index 5fe6faff7b..b6b39a5396 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusRtuADU.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusRtuADU.py
@@ -84,7 +84,6 @@ class ModbusRtuADU(PlcMessage, ModbusADU):
         read_buffer: ReadBuffer, driver_type: DriverType, response: c_bool
     ):
         read_buffer.pull_context("ModbusRtuADU")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         address: c_uint8 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusTcpADU.py b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusTcpADU.py
index 6d50efd12d..9de5d13be4 100644
--- a/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusTcpADU.py
+++ b/sandbox/plc4py/plc4py/protocols/modbus/readwrite/ModbusTcpADU.py
@@ -101,7 +101,6 @@ class ModbusTcpADU(PlcMessage, ModbusADU):
         read_buffer: ReadBuffer, driver_type: DriverType, response: c_bool
     ):
         read_buffer.pull_context("ModbusTcpADU")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         transaction_identifier: c_uint16 = read_simple_field(
diff --git a/sandbox/plc4py/plc4py/protocols/simulated/readwrite/Dummy.py b/sandbox/plc4py/plc4py/protocols/simulated/readwrite/Dummy.py
index af0f253f1d..54028db6bd 100644
--- a/sandbox/plc4py/plc4py/protocols/simulated/readwrite/Dummy.py
+++ b/sandbox/plc4py/plc4py/protocols/simulated/readwrite/Dummy.py
@@ -58,7 +58,6 @@ class Dummy(PlcMessage):
     @staticmethod
     def static_parse_context(read_buffer: ReadBuffer):
         read_buffer.pull_context("Dummy")
-        start_pos: int = read_buffer.get_pos()
         cur_pos: int = 0
 
         dummy: c_uint16 = read_simple_field(