You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/05/24 14:47:21 UTC

[plc4x] branch develop updated (cbaedc9a39 -> 6b7628f91d)

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

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


    from cbaedc9a39 feat(bacnet): implement BACnetUnconfirmedServiceRequestWriteGroup
     new 1e5d6f548c feat(bacnet): implement BACnetServiceAckGetAlarmSummary
     new b0c9709999 feat(bacnet): implement BACnetServiceAckVTOpen
     new 0003c82e2c feat(bacnet): implement BACnetServiceAckVTData
     new ba8b2dde6b feat(bacnet): implement BACnetConfirmedServiceRequestVTOpen
     new 001eedb0b2 feat(bacnet): implement BACnetConfirmedServiceRequestVTOpen
     new e6b90c69f3 feat(bacnet): implement BACnetConfirmedServiceRequestVTData
     new 6b7628f91d fix(codegen/plc4go): fixed issue with complex type and length arrays

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


Summary of changes:
 .../templates/go/complex-type-template.go.ftlh     |  34 ++++-
 .../protocols/bacnetip/readwrite/ParserHelper.go   |   2 +
 .../bacnetip/readwrite/XmlParserHelper.go          |   2 +
 ...tConfirmedServiceRequestReadPropertyMultiple.go |   2 +-
 .../model/BACnetConfirmedServiceRequestVTClose.go  |  71 ++++++++-
 .../model/BACnetConfirmedServiceRequestVTData.go   | 125 +++++++++++++++-
 .../model/BACnetConfirmedServiceRequestVTOpen.go   |  88 ++++++++++-
 ...ConfirmedServiceRequestWritePropertyMultiple.go |   2 +-
 ....go => BACnetEventTransitionBitsApplication.go} |  65 ++++-----
 .../bacnetip/readwrite/model/BACnetServiceAck.go   |  32 ----
 .../model/BACnetServiceAckAcknowledgeAlarm.go      | 161 --------------------
 .../model/BACnetServiceAckAddListElement.go        | 161 --------------------
 .../BACnetServiceAckConfirmedCovNotification.go    | 161 --------------------
 ...etServiceAckConfirmedCovNotificationMultiple.go | 162 ---------------------
 .../BACnetServiceAckConfirmedEventNotification.go  | 161 --------------------
 .../model/BACnetServiceAckConfirmedTextMessage.go  | 161 --------------------
 .../model/BACnetServiceAckCreateObject.go          |  51 ++++++-
 .../BACnetServiceAckDeviceCommunicationControl.go  | 161 --------------------
 .../model/BACnetServiceAckGetAlarmSummary.go       | 129 +++++++++++++++-
 .../model/BACnetServiceAckLifeSafetyOperation.go   | 161 --------------------
 .../model/BACnetServiceAckReadPropertyMultiple.go  |   2 +-
 .../model/BACnetServiceAckReinitializeDevice.go    | 161 --------------------
 .../model/BACnetServiceAckRemoveListElement.go     | 161 --------------------
 .../model/BACnetServiceAckSubscribeCov.go          | 161 --------------------
 .../model/BACnetServiceAckSubscribeCovProperty.go  | 161 --------------------
 ...BACnetServiceAckSubscribeCovPropertyMultiple.go | 161 --------------------
 .../readwrite/model/BACnetServiceAckVTClose.go     | 161 --------------------
 .../readwrite/model/BACnetServiceAckVTData.go      | 129 +++++++++++++++-
 .../readwrite/model/BACnetServiceAckVTOpen.go      |  55 ++++++-
 .../model/BACnetServiceAckWriteProperty.go         | 161 --------------------
 .../model/BACnetServiceAckWritePropertyMultiple.go | 161 --------------------
 .../model/BVLCReadBroadcastDistributionTableAck.go |   2 +-
 .../model/BVLCReadForeignDeviceTableAck.go         |   2 +-
 .../model/BVLCWriteBroadcastDistributionTable.go   |   2 +-
 .../knxnetip/readwrite/model/DIBSuppSvcFamilies.go |   2 +-
 .../knxnetip/readwrite/model/LBusmonInd.go         |   2 +-
 .../protocols/knxnetip/readwrite/model/LDataCon.go |   2 +-
 .../protocols/knxnetip/readwrite/model/LDataInd.go |   2 +-
 .../protocols/knxnetip/readwrite/model/LDataReq.go |   2 +-
 .../model/ModbusPDUReadFileRecordRequest.go        |   2 +-
 .../model/ModbusPDUReadFileRecordResponse.go       |   2 +-
 .../model/ModbusPDUWriteFileRecordRequest.go       |   2 +-
 .../model/ModbusPDUWriteFileRecordResponse.go      |   2 +-
 plc4go/protocols/s7/readwrite/model/COTPPacket.go  |   2 +-
 .../resources/protocols/bacnetip/bacnetip.mspec    | 111 ++++----------
 45 files changed, 721 insertions(+), 2782 deletions(-)
 copy plc4go/protocols/bacnetip/readwrite/model/{BACnetEventTransitionBits.go => BACnetEventTransitionBitsApplication.go} (69%)
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAcknowledgeAlarm.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAddListElement.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedCovNotification.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedCovNotificationMultiple.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedEventNotification.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedTextMessage.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckDeviceCommunicationControl.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckLifeSafetyOperation.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReinitializeDevice.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckRemoveListElement.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCov.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCovProperty.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCovPropertyMultiple.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTClose.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckWriteProperty.go
 delete mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckWritePropertyMultiple.go


[plc4x] 07/07: fix(codegen/plc4go): fixed issue with complex type and length arrays

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

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

commit 6b7628f91d3efe5146138dd377db03efcf7eaf15
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue May 24 16:47:12 2022 +0200

    fix(codegen/plc4go): fixed issue with complex type and length arrays
---
 .../templates/go/complex-type-template.go.ftlh     | 34 ++++++++++++++++++++--
 ...tConfirmedServiceRequestReadPropertyMultiple.go |  2 +-
 .../model/BACnetConfirmedServiceRequestVTClose.go  |  4 +--
 ...ConfirmedServiceRequestWritePropertyMultiple.go |  2 +-
 .../model/BACnetServiceAckReadPropertyMultiple.go  |  2 +-
 .../model/BVLCReadBroadcastDistributionTableAck.go |  2 +-
 .../model/BVLCReadForeignDeviceTableAck.go         |  2 +-
 .../model/BVLCWriteBroadcastDistributionTable.go   |  2 +-
 .../knxnetip/readwrite/model/DIBSuppSvcFamilies.go |  2 +-
 .../knxnetip/readwrite/model/LBusmonInd.go         |  2 +-
 .../protocols/knxnetip/readwrite/model/LDataCon.go |  2 +-
 .../protocols/knxnetip/readwrite/model/LDataInd.go |  2 +-
 .../protocols/knxnetip/readwrite/model/LDataReq.go |  2 +-
 .../model/ModbusPDUReadFileRecordRequest.go        |  2 +-
 .../model/ModbusPDUReadFileRecordResponse.go       |  2 +-
 .../model/ModbusPDUWriteFileRecordRequest.go       |  2 +-
 .../model/ModbusPDUWriteFileRecordResponse.go      |  2 +-
 plc4go/protocols/s7/readwrite/model/COTPPacket.go  |  2 +-
 18 files changed, 49 insertions(+), 21 deletions(-)

diff --git a/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh b/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh
index 796205db3a..f7dfee5dca 100644
--- a/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh
+++ b/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh
@@ -830,11 +830,40 @@ func ${type.name}Parse(readBuffer utils.ReadBuffer<#if hasParserArguments>, ${pa
 		_${arrayField.name}Length := ${helper.toIntegerParseExpression(arrayField, 16, arrayField.loopExpression, parserArguments)}
 		_${arrayField.name}EndPos := positionAware.GetPos() + uint16(_${arrayField.name}Length)
 		for ;positionAware.GetPos() < _${arrayField.name}EndPos; {
-			_item, _err := <#if arrayElementType.isSimpleTypeReference()>${helper.getReadBufferReadMethodCall("", arrayElementType.asSimpleTypeReference().orElseThrow(), arrayField)}<#else>${arrayElementType.asComplexTypeReference().orElseThrow().name}Parse(readBuffer<#if arrayElementType.asComplexTypeReference().orElseThrow().params.isPresent()>, <#list arrayElementType.asComplexTypeReference().orElseThrow().params.orElseThrow() as parserArgument><#if <#--TODO: here DF1ResponseMessage throws a p [...]
+                        <@compress single_line=true>
+							_item, _err := <#if arrayElementType.isSimpleTypeReference()>
+                            ${helper.getReadBufferReadMethodCall("", arrayElementType.asSimpleTypeReference().orElseThrow(), arrayField)}
+                        <#else>
+                            <#assign complexTypeReference=arrayElementType.asComplexTypeReference().orElseThrow()>
+                            <#assign typeName=complexTypeReference.name>
+                            <#assign typeDefinition=complexTypeReference.typeDefinition>
+                            <#if typeDefinition.isComplexTypeDefinition() && typeDefinition.asComplexTypeDefinition().orElseThrow().isDiscriminatedChildTypeDefinition()>
+                            <#-- Usually you don't use child directly unless they are parameterized #-->
+                                <#assign typeName=typeDefinition.asComplexTypeDefinition().orElseThrow().parentType.orElseThrow().name>
+                                <#assign typeDefinition=typeDefinition.asComplexTypeDefinition().orElseThrow().parentType.orElseThrow()>
+                            </#if>
+                            <#assign hasRefParams=complexTypeReference.params.isPresent()>
+                            <#assign refParams>
+                                <#if hasRefParams>
+									,
+                                    <#list complexTypeReference.params.orElseThrow() as parserArgument>
+                                        ${helper.toTypedParseExpression(arrayField, helper.getArgumentType(arrayElementType, parserArgument?index), parserArgument, parserArguments)}
+                                        <#sep>, </#sep>
+                                    </#list>
+                                </#if>
+                            </#assign>
+                            ${typeName}Parse(readBuffer${refParams})
+                        </#if>
+                        </...@compress>
+
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing '${arrayField.name}' field")<@emitImport import="github.com/pkg/errors" />
 			}
+                        <#if arrayElementType.isSimpleTypeReference()>
 			${arrayField.name} = append(${arrayField.name}, _item)
+                        <#else>
+			${arrayField.name} = append(${arrayField.name}, Cast${arrayElementType.asComplexTypeReference().orElseThrow().name}(_item))
+                        </#if>
 						<#-- After parsing, update the current position, but only if it's needed -->
 							<#if arrayField.loopExpression.contains("curPos")>
 			curPos = positionAware.GetPos() - startPos
@@ -848,8 +877,7 @@ func ${type.name}Parse(readBuffer utils.ReadBuffer<#if hasParserArguments>, ${pa
 	{
 		for ;!bool(${helper.toParseExpression(arrayField, helper.boolTypeReference, arrayField.loopExpression, parserArguments)}); {
 						<@compress single_line=true>
-			_item, _err :=
-							<#if arrayElementType.isSimpleTypeReference()>
+			_item, _err := <#if arrayElementType.isSimpleTypeReference()>
 								${helper.getReadBufferReadMethodCall("", arrayElementType.asSimpleTypeReference().orElseThrow(), arrayField)}
 							<#else>
                                 <#assign complexTypeReference=arrayElementType.asComplexTypeReference().orElseThrow()>
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyMultiple.go
index b24e98f0e1..25f5785cf3 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyMultiple.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyMultiple.go
@@ -157,7 +157,7 @@ func BACnetConfirmedServiceRequestReadPropertyMultipleParse(readBuffer utils.Rea
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'data' field")
 			}
-			data = append(data, _item)
+			data = append(data, CastBACnetReadAccessSpecification(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("data", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go
index c9e8a2c33d..20b8c39652 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go
@@ -153,11 +153,11 @@ func BACnetConfirmedServiceRequestVTCloseParse(readBuffer utils.ReadBuffer, serv
 		_listOfRemoteVtSessionIdentifiersLength := utils.InlineIf(bool(bool((serviceRequestLength) > (0))), func() interface{} { return uint16(uint16(uint16(serviceRequestLength) - uint16(uint16(1)))) }, func() interface{} { return uint16(uint16(0)) }).(uint16)
 		_listOfRemoteVtSessionIdentifiersEndPos := positionAware.GetPos() + uint16(_listOfRemoteVtSessionIdentifiersLength)
 		for positionAware.GetPos() < _listOfRemoteVtSessionIdentifiersEndPos {
-			_item, _err := BACnetApplicationTagUnsignedIntegerParse(readBuffer)
+			_item, _err := BACnetApplicationTagParse(readBuffer)
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'listOfRemoteVtSessionIdentifiers' field")
 			}
-			listOfRemoteVtSessionIdentifiers = append(listOfRemoteVtSessionIdentifiers, _item)
+			listOfRemoteVtSessionIdentifiers = append(listOfRemoteVtSessionIdentifiers, CastBACnetApplicationTagUnsignedInteger(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("listOfRemoteVtSessionIdentifiers", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWritePropertyMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWritePropertyMultiple.go
index bbfca89c12..287f033ba6 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWritePropertyMultiple.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWritePropertyMultiple.go
@@ -157,7 +157,7 @@ func BACnetConfirmedServiceRequestWritePropertyMultipleParse(readBuffer utils.Re
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'data' field")
 			}
-			data = append(data, _item)
+			data = append(data, CastBACnetWriteAccessSpecification(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("data", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyMultiple.go
index c9110f1c5c..b44fa5dcbf 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyMultiple.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyMultiple.go
@@ -156,7 +156,7 @@ func BACnetServiceAckReadPropertyMultipleParse(readBuffer utils.ReadBuffer, serv
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'data' field")
 			}
-			data = append(data, _item)
+			data = append(data, CastBACnetReadAccessResult(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("data", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go
index 422abcf3f8..b03008e293 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go
@@ -156,7 +156,7 @@ func BVLCReadBroadcastDistributionTableAckParse(readBuffer utils.ReadBuffer, bvl
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'table' field")
 			}
-			table = append(table, _item)
+			table = append(table, CastBVLCBroadcastDistributionTableEntry(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("table", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go
index db5dcd845c..68768a746c 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go
@@ -156,7 +156,7 @@ func BVLCReadForeignDeviceTableAckParse(readBuffer utils.ReadBuffer, bvlcPayload
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'table' field")
 			}
-			table = append(table, _item)
+			table = append(table, CastBVLCForeignDeviceTableEntry(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("table", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCWriteBroadcastDistributionTable.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCWriteBroadcastDistributionTable.go
index 3f1b295bab..8301c3d58c 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BVLCWriteBroadcastDistributionTable.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCWriteBroadcastDistributionTable.go
@@ -156,7 +156,7 @@ func BVLCWriteBroadcastDistributionTableParse(readBuffer utils.ReadBuffer, bvlcP
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'table' field")
 			}
-			table = append(table, _item)
+			table = append(table, CastBVLCBroadcastDistributionTableEntry(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("table", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/knxnetip/readwrite/model/DIBSuppSvcFamilies.go b/plc4go/protocols/knxnetip/readwrite/model/DIBSuppSvcFamilies.go
index 3311759913..99c2baef78 100644
--- a/plc4go/protocols/knxnetip/readwrite/model/DIBSuppSvcFamilies.go
+++ b/plc4go/protocols/knxnetip/readwrite/model/DIBSuppSvcFamilies.go
@@ -147,7 +147,7 @@ func DIBSuppSvcFamiliesParse(readBuffer utils.ReadBuffer) (*DIBSuppSvcFamilies,
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'serviceIds' field")
 			}
-			serviceIds = append(serviceIds, _item)
+			serviceIds = append(serviceIds, CastServiceId(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("serviceIds", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/knxnetip/readwrite/model/LBusmonInd.go b/plc4go/protocols/knxnetip/readwrite/model/LBusmonInd.go
index b73c24c6a7..2ccc0b6771 100644
--- a/plc4go/protocols/knxnetip/readwrite/model/LBusmonInd.go
+++ b/plc4go/protocols/knxnetip/readwrite/model/LBusmonInd.go
@@ -198,7 +198,7 @@ func LBusmonIndParse(readBuffer utils.ReadBuffer, size uint16) (*LBusmonInd, err
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'additionalInformation' field")
 			}
-			additionalInformation = append(additionalInformation, _item)
+			additionalInformation = append(additionalInformation, CastCEMIAdditionalInformation(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("additionalInformation", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/knxnetip/readwrite/model/LDataCon.go b/plc4go/protocols/knxnetip/readwrite/model/LDataCon.go
index 1b1b7f14c2..645f5552fa 100644
--- a/plc4go/protocols/knxnetip/readwrite/model/LDataCon.go
+++ b/plc4go/protocols/knxnetip/readwrite/model/LDataCon.go
@@ -185,7 +185,7 @@ func LDataConParse(readBuffer utils.ReadBuffer, size uint16) (*LDataCon, error)
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'additionalInformation' field")
 			}
-			additionalInformation = append(additionalInformation, _item)
+			additionalInformation = append(additionalInformation, CastCEMIAdditionalInformation(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("additionalInformation", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/knxnetip/readwrite/model/LDataInd.go b/plc4go/protocols/knxnetip/readwrite/model/LDataInd.go
index adbcdd752f..b71721afaf 100644
--- a/plc4go/protocols/knxnetip/readwrite/model/LDataInd.go
+++ b/plc4go/protocols/knxnetip/readwrite/model/LDataInd.go
@@ -185,7 +185,7 @@ func LDataIndParse(readBuffer utils.ReadBuffer, size uint16) (*LDataInd, error)
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'additionalInformation' field")
 			}
-			additionalInformation = append(additionalInformation, _item)
+			additionalInformation = append(additionalInformation, CastCEMIAdditionalInformation(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("additionalInformation", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/knxnetip/readwrite/model/LDataReq.go b/plc4go/protocols/knxnetip/readwrite/model/LDataReq.go
index e52b9058e4..811906614e 100644
--- a/plc4go/protocols/knxnetip/readwrite/model/LDataReq.go
+++ b/plc4go/protocols/knxnetip/readwrite/model/LDataReq.go
@@ -185,7 +185,7 @@ func LDataReqParse(readBuffer utils.ReadBuffer, size uint16) (*LDataReq, error)
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'additionalInformation' field")
 			}
-			additionalInformation = append(additionalInformation, _item)
+			additionalInformation = append(additionalInformation, CastCEMIAdditionalInformation(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("additionalInformation", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequest.go
index 844f8ed87e..5bae53e35c 100644
--- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequest.go
+++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequest.go
@@ -171,7 +171,7 @@ func ModbusPDUReadFileRecordRequestParse(readBuffer utils.ReadBuffer, response b
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'items' field")
 			}
-			items = append(items, _item)
+			items = append(items, CastModbusPDUReadFileRecordRequestItem(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("items", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponse.go
index 116202b036..0ff8b0e27c 100644
--- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponse.go
+++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponse.go
@@ -171,7 +171,7 @@ func ModbusPDUReadFileRecordResponseParse(readBuffer utils.ReadBuffer, response
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'items' field")
 			}
-			items = append(items, _item)
+			items = append(items, CastModbusPDUReadFileRecordResponseItem(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("items", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequest.go
index 32ff4441b7..50f7584d0c 100644
--- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequest.go
+++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequest.go
@@ -171,7 +171,7 @@ func ModbusPDUWriteFileRecordRequestParse(readBuffer utils.ReadBuffer, response
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'items' field")
 			}
-			items = append(items, _item)
+			items = append(items, CastModbusPDUWriteFileRecordRequestItem(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("items", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponse.go
index 82b358cecc..3b788b8711 100644
--- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponse.go
+++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponse.go
@@ -171,7 +171,7 @@ func ModbusPDUWriteFileRecordResponseParse(readBuffer utils.ReadBuffer, response
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'items' field")
 			}
-			items = append(items, _item)
+			items = append(items, CastModbusPDUWriteFileRecordResponseItem(_item))
 		}
 	}
 	if closeErr := readBuffer.CloseContext("items", utils.WithRenderAsList(true)); closeErr != nil {
diff --git a/plc4go/protocols/s7/readwrite/model/COTPPacket.go b/plc4go/protocols/s7/readwrite/model/COTPPacket.go
index 6233c8c7c9..fe93e663da 100644
--- a/plc4go/protocols/s7/readwrite/model/COTPPacket.go
+++ b/plc4go/protocols/s7/readwrite/model/COTPPacket.go
@@ -209,7 +209,7 @@ func COTPPacketParse(readBuffer utils.ReadBuffer, cotpLen uint16) (*COTPPacket,
 			if _err != nil {
 				return nil, errors.Wrap(_err, "Error parsing 'parameters' field")
 			}
-			parameters = append(parameters, _item)
+			parameters = append(parameters, CastCOTPParameter(_item))
 			curPos = positionAware.GetPos() - startPos
 		}
 	}


[plc4x] 02/07: feat(bacnet): implement BACnetServiceAckVTOpen

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

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

commit b0c9709999386a4003330e664b8c288244479c1e
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue May 24 16:26:40 2022 +0200

    feat(bacnet): implement BACnetServiceAckVTOpen
---
 .../bacnetip/readwrite/model/BACnetServiceAck.go   |   8 -
 .../model/BACnetServiceAckConfirmedTextMessage.go  | 161 ---------------------
 .../model/BACnetServiceAckCreateObject.go          |  51 ++++++-
 .../BACnetServiceAckDeviceCommunicationControl.go  | 161 ---------------------
 .../model/BACnetServiceAckReinitializeDevice.go    | 161 ---------------------
 .../readwrite/model/BACnetServiceAckVTClose.go     | 161 ---------------------
 .../readwrite/model/BACnetServiceAckVTOpen.go      |  55 ++++++-
 .../resources/protocols/bacnetip/bacnetip.mspec    |  22 +--
 8 files changed, 98 insertions(+), 682 deletions(-)

diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go
index 6713edbd8e..5a4e61c5fe 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go
@@ -150,18 +150,10 @@ func BACnetServiceAckParse(readBuffer utils.ReadBuffer, serviceAckLength uint16)
 		_child, typeSwitchError = BACnetServiceAckReadPropertyMultipleParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_READ_RANGE: // BACnetServiceAckReadRange
 		_child, typeSwitchError = BACnetServiceAckReadRangeParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_DEVICE_COMMUNICATION_CONTROL: // BACnetServiceAckDeviceCommunicationControl
-		_child, typeSwitchError = BACnetServiceAckDeviceCommunicationControlParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER: // BACnetServiceAckConfirmedPrivateTransfer
 		_child, typeSwitchError = BACnetServiceAckConfirmedPrivateTransferParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_TEXT_MESSAGE: // BACnetServiceAckConfirmedTextMessage
-		_child, typeSwitchError = BACnetServiceAckConfirmedTextMessageParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_REINITIALIZE_DEVICE: // BACnetServiceAckReinitializeDevice
-		_child, typeSwitchError = BACnetServiceAckReinitializeDeviceParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_VT_OPEN: // BACnetServiceAckVTOpen
 		_child, typeSwitchError = BACnetServiceAckVTOpenParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_VT_CLOSE: // BACnetServiceAckVTClose
-		_child, typeSwitchError = BACnetServiceAckVTCloseParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_VT_DATA: // BACnetServiceAckVTData
 		_child, typeSwitchError = BACnetServiceAckVTDataParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_AUTHENTICATE: // BACnetServiceAckAuthenticate
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedTextMessage.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedTextMessage.go
deleted file mode 100644
index f11aa21ce5..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedTextMessage.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckConfirmedTextMessage is the data-structure of this message
-type BACnetServiceAckConfirmedTextMessage struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckConfirmedTextMessage is the corresponding interface of BACnetServiceAckConfirmedTextMessage
-type IBACnetServiceAckConfirmedTextMessage interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckConfirmedTextMessage) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_CONFIRMED_TEXT_MESSAGE
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckConfirmedTextMessage) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckConfirmedTextMessage) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckConfirmedTextMessage factory function for BACnetServiceAckConfirmedTextMessage
-func NewBACnetServiceAckConfirmedTextMessage(serviceAckLength uint16) *BACnetServiceAckConfirmedTextMessage {
-	_result := &BACnetServiceAckConfirmedTextMessage{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckConfirmedTextMessage(structType interface{}) *BACnetServiceAckConfirmedTextMessage {
-	if casted, ok := structType.(BACnetServiceAckConfirmedTextMessage); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckConfirmedTextMessage); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckConfirmedTextMessage(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckConfirmedTextMessage(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckConfirmedTextMessage) GetTypeName() string {
-	return "BACnetServiceAckConfirmedTextMessage"
-}
-
-func (m *BACnetServiceAckConfirmedTextMessage) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckConfirmedTextMessage) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckConfirmedTextMessage) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckConfirmedTextMessageParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckConfirmedTextMessage, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckConfirmedTextMessage"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckConfirmedTextMessage"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckConfirmedTextMessage{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckConfirmedTextMessage) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckConfirmedTextMessage"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckConfirmedTextMessage"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckConfirmedTextMessage) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckCreateObject.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckCreateObject.go
index 63738c26de..b9834965fe 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckCreateObject.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckCreateObject.go
@@ -21,6 +21,7 @@ package model
 
 import (
 	"github.com/apache/plc4x/plc4go/internal/spi/utils"
+	"github.com/pkg/errors"
 )
 
 // Code generated by code-generation. DO NOT EDIT.
@@ -28,6 +29,7 @@ import (
 // BACnetServiceAckCreateObject is the data-structure of this message
 type BACnetServiceAckCreateObject struct {
 	*BACnetServiceAck
+	ObjectIdentifier *BACnetApplicationTagObjectIdentifier
 
 	// Arguments.
 	ServiceAckLength uint16
@@ -36,6 +38,8 @@ type BACnetServiceAckCreateObject struct {
 // IBACnetServiceAckCreateObject is the corresponding interface of BACnetServiceAckCreateObject
 type IBACnetServiceAckCreateObject interface {
 	IBACnetServiceAck
+	// GetObjectIdentifier returns ObjectIdentifier (property field)
+	GetObjectIdentifier() *BACnetApplicationTagObjectIdentifier
 	// GetLengthInBytes returns the length in bytes
 	GetLengthInBytes() uint16
 	// GetLengthInBits returns the length in bits
@@ -64,9 +68,24 @@ func (m *BACnetServiceAckCreateObject) GetParent() *BACnetServiceAck {
 	return m.BACnetServiceAck
 }
 
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetServiceAckCreateObject) GetObjectIdentifier() *BACnetApplicationTagObjectIdentifier {
+	return m.ObjectIdentifier
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
 // NewBACnetServiceAckCreateObject factory function for BACnetServiceAckCreateObject
-func NewBACnetServiceAckCreateObject(serviceAckLength uint16) *BACnetServiceAckCreateObject {
+func NewBACnetServiceAckCreateObject(objectIdentifier *BACnetApplicationTagObjectIdentifier, serviceAckLength uint16) *BACnetServiceAckCreateObject {
 	_result := &BACnetServiceAckCreateObject{
+		ObjectIdentifier: objectIdentifier,
 		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
 	}
 	_result.Child = _result
@@ -100,6 +119,9 @@ func (m *BACnetServiceAckCreateObject) GetLengthInBits() uint16 {
 func (m *BACnetServiceAckCreateObject) GetLengthInBitsConditional(lastItem bool) uint16 {
 	lengthInBits := uint16(m.GetParentLengthInBits())
 
+	// Simple field (objectIdentifier)
+	lengthInBits += m.ObjectIdentifier.GetLengthInBits()
+
 	return lengthInBits
 }
 
@@ -116,9 +138,17 @@ func BACnetServiceAckCreateObjectParse(readBuffer utils.ReadBuffer, serviceAckLe
 	currentPos := positionAware.GetPos()
 	_ = currentPos
 
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
+	// Simple Field (objectIdentifier)
+	if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil {
+		return nil, pullErr
+	}
+	_objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParse(readBuffer)
+	if _objectIdentifierErr != nil {
+		return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field")
+	}
+	objectIdentifier := CastBACnetApplicationTagObjectIdentifier(_objectIdentifier)
+	if closeErr := readBuffer.CloseContext("objectIdentifier"); closeErr != nil {
+		return nil, closeErr
 	}
 
 	if closeErr := readBuffer.CloseContext("BACnetServiceAckCreateObject"); closeErr != nil {
@@ -127,6 +157,7 @@ func BACnetServiceAckCreateObjectParse(readBuffer utils.ReadBuffer, serviceAckLe
 
 	// Create a partially initialized instance
 	_child := &BACnetServiceAckCreateObject{
+		ObjectIdentifier: CastBACnetApplicationTagObjectIdentifier(objectIdentifier),
 		BACnetServiceAck: &BACnetServiceAck{},
 	}
 	_child.BACnetServiceAck.Child = _child
@@ -141,6 +172,18 @@ func (m *BACnetServiceAckCreateObject) Serialize(writeBuffer utils.WriteBuffer)
 			return pushErr
 		}
 
+		// Simple Field (objectIdentifier)
+		if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil {
+			return pushErr
+		}
+		_objectIdentifierErr := m.ObjectIdentifier.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil {
+			return popErr
+		}
+		if _objectIdentifierErr != nil {
+			return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field")
+		}
+
 		if popErr := writeBuffer.PopContext("BACnetServiceAckCreateObject"); popErr != nil {
 			return popErr
 		}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckDeviceCommunicationControl.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckDeviceCommunicationControl.go
deleted file mode 100644
index f507681fee..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckDeviceCommunicationControl.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckDeviceCommunicationControl is the data-structure of this message
-type BACnetServiceAckDeviceCommunicationControl struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckDeviceCommunicationControl is the corresponding interface of BACnetServiceAckDeviceCommunicationControl
-type IBACnetServiceAckDeviceCommunicationControl interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckDeviceCommunicationControl) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_DEVICE_COMMUNICATION_CONTROL
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckDeviceCommunicationControl) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckDeviceCommunicationControl) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckDeviceCommunicationControl factory function for BACnetServiceAckDeviceCommunicationControl
-func NewBACnetServiceAckDeviceCommunicationControl(serviceAckLength uint16) *BACnetServiceAckDeviceCommunicationControl {
-	_result := &BACnetServiceAckDeviceCommunicationControl{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckDeviceCommunicationControl(structType interface{}) *BACnetServiceAckDeviceCommunicationControl {
-	if casted, ok := structType.(BACnetServiceAckDeviceCommunicationControl); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckDeviceCommunicationControl); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckDeviceCommunicationControl(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckDeviceCommunicationControl(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckDeviceCommunicationControl) GetTypeName() string {
-	return "BACnetServiceAckDeviceCommunicationControl"
-}
-
-func (m *BACnetServiceAckDeviceCommunicationControl) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckDeviceCommunicationControl) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckDeviceCommunicationControl) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckDeviceCommunicationControlParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckDeviceCommunicationControl, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckDeviceCommunicationControl"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckDeviceCommunicationControl"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckDeviceCommunicationControl{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckDeviceCommunicationControl) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckDeviceCommunicationControl"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckDeviceCommunicationControl"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckDeviceCommunicationControl) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReinitializeDevice.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReinitializeDevice.go
deleted file mode 100644
index afe0a1426f..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReinitializeDevice.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckReinitializeDevice is the data-structure of this message
-type BACnetServiceAckReinitializeDevice struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckReinitializeDevice is the corresponding interface of BACnetServiceAckReinitializeDevice
-type IBACnetServiceAckReinitializeDevice interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckReinitializeDevice) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_REINITIALIZE_DEVICE
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckReinitializeDevice) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckReinitializeDevice) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckReinitializeDevice factory function for BACnetServiceAckReinitializeDevice
-func NewBACnetServiceAckReinitializeDevice(serviceAckLength uint16) *BACnetServiceAckReinitializeDevice {
-	_result := &BACnetServiceAckReinitializeDevice{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckReinitializeDevice(structType interface{}) *BACnetServiceAckReinitializeDevice {
-	if casted, ok := structType.(BACnetServiceAckReinitializeDevice); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckReinitializeDevice); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckReinitializeDevice(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckReinitializeDevice(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckReinitializeDevice) GetTypeName() string {
-	return "BACnetServiceAckReinitializeDevice"
-}
-
-func (m *BACnetServiceAckReinitializeDevice) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckReinitializeDevice) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckReinitializeDevice) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckReinitializeDeviceParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckReinitializeDevice, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckReinitializeDevice"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckReinitializeDevice"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckReinitializeDevice{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckReinitializeDevice) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckReinitializeDevice"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckReinitializeDevice"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckReinitializeDevice) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTClose.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTClose.go
deleted file mode 100644
index 4a6ef3cf3a..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTClose.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckVTClose is the data-structure of this message
-type BACnetServiceAckVTClose struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckVTClose is the corresponding interface of BACnetServiceAckVTClose
-type IBACnetServiceAckVTClose interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckVTClose) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_VT_CLOSE
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckVTClose) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckVTClose) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckVTClose factory function for BACnetServiceAckVTClose
-func NewBACnetServiceAckVTClose(serviceAckLength uint16) *BACnetServiceAckVTClose {
-	_result := &BACnetServiceAckVTClose{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckVTClose(structType interface{}) *BACnetServiceAckVTClose {
-	if casted, ok := structType.(BACnetServiceAckVTClose); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckVTClose); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckVTClose(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckVTClose(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckVTClose) GetTypeName() string {
-	return "BACnetServiceAckVTClose"
-}
-
-func (m *BACnetServiceAckVTClose) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckVTClose) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckVTClose) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckVTCloseParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckVTClose, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckVTClose"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckVTClose"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckVTClose{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckVTClose) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckVTClose"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckVTClose"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckVTClose) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTOpen.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTOpen.go
index ff70396a7c..9fbecb51c0 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTOpen.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTOpen.go
@@ -21,6 +21,7 @@ package model
 
 import (
 	"github.com/apache/plc4x/plc4go/internal/spi/utils"
+	"github.com/pkg/errors"
 )
 
 // Code generated by code-generation. DO NOT EDIT.
@@ -28,6 +29,7 @@ import (
 // BACnetServiceAckVTOpen is the data-structure of this message
 type BACnetServiceAckVTOpen struct {
 	*BACnetServiceAck
+	RemoteVtSessionIdentifier *BACnetApplicationTagUnsignedInteger
 
 	// Arguments.
 	ServiceAckLength uint16
@@ -36,6 +38,8 @@ type BACnetServiceAckVTOpen struct {
 // IBACnetServiceAckVTOpen is the corresponding interface of BACnetServiceAckVTOpen
 type IBACnetServiceAckVTOpen interface {
 	IBACnetServiceAck
+	// GetRemoteVtSessionIdentifier returns RemoteVtSessionIdentifier (property field)
+	GetRemoteVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger
 	// GetLengthInBytes returns the length in bytes
 	GetLengthInBytes() uint16
 	// GetLengthInBits returns the length in bits
@@ -64,10 +68,25 @@ func (m *BACnetServiceAckVTOpen) GetParent() *BACnetServiceAck {
 	return m.BACnetServiceAck
 }
 
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetServiceAckVTOpen) GetRemoteVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger {
+	return m.RemoteVtSessionIdentifier
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
 // NewBACnetServiceAckVTOpen factory function for BACnetServiceAckVTOpen
-func NewBACnetServiceAckVTOpen(serviceAckLength uint16) *BACnetServiceAckVTOpen {
+func NewBACnetServiceAckVTOpen(remoteVtSessionIdentifier *BACnetApplicationTagUnsignedInteger, serviceAckLength uint16) *BACnetServiceAckVTOpen {
 	_result := &BACnetServiceAckVTOpen{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
+		RemoteVtSessionIdentifier: remoteVtSessionIdentifier,
+		BACnetServiceAck:          NewBACnetServiceAck(serviceAckLength),
 	}
 	_result.Child = _result
 	return _result
@@ -100,6 +119,9 @@ func (m *BACnetServiceAckVTOpen) GetLengthInBits() uint16 {
 func (m *BACnetServiceAckVTOpen) GetLengthInBitsConditional(lastItem bool) uint16 {
 	lengthInBits := uint16(m.GetParentLengthInBits())
 
+	// Simple field (remoteVtSessionIdentifier)
+	lengthInBits += m.RemoteVtSessionIdentifier.GetLengthInBits()
+
 	return lengthInBits
 }
 
@@ -116,9 +138,17 @@ func BACnetServiceAckVTOpenParse(readBuffer utils.ReadBuffer, serviceAckLength u
 	currentPos := positionAware.GetPos()
 	_ = currentPos
 
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
+	// Simple Field (remoteVtSessionIdentifier)
+	if pullErr := readBuffer.PullContext("remoteVtSessionIdentifier"); pullErr != nil {
+		return nil, pullErr
+	}
+	_remoteVtSessionIdentifier, _remoteVtSessionIdentifierErr := BACnetApplicationTagParse(readBuffer)
+	if _remoteVtSessionIdentifierErr != nil {
+		return nil, errors.Wrap(_remoteVtSessionIdentifierErr, "Error parsing 'remoteVtSessionIdentifier' field")
+	}
+	remoteVtSessionIdentifier := CastBACnetApplicationTagUnsignedInteger(_remoteVtSessionIdentifier)
+	if closeErr := readBuffer.CloseContext("remoteVtSessionIdentifier"); closeErr != nil {
+		return nil, closeErr
 	}
 
 	if closeErr := readBuffer.CloseContext("BACnetServiceAckVTOpen"); closeErr != nil {
@@ -127,7 +157,8 @@ func BACnetServiceAckVTOpenParse(readBuffer utils.ReadBuffer, serviceAckLength u
 
 	// Create a partially initialized instance
 	_child := &BACnetServiceAckVTOpen{
-		BACnetServiceAck: &BACnetServiceAck{},
+		RemoteVtSessionIdentifier: CastBACnetApplicationTagUnsignedInteger(remoteVtSessionIdentifier),
+		BACnetServiceAck:          &BACnetServiceAck{},
 	}
 	_child.BACnetServiceAck.Child = _child
 	return _child, nil
@@ -141,6 +172,18 @@ func (m *BACnetServiceAckVTOpen) Serialize(writeBuffer utils.WriteBuffer) error
 			return pushErr
 		}
 
+		// Simple Field (remoteVtSessionIdentifier)
+		if pushErr := writeBuffer.PushContext("remoteVtSessionIdentifier"); pushErr != nil {
+			return pushErr
+		}
+		_remoteVtSessionIdentifierErr := m.RemoteVtSessionIdentifier.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("remoteVtSessionIdentifier"); popErr != nil {
+			return popErr
+		}
+		if _remoteVtSessionIdentifierErr != nil {
+			return errors.Wrap(_remoteVtSessionIdentifierErr, "Error serializing 'remoteVtSessionIdentifier' field")
+		}
+
 		if popErr := writeBuffer.PopContext("BACnetServiceAckVTOpen"); popErr != nil {
 			return popErr
 		}
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index 1a82c1bd14..de076720fb 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -934,8 +934,7 @@
         ////
         // Object Access Services
         ['CREATE_OBJECT' BACnetServiceAckCreateObject
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
+            [simple   BACnetApplicationTagObjectIdentifier                      objectIdentifier                ]
         ]
         ['READ_PROPERTY' BACnetServiceAckReadProperty
             [simple   BACnetContextTagObjectIdentifier('0', 'BACnetDataType.BACNET_OBJECT_IDENTIFIER')
@@ -969,23 +968,11 @@
         ////
         // Remote Device Management Services
 
-        ['DEVICE_COMMUNICATION_CONTROL' BACnetServiceAckDeviceCommunicationControl
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
         ['CONFIRMED_PRIVATE_TRANSFER' BACnetServiceAckConfirmedPrivateTransfer
             [simple   BACnetVendorIdTagged('0', 'TagClass.CONTEXT_SPECIFIC_TAGS')                      vendorId                    ]
             [simple   BACnetContextTagUnsignedInteger('1', 'BACnetDataType.UNSIGNED_INTEGER')          serviceNumber               ]
             [optional BACnetConstructedData('2', 'BACnetObjectType.VENDOR_PROPRIETARY_VALUE', 'BACnetPropertyIdentifier.VENDOR_PROPRIETARY_VALUE') resultBlock                 ]
         ]
-        ['CONFIRMED_TEXT_MESSAGE' BACnetServiceAckConfirmedTextMessage
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
-        ['REINITIALIZE_DEVICE' BACnetServiceAckReinitializeDevice
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
         //
         ////
 
@@ -993,12 +980,7 @@
         //  Virtual Terminal Services
 
         ['VT_OPEN' BACnetServiceAckVTOpen
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
-        ['VT_CLOSE' BACnetServiceAckVTClose
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
+            [simple   BACnetApplicationTagUnsignedInteger                       remoteVtSessionIdentifier                        ]
         ]
         ['VT_DATA' BACnetServiceAckVTData
             // TODO: implement me


[plc4x] 03/07: feat(bacnet): implement BACnetServiceAckVTData

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

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

commit 0003c82e2c1f258dbc5f28f1beaccf0eb216b497
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue May 24 16:28:17 2022 +0200

    feat(bacnet): implement BACnetServiceAckVTData
---
 .../readwrite/model/BACnetServiceAckVTData.go      | 129 ++++++++++++++++++++-
 .../resources/protocols/bacnetip/bacnetip.mspec    |   5 +-
 2 files changed, 126 insertions(+), 8 deletions(-)

diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTData.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTData.go
index 7e2976c902..b8a9f5cc94 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTData.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTData.go
@@ -21,6 +21,7 @@ package model
 
 import (
 	"github.com/apache/plc4x/plc4go/internal/spi/utils"
+	"github.com/pkg/errors"
 )
 
 // Code generated by code-generation. DO NOT EDIT.
@@ -28,6 +29,9 @@ import (
 // BACnetServiceAckVTData is the data-structure of this message
 type BACnetServiceAckVTData struct {
 	*BACnetServiceAck
+	VtSessionIdentifier *BACnetApplicationTagUnsignedInteger
+	VtNewData           *BACnetApplicationTagOctetString
+	VtDataFlag          *BACnetApplicationTagUnsignedInteger
 
 	// Arguments.
 	ServiceAckLength uint16
@@ -36,6 +40,12 @@ type BACnetServiceAckVTData struct {
 // IBACnetServiceAckVTData is the corresponding interface of BACnetServiceAckVTData
 type IBACnetServiceAckVTData interface {
 	IBACnetServiceAck
+	// GetVtSessionIdentifier returns VtSessionIdentifier (property field)
+	GetVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger
+	// GetVtNewData returns VtNewData (property field)
+	GetVtNewData() *BACnetApplicationTagOctetString
+	// GetVtDataFlag returns VtDataFlag (property field)
+	GetVtDataFlag() *BACnetApplicationTagUnsignedInteger
 	// GetLengthInBytes returns the length in bytes
 	GetLengthInBytes() uint16
 	// GetLengthInBits returns the length in bits
@@ -64,10 +74,35 @@ func (m *BACnetServiceAckVTData) GetParent() *BACnetServiceAck {
 	return m.BACnetServiceAck
 }
 
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetServiceAckVTData) GetVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger {
+	return m.VtSessionIdentifier
+}
+
+func (m *BACnetServiceAckVTData) GetVtNewData() *BACnetApplicationTagOctetString {
+	return m.VtNewData
+}
+
+func (m *BACnetServiceAckVTData) GetVtDataFlag() *BACnetApplicationTagUnsignedInteger {
+	return m.VtDataFlag
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
 // NewBACnetServiceAckVTData factory function for BACnetServiceAckVTData
-func NewBACnetServiceAckVTData(serviceAckLength uint16) *BACnetServiceAckVTData {
+func NewBACnetServiceAckVTData(vtSessionIdentifier *BACnetApplicationTagUnsignedInteger, vtNewData *BACnetApplicationTagOctetString, vtDataFlag *BACnetApplicationTagUnsignedInteger, serviceAckLength uint16) *BACnetServiceAckVTData {
 	_result := &BACnetServiceAckVTData{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
+		VtSessionIdentifier: vtSessionIdentifier,
+		VtNewData:           vtNewData,
+		VtDataFlag:          vtDataFlag,
+		BACnetServiceAck:    NewBACnetServiceAck(serviceAckLength),
 	}
 	_result.Child = _result
 	return _result
@@ -100,6 +135,15 @@ func (m *BACnetServiceAckVTData) GetLengthInBits() uint16 {
 func (m *BACnetServiceAckVTData) GetLengthInBitsConditional(lastItem bool) uint16 {
 	lengthInBits := uint16(m.GetParentLengthInBits())
 
+	// Simple field (vtSessionIdentifier)
+	lengthInBits += m.VtSessionIdentifier.GetLengthInBits()
+
+	// Simple field (vtNewData)
+	lengthInBits += m.VtNewData.GetLengthInBits()
+
+	// Simple field (vtDataFlag)
+	lengthInBits += m.VtDataFlag.GetLengthInBits()
+
 	return lengthInBits
 }
 
@@ -116,9 +160,43 @@ func BACnetServiceAckVTDataParse(readBuffer utils.ReadBuffer, serviceAckLength u
 	currentPos := positionAware.GetPos()
 	_ = currentPos
 
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
+	// Simple Field (vtSessionIdentifier)
+	if pullErr := readBuffer.PullContext("vtSessionIdentifier"); pullErr != nil {
+		return nil, pullErr
+	}
+	_vtSessionIdentifier, _vtSessionIdentifierErr := BACnetApplicationTagParse(readBuffer)
+	if _vtSessionIdentifierErr != nil {
+		return nil, errors.Wrap(_vtSessionIdentifierErr, "Error parsing 'vtSessionIdentifier' field")
+	}
+	vtSessionIdentifier := CastBACnetApplicationTagUnsignedInteger(_vtSessionIdentifier)
+	if closeErr := readBuffer.CloseContext("vtSessionIdentifier"); closeErr != nil {
+		return nil, closeErr
+	}
+
+	// Simple Field (vtNewData)
+	if pullErr := readBuffer.PullContext("vtNewData"); pullErr != nil {
+		return nil, pullErr
+	}
+	_vtNewData, _vtNewDataErr := BACnetApplicationTagParse(readBuffer)
+	if _vtNewDataErr != nil {
+		return nil, errors.Wrap(_vtNewDataErr, "Error parsing 'vtNewData' field")
+	}
+	vtNewData := CastBACnetApplicationTagOctetString(_vtNewData)
+	if closeErr := readBuffer.CloseContext("vtNewData"); closeErr != nil {
+		return nil, closeErr
+	}
+
+	// Simple Field (vtDataFlag)
+	if pullErr := readBuffer.PullContext("vtDataFlag"); pullErr != nil {
+		return nil, pullErr
+	}
+	_vtDataFlag, _vtDataFlagErr := BACnetApplicationTagParse(readBuffer)
+	if _vtDataFlagErr != nil {
+		return nil, errors.Wrap(_vtDataFlagErr, "Error parsing 'vtDataFlag' field")
+	}
+	vtDataFlag := CastBACnetApplicationTagUnsignedInteger(_vtDataFlag)
+	if closeErr := readBuffer.CloseContext("vtDataFlag"); closeErr != nil {
+		return nil, closeErr
 	}
 
 	if closeErr := readBuffer.CloseContext("BACnetServiceAckVTData"); closeErr != nil {
@@ -127,7 +205,10 @@ func BACnetServiceAckVTDataParse(readBuffer utils.ReadBuffer, serviceAckLength u
 
 	// Create a partially initialized instance
 	_child := &BACnetServiceAckVTData{
-		BACnetServiceAck: &BACnetServiceAck{},
+		VtSessionIdentifier: CastBACnetApplicationTagUnsignedInteger(vtSessionIdentifier),
+		VtNewData:           CastBACnetApplicationTagOctetString(vtNewData),
+		VtDataFlag:          CastBACnetApplicationTagUnsignedInteger(vtDataFlag),
+		BACnetServiceAck:    &BACnetServiceAck{},
 	}
 	_child.BACnetServiceAck.Child = _child
 	return _child, nil
@@ -141,6 +222,42 @@ func (m *BACnetServiceAckVTData) Serialize(writeBuffer utils.WriteBuffer) error
 			return pushErr
 		}
 
+		// Simple Field (vtSessionIdentifier)
+		if pushErr := writeBuffer.PushContext("vtSessionIdentifier"); pushErr != nil {
+			return pushErr
+		}
+		_vtSessionIdentifierErr := m.VtSessionIdentifier.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("vtSessionIdentifier"); popErr != nil {
+			return popErr
+		}
+		if _vtSessionIdentifierErr != nil {
+			return errors.Wrap(_vtSessionIdentifierErr, "Error serializing 'vtSessionIdentifier' field")
+		}
+
+		// Simple Field (vtNewData)
+		if pushErr := writeBuffer.PushContext("vtNewData"); pushErr != nil {
+			return pushErr
+		}
+		_vtNewDataErr := m.VtNewData.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("vtNewData"); popErr != nil {
+			return popErr
+		}
+		if _vtNewDataErr != nil {
+			return errors.Wrap(_vtNewDataErr, "Error serializing 'vtNewData' field")
+		}
+
+		// Simple Field (vtDataFlag)
+		if pushErr := writeBuffer.PushContext("vtDataFlag"); pushErr != nil {
+			return pushErr
+		}
+		_vtDataFlagErr := m.VtDataFlag.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("vtDataFlag"); popErr != nil {
+			return popErr
+		}
+		if _vtDataFlagErr != nil {
+			return errors.Wrap(_vtDataFlagErr, "Error serializing 'vtDataFlag' field")
+		}
+
 		if popErr := writeBuffer.PopContext("BACnetServiceAckVTData"); popErr != nil {
 			return popErr
 		}
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index de076720fb..170fe1c21e 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -983,8 +983,9 @@
             [simple   BACnetApplicationTagUnsignedInteger                       remoteVtSessionIdentifier                        ]
         ]
         ['VT_DATA' BACnetServiceAckVTData
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
+            [simple   BACnetApplicationTagUnsignedInteger                       vtSessionIdentifier                              ]
+            [simple   BACnetApplicationTagOctetString                           vtNewData                                        ]
+            [simple   BACnetApplicationTagUnsignedInteger                       vtDataFlag                                       ]
         ]
         //
         ////


[plc4x] 06/07: feat(bacnet): implement BACnetConfirmedServiceRequestVTData

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

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

commit e6b90c69f32aa88873bb908cad56c8cd66668c4e
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue May 24 16:34:53 2022 +0200

    feat(bacnet): implement BACnetConfirmedServiceRequestVTData
---
 .../model/BACnetConfirmedServiceRequestVTData.go   | 125 ++++++++++++++++++++-
 .../resources/protocols/bacnetip/bacnetip.mspec    |   7 +-
 2 files changed, 124 insertions(+), 8 deletions(-)

diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTData.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTData.go
index 8a9009dbe1..299022f835 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTData.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTData.go
@@ -21,6 +21,7 @@ package model
 
 import (
 	"github.com/apache/plc4x/plc4go/internal/spi/utils"
+	"github.com/pkg/errors"
 )
 
 // Code generated by code-generation. DO NOT EDIT.
@@ -28,6 +29,9 @@ import (
 // BACnetConfirmedServiceRequestVTData is the data-structure of this message
 type BACnetConfirmedServiceRequestVTData struct {
 	*BACnetConfirmedServiceRequest
+	VtSessionIdentifier *BACnetApplicationTagUnsignedInteger
+	VtNewData           *BACnetApplicationTagOctetString
+	VtDataFlag          *BACnetApplicationTagUnsignedInteger
 
 	// Arguments.
 	ServiceRequestLength uint16
@@ -36,6 +40,12 @@ type BACnetConfirmedServiceRequestVTData struct {
 // IBACnetConfirmedServiceRequestVTData is the corresponding interface of BACnetConfirmedServiceRequestVTData
 type IBACnetConfirmedServiceRequestVTData interface {
 	IBACnetConfirmedServiceRequest
+	// GetVtSessionIdentifier returns VtSessionIdentifier (property field)
+	GetVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger
+	// GetVtNewData returns VtNewData (property field)
+	GetVtNewData() *BACnetApplicationTagOctetString
+	// GetVtDataFlag returns VtDataFlag (property field)
+	GetVtDataFlag() *BACnetApplicationTagUnsignedInteger
 	// GetLengthInBytes returns the length in bytes
 	GetLengthInBytes() uint16
 	// GetLengthInBits returns the length in bits
@@ -65,9 +75,34 @@ func (m *BACnetConfirmedServiceRequestVTData) GetParent() *BACnetConfirmedServic
 	return m.BACnetConfirmedServiceRequest
 }
 
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConfirmedServiceRequestVTData) GetVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger {
+	return m.VtSessionIdentifier
+}
+
+func (m *BACnetConfirmedServiceRequestVTData) GetVtNewData() *BACnetApplicationTagOctetString {
+	return m.VtNewData
+}
+
+func (m *BACnetConfirmedServiceRequestVTData) GetVtDataFlag() *BACnetApplicationTagUnsignedInteger {
+	return m.VtDataFlag
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
 // NewBACnetConfirmedServiceRequestVTData factory function for BACnetConfirmedServiceRequestVTData
-func NewBACnetConfirmedServiceRequestVTData(serviceRequestLength uint16) *BACnetConfirmedServiceRequestVTData {
+func NewBACnetConfirmedServiceRequestVTData(vtSessionIdentifier *BACnetApplicationTagUnsignedInteger, vtNewData *BACnetApplicationTagOctetString, vtDataFlag *BACnetApplicationTagUnsignedInteger, serviceRequestLength uint16) *BACnetConfirmedServiceRequestVTData {
 	_result := &BACnetConfirmedServiceRequestVTData{
+		VtSessionIdentifier:           vtSessionIdentifier,
+		VtNewData:                     vtNewData,
+		VtDataFlag:                    vtDataFlag,
 		BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength),
 	}
 	_result.Child = _result
@@ -101,6 +136,15 @@ func (m *BACnetConfirmedServiceRequestVTData) GetLengthInBits() uint16 {
 func (m *BACnetConfirmedServiceRequestVTData) GetLengthInBitsConditional(lastItem bool) uint16 {
 	lengthInBits := uint16(m.GetParentLengthInBits())
 
+	// Simple field (vtSessionIdentifier)
+	lengthInBits += m.VtSessionIdentifier.GetLengthInBits()
+
+	// Simple field (vtNewData)
+	lengthInBits += m.VtNewData.GetLengthInBits()
+
+	// Simple field (vtDataFlag)
+	lengthInBits += m.VtDataFlag.GetLengthInBits()
+
 	return lengthInBits
 }
 
@@ -117,9 +161,43 @@ func BACnetConfirmedServiceRequestVTDataParse(readBuffer utils.ReadBuffer, servi
 	currentPos := positionAware.GetPos()
 	_ = currentPos
 
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
+	// Simple Field (vtSessionIdentifier)
+	if pullErr := readBuffer.PullContext("vtSessionIdentifier"); pullErr != nil {
+		return nil, pullErr
+	}
+	_vtSessionIdentifier, _vtSessionIdentifierErr := BACnetApplicationTagParse(readBuffer)
+	if _vtSessionIdentifierErr != nil {
+		return nil, errors.Wrap(_vtSessionIdentifierErr, "Error parsing 'vtSessionIdentifier' field")
+	}
+	vtSessionIdentifier := CastBACnetApplicationTagUnsignedInteger(_vtSessionIdentifier)
+	if closeErr := readBuffer.CloseContext("vtSessionIdentifier"); closeErr != nil {
+		return nil, closeErr
+	}
+
+	// Simple Field (vtNewData)
+	if pullErr := readBuffer.PullContext("vtNewData"); pullErr != nil {
+		return nil, pullErr
+	}
+	_vtNewData, _vtNewDataErr := BACnetApplicationTagParse(readBuffer)
+	if _vtNewDataErr != nil {
+		return nil, errors.Wrap(_vtNewDataErr, "Error parsing 'vtNewData' field")
+	}
+	vtNewData := CastBACnetApplicationTagOctetString(_vtNewData)
+	if closeErr := readBuffer.CloseContext("vtNewData"); closeErr != nil {
+		return nil, closeErr
+	}
+
+	// Simple Field (vtDataFlag)
+	if pullErr := readBuffer.PullContext("vtDataFlag"); pullErr != nil {
+		return nil, pullErr
+	}
+	_vtDataFlag, _vtDataFlagErr := BACnetApplicationTagParse(readBuffer)
+	if _vtDataFlagErr != nil {
+		return nil, errors.Wrap(_vtDataFlagErr, "Error parsing 'vtDataFlag' field")
+	}
+	vtDataFlag := CastBACnetApplicationTagUnsignedInteger(_vtDataFlag)
+	if closeErr := readBuffer.CloseContext("vtDataFlag"); closeErr != nil {
+		return nil, closeErr
 	}
 
 	if closeErr := readBuffer.CloseContext("BACnetConfirmedServiceRequestVTData"); closeErr != nil {
@@ -128,6 +206,9 @@ func BACnetConfirmedServiceRequestVTDataParse(readBuffer utils.ReadBuffer, servi
 
 	// Create a partially initialized instance
 	_child := &BACnetConfirmedServiceRequestVTData{
+		VtSessionIdentifier:           CastBACnetApplicationTagUnsignedInteger(vtSessionIdentifier),
+		VtNewData:                     CastBACnetApplicationTagOctetString(vtNewData),
+		VtDataFlag:                    CastBACnetApplicationTagUnsignedInteger(vtDataFlag),
 		BACnetConfirmedServiceRequest: &BACnetConfirmedServiceRequest{},
 	}
 	_child.BACnetConfirmedServiceRequest.Child = _child
@@ -142,6 +223,42 @@ func (m *BACnetConfirmedServiceRequestVTData) Serialize(writeBuffer utils.WriteB
 			return pushErr
 		}
 
+		// Simple Field (vtSessionIdentifier)
+		if pushErr := writeBuffer.PushContext("vtSessionIdentifier"); pushErr != nil {
+			return pushErr
+		}
+		_vtSessionIdentifierErr := m.VtSessionIdentifier.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("vtSessionIdentifier"); popErr != nil {
+			return popErr
+		}
+		if _vtSessionIdentifierErr != nil {
+			return errors.Wrap(_vtSessionIdentifierErr, "Error serializing 'vtSessionIdentifier' field")
+		}
+
+		// Simple Field (vtNewData)
+		if pushErr := writeBuffer.PushContext("vtNewData"); pushErr != nil {
+			return pushErr
+		}
+		_vtNewDataErr := m.VtNewData.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("vtNewData"); popErr != nil {
+			return popErr
+		}
+		if _vtNewDataErr != nil {
+			return errors.Wrap(_vtNewDataErr, "Error serializing 'vtNewData' field")
+		}
+
+		// Simple Field (vtDataFlag)
+		if pushErr := writeBuffer.PushContext("vtDataFlag"); pushErr != nil {
+			return pushErr
+		}
+		_vtDataFlagErr := m.VtDataFlag.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("vtDataFlag"); popErr != nil {
+			return popErr
+		}
+		if _vtDataFlagErr != nil {
+			return errors.Wrap(_vtDataFlagErr, "Error serializing 'vtDataFlag' field")
+		}
+
 		if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestVTData"); popErr != nil {
 			return popErr
 		}
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index 08565249df..6654a86daf 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -197,7 +197,6 @@
             [optional BACnetConfirmedServiceRequest('apduLength - (4 + (segmentedMessage ? 2 : 0))')
                                 serviceRequest       '!segmentedMessage' ]
             [validation '(!segmentedMessage && serviceRequest != null) || segmentedMessage' "service request should be set" ]
-            // TODO: maybe we should put this in the discriminated types below
             [optional uint 8    segmentServiceChoice
                                     'segmentedMessage && sequenceNumber != 0']
             [array    byte      segment
@@ -224,7 +223,6 @@
             [optional BACnetServiceAck('apduLength - (3 + (segmentedMessage ? 2 : 0))')
                                 serviceAck         '!segmentedMessage'  ]
             [validation '(!segmentedMessage && serviceAck != null) || segmentedMessage' "service ack should be set" ]
-            // TODO: maybe we should put this in the discriminated types below
             [optional uint 8    segmentServiceChoice 'segmentedMessage && sequenceNumber != 0']
             [array    byte      segment
                                     length
@@ -503,8 +501,9 @@
                                                                length '(serviceRequestLength>0)?(serviceRequestLength - 1):0'           ]
         ]
         ['VT_DATA' BACnetConfirmedServiceRequestVTData
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
+            [simple   BACnetApplicationTagUnsignedInteger                                                   vtSessionIdentifier         ]
+            [simple   BACnetApplicationTagOctetString                                                       vtNewData                   ]
+            [simple   BACnetApplicationTagUnsignedInteger                                                   vtDataFlag                  ]
         ]
         //
         ////


[plc4x] 01/07: feat(bacnet): implement BACnetServiceAckGetAlarmSummary

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

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

commit 1e5d6f548c0285926a9b586c55ebcad9ef7af033
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue May 24 16:22:43 2022 +0200

    feat(bacnet): implement BACnetServiceAckGetAlarmSummary
---
 .../protocols/bacnetip/readwrite/ParserHelper.go   |   2 +
 .../bacnetip/readwrite/XmlParserHelper.go          |   2 +
 .../model/BACnetEventTransitionBitsApplication.go  | 220 +++++++++++++++++++++
 .../bacnetip/readwrite/model/BACnetServiceAck.go   |  24 ---
 .../model/BACnetServiceAckAcknowledgeAlarm.go      | 161 ---------------
 .../model/BACnetServiceAckAddListElement.go        | 161 ---------------
 .../BACnetServiceAckConfirmedCovNotification.go    | 161 ---------------
 ...etServiceAckConfirmedCovNotificationMultiple.go | 162 ---------------
 .../BACnetServiceAckConfirmedEventNotification.go  | 161 ---------------
 .../model/BACnetServiceAckGetAlarmSummary.go       | 129 +++++++++++-
 .../model/BACnetServiceAckLifeSafetyOperation.go   | 161 ---------------
 .../model/BACnetServiceAckRemoveListElement.go     | 161 ---------------
 .../model/BACnetServiceAckSubscribeCov.go          | 161 ---------------
 .../model/BACnetServiceAckSubscribeCovProperty.go  | 161 ---------------
 ...BACnetServiceAckSubscribeCovPropertyMultiple.go | 161 ---------------
 .../model/BACnetServiceAckWriteProperty.go         | 161 ---------------
 .../model/BACnetServiceAckWritePropertyMultiple.go | 161 ---------------
 .../resources/protocols/bacnetip/bacnetip.mspec    |  65 ++----
 18 files changed, 360 insertions(+), 2015 deletions(-)

diff --git a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
index 2d0a3bdcc7..1fc2789e7b 100644
--- a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
+++ b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
@@ -154,6 +154,8 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
 			return nil, errors.Wrap(err, "Error parsing")
 		}
 		return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParse(io, tagNumber)
+	case "BACnetEventTransitionBitsApplication":
+		return model.BACnetEventTransitionBitsApplicationParse(io)
 	case "BACnetTagPayloadEnumerated":
 		actualLength, err := utils.StrToUint32(arguments[0])
 		if err != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
index 3acd2a8cb3..93586eaff1 100644
--- a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
@@ -182,6 +182,8 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
 		}
 		tagNumber := uint8(parsedUint0)
 		return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber)
+	case "BACnetEventTransitionBitsApplication":
+		return model.BACnetEventTransitionBitsApplicationParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "BACnetTagPayloadEnumerated":
 		parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32)
 		if err != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBitsApplication.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBitsApplication.go
new file mode 100644
index 0000000000..906a70f69c
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBitsApplication.go
@@ -0,0 +1,220 @@
+/*
+ * 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
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+	"github.com/apache/plc4x/plc4go/internal/spi/utils"
+	"github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetEventTransitionBitsApplication is the data-structure of this message
+type BACnetEventTransitionBitsApplication struct {
+	RawBits *BACnetApplicationTagBitString
+}
+
+// IBACnetEventTransitionBitsApplication is the corresponding interface of BACnetEventTransitionBitsApplication
+type IBACnetEventTransitionBitsApplication interface {
+	// GetRawBits returns RawBits (property field)
+	GetRawBits() *BACnetApplicationTagBitString
+	// GetToOffnormal returns ToOffnormal (virtual field)
+	GetToOffnormal() bool
+	// GetToFault returns ToFault (virtual field)
+	GetToFault() bool
+	// GetToNormal returns ToNormal (virtual field)
+	GetToNormal() bool
+	// GetLengthInBytes returns the length in bytes
+	GetLengthInBytes() uint16
+	// GetLengthInBits returns the length in bits
+	GetLengthInBits() uint16
+	// Serialize serializes this type
+	Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetEventTransitionBitsApplication) GetRawBits() *BACnetApplicationTagBitString {
+	return m.RawBits
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *BACnetEventTransitionBitsApplication) GetToOffnormal() bool {
+	return bool(m.GetRawBits().GetPayload().GetData()[0])
+}
+
+func (m *BACnetEventTransitionBitsApplication) GetToFault() bool {
+	return bool(m.GetRawBits().GetPayload().GetData()[1])
+}
+
+func (m *BACnetEventTransitionBitsApplication) GetToNormal() bool {
+	return bool(m.GetRawBits().GetPayload().GetData()[2])
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetEventTransitionBitsApplication factory function for BACnetEventTransitionBitsApplication
+func NewBACnetEventTransitionBitsApplication(rawBits *BACnetApplicationTagBitString) *BACnetEventTransitionBitsApplication {
+	return &BACnetEventTransitionBitsApplication{RawBits: rawBits}
+}
+
+func CastBACnetEventTransitionBitsApplication(structType interface{}) *BACnetEventTransitionBitsApplication {
+	if casted, ok := structType.(BACnetEventTransitionBitsApplication); ok {
+		return &casted
+	}
+	if casted, ok := structType.(*BACnetEventTransitionBitsApplication); ok {
+		return casted
+	}
+	return nil
+}
+
+func (m *BACnetEventTransitionBitsApplication) GetTypeName() string {
+	return "BACnetEventTransitionBitsApplication"
+}
+
+func (m *BACnetEventTransitionBitsApplication) GetLengthInBits() uint16 {
+	return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetEventTransitionBitsApplication) GetLengthInBitsConditional(lastItem bool) uint16 {
+	lengthInBits := uint16(0)
+
+	// Simple field (rawBits)
+	lengthInBits += m.RawBits.GetLengthInBits()
+
+	// A virtual field doesn't have any in- or output.
+
+	// A virtual field doesn't have any in- or output.
+
+	// A virtual field doesn't have any in- or output.
+
+	return lengthInBits
+}
+
+func (m *BACnetEventTransitionBitsApplication) GetLengthInBytes() uint16 {
+	return m.GetLengthInBits() / 8
+}
+
+func BACnetEventTransitionBitsApplicationParse(readBuffer utils.ReadBuffer) (*BACnetEventTransitionBitsApplication, error) {
+	positionAware := readBuffer
+	_ = positionAware
+	if pullErr := readBuffer.PullContext("BACnetEventTransitionBitsApplication"); pullErr != nil {
+		return nil, pullErr
+	}
+	currentPos := positionAware.GetPos()
+	_ = currentPos
+
+	// Simple Field (rawBits)
+	if pullErr := readBuffer.PullContext("rawBits"); pullErr != nil {
+		return nil, pullErr
+	}
+	_rawBits, _rawBitsErr := BACnetApplicationTagParse(readBuffer)
+	if _rawBitsErr != nil {
+		return nil, errors.Wrap(_rawBitsErr, "Error parsing 'rawBits' field")
+	}
+	rawBits := CastBACnetApplicationTagBitString(_rawBits)
+	if closeErr := readBuffer.CloseContext("rawBits"); closeErr != nil {
+		return nil, closeErr
+	}
+
+	// Virtual field
+	_toOffnormal := rawBits.GetPayload().GetData()[0]
+	toOffnormal := bool(_toOffnormal)
+	_ = toOffnormal
+
+	// Virtual field
+	_toFault := rawBits.GetPayload().GetData()[1]
+	toFault := bool(_toFault)
+	_ = toFault
+
+	// Virtual field
+	_toNormal := rawBits.GetPayload().GetData()[2]
+	toNormal := bool(_toNormal)
+	_ = toNormal
+
+	if closeErr := readBuffer.CloseContext("BACnetEventTransitionBitsApplication"); closeErr != nil {
+		return nil, closeErr
+	}
+
+	// Create the instance
+	return NewBACnetEventTransitionBitsApplication(rawBits), nil
+}
+
+func (m *BACnetEventTransitionBitsApplication) Serialize(writeBuffer utils.WriteBuffer) error {
+	positionAware := writeBuffer
+	_ = positionAware
+	if pushErr := writeBuffer.PushContext("BACnetEventTransitionBitsApplication"); pushErr != nil {
+		return pushErr
+	}
+
+	// Simple Field (rawBits)
+	if pushErr := writeBuffer.PushContext("rawBits"); pushErr != nil {
+		return pushErr
+	}
+	_rawBitsErr := m.RawBits.Serialize(writeBuffer)
+	if popErr := writeBuffer.PopContext("rawBits"); popErr != nil {
+		return popErr
+	}
+	if _rawBitsErr != nil {
+		return errors.Wrap(_rawBitsErr, "Error serializing 'rawBits' field")
+	}
+	// Virtual field
+	if _toOffnormalErr := writeBuffer.WriteVirtual("toOffnormal", m.GetToOffnormal()); _toOffnormalErr != nil {
+		return errors.Wrap(_toOffnormalErr, "Error serializing 'toOffnormal' field")
+	}
+	// Virtual field
+	if _toFaultErr := writeBuffer.WriteVirtual("toFault", m.GetToFault()); _toFaultErr != nil {
+		return errors.Wrap(_toFaultErr, "Error serializing 'toFault' field")
+	}
+	// Virtual field
+	if _toNormalErr := writeBuffer.WriteVirtual("toNormal", m.GetToNormal()); _toNormalErr != nil {
+		return errors.Wrap(_toNormalErr, "Error serializing 'toNormal' field")
+	}
+
+	if popErr := writeBuffer.PopContext("BACnetEventTransitionBitsApplication"); popErr != nil {
+		return popErr
+	}
+	return nil
+}
+
+func (m *BACnetEventTransitionBitsApplication) String() string {
+	if m == nil {
+		return "<nil>"
+	}
+	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+	if err := m.Serialize(buffer); err != nil {
+		return err.Error()
+	}
+	return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go
index a12f492cef..6713edbd8e 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go
@@ -132,36 +132,16 @@ func BACnetServiceAckParse(readBuffer utils.ReadBuffer, serviceAckLength uint16)
 	var _child BACnetServiceAckChild
 	var typeSwitchError error
 	switch {
-	case serviceChoice == BACnetConfirmedServiceChoice_ACKNOWLEDGE_ALARM: // BACnetServiceAckAcknowledgeAlarm
-		_child, typeSwitchError = BACnetServiceAckAcknowledgeAlarmParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION: // BACnetServiceAckConfirmedCovNotification
-		_child, typeSwitchError = BACnetServiceAckConfirmedCovNotificationParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION_MULTIPLE: // BACnetServiceAckConfirmedCovNotificationMultiple
-		_child, typeSwitchError = BACnetServiceAckConfirmedCovNotificationMultipleParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_EVENT_NOTIFICATION: // BACnetServiceAckConfirmedEventNotification
-		_child, typeSwitchError = BACnetServiceAckConfirmedEventNotificationParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_GET_ALARM_SUMMARY: // BACnetServiceAckGetAlarmSummary
 		_child, typeSwitchError = BACnetServiceAckGetAlarmSummaryParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY: // BACnetServiceAckGetEnrollmentSummary
 		_child, typeSwitchError = BACnetServiceAckGetEnrollmentSummaryParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION: // BACnetServiceAckGetEventInformation
 		_child, typeSwitchError = BACnetServiceAckGetEventInformationParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_LIFE_SAFETY_OPERATION: // BACnetServiceAckLifeSafetyOperation
-		_child, typeSwitchError = BACnetServiceAckLifeSafetyOperationParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_SUBSCRIBE_COV: // BACnetServiceAckSubscribeCov
-		_child, typeSwitchError = BACnetServiceAckSubscribeCovParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY: // BACnetServiceAckSubscribeCovProperty
-		_child, typeSwitchError = BACnetServiceAckSubscribeCovPropertyParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE: // BACnetServiceAckSubscribeCovPropertyMultiple
-		_child, typeSwitchError = BACnetServiceAckSubscribeCovPropertyMultipleParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_ATOMIC_READ_FILE: // BACnetServiceAckAtomicReadFile
 		_child, typeSwitchError = BACnetServiceAckAtomicReadFileParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE: // BACnetServiceAckAtomicWriteFile
 		_child, typeSwitchError = BACnetServiceAckAtomicWriteFileParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT: // BACnetServiceAckAddListElement
-		_child, typeSwitchError = BACnetServiceAckAddListElementParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT: // BACnetServiceAckRemoveListElement
-		_child, typeSwitchError = BACnetServiceAckRemoveListElementParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_CREATE_OBJECT: // BACnetServiceAckCreateObject
 		_child, typeSwitchError = BACnetServiceAckCreateObjectParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY: // BACnetServiceAckReadProperty
@@ -170,10 +150,6 @@ func BACnetServiceAckParse(readBuffer utils.ReadBuffer, serviceAckLength uint16)
 		_child, typeSwitchError = BACnetServiceAckReadPropertyMultipleParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_READ_RANGE: // BACnetServiceAckReadRange
 		_child, typeSwitchError = BACnetServiceAckReadRangeParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_WRITE_PROPERTY: // BACnetServiceAckWriteProperty
-		_child, typeSwitchError = BACnetServiceAckWritePropertyParse(readBuffer, serviceAckLength)
-	case serviceChoice == BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE: // BACnetServiceAckWritePropertyMultiple
-		_child, typeSwitchError = BACnetServiceAckWritePropertyMultipleParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_DEVICE_COMMUNICATION_CONTROL: // BACnetServiceAckDeviceCommunicationControl
 		_child, typeSwitchError = BACnetServiceAckDeviceCommunicationControlParse(readBuffer, serviceAckLength)
 	case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER: // BACnetServiceAckConfirmedPrivateTransfer
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAcknowledgeAlarm.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAcknowledgeAlarm.go
deleted file mode 100644
index 53c42763d4..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAcknowledgeAlarm.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckAcknowledgeAlarm is the data-structure of this message
-type BACnetServiceAckAcknowledgeAlarm struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckAcknowledgeAlarm is the corresponding interface of BACnetServiceAckAcknowledgeAlarm
-type IBACnetServiceAckAcknowledgeAlarm interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckAcknowledgeAlarm) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_ACKNOWLEDGE_ALARM
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckAcknowledgeAlarm) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckAcknowledgeAlarm) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckAcknowledgeAlarm factory function for BACnetServiceAckAcknowledgeAlarm
-func NewBACnetServiceAckAcknowledgeAlarm(serviceAckLength uint16) *BACnetServiceAckAcknowledgeAlarm {
-	_result := &BACnetServiceAckAcknowledgeAlarm{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckAcknowledgeAlarm(structType interface{}) *BACnetServiceAckAcknowledgeAlarm {
-	if casted, ok := structType.(BACnetServiceAckAcknowledgeAlarm); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckAcknowledgeAlarm); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckAcknowledgeAlarm(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckAcknowledgeAlarm(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckAcknowledgeAlarm) GetTypeName() string {
-	return "BACnetServiceAckAcknowledgeAlarm"
-}
-
-func (m *BACnetServiceAckAcknowledgeAlarm) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckAcknowledgeAlarm) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckAcknowledgeAlarm) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckAcknowledgeAlarmParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckAcknowledgeAlarm, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckAcknowledgeAlarm"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckAcknowledgeAlarm"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckAcknowledgeAlarm{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckAcknowledgeAlarm) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckAcknowledgeAlarm"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckAcknowledgeAlarm"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckAcknowledgeAlarm) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAddListElement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAddListElement.go
deleted file mode 100644
index 65f0e4136e..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAddListElement.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckAddListElement is the data-structure of this message
-type BACnetServiceAckAddListElement struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckAddListElement is the corresponding interface of BACnetServiceAckAddListElement
-type IBACnetServiceAckAddListElement interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckAddListElement) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckAddListElement) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckAddListElement) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckAddListElement factory function for BACnetServiceAckAddListElement
-func NewBACnetServiceAckAddListElement(serviceAckLength uint16) *BACnetServiceAckAddListElement {
-	_result := &BACnetServiceAckAddListElement{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckAddListElement(structType interface{}) *BACnetServiceAckAddListElement {
-	if casted, ok := structType.(BACnetServiceAckAddListElement); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckAddListElement); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckAddListElement(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckAddListElement(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckAddListElement) GetTypeName() string {
-	return "BACnetServiceAckAddListElement"
-}
-
-func (m *BACnetServiceAckAddListElement) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckAddListElement) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckAddListElement) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckAddListElementParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckAddListElement, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckAddListElement"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckAddListElement"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckAddListElement{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckAddListElement) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckAddListElement"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckAddListElement"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckAddListElement) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedCovNotification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedCovNotification.go
deleted file mode 100644
index b87244255d..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedCovNotification.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckConfirmedCovNotification is the data-structure of this message
-type BACnetServiceAckConfirmedCovNotification struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckConfirmedCovNotification is the corresponding interface of BACnetServiceAckConfirmedCovNotification
-type IBACnetServiceAckConfirmedCovNotification interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckConfirmedCovNotification) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckConfirmedCovNotification) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckConfirmedCovNotification) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckConfirmedCovNotification factory function for BACnetServiceAckConfirmedCovNotification
-func NewBACnetServiceAckConfirmedCovNotification(serviceAckLength uint16) *BACnetServiceAckConfirmedCovNotification {
-	_result := &BACnetServiceAckConfirmedCovNotification{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckConfirmedCovNotification(structType interface{}) *BACnetServiceAckConfirmedCovNotification {
-	if casted, ok := structType.(BACnetServiceAckConfirmedCovNotification); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckConfirmedCovNotification); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckConfirmedCovNotification(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckConfirmedCovNotification(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckConfirmedCovNotification) GetTypeName() string {
-	return "BACnetServiceAckConfirmedCovNotification"
-}
-
-func (m *BACnetServiceAckConfirmedCovNotification) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckConfirmedCovNotification) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckConfirmedCovNotification) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckConfirmedCovNotificationParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckConfirmedCovNotification, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckConfirmedCovNotification"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckConfirmedCovNotification"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckConfirmedCovNotification{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckConfirmedCovNotification) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckConfirmedCovNotification"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckConfirmedCovNotification"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckConfirmedCovNotification) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedCovNotificationMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedCovNotificationMultiple.go
deleted file mode 100644
index 71755128ff..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedCovNotificationMultiple.go
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckConfirmedCovNotificationMultiple is the data-structure of this message
-type BACnetServiceAckConfirmedCovNotificationMultiple struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckConfirmedCovNotificationMultiple is the corresponding interface of BACnetServiceAckConfirmedCovNotificationMultiple
-type IBACnetServiceAckConfirmedCovNotificationMultiple interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckConfirmedCovNotificationMultiple) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION_MULTIPLE
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckConfirmedCovNotificationMultiple) InitializeParent(parent *BACnetServiceAck) {
-}
-
-func (m *BACnetServiceAckConfirmedCovNotificationMultiple) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckConfirmedCovNotificationMultiple factory function for BACnetServiceAckConfirmedCovNotificationMultiple
-func NewBACnetServiceAckConfirmedCovNotificationMultiple(serviceAckLength uint16) *BACnetServiceAckConfirmedCovNotificationMultiple {
-	_result := &BACnetServiceAckConfirmedCovNotificationMultiple{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckConfirmedCovNotificationMultiple(structType interface{}) *BACnetServiceAckConfirmedCovNotificationMultiple {
-	if casted, ok := structType.(BACnetServiceAckConfirmedCovNotificationMultiple); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckConfirmedCovNotificationMultiple); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckConfirmedCovNotificationMultiple(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckConfirmedCovNotificationMultiple(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckConfirmedCovNotificationMultiple) GetTypeName() string {
-	return "BACnetServiceAckConfirmedCovNotificationMultiple"
-}
-
-func (m *BACnetServiceAckConfirmedCovNotificationMultiple) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckConfirmedCovNotificationMultiple) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckConfirmedCovNotificationMultiple) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckConfirmedCovNotificationMultipleParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckConfirmedCovNotificationMultiple, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckConfirmedCovNotificationMultiple"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckConfirmedCovNotificationMultiple"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckConfirmedCovNotificationMultiple{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckConfirmedCovNotificationMultiple) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckConfirmedCovNotificationMultiple"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckConfirmedCovNotificationMultiple"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckConfirmedCovNotificationMultiple) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedEventNotification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedEventNotification.go
deleted file mode 100644
index 4a8c450895..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedEventNotification.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckConfirmedEventNotification is the data-structure of this message
-type BACnetServiceAckConfirmedEventNotification struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckConfirmedEventNotification is the corresponding interface of BACnetServiceAckConfirmedEventNotification
-type IBACnetServiceAckConfirmedEventNotification interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckConfirmedEventNotification) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_CONFIRMED_EVENT_NOTIFICATION
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckConfirmedEventNotification) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckConfirmedEventNotification) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckConfirmedEventNotification factory function for BACnetServiceAckConfirmedEventNotification
-func NewBACnetServiceAckConfirmedEventNotification(serviceAckLength uint16) *BACnetServiceAckConfirmedEventNotification {
-	_result := &BACnetServiceAckConfirmedEventNotification{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckConfirmedEventNotification(structType interface{}) *BACnetServiceAckConfirmedEventNotification {
-	if casted, ok := structType.(BACnetServiceAckConfirmedEventNotification); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckConfirmedEventNotification); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckConfirmedEventNotification(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckConfirmedEventNotification(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckConfirmedEventNotification) GetTypeName() string {
-	return "BACnetServiceAckConfirmedEventNotification"
-}
-
-func (m *BACnetServiceAckConfirmedEventNotification) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckConfirmedEventNotification) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckConfirmedEventNotification) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckConfirmedEventNotificationParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckConfirmedEventNotification, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckConfirmedEventNotification"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckConfirmedEventNotification"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckConfirmedEventNotification{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckConfirmedEventNotification) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckConfirmedEventNotification"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckConfirmedEventNotification"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckConfirmedEventNotification) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go
index 331b537cb0..272e764aa1 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go
@@ -21,6 +21,7 @@ package model
 
 import (
 	"github.com/apache/plc4x/plc4go/internal/spi/utils"
+	"github.com/pkg/errors"
 )
 
 // Code generated by code-generation. DO NOT EDIT.
@@ -28,6 +29,9 @@ import (
 // BACnetServiceAckGetAlarmSummary is the data-structure of this message
 type BACnetServiceAckGetAlarmSummary struct {
 	*BACnetServiceAck
+	ObjectIdentifier        *BACnetApplicationTagObjectIdentifier
+	EventState              *BACnetEventStateTagged
+	AcknowledgedTransitions *BACnetEventTransitionBitsApplication
 
 	// Arguments.
 	ServiceAckLength uint16
@@ -36,6 +40,12 @@ type BACnetServiceAckGetAlarmSummary struct {
 // IBACnetServiceAckGetAlarmSummary is the corresponding interface of BACnetServiceAckGetAlarmSummary
 type IBACnetServiceAckGetAlarmSummary interface {
 	IBACnetServiceAck
+	// GetObjectIdentifier returns ObjectIdentifier (property field)
+	GetObjectIdentifier() *BACnetApplicationTagObjectIdentifier
+	// GetEventState returns EventState (property field)
+	GetEventState() *BACnetEventStateTagged
+	// GetAcknowledgedTransitions returns AcknowledgedTransitions (property field)
+	GetAcknowledgedTransitions() *BACnetEventTransitionBitsApplication
 	// GetLengthInBytes returns the length in bytes
 	GetLengthInBytes() uint16
 	// GetLengthInBits returns the length in bits
@@ -64,10 +74,35 @@ func (m *BACnetServiceAckGetAlarmSummary) GetParent() *BACnetServiceAck {
 	return m.BACnetServiceAck
 }
 
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetServiceAckGetAlarmSummary) GetObjectIdentifier() *BACnetApplicationTagObjectIdentifier {
+	return m.ObjectIdentifier
+}
+
+func (m *BACnetServiceAckGetAlarmSummary) GetEventState() *BACnetEventStateTagged {
+	return m.EventState
+}
+
+func (m *BACnetServiceAckGetAlarmSummary) GetAcknowledgedTransitions() *BACnetEventTransitionBitsApplication {
+	return m.AcknowledgedTransitions
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
 // NewBACnetServiceAckGetAlarmSummary factory function for BACnetServiceAckGetAlarmSummary
-func NewBACnetServiceAckGetAlarmSummary(serviceAckLength uint16) *BACnetServiceAckGetAlarmSummary {
+func NewBACnetServiceAckGetAlarmSummary(objectIdentifier *BACnetApplicationTagObjectIdentifier, eventState *BACnetEventStateTagged, acknowledgedTransitions *BACnetEventTransitionBitsApplication, serviceAckLength uint16) *BACnetServiceAckGetAlarmSummary {
 	_result := &BACnetServiceAckGetAlarmSummary{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
+		ObjectIdentifier:        objectIdentifier,
+		EventState:              eventState,
+		AcknowledgedTransitions: acknowledgedTransitions,
+		BACnetServiceAck:        NewBACnetServiceAck(serviceAckLength),
 	}
 	_result.Child = _result
 	return _result
@@ -100,6 +135,15 @@ func (m *BACnetServiceAckGetAlarmSummary) GetLengthInBits() uint16 {
 func (m *BACnetServiceAckGetAlarmSummary) GetLengthInBitsConditional(lastItem bool) uint16 {
 	lengthInBits := uint16(m.GetParentLengthInBits())
 
+	// Simple field (objectIdentifier)
+	lengthInBits += m.ObjectIdentifier.GetLengthInBits()
+
+	// Simple field (eventState)
+	lengthInBits += m.EventState.GetLengthInBits()
+
+	// Simple field (acknowledgedTransitions)
+	lengthInBits += m.AcknowledgedTransitions.GetLengthInBits()
+
 	return lengthInBits
 }
 
@@ -116,9 +160,43 @@ func BACnetServiceAckGetAlarmSummaryParse(readBuffer utils.ReadBuffer, serviceAc
 	currentPos := positionAware.GetPos()
 	_ = currentPos
 
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
+	// Simple Field (objectIdentifier)
+	if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil {
+		return nil, pullErr
+	}
+	_objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParse(readBuffer)
+	if _objectIdentifierErr != nil {
+		return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field")
+	}
+	objectIdentifier := CastBACnetApplicationTagObjectIdentifier(_objectIdentifier)
+	if closeErr := readBuffer.CloseContext("objectIdentifier"); closeErr != nil {
+		return nil, closeErr
+	}
+
+	// Simple Field (eventState)
+	if pullErr := readBuffer.PullContext("eventState"); pullErr != nil {
+		return nil, pullErr
+	}
+	_eventState, _eventStateErr := BACnetEventStateTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
+	if _eventStateErr != nil {
+		return nil, errors.Wrap(_eventStateErr, "Error parsing 'eventState' field")
+	}
+	eventState := CastBACnetEventStateTagged(_eventState)
+	if closeErr := readBuffer.CloseContext("eventState"); closeErr != nil {
+		return nil, closeErr
+	}
+
+	// Simple Field (acknowledgedTransitions)
+	if pullErr := readBuffer.PullContext("acknowledgedTransitions"); pullErr != nil {
+		return nil, pullErr
+	}
+	_acknowledgedTransitions, _acknowledgedTransitionsErr := BACnetEventTransitionBitsApplicationParse(readBuffer)
+	if _acknowledgedTransitionsErr != nil {
+		return nil, errors.Wrap(_acknowledgedTransitionsErr, "Error parsing 'acknowledgedTransitions' field")
+	}
+	acknowledgedTransitions := CastBACnetEventTransitionBitsApplication(_acknowledgedTransitions)
+	if closeErr := readBuffer.CloseContext("acknowledgedTransitions"); closeErr != nil {
+		return nil, closeErr
 	}
 
 	if closeErr := readBuffer.CloseContext("BACnetServiceAckGetAlarmSummary"); closeErr != nil {
@@ -127,7 +205,10 @@ func BACnetServiceAckGetAlarmSummaryParse(readBuffer utils.ReadBuffer, serviceAc
 
 	// Create a partially initialized instance
 	_child := &BACnetServiceAckGetAlarmSummary{
-		BACnetServiceAck: &BACnetServiceAck{},
+		ObjectIdentifier:        CastBACnetApplicationTagObjectIdentifier(objectIdentifier),
+		EventState:              CastBACnetEventStateTagged(eventState),
+		AcknowledgedTransitions: CastBACnetEventTransitionBitsApplication(acknowledgedTransitions),
+		BACnetServiceAck:        &BACnetServiceAck{},
 	}
 	_child.BACnetServiceAck.Child = _child
 	return _child, nil
@@ -141,6 +222,42 @@ func (m *BACnetServiceAckGetAlarmSummary) Serialize(writeBuffer utils.WriteBuffe
 			return pushErr
 		}
 
+		// Simple Field (objectIdentifier)
+		if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil {
+			return pushErr
+		}
+		_objectIdentifierErr := m.ObjectIdentifier.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil {
+			return popErr
+		}
+		if _objectIdentifierErr != nil {
+			return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field")
+		}
+
+		// Simple Field (eventState)
+		if pushErr := writeBuffer.PushContext("eventState"); pushErr != nil {
+			return pushErr
+		}
+		_eventStateErr := m.EventState.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("eventState"); popErr != nil {
+			return popErr
+		}
+		if _eventStateErr != nil {
+			return errors.Wrap(_eventStateErr, "Error serializing 'eventState' field")
+		}
+
+		// Simple Field (acknowledgedTransitions)
+		if pushErr := writeBuffer.PushContext("acknowledgedTransitions"); pushErr != nil {
+			return pushErr
+		}
+		_acknowledgedTransitionsErr := m.AcknowledgedTransitions.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("acknowledgedTransitions"); popErr != nil {
+			return popErr
+		}
+		if _acknowledgedTransitionsErr != nil {
+			return errors.Wrap(_acknowledgedTransitionsErr, "Error serializing 'acknowledgedTransitions' field")
+		}
+
 		if popErr := writeBuffer.PopContext("BACnetServiceAckGetAlarmSummary"); popErr != nil {
 			return popErr
 		}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckLifeSafetyOperation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckLifeSafetyOperation.go
deleted file mode 100644
index 94256c93e2..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckLifeSafetyOperation.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckLifeSafetyOperation is the data-structure of this message
-type BACnetServiceAckLifeSafetyOperation struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckLifeSafetyOperation is the corresponding interface of BACnetServiceAckLifeSafetyOperation
-type IBACnetServiceAckLifeSafetyOperation interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckLifeSafetyOperation) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_LIFE_SAFETY_OPERATION
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckLifeSafetyOperation) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckLifeSafetyOperation) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckLifeSafetyOperation factory function for BACnetServiceAckLifeSafetyOperation
-func NewBACnetServiceAckLifeSafetyOperation(serviceAckLength uint16) *BACnetServiceAckLifeSafetyOperation {
-	_result := &BACnetServiceAckLifeSafetyOperation{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckLifeSafetyOperation(structType interface{}) *BACnetServiceAckLifeSafetyOperation {
-	if casted, ok := structType.(BACnetServiceAckLifeSafetyOperation); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckLifeSafetyOperation); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckLifeSafetyOperation(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckLifeSafetyOperation(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckLifeSafetyOperation) GetTypeName() string {
-	return "BACnetServiceAckLifeSafetyOperation"
-}
-
-func (m *BACnetServiceAckLifeSafetyOperation) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckLifeSafetyOperation) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckLifeSafetyOperation) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckLifeSafetyOperationParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckLifeSafetyOperation, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckLifeSafetyOperation"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckLifeSafetyOperation"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckLifeSafetyOperation{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckLifeSafetyOperation) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckLifeSafetyOperation"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckLifeSafetyOperation"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckLifeSafetyOperation) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckRemoveListElement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckRemoveListElement.go
deleted file mode 100644
index 777c822bab..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckRemoveListElement.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckRemoveListElement is the data-structure of this message
-type BACnetServiceAckRemoveListElement struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckRemoveListElement is the corresponding interface of BACnetServiceAckRemoveListElement
-type IBACnetServiceAckRemoveListElement interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckRemoveListElement) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckRemoveListElement) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckRemoveListElement) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckRemoveListElement factory function for BACnetServiceAckRemoveListElement
-func NewBACnetServiceAckRemoveListElement(serviceAckLength uint16) *BACnetServiceAckRemoveListElement {
-	_result := &BACnetServiceAckRemoveListElement{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckRemoveListElement(structType interface{}) *BACnetServiceAckRemoveListElement {
-	if casted, ok := structType.(BACnetServiceAckRemoveListElement); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckRemoveListElement); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckRemoveListElement(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckRemoveListElement(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckRemoveListElement) GetTypeName() string {
-	return "BACnetServiceAckRemoveListElement"
-}
-
-func (m *BACnetServiceAckRemoveListElement) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckRemoveListElement) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckRemoveListElement) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckRemoveListElementParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckRemoveListElement, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckRemoveListElement"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckRemoveListElement"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckRemoveListElement{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckRemoveListElement) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckRemoveListElement"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckRemoveListElement"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckRemoveListElement) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCov.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCov.go
deleted file mode 100644
index 7d43cdafee..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCov.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckSubscribeCov is the data-structure of this message
-type BACnetServiceAckSubscribeCov struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckSubscribeCov is the corresponding interface of BACnetServiceAckSubscribeCov
-type IBACnetServiceAckSubscribeCov interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckSubscribeCov) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_SUBSCRIBE_COV
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckSubscribeCov) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckSubscribeCov) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckSubscribeCov factory function for BACnetServiceAckSubscribeCov
-func NewBACnetServiceAckSubscribeCov(serviceAckLength uint16) *BACnetServiceAckSubscribeCov {
-	_result := &BACnetServiceAckSubscribeCov{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckSubscribeCov(structType interface{}) *BACnetServiceAckSubscribeCov {
-	if casted, ok := structType.(BACnetServiceAckSubscribeCov); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckSubscribeCov); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckSubscribeCov(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckSubscribeCov(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckSubscribeCov) GetTypeName() string {
-	return "BACnetServiceAckSubscribeCov"
-}
-
-func (m *BACnetServiceAckSubscribeCov) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckSubscribeCov) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckSubscribeCov) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckSubscribeCovParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckSubscribeCov, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckSubscribeCov"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckSubscribeCov"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckSubscribeCov{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckSubscribeCov) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckSubscribeCov"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckSubscribeCov"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckSubscribeCov) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCovProperty.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCovProperty.go
deleted file mode 100644
index 66dad3032d..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCovProperty.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckSubscribeCovProperty is the data-structure of this message
-type BACnetServiceAckSubscribeCovProperty struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckSubscribeCovProperty is the corresponding interface of BACnetServiceAckSubscribeCovProperty
-type IBACnetServiceAckSubscribeCovProperty interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckSubscribeCovProperty) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckSubscribeCovProperty) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckSubscribeCovProperty) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckSubscribeCovProperty factory function for BACnetServiceAckSubscribeCovProperty
-func NewBACnetServiceAckSubscribeCovProperty(serviceAckLength uint16) *BACnetServiceAckSubscribeCovProperty {
-	_result := &BACnetServiceAckSubscribeCovProperty{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckSubscribeCovProperty(structType interface{}) *BACnetServiceAckSubscribeCovProperty {
-	if casted, ok := structType.(BACnetServiceAckSubscribeCovProperty); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckSubscribeCovProperty); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckSubscribeCovProperty(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckSubscribeCovProperty(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckSubscribeCovProperty) GetTypeName() string {
-	return "BACnetServiceAckSubscribeCovProperty"
-}
-
-func (m *BACnetServiceAckSubscribeCovProperty) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckSubscribeCovProperty) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckSubscribeCovProperty) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckSubscribeCovPropertyParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckSubscribeCovProperty, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckSubscribeCovProperty"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckSubscribeCovProperty"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckSubscribeCovProperty{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckSubscribeCovProperty) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckSubscribeCovProperty"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckSubscribeCovProperty"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckSubscribeCovProperty) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCovPropertyMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCovPropertyMultiple.go
deleted file mode 100644
index 44f1a363ba..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckSubscribeCovPropertyMultiple.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckSubscribeCovPropertyMultiple is the data-structure of this message
-type BACnetServiceAckSubscribeCovPropertyMultiple struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckSubscribeCovPropertyMultiple is the corresponding interface of BACnetServiceAckSubscribeCovPropertyMultiple
-type IBACnetServiceAckSubscribeCovPropertyMultiple interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckSubscribeCovPropertyMultiple) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckSubscribeCovPropertyMultiple) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckSubscribeCovPropertyMultiple) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckSubscribeCovPropertyMultiple factory function for BACnetServiceAckSubscribeCovPropertyMultiple
-func NewBACnetServiceAckSubscribeCovPropertyMultiple(serviceAckLength uint16) *BACnetServiceAckSubscribeCovPropertyMultiple {
-	_result := &BACnetServiceAckSubscribeCovPropertyMultiple{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckSubscribeCovPropertyMultiple(structType interface{}) *BACnetServiceAckSubscribeCovPropertyMultiple {
-	if casted, ok := structType.(BACnetServiceAckSubscribeCovPropertyMultiple); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckSubscribeCovPropertyMultiple); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckSubscribeCovPropertyMultiple(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckSubscribeCovPropertyMultiple(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckSubscribeCovPropertyMultiple) GetTypeName() string {
-	return "BACnetServiceAckSubscribeCovPropertyMultiple"
-}
-
-func (m *BACnetServiceAckSubscribeCovPropertyMultiple) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckSubscribeCovPropertyMultiple) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckSubscribeCovPropertyMultiple) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckSubscribeCovPropertyMultipleParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckSubscribeCovPropertyMultiple, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckSubscribeCovPropertyMultiple"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckSubscribeCovPropertyMultiple"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckSubscribeCovPropertyMultiple{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckSubscribeCovPropertyMultiple) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckSubscribeCovPropertyMultiple"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckSubscribeCovPropertyMultiple"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckSubscribeCovPropertyMultiple) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckWriteProperty.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckWriteProperty.go
deleted file mode 100644
index 74893a972e..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckWriteProperty.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckWriteProperty is the data-structure of this message
-type BACnetServiceAckWriteProperty struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckWriteProperty is the corresponding interface of BACnetServiceAckWriteProperty
-type IBACnetServiceAckWriteProperty interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckWriteProperty) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_WRITE_PROPERTY
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckWriteProperty) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckWriteProperty) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckWriteProperty factory function for BACnetServiceAckWriteProperty
-func NewBACnetServiceAckWriteProperty(serviceAckLength uint16) *BACnetServiceAckWriteProperty {
-	_result := &BACnetServiceAckWriteProperty{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckWriteProperty(structType interface{}) *BACnetServiceAckWriteProperty {
-	if casted, ok := structType.(BACnetServiceAckWriteProperty); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckWriteProperty); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckWriteProperty(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckWriteProperty(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckWriteProperty) GetTypeName() string {
-	return "BACnetServiceAckWriteProperty"
-}
-
-func (m *BACnetServiceAckWriteProperty) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckWriteProperty) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckWriteProperty) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckWritePropertyParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckWriteProperty, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckWriteProperty"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckWriteProperty"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckWriteProperty{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckWriteProperty) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckWriteProperty"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckWriteProperty"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckWriteProperty) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckWritePropertyMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckWritePropertyMultiple.go
deleted file mode 100644
index b1dda95e6d..0000000000
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckWritePropertyMultiple.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// BACnetServiceAckWritePropertyMultiple is the data-structure of this message
-type BACnetServiceAckWritePropertyMultiple struct {
-	*BACnetServiceAck
-
-	// Arguments.
-	ServiceAckLength uint16
-}
-
-// IBACnetServiceAckWritePropertyMultiple is the corresponding interface of BACnetServiceAckWritePropertyMultiple
-type IBACnetServiceAckWritePropertyMultiple interface {
-	IBACnetServiceAck
-	// GetLengthInBytes returns the length in bytes
-	GetLengthInBytes() uint16
-	// GetLengthInBits returns the length in bits
-	GetLengthInBits() uint16
-	// Serialize serializes this type
-	Serialize(writeBuffer utils.WriteBuffer) error
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-func (m *BACnetServiceAckWritePropertyMultiple) GetServiceChoice() BACnetConfirmedServiceChoice {
-	return BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *BACnetServiceAckWritePropertyMultiple) InitializeParent(parent *BACnetServiceAck) {}
-
-func (m *BACnetServiceAckWritePropertyMultiple) GetParent() *BACnetServiceAck {
-	return m.BACnetServiceAck
-}
-
-// NewBACnetServiceAckWritePropertyMultiple factory function for BACnetServiceAckWritePropertyMultiple
-func NewBACnetServiceAckWritePropertyMultiple(serviceAckLength uint16) *BACnetServiceAckWritePropertyMultiple {
-	_result := &BACnetServiceAckWritePropertyMultiple{
-		BACnetServiceAck: NewBACnetServiceAck(serviceAckLength),
-	}
-	_result.Child = _result
-	return _result
-}
-
-func CastBACnetServiceAckWritePropertyMultiple(structType interface{}) *BACnetServiceAckWritePropertyMultiple {
-	if casted, ok := structType.(BACnetServiceAckWritePropertyMultiple); ok {
-		return &casted
-	}
-	if casted, ok := structType.(*BACnetServiceAckWritePropertyMultiple); ok {
-		return casted
-	}
-	if casted, ok := structType.(BACnetServiceAck); ok {
-		return CastBACnetServiceAckWritePropertyMultiple(casted.Child)
-	}
-	if casted, ok := structType.(*BACnetServiceAck); ok {
-		return CastBACnetServiceAckWritePropertyMultiple(casted.Child)
-	}
-	return nil
-}
-
-func (m *BACnetServiceAckWritePropertyMultiple) GetTypeName() string {
-	return "BACnetServiceAckWritePropertyMultiple"
-}
-
-func (m *BACnetServiceAckWritePropertyMultiple) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *BACnetServiceAckWritePropertyMultiple) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	return lengthInBits
-}
-
-func (m *BACnetServiceAckWritePropertyMultiple) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func BACnetServiceAckWritePropertyMultipleParse(readBuffer utils.ReadBuffer, serviceAckLength uint16) (*BACnetServiceAckWritePropertyMultiple, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("BACnetServiceAckWritePropertyMultiple"); pullErr != nil {
-		return nil, pullErr
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
-	}
-
-	if closeErr := readBuffer.CloseContext("BACnetServiceAckWritePropertyMultiple"); closeErr != nil {
-		return nil, closeErr
-	}
-
-	// Create a partially initialized instance
-	_child := &BACnetServiceAckWritePropertyMultiple{
-		BACnetServiceAck: &BACnetServiceAck{},
-	}
-	_child.BACnetServiceAck.Child = _child
-	return _child, nil
-}
-
-func (m *BACnetServiceAckWritePropertyMultiple) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("BACnetServiceAckWritePropertyMultiple"); pushErr != nil {
-			return pushErr
-		}
-
-		if popErr := writeBuffer.PopContext("BACnetServiceAckWritePropertyMultiple"); popErr != nil {
-			return popErr
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *BACnetServiceAckWritePropertyMultiple) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := m.Serialize(buffer); err != nil {
-		return err.Error()
-	}
-	return buffer.GetBox().String()
-}
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index b83b4045ce..1a82c1bd14 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -894,25 +894,10 @@
         ////
         // Alarm and Event Services
 
-        ['ACKNOWLEDGE_ALARM' BACnetServiceAckAcknowledgeAlarm
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
-        ['CONFIRMED_COV_NOTIFICATION' BACnetServiceAckConfirmedCovNotification
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
-        ['CONFIRMED_COV_NOTIFICATION_MULTIPLE' BACnetServiceAckConfirmedCovNotificationMultiple
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
-        ['CONFIRMED_EVENT_NOTIFICATION' BACnetServiceAckConfirmedEventNotification
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
         ['GET_ALARM_SUMMARY' BACnetServiceAckGetAlarmSummary
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
+            [simple   BACnetApplicationTagObjectIdentifier                      objectIdentifier                ]
+            [simple   BACnetEventStateTagged('0', 'TagClass.APPLICATION_TAGS')  eventState                      ]
+            [simple   BACnetEventTransitionBitsApplication                      acknowledgedTransitions         ]
         ]
         ['GET_ENROLLMENT_SUMMARY' BACnetServiceAckGetEnrollmentSummary
             [simple   BACnetApplicationTagObjectIdentifier                      objectIdentifier                ]
@@ -927,22 +912,6 @@
             [simple   BACnetContextTagBoolean('1', 'BACnetDataType.BOOLEAN')
                         moreEvents                       ]
         ]
-        ['LIFE_SAFETY_OPERATION' BACnetServiceAckLifeSafetyOperation
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
-        ['SUBSCRIBE_COV' BACnetServiceAckSubscribeCov
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
-        ['SUBSCRIBE_COV_PROPERTY' BACnetServiceAckSubscribeCovProperty
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
-        ['SUBSCRIBE_COV_PROPERTY_MULTIPLE' BACnetServiceAckSubscribeCovPropertyMultiple
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
         //
         ////
 
@@ -964,14 +933,6 @@
 
         ////
         // Object Access Services
-        ['ADD_LIST_ELEMENT' BACnetServiceAckAddListElement
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
-        ['REMOVE_LIST_ELEMENT' BACnetServiceAckRemoveListElement
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
         ['CREATE_OBJECT' BACnetServiceAckCreateObject
             // TODO: implement me
             [validation    '1 == 2'    "TODO: implement me"]
@@ -1001,14 +962,6 @@
             [optional BACnetConstructedData('5', 'objectIdentifier.objectType', 'propertyIdentifier.value') itemData            ]
             [optional BACnetContextTagUnsignedInteger('2', 'BACnetDataType.UNSIGNED_INTEGER')               firstSequenceNumber ]
         ]
-        ['WRITE_PROPERTY' BACnetServiceAckWriteProperty
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
-        ['WRITE_PROPERTY_MULTIPLE' BACnetServiceAckWritePropertyMultiple
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
-        ]
         //
         ////
 
@@ -1133,8 +1086,16 @@
 
 [type BACnetEventTransitionBits(uint 8 tagNumber)
     [simple   BACnetContextTagBitString('tagNumber', 'BACnetDataType.BIT_STRING')
-        rawBits
-    ]
+                    rawBits                                      ]
+    [virtual    bit toOffnormal         'rawBits.payload.data[0]']
+    [virtual    bit toFault             'rawBits.payload.data[1]']
+    [virtual    bit toNormal            'rawBits.payload.data[2]']
+]
+
+// TODO: check if we can do that a bit smarter
+[type BACnetEventTransitionBitsApplication
+    [simple   BACnetApplicationTagBitString
+                    rawBits                                      ]
     [virtual    bit toOffnormal         'rawBits.payload.data[0]']
     [virtual    bit toFault             'rawBits.payload.data[1]']
     [virtual    bit toNormal            'rawBits.payload.data[2]']


[plc4x] 04/07: feat(bacnet): implement BACnetConfirmedServiceRequestVTOpen

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

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

commit ba8b2dde6b6a2a12100254b6d54f660d9dbe56e3
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue May 24 16:30:49 2022 +0200

    feat(bacnet): implement BACnetConfirmedServiceRequestVTOpen
---
 .../model/BACnetConfirmedServiceRequestVTOpen.go   | 88 +++++++++++++++++++++-
 .../resources/protocols/bacnetip/bacnetip.mspec    |  8 +-
 2 files changed, 88 insertions(+), 8 deletions(-)

diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go
index c527d2e4bd..fb2addaadf 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go
@@ -21,6 +21,7 @@ package model
 
 import (
 	"github.com/apache/plc4x/plc4go/internal/spi/utils"
+	"github.com/pkg/errors"
 )
 
 // Code generated by code-generation. DO NOT EDIT.
@@ -28,6 +29,8 @@ import (
 // BACnetConfirmedServiceRequestVTOpen is the data-structure of this message
 type BACnetConfirmedServiceRequestVTOpen struct {
 	*BACnetConfirmedServiceRequest
+	VtClass                  *BACnetVTClassTagged
+	LocatVtSessionIdentifier *BACnetApplicationTagUnsignedInteger
 
 	// Arguments.
 	ServiceRequestLength uint16
@@ -36,6 +39,10 @@ type BACnetConfirmedServiceRequestVTOpen struct {
 // IBACnetConfirmedServiceRequestVTOpen is the corresponding interface of BACnetConfirmedServiceRequestVTOpen
 type IBACnetConfirmedServiceRequestVTOpen interface {
 	IBACnetConfirmedServiceRequest
+	// GetVtClass returns VtClass (property field)
+	GetVtClass() *BACnetVTClassTagged
+	// GetLocatVtSessionIdentifier returns LocatVtSessionIdentifier (property field)
+	GetLocatVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger
 	// GetLengthInBytes returns the length in bytes
 	GetLengthInBytes() uint16
 	// GetLengthInBits returns the length in bits
@@ -65,9 +72,29 @@ func (m *BACnetConfirmedServiceRequestVTOpen) GetParent() *BACnetConfirmedServic
 	return m.BACnetConfirmedServiceRequest
 }
 
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConfirmedServiceRequestVTOpen) GetVtClass() *BACnetVTClassTagged {
+	return m.VtClass
+}
+
+func (m *BACnetConfirmedServiceRequestVTOpen) GetLocatVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger {
+	return m.LocatVtSessionIdentifier
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
 // NewBACnetConfirmedServiceRequestVTOpen factory function for BACnetConfirmedServiceRequestVTOpen
-func NewBACnetConfirmedServiceRequestVTOpen(serviceRequestLength uint16) *BACnetConfirmedServiceRequestVTOpen {
+func NewBACnetConfirmedServiceRequestVTOpen(vtClass *BACnetVTClassTagged, locatVtSessionIdentifier *BACnetApplicationTagUnsignedInteger, serviceRequestLength uint16) *BACnetConfirmedServiceRequestVTOpen {
 	_result := &BACnetConfirmedServiceRequestVTOpen{
+		VtClass:                       vtClass,
+		LocatVtSessionIdentifier:      locatVtSessionIdentifier,
 		BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength),
 	}
 	_result.Child = _result
@@ -101,6 +128,12 @@ func (m *BACnetConfirmedServiceRequestVTOpen) GetLengthInBits() uint16 {
 func (m *BACnetConfirmedServiceRequestVTOpen) GetLengthInBitsConditional(lastItem bool) uint16 {
 	lengthInBits := uint16(m.GetParentLengthInBits())
 
+	// Simple field (vtClass)
+	lengthInBits += m.VtClass.GetLengthInBits()
+
+	// Simple field (locatVtSessionIdentifier)
+	lengthInBits += m.LocatVtSessionIdentifier.GetLengthInBits()
+
 	return lengthInBits
 }
 
@@ -117,9 +150,30 @@ func BACnetConfirmedServiceRequestVTOpenParse(readBuffer utils.ReadBuffer, servi
 	currentPos := positionAware.GetPos()
 	_ = currentPos
 
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
+	// Simple Field (vtClass)
+	if pullErr := readBuffer.PullContext("vtClass"); pullErr != nil {
+		return nil, pullErr
+	}
+	_vtClass, _vtClassErr := BACnetVTClassTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
+	if _vtClassErr != nil {
+		return nil, errors.Wrap(_vtClassErr, "Error parsing 'vtClass' field")
+	}
+	vtClass := CastBACnetVTClassTagged(_vtClass)
+	if closeErr := readBuffer.CloseContext("vtClass"); closeErr != nil {
+		return nil, closeErr
+	}
+
+	// Simple Field (locatVtSessionIdentifier)
+	if pullErr := readBuffer.PullContext("locatVtSessionIdentifier"); pullErr != nil {
+		return nil, pullErr
+	}
+	_locatVtSessionIdentifier, _locatVtSessionIdentifierErr := BACnetApplicationTagParse(readBuffer)
+	if _locatVtSessionIdentifierErr != nil {
+		return nil, errors.Wrap(_locatVtSessionIdentifierErr, "Error parsing 'locatVtSessionIdentifier' field")
+	}
+	locatVtSessionIdentifier := CastBACnetApplicationTagUnsignedInteger(_locatVtSessionIdentifier)
+	if closeErr := readBuffer.CloseContext("locatVtSessionIdentifier"); closeErr != nil {
+		return nil, closeErr
 	}
 
 	if closeErr := readBuffer.CloseContext("BACnetConfirmedServiceRequestVTOpen"); closeErr != nil {
@@ -128,6 +182,8 @@ func BACnetConfirmedServiceRequestVTOpenParse(readBuffer utils.ReadBuffer, servi
 
 	// Create a partially initialized instance
 	_child := &BACnetConfirmedServiceRequestVTOpen{
+		VtClass:                       CastBACnetVTClassTagged(vtClass),
+		LocatVtSessionIdentifier:      CastBACnetApplicationTagUnsignedInteger(locatVtSessionIdentifier),
 		BACnetConfirmedServiceRequest: &BACnetConfirmedServiceRequest{},
 	}
 	_child.BACnetConfirmedServiceRequest.Child = _child
@@ -142,6 +198,30 @@ func (m *BACnetConfirmedServiceRequestVTOpen) Serialize(writeBuffer utils.WriteB
 			return pushErr
 		}
 
+		// Simple Field (vtClass)
+		if pushErr := writeBuffer.PushContext("vtClass"); pushErr != nil {
+			return pushErr
+		}
+		_vtClassErr := m.VtClass.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("vtClass"); popErr != nil {
+			return popErr
+		}
+		if _vtClassErr != nil {
+			return errors.Wrap(_vtClassErr, "Error serializing 'vtClass' field")
+		}
+
+		// Simple Field (locatVtSessionIdentifier)
+		if pushErr := writeBuffer.PushContext("locatVtSessionIdentifier"); pushErr != nil {
+			return pushErr
+		}
+		_locatVtSessionIdentifierErr := m.LocatVtSessionIdentifier.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("locatVtSessionIdentifier"); popErr != nil {
+			return popErr
+		}
+		if _locatVtSessionIdentifierErr != nil {
+			return errors.Wrap(_locatVtSessionIdentifierErr, "Error serializing 'locatVtSessionIdentifier' field")
+		}
+
 		if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestVTOpen"); popErr != nil {
 			return popErr
 		}
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index 170fe1c21e..ed8be7707e 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -485,9 +485,9 @@
             [simple   BACnetContextTagCharacterString('3', 'BACnetDataType.CHARACTER_STRING')               message                     ]
         ]
         ['REINITIALIZE_DEVICE' BACnetConfirmedServiceRequestReinitializeDevice
-          [simple   BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged('0', 'TagClass.CONTEXT_SPECIFIC_TAGS')
+            [simple   BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged('0', 'TagClass.CONTEXT_SPECIFIC_TAGS')
                                                                                                             reinitializedStateOfDevice  ]
-          [optional BACnetContextTagCharacterString('1', 'BACnetDataType.CHARACTER_STRING')
+            [optional BACnetContextTagCharacterString('1', 'BACnetDataType.CHARACTER_STRING')
                                                                                                             password                    ]
         ]
 
@@ -495,8 +495,8 @@
         //  Virtual Terminal Services
 
         ['VT_OPEN' BACnetConfirmedServiceRequestVTOpen
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
+            [simple   BACnetVTClassTagged('0', 'TagClass.APPLICATION_TAGS')                                 vtClass                     ]
+            [simple   BACnetApplicationTagUnsignedInteger                                                   locatVtSessionIdentifier    ]
         ]
         ['VT_CLOSE' BACnetConfirmedServiceRequestVTClose
             // TODO: implement me


[plc4x] 05/07: feat(bacnet): implement BACnetConfirmedServiceRequestVTOpen

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

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

commit 001eedb0b2bfc302228db2da6f9931dee73d7021
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue May 24 16:33:07 2022 +0200

    feat(bacnet): implement BACnetConfirmedServiceRequestVTOpen
---
 .../model/BACnetConfirmedServiceRequestVTClose.go  | 71 ++++++++++++++++++++--
 .../model/BACnetConfirmedServiceRequestVTOpen.go   | 46 +++++++-------
 .../resources/protocols/bacnetip/bacnetip.mspec    |  6 +-
 3 files changed, 91 insertions(+), 32 deletions(-)

diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go
index fb00bb0abe..c9e8a2c33d 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go
@@ -21,6 +21,7 @@ package model
 
 import (
 	"github.com/apache/plc4x/plc4go/internal/spi/utils"
+	"github.com/pkg/errors"
 )
 
 // Code generated by code-generation. DO NOT EDIT.
@@ -28,6 +29,7 @@ import (
 // BACnetConfirmedServiceRequestVTClose is the data-structure of this message
 type BACnetConfirmedServiceRequestVTClose struct {
 	*BACnetConfirmedServiceRequest
+	ListOfRemoteVtSessionIdentifiers []*BACnetApplicationTagUnsignedInteger
 
 	// Arguments.
 	ServiceRequestLength uint16
@@ -36,6 +38,8 @@ type BACnetConfirmedServiceRequestVTClose struct {
 // IBACnetConfirmedServiceRequestVTClose is the corresponding interface of BACnetConfirmedServiceRequestVTClose
 type IBACnetConfirmedServiceRequestVTClose interface {
 	IBACnetConfirmedServiceRequest
+	// GetListOfRemoteVtSessionIdentifiers returns ListOfRemoteVtSessionIdentifiers (property field)
+	GetListOfRemoteVtSessionIdentifiers() []*BACnetApplicationTagUnsignedInteger
 	// GetLengthInBytes returns the length in bytes
 	GetLengthInBytes() uint16
 	// GetLengthInBits returns the length in bits
@@ -65,10 +69,25 @@ func (m *BACnetConfirmedServiceRequestVTClose) GetParent() *BACnetConfirmedServi
 	return m.BACnetConfirmedServiceRequest
 }
 
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConfirmedServiceRequestVTClose) GetListOfRemoteVtSessionIdentifiers() []*BACnetApplicationTagUnsignedInteger {
+	return m.ListOfRemoteVtSessionIdentifiers
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
 // NewBACnetConfirmedServiceRequestVTClose factory function for BACnetConfirmedServiceRequestVTClose
-func NewBACnetConfirmedServiceRequestVTClose(serviceRequestLength uint16) *BACnetConfirmedServiceRequestVTClose {
+func NewBACnetConfirmedServiceRequestVTClose(listOfRemoteVtSessionIdentifiers []*BACnetApplicationTagUnsignedInteger, serviceRequestLength uint16) *BACnetConfirmedServiceRequestVTClose {
 	_result := &BACnetConfirmedServiceRequestVTClose{
-		BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength),
+		ListOfRemoteVtSessionIdentifiers: listOfRemoteVtSessionIdentifiers,
+		BACnetConfirmedServiceRequest:    NewBACnetConfirmedServiceRequest(serviceRequestLength),
 	}
 	_result.Child = _result
 	return _result
@@ -101,6 +120,13 @@ func (m *BACnetConfirmedServiceRequestVTClose) GetLengthInBits() uint16 {
 func (m *BACnetConfirmedServiceRequestVTClose) GetLengthInBitsConditional(lastItem bool) uint16 {
 	lengthInBits := uint16(m.GetParentLengthInBits())
 
+	// Array field
+	if len(m.ListOfRemoteVtSessionIdentifiers) > 0 {
+		for _, element := range m.ListOfRemoteVtSessionIdentifiers {
+			lengthInBits += element.GetLengthInBits()
+		}
+	}
+
 	return lengthInBits
 }
 
@@ -117,9 +143,25 @@ func BACnetConfirmedServiceRequestVTCloseParse(readBuffer utils.ReadBuffer, serv
 	currentPos := positionAware.GetPos()
 	_ = currentPos
 
-	// Validation
-	if !(bool((1) == (2))) {
-		return nil, utils.ParseValidationError{"TODO: implement me"}
+	// Array field (listOfRemoteVtSessionIdentifiers)
+	if pullErr := readBuffer.PullContext("listOfRemoteVtSessionIdentifiers", utils.WithRenderAsList(true)); pullErr != nil {
+		return nil, pullErr
+	}
+	// Length array
+	listOfRemoteVtSessionIdentifiers := make([]*BACnetApplicationTagUnsignedInteger, 0)
+	{
+		_listOfRemoteVtSessionIdentifiersLength := utils.InlineIf(bool(bool((serviceRequestLength) > (0))), func() interface{} { return uint16(uint16(uint16(serviceRequestLength) - uint16(uint16(1)))) }, func() interface{} { return uint16(uint16(0)) }).(uint16)
+		_listOfRemoteVtSessionIdentifiersEndPos := positionAware.GetPos() + uint16(_listOfRemoteVtSessionIdentifiersLength)
+		for positionAware.GetPos() < _listOfRemoteVtSessionIdentifiersEndPos {
+			_item, _err := BACnetApplicationTagUnsignedIntegerParse(readBuffer)
+			if _err != nil {
+				return nil, errors.Wrap(_err, "Error parsing 'listOfRemoteVtSessionIdentifiers' field")
+			}
+			listOfRemoteVtSessionIdentifiers = append(listOfRemoteVtSessionIdentifiers, _item)
+		}
+	}
+	if closeErr := readBuffer.CloseContext("listOfRemoteVtSessionIdentifiers", utils.WithRenderAsList(true)); closeErr != nil {
+		return nil, closeErr
 	}
 
 	if closeErr := readBuffer.CloseContext("BACnetConfirmedServiceRequestVTClose"); closeErr != nil {
@@ -128,7 +170,8 @@ func BACnetConfirmedServiceRequestVTCloseParse(readBuffer utils.ReadBuffer, serv
 
 	// Create a partially initialized instance
 	_child := &BACnetConfirmedServiceRequestVTClose{
-		BACnetConfirmedServiceRequest: &BACnetConfirmedServiceRequest{},
+		ListOfRemoteVtSessionIdentifiers: listOfRemoteVtSessionIdentifiers,
+		BACnetConfirmedServiceRequest:    &BACnetConfirmedServiceRequest{},
 	}
 	_child.BACnetConfirmedServiceRequest.Child = _child
 	return _child, nil
@@ -142,6 +185,22 @@ func (m *BACnetConfirmedServiceRequestVTClose) Serialize(writeBuffer utils.Write
 			return pushErr
 		}
 
+		// Array Field (listOfRemoteVtSessionIdentifiers)
+		if m.ListOfRemoteVtSessionIdentifiers != nil {
+			if pushErr := writeBuffer.PushContext("listOfRemoteVtSessionIdentifiers", utils.WithRenderAsList(true)); pushErr != nil {
+				return pushErr
+			}
+			for _, _element := range m.ListOfRemoteVtSessionIdentifiers {
+				_elementErr := _element.Serialize(writeBuffer)
+				if _elementErr != nil {
+					return errors.Wrap(_elementErr, "Error serializing 'listOfRemoteVtSessionIdentifiers' field")
+				}
+			}
+			if popErr := writeBuffer.PopContext("listOfRemoteVtSessionIdentifiers", utils.WithRenderAsList(true)); popErr != nil {
+				return popErr
+			}
+		}
+
 		if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestVTClose"); popErr != nil {
 			return popErr
 		}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go
index fb2addaadf..b9a18f3fa0 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go
@@ -30,7 +30,7 @@ import (
 type BACnetConfirmedServiceRequestVTOpen struct {
 	*BACnetConfirmedServiceRequest
 	VtClass                  *BACnetVTClassTagged
-	LocatVtSessionIdentifier *BACnetApplicationTagUnsignedInteger
+	LocalVtSessionIdentifier *BACnetApplicationTagUnsignedInteger
 
 	// Arguments.
 	ServiceRequestLength uint16
@@ -41,8 +41,8 @@ type IBACnetConfirmedServiceRequestVTOpen interface {
 	IBACnetConfirmedServiceRequest
 	// GetVtClass returns VtClass (property field)
 	GetVtClass() *BACnetVTClassTagged
-	// GetLocatVtSessionIdentifier returns LocatVtSessionIdentifier (property field)
-	GetLocatVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger
+	// GetLocalVtSessionIdentifier returns LocalVtSessionIdentifier (property field)
+	GetLocalVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger
 	// GetLengthInBytes returns the length in bytes
 	GetLengthInBytes() uint16
 	// GetLengthInBits returns the length in bits
@@ -81,8 +81,8 @@ func (m *BACnetConfirmedServiceRequestVTOpen) GetVtClass() *BACnetVTClassTagged
 	return m.VtClass
 }
 
-func (m *BACnetConfirmedServiceRequestVTOpen) GetLocatVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger {
-	return m.LocatVtSessionIdentifier
+func (m *BACnetConfirmedServiceRequestVTOpen) GetLocalVtSessionIdentifier() *BACnetApplicationTagUnsignedInteger {
+	return m.LocalVtSessionIdentifier
 }
 
 ///////////////////////
@@ -91,10 +91,10 @@ func (m *BACnetConfirmedServiceRequestVTOpen) GetLocatVtSessionIdentifier() *BAC
 ///////////////////////////////////////////////////////////
 
 // NewBACnetConfirmedServiceRequestVTOpen factory function for BACnetConfirmedServiceRequestVTOpen
-func NewBACnetConfirmedServiceRequestVTOpen(vtClass *BACnetVTClassTagged, locatVtSessionIdentifier *BACnetApplicationTagUnsignedInteger, serviceRequestLength uint16) *BACnetConfirmedServiceRequestVTOpen {
+func NewBACnetConfirmedServiceRequestVTOpen(vtClass *BACnetVTClassTagged, localVtSessionIdentifier *BACnetApplicationTagUnsignedInteger, serviceRequestLength uint16) *BACnetConfirmedServiceRequestVTOpen {
 	_result := &BACnetConfirmedServiceRequestVTOpen{
 		VtClass:                       vtClass,
-		LocatVtSessionIdentifier:      locatVtSessionIdentifier,
+		LocalVtSessionIdentifier:      localVtSessionIdentifier,
 		BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength),
 	}
 	_result.Child = _result
@@ -131,8 +131,8 @@ func (m *BACnetConfirmedServiceRequestVTOpen) GetLengthInBitsConditional(lastIte
 	// Simple field (vtClass)
 	lengthInBits += m.VtClass.GetLengthInBits()
 
-	// Simple field (locatVtSessionIdentifier)
-	lengthInBits += m.LocatVtSessionIdentifier.GetLengthInBits()
+	// Simple field (localVtSessionIdentifier)
+	lengthInBits += m.LocalVtSessionIdentifier.GetLengthInBits()
 
 	return lengthInBits
 }
@@ -163,16 +163,16 @@ func BACnetConfirmedServiceRequestVTOpenParse(readBuffer utils.ReadBuffer, servi
 		return nil, closeErr
 	}
 
-	// Simple Field (locatVtSessionIdentifier)
-	if pullErr := readBuffer.PullContext("locatVtSessionIdentifier"); pullErr != nil {
+	// Simple Field (localVtSessionIdentifier)
+	if pullErr := readBuffer.PullContext("localVtSessionIdentifier"); pullErr != nil {
 		return nil, pullErr
 	}
-	_locatVtSessionIdentifier, _locatVtSessionIdentifierErr := BACnetApplicationTagParse(readBuffer)
-	if _locatVtSessionIdentifierErr != nil {
-		return nil, errors.Wrap(_locatVtSessionIdentifierErr, "Error parsing 'locatVtSessionIdentifier' field")
+	_localVtSessionIdentifier, _localVtSessionIdentifierErr := BACnetApplicationTagParse(readBuffer)
+	if _localVtSessionIdentifierErr != nil {
+		return nil, errors.Wrap(_localVtSessionIdentifierErr, "Error parsing 'localVtSessionIdentifier' field")
 	}
-	locatVtSessionIdentifier := CastBACnetApplicationTagUnsignedInteger(_locatVtSessionIdentifier)
-	if closeErr := readBuffer.CloseContext("locatVtSessionIdentifier"); closeErr != nil {
+	localVtSessionIdentifier := CastBACnetApplicationTagUnsignedInteger(_localVtSessionIdentifier)
+	if closeErr := readBuffer.CloseContext("localVtSessionIdentifier"); closeErr != nil {
 		return nil, closeErr
 	}
 
@@ -183,7 +183,7 @@ func BACnetConfirmedServiceRequestVTOpenParse(readBuffer utils.ReadBuffer, servi
 	// Create a partially initialized instance
 	_child := &BACnetConfirmedServiceRequestVTOpen{
 		VtClass:                       CastBACnetVTClassTagged(vtClass),
-		LocatVtSessionIdentifier:      CastBACnetApplicationTagUnsignedInteger(locatVtSessionIdentifier),
+		LocalVtSessionIdentifier:      CastBACnetApplicationTagUnsignedInteger(localVtSessionIdentifier),
 		BACnetConfirmedServiceRequest: &BACnetConfirmedServiceRequest{},
 	}
 	_child.BACnetConfirmedServiceRequest.Child = _child
@@ -210,16 +210,16 @@ func (m *BACnetConfirmedServiceRequestVTOpen) Serialize(writeBuffer utils.WriteB
 			return errors.Wrap(_vtClassErr, "Error serializing 'vtClass' field")
 		}
 
-		// Simple Field (locatVtSessionIdentifier)
-		if pushErr := writeBuffer.PushContext("locatVtSessionIdentifier"); pushErr != nil {
+		// Simple Field (localVtSessionIdentifier)
+		if pushErr := writeBuffer.PushContext("localVtSessionIdentifier"); pushErr != nil {
 			return pushErr
 		}
-		_locatVtSessionIdentifierErr := m.LocatVtSessionIdentifier.Serialize(writeBuffer)
-		if popErr := writeBuffer.PopContext("locatVtSessionIdentifier"); popErr != nil {
+		_localVtSessionIdentifierErr := m.LocalVtSessionIdentifier.Serialize(writeBuffer)
+		if popErr := writeBuffer.PopContext("localVtSessionIdentifier"); popErr != nil {
 			return popErr
 		}
-		if _locatVtSessionIdentifierErr != nil {
-			return errors.Wrap(_locatVtSessionIdentifierErr, "Error serializing 'locatVtSessionIdentifier' field")
+		if _localVtSessionIdentifierErr != nil {
+			return errors.Wrap(_localVtSessionIdentifierErr, "Error serializing 'localVtSessionIdentifier' field")
 		}
 
 		if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestVTOpen"); popErr != nil {
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index ed8be7707e..08565249df 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -496,11 +496,11 @@
 
         ['VT_OPEN' BACnetConfirmedServiceRequestVTOpen
             [simple   BACnetVTClassTagged('0', 'TagClass.APPLICATION_TAGS')                                 vtClass                     ]
-            [simple   BACnetApplicationTagUnsignedInteger                                                   locatVtSessionIdentifier    ]
+            [simple   BACnetApplicationTagUnsignedInteger                                                   localVtSessionIdentifier    ]
         ]
         ['VT_CLOSE' BACnetConfirmedServiceRequestVTClose
-            // TODO: implement me
-            [validation    '1 == 2'    "TODO: implement me"]
+            [array    BACnetApplicationTagUnsignedInteger                                                   listOfRemoteVtSessionIdentifiers
+                                                               length '(serviceRequestLength>0)?(serviceRequestLength - 1):0'           ]
         ]
         ['VT_DATA' BACnetConfirmedServiceRequestVTData
             // TODO: implement me