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/08/04 12:37:33 UTC

[plc4x] branch develop updated (86d2ee35f -> 2a132d6fc)

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 86d2ee35f fix(cbus): fixed ParameterValues respecting the additional data
     new 4d379b194 fix(plc4xpcapanalyzer): fixed unnecessary replacing of payloads
     new c8893e012 feat(plc4xpcapanalyzer/cbus): echo in merge requests should now be discarded so numbering won't get messed up
     new 2a132d6fc fix(cbus): greatly simplified parsing by removing duplicate definition

The 3 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:
 plc4go/internal/cbus/MessageCodec.go               |   6 +-
 plc4go/internal/cbus/Reader.go                     | 106 +++---
 plc4go/internal/cbus/Util.go                       |  35 +-
 plc4go/protocols/cbus/readwrite/ParserHelper.go    |   8 -
 plc4go/protocols/cbus/readwrite/XmlParserHelper.go |   8 -
 .../cbus/readwrite/model/CALDataStatus.go          |  66 +++-
 .../cbus/readwrite/model/CALDataStatusExtended.go  | 274 ++++++++------
 .../protocols/cbus/readwrite/model/EncodedReply.go |  65 +---
 .../model/EncodedReplyExtendedFormatStatusReply.go | 204 ----------
 .../model/EncodedReplyStandardFormatStatusReply.go | 204 ----------
 .../readwrite/model/ExtendedFormatStatusReply.go   | 415 ---------------------
 .../cbus/readwrite/model/ExtendedStatusHeader.go   | 183 ---------
 .../cbus/readwrite/model/RequestContext.go         |  56 +--
 .../readwrite/model/StandardFormatStatusReply.go   | 279 --------------
 .../protocols/cbus/readwrite/model/StatusHeader.go | 183 ---------
 .../internal/analyzer/analyzer.go                  |   2 +
 .../internal/cbusanalyzer/analyzer.go              | 145 ++++---
 .../plc4xpcapanalyzer/internal/common/common.go    |   4 +
 .../java/cbus/readwrite/utils/StaticHelper.java    |   2 +-
 .../apache/plc4x/java/cbus/RandomPackagesTest.java |  40 +-
 .../org/apache/plc4x/java/cbus/ReferenceTest.java  |  52 +--
 .../src/main/resources/protocols/cbus/c-bus.mspec  |  97 ++---
 22 files changed, 441 insertions(+), 1993 deletions(-)
 delete mode 100644 plc4go/protocols/cbus/readwrite/model/EncodedReplyExtendedFormatStatusReply.go
 delete mode 100644 plc4go/protocols/cbus/readwrite/model/EncodedReplyStandardFormatStatusReply.go
 delete mode 100644 plc4go/protocols/cbus/readwrite/model/ExtendedFormatStatusReply.go
 delete mode 100644 plc4go/protocols/cbus/readwrite/model/ExtendedStatusHeader.go
 delete mode 100644 plc4go/protocols/cbus/readwrite/model/StandardFormatStatusReply.go
 delete mode 100644 plc4go/protocols/cbus/readwrite/model/StatusHeader.go


[plc4x] 03/03: fix(cbus): greatly simplified parsing by removing duplicate definition

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 2a132d6fce140bf0275673212dcf5488c0c660ab
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Aug 4 14:37:25 2022 +0200

    fix(cbus): greatly simplified parsing by removing duplicate definition
---
 plc4go/internal/cbus/MessageCodec.go               |   6 +-
 plc4go/internal/cbus/Reader.go                     | 106 +++---
 plc4go/internal/cbus/Util.go                       |  35 +-
 plc4go/protocols/cbus/readwrite/ParserHelper.go    |   8 -
 plc4go/protocols/cbus/readwrite/XmlParserHelper.go |   8 -
 .../cbus/readwrite/model/CALDataStatus.go          |  66 +++-
 .../cbus/readwrite/model/CALDataStatusExtended.go  | 274 ++++++++------
 .../protocols/cbus/readwrite/model/EncodedReply.go |  65 +---
 .../model/EncodedReplyExtendedFormatStatusReply.go | 204 ----------
 .../model/EncodedReplyStandardFormatStatusReply.go | 204 ----------
 .../readwrite/model/ExtendedFormatStatusReply.go   | 415 ---------------------
 .../cbus/readwrite/model/ExtendedStatusHeader.go   | 183 ---------
 .../cbus/readwrite/model/RequestContext.go         |  56 +--
 .../readwrite/model/StandardFormatStatusReply.go   | 279 --------------
 .../protocols/cbus/readwrite/model/StatusHeader.go | 183 ---------
 .../internal/cbusanalyzer/analyzer.go              |  21 +-
 .../java/cbus/readwrite/utils/StaticHelper.java    |   2 +-
 .../apache/plc4x/java/cbus/RandomPackagesTest.java |  40 +-
 .../org/apache/plc4x/java/cbus/ReferenceTest.java  |  52 +--
 .../src/main/resources/protocols/cbus/c-bus.mspec  |  97 ++---
 20 files changed, 357 insertions(+), 1947 deletions(-)

diff --git a/plc4go/internal/cbus/MessageCodec.go b/plc4go/internal/cbus/MessageCodec.go
index 0d706b57a..bb1fad9f9 100644
--- a/plc4go/internal/cbus/MessageCodec.go
+++ b/plc4go/internal/cbus/MessageCodec.go
@@ -43,7 +43,7 @@ type MessageCodec struct {
 
 func NewMessageCodec(transportInstance transports.TransportInstance, srchk bool) *MessageCodec {
 	codec := &MessageCodec{
-		requestContext: readwriteModel.NewRequestContext(false, false, false),
+		requestContext: readwriteModel.NewRequestContext(false),
 		cbusOptions:    readwriteModel.NewCBusOptions(false, false, false, false, false, false, false, false, srchk),
 		monitoredSALs:  make(chan readwriteModel.MonitoredSAL, 100),
 	}
@@ -181,7 +181,7 @@ lookingForTheEnd:
 		// TODO: bit bad we need to do this but cal detection is not reliable enough
 		{ // Try SAL
 			rb := utils.NewReadBufferByteBased(read)
-			cBusMessage, secondErr := readwriteModel.CBusMessageParse(rb, pciResponse, readwriteModel.NewRequestContext(false, false, false), m.cbusOptions)
+			cBusMessage, secondErr := readwriteModel.CBusMessageParse(rb, pciResponse, readwriteModel.NewRequestContext(false), m.cbusOptions)
 			if secondErr == nil {
 				return cBusMessage, nil
 			} else {
@@ -189,7 +189,7 @@ lookingForTheEnd:
 			}
 		}
 		{ // Try MMI
-			requestContext := readwriteModel.NewRequestContext(false, false, false)
+			requestContext := readwriteModel.NewRequestContext(false)
 			cbusOptions := readwriteModel.NewCBusOptions(false, false, false, false, false, false, false, false, false)
 			rb := utils.NewReadBufferByteBased(read)
 			cBusMessage, secondErr := readwriteModel.CBusMessageParse(rb, true, requestContext, cbusOptions)
diff --git a/plc4go/internal/cbus/Reader.go b/plc4go/internal/cbus/Reader.go
index d54b4f7b9..8df3d1b18 100644
--- a/plc4go/internal/cbus/Reader.go
+++ b/plc4go/internal/cbus/Reader.go
@@ -142,38 +142,18 @@ func (m *Reader) Read(readRequest model.PlcReadRequest) <-chan model.PlcReadRequ
 						embeddedReply := confirmation.GetEmbeddedReply().(readWriteModel.ReplyOrConfirmationReplyExactly)
 
 						switch reply := embeddedReply.GetReply().(readWriteModel.ReplyEncodedReply).GetEncodedReply().(type) {
-						case readWriteModel.EncodedReplyStandardFormatStatusReplyExactly:
-							application := reply.GetReply().GetApplication()
-							// TODO: verify application... this should be the same
-							_ = application
-							blockStart := reply.GetReply().GetBlockStart()
-							// TODO: verify application... this should be the same
-							_ = blockStart
-							statusBytes := reply.GetReply().GetStatusBytes()
+						case readWriteModel.EncodedReplyCALReplyExactly:
+							calData := reply.GetCalReply().GetCalData()
 							addResponseCode(fieldNameCopy, model.PlcResponseCode_OK)
-							plcListValues := make([]values.PlcValue, len(statusBytes)*4)
-							for i, statusByte := range statusBytes {
-								plcListValues[i*4+0] = spiValues.NewPlcSTRING(statusByte.GetGav0().String())
-								plcListValues[i*4+1] = spiValues.NewPlcSTRING(statusByte.GetGav1().String())
-								plcListValues[i*4+2] = spiValues.NewPlcSTRING(statusByte.GetGav2().String())
-								plcListValues[i*4+3] = spiValues.NewPlcSTRING(statusByte.GetGav3().String())
-							}
-							addPlcValue(fieldNameCopy, spiValues.NewPlcList(plcListValues))
-						case readWriteModel.EncodedReplyExtendedFormatStatusReplyExactly:
-							coding := reply.GetReply().GetCoding()
-							// TODO: verify coding... this should be the same
-							_ = coding
-							application := reply.GetReply().GetApplication()
-							// TODO: verify application... this should be the same
-							_ = application
-							blockStart := reply.GetReply().GetBlockStart()
-							// TODO: verify application... this should be the same
-							_ = blockStart
-							switch coding {
-							case readWriteModel.StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE:
-								fallthrough
-							case readWriteModel.StatusCoding_BINARY_BY_ELSEWHERE:
-								statusBytes := reply.GetReply().GetStatusBytes()
+							switch calData := calData.(type) {
+							case readWriteModel.CALDataStatusExactly:
+								application := calData.GetApplication()
+								// TODO: verify application... this should be the same
+								_ = application
+								blockStart := calData.GetBlockStart()
+								// TODO: verify application... this should be the same
+								_ = blockStart
+								statusBytes := calData.GetStatusBytes()
 								addResponseCode(fieldNameCopy, model.PlcResponseCode_OK)
 								plcListValues := make([]values.PlcValue, len(statusBytes)*4)
 								for i, statusByte := range statusBytes {
@@ -183,29 +163,51 @@ func (m *Reader) Read(readRequest model.PlcReadRequest) <-chan model.PlcReadRequ
 									plcListValues[i*4+3] = spiValues.NewPlcSTRING(statusByte.GetGav3().String())
 								}
 								addPlcValue(fieldNameCopy, spiValues.NewPlcList(plcListValues))
-							case readWriteModel.StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE:
-								fallthrough
-							case readWriteModel.StatusCoding_LEVEL_BY_ELSEWHERE:
-								levelInformation := reply.GetReply().GetLevelInformation()
-								addResponseCode(fieldNameCopy, model.PlcResponseCode_OK)
-								plcListValues := make([]values.PlcValue, len(levelInformation))
-								for i, levelInformation := range levelInformation {
-									switch levelInformation := levelInformation.(type) {
-									case readWriteModel.LevelInformationAbsentExactly:
-										plcListValues[i] = spiValues.NewPlcSTRING("is absent")
-									case readWriteModel.LevelInformationCorruptedExactly:
-										plcListValues[i] = spiValues.NewPlcSTRING("corrupted")
-									case readWriteModel.LevelInformationNormalExactly:
-										plcListValues[i] = spiValues.NewPlcUSINT(levelInformation.GetActualLevel())
-									default:
-										panic("Impossible case")
+							case readWriteModel.CALDataStatusExtendedExactly:
+								coding := calData.GetCoding()
+								// TODO: verify coding... this should be the same
+								_ = coding
+								application := calData.GetApplication()
+								// TODO: verify application... this should be the same
+								_ = application
+								blockStart := calData.GetBlockStart()
+								// TODO: verify application... this should be the same
+								_ = blockStart
+								switch coding {
+								case readWriteModel.StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE:
+									fallthrough
+								case readWriteModel.StatusCoding_BINARY_BY_ELSEWHERE:
+									statusBytes := calData.GetStatusBytes()
+									addResponseCode(fieldNameCopy, model.PlcResponseCode_OK)
+									plcListValues := make([]values.PlcValue, len(statusBytes)*4)
+									for i, statusByte := range statusBytes {
+										plcListValues[i*4+0] = spiValues.NewPlcSTRING(statusByte.GetGav0().String())
+										plcListValues[i*4+1] = spiValues.NewPlcSTRING(statusByte.GetGav1().String())
+										plcListValues[i*4+2] = spiValues.NewPlcSTRING(statusByte.GetGav2().String())
+										plcListValues[i*4+3] = spiValues.NewPlcSTRING(statusByte.GetGav3().String())
+									}
+									addPlcValue(fieldNameCopy, spiValues.NewPlcList(plcListValues))
+								case readWriteModel.StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE:
+									fallthrough
+								case readWriteModel.StatusCoding_LEVEL_BY_ELSEWHERE:
+									levelInformation := calData.GetLevelInformation()
+									addResponseCode(fieldNameCopy, model.PlcResponseCode_OK)
+									plcListValues := make([]values.PlcValue, len(levelInformation))
+									for i, levelInformation := range levelInformation {
+										switch levelInformation := levelInformation.(type) {
+										case readWriteModel.LevelInformationAbsentExactly:
+											plcListValues[i] = spiValues.NewPlcSTRING("is absent")
+										case readWriteModel.LevelInformationCorruptedExactly:
+											plcListValues[i] = spiValues.NewPlcSTRING("corrupted")
+										case readWriteModel.LevelInformationNormalExactly:
+											plcListValues[i] = spiValues.NewPlcUSINT(levelInformation.GetActualLevel())
+										default:
+											panic("Impossible case")
+										}
 									}
+									addPlcValue(fieldNameCopy, spiValues.NewPlcList(plcListValues))
 								}
-								addPlcValue(fieldNameCopy, spiValues.NewPlcList(plcListValues))
 							}
-						case readWriteModel.EncodedReplyCALReplyExactly:
-							calData := reply.GetCalReply().GetCalData()
-							addResponseCode(fieldNameCopy, model.PlcResponseCode_OK)
 							// TODO: how should we serialize that???
 							addPlcValue(fieldNameCopy, spiValues.NewPlcSTRING(fmt.Sprintf("%s", calData)))
 						}
@@ -240,7 +242,7 @@ func (m *Reader) Read(readRequest model.PlcReadRequest) <-chan model.PlcReadRequ
 	return result
 }
 
-var defaultRequestContext = readWriteModel.NewRequestContext(false, false, false)
+var defaultRequestContext = readWriteModel.NewRequestContext(false)
 var defaultOptions = readWriteModel.NewCBusOptions(false, false, false, false, false, false, false, false, false)
 
 func (m *Reader) fieldToCBusMessage(field model.PlcField) (readWriteModel.CBusMessage, error) {
diff --git a/plc4go/internal/cbus/Util.go b/plc4go/internal/cbus/Util.go
index cddfa093f..f0fff3ee6 100644
--- a/plc4go/internal/cbus/Util.go
+++ b/plc4go/internal/cbus/Util.go
@@ -38,12 +38,9 @@ func CreateRequestContextWithInfoCallback(cBusMessage readwriteModel.CBusMessage
 			case readwriteModel.CALDataIdentifyExactly:
 				sendIdentifyRequestBefore = true
 			}
-			return readwriteModel.NewRequestContext(true, false, sendIdentifyRequestBefore)
+			return readwriteModel.NewRequestContext(sendIdentifyRequestBefore)
 		case readwriteModel.RequestCommandExactly:
 			switch command := request.GetCbusCommand().(type) {
-			case readwriteModel.CBusCommandDeviceManagementExactly:
-				infoCallBack("CAL request detected")
-				return readwriteModel.NewRequestContext(true, false, false)
 			case readwriteModel.CBusCommandPointToPointExactly:
 				sendIdentifyRequestBefore := false
 				infoCallBack("CAL request detected")
@@ -51,29 +48,7 @@ func CreateRequestContextWithInfoCallback(cBusMessage readwriteModel.CBusMessage
 				case readwriteModel.CALDataIdentifyExactly:
 					sendIdentifyRequestBefore = true
 				}
-				return readwriteModel.NewRequestContext(true, false, sendIdentifyRequestBefore)
-			case readwriteModel.CBusCommandPointToMultiPointExactly:
-				switch command := command.GetCommand().(type) {
-				case readwriteModel.CBusPointToMultiPointCommandStatusExactly:
-					var sendStatusRequestLevelBefore bool
-					switch command.GetStatusRequest().(type) {
-					case readwriteModel.StatusRequestLevelExactly:
-						sendStatusRequestLevelBefore = true
-					}
-					infoCallBack("SAL status request detected")
-					return readwriteModel.NewRequestContext(false, sendStatusRequestLevelBefore, false)
-				}
-			case readwriteModel.CBusCommandPointToPointToMultiPointExactly:
-				switch command := command.GetCommand().(type) {
-				case readwriteModel.CBusPointToPointToMultiPointCommandStatusExactly:
-					var sendStatusRequestLevelBefore bool
-					switch command.GetStatusRequest().(type) {
-					case readwriteModel.StatusRequestLevelExactly:
-						sendStatusRequestLevelBefore = true
-					}
-					infoCallBack("SAL status request detected")
-					return readwriteModel.NewRequestContext(false, sendStatusRequestLevelBefore, false)
-				}
+				return readwriteModel.NewRequestContext(sendIdentifyRequestBefore)
 			}
 		case readwriteModel.RequestObsoleteExactly:
 			sendIdentifyRequestBefore := false
@@ -82,11 +57,11 @@ func CreateRequestContextWithInfoCallback(cBusMessage readwriteModel.CBusMessage
 			case readwriteModel.CALDataIdentifyExactly:
 				sendIdentifyRequestBefore = true
 			}
-			return readwriteModel.NewRequestContext(true, false, sendIdentifyRequestBefore)
+			return readwriteModel.NewRequestContext(sendIdentifyRequestBefore)
 		}
 	case readwriteModel.CBusMessageToClientExactly:
 		// We received a request so we need to reset our flags
-		return readwriteModel.NewRequestContext(false, false, false)
+		return readwriteModel.NewRequestContext(false)
 	}
-	return readwriteModel.NewRequestContext(false, false, false)
+	return readwriteModel.NewRequestContext(false)
 }
diff --git a/plc4go/protocols/cbus/readwrite/ParserHelper.go b/plc4go/protocols/cbus/readwrite/ParserHelper.go
index cbb811509..37bc570e1 100644
--- a/plc4go/protocols/cbus/readwrite/ParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/ParserHelper.go
@@ -99,8 +99,6 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
 		return model.MediaTransportControlDataParse(io)
 	case "StatusByte":
 		return model.StatusByteParse(io)
-	case "ExtendedStatusHeader":
-		return model.ExtendedStatusHeaderParse(io)
 	case "TriggerControlLabelOptions":
 		return model.TriggerControlLabelOptionsParse(io)
 	case "HVACAuxiliaryLevel":
@@ -188,8 +186,6 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
 		return model.ClockAndTimekeepingDataParse(io)
 	case "NetworkRoute":
 		return model.NetworkRouteParse(io)
-	case "StandardFormatStatusReply":
-		return model.StandardFormatStatusReplyParse(io)
 	case "ResponseTermination":
 		return model.ResponseTerminationParse(io)
 	case "LevelInformation":
@@ -217,8 +213,6 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
 			return nil, errors.Wrap(err, "Error parsing")
 		}
 		return model.CustomTypesParse(io, numBytes)
-	case "StatusHeader":
-		return model.StatusHeaderParse(io)
 	case "EncodedReply":
 		var cBusOptions model.CBusOptions
 		var requestContext model.RequestContext
@@ -226,8 +220,6 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
 	case "CBusPointToPointToMultiPointCommand":
 		var cBusOptions model.CBusOptions
 		return model.CBusPointToPointToMultiPointCommandParse(io, cBusOptions)
-	case "ExtendedFormatStatusReply":
-		return model.ExtendedFormatStatusReplyParse(io)
 	case "CBusPointToPointCommand":
 		var cBusOptions model.CBusOptions
 		return model.CBusPointToPointCommandParse(io, cBusOptions)
diff --git a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
index 766f45cfa..078f4a674 100644
--- a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
@@ -115,8 +115,6 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
 		return model.MediaTransportControlDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "StatusByte":
 		return model.StatusByteParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
-	case "ExtendedStatusHeader":
-		return model.ExtendedStatusHeaderParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "TriggerControlLabelOptions":
 		return model.TriggerControlLabelOptionsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "HVACAuxiliaryLevel":
@@ -210,8 +208,6 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
 		return model.ClockAndTimekeepingDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "NetworkRoute":
 		return model.NetworkRouteParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
-	case "StandardFormatStatusReply":
-		return model.StandardFormatStatusReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "ResponseTermination":
 		return model.ResponseTerminationParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "LevelInformation":
@@ -241,8 +237,6 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
 		}
 		numBytes := uint8(parsedUint0)
 		return model.CustomTypesParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), numBytes)
-	case "StatusHeader":
-		return model.StatusHeaderParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "EncodedReply":
 		// TODO: find a way to parse the sub types
 		var cBusOptions model.CBusOptions
@@ -253,8 +247,6 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
 		// TODO: find a way to parse the sub types
 		var cBusOptions model.CBusOptions
 		return model.CBusPointToPointToMultiPointCommandParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions)
-	case "ExtendedFormatStatusReply":
-		return model.ExtendedFormatStatusReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "CBusPointToPointCommand":
 		// TODO: find a way to parse the sub types
 		var cBusOptions model.CBusOptions
diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataStatus.go b/plc4go/protocols/cbus/readwrite/model/CALDataStatus.go
index df2612ef2..ecdfc4150 100644
--- a/plc4go/protocols/cbus/readwrite/model/CALDataStatus.go
+++ b/plc4go/protocols/cbus/readwrite/model/CALDataStatus.go
@@ -35,8 +35,8 @@ type CALDataStatus interface {
 	GetApplication() ApplicationIdContainer
 	// GetBlockStart returns BlockStart (property field)
 	GetBlockStart() uint8
-	// GetData returns Data (property field)
-	GetData() []byte
+	// GetStatusBytes returns StatusBytes (property field)
+	GetStatusBytes() []StatusByte
 }
 
 // CALDataStatusExactly can be used when we want exactly this type and not a type which fulfills CALDataStatus.
@@ -51,7 +51,7 @@ type _CALDataStatus struct {
 	*_CALData
 	Application ApplicationIdContainer
 	BlockStart  uint8
-	Data        []byte
+	StatusBytes []StatusByte
 }
 
 ///////////////////////////////////////////////////////////
@@ -86,8 +86,8 @@ func (m *_CALDataStatus) GetBlockStart() uint8 {
 	return m.BlockStart
 }
 
-func (m *_CALDataStatus) GetData() []byte {
-	return m.Data
+func (m *_CALDataStatus) GetStatusBytes() []StatusByte {
+	return m.StatusBytes
 }
 
 ///////////////////////
@@ -96,11 +96,11 @@ func (m *_CALDataStatus) GetData() []byte {
 ///////////////////////////////////////////////////////////
 
 // NewCALDataStatus factory function for _CALDataStatus
-func NewCALDataStatus(application ApplicationIdContainer, blockStart uint8, data []byte, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataStatus {
+func NewCALDataStatus(application ApplicationIdContainer, blockStart uint8, statusBytes []StatusByte, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataStatus {
 	_result := &_CALDataStatus{
 		Application: application,
 		BlockStart:  blockStart,
-		Data:        data,
+		StatusBytes: statusBytes,
 		_CALData:    NewCALData(commandTypeContainer, additionalData, requestContext),
 	}
 	_result._CALData._CALDataChildRequirements = _result
@@ -136,8 +136,11 @@ func (m *_CALDataStatus) GetLengthInBitsConditional(lastItem bool) uint16 {
 	lengthInBits += 8
 
 	// Array field
-	if len(m.Data) > 0 {
-		lengthInBits += 8 * uint16(len(m.Data))
+	if len(m.StatusBytes) > 0 {
+		for i, element := range m.StatusBytes {
+			last := i == len(m.StatusBytes)-1
+			lengthInBits += element.(interface{ GetLengthInBitsConditional(bool) uint16 }).GetLengthInBitsConditional(last)
+		}
 	}
 
 	return lengthInBits
@@ -175,11 +178,28 @@ func CALDataStatusParse(readBuffer utils.ReadBuffer, requestContext RequestConte
 		return nil, errors.Wrap(_blockStartErr, "Error parsing 'blockStart' field of CALDataStatus")
 	}
 	blockStart := _blockStart
-	// Byte Array field (data)
-	numberOfBytesdata := int(uint16(commandTypeContainer.NumBytes()) - uint16(uint16(2)))
-	data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata)
-	if _readArrayErr != nil {
-		return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of CALDataStatus")
+
+	// Array field (statusBytes)
+	if pullErr := readBuffer.PullContext("statusBytes", utils.WithRenderAsList(true)); pullErr != nil {
+		return nil, errors.Wrap(pullErr, "Error pulling for statusBytes")
+	}
+	// Count array
+	statusBytes := make([]StatusByte, uint16(commandTypeContainer.NumBytes())-uint16(uint16(2)))
+	// This happens when the size is set conditional to 0
+	if len(statusBytes) == 0 {
+		statusBytes = nil
+	}
+	{
+		for curItem := uint16(0); curItem < uint16(uint16(commandTypeContainer.NumBytes())-uint16(uint16(2))); curItem++ {
+			_item, _err := StatusByteParse(readBuffer)
+			if _err != nil {
+				return nil, errors.Wrap(_err, "Error parsing 'statusBytes' field of CALDataStatus")
+			}
+			statusBytes[curItem] = _item.(StatusByte)
+		}
+	}
+	if closeErr := readBuffer.CloseContext("statusBytes", utils.WithRenderAsList(true)); closeErr != nil {
+		return nil, errors.Wrap(closeErr, "Error closing for statusBytes")
 	}
 
 	if closeErr := readBuffer.CloseContext("CALDataStatus"); closeErr != nil {
@@ -190,7 +210,7 @@ func CALDataStatusParse(readBuffer utils.ReadBuffer, requestContext RequestConte
 	_child := &_CALDataStatus{
 		Application: application,
 		BlockStart:  blockStart,
-		Data:        data,
+		StatusBytes: statusBytes,
 		_CALData: &_CALData{
 			RequestContext: requestContext,
 		},
@@ -226,10 +246,18 @@ func (m *_CALDataStatus) Serialize(writeBuffer utils.WriteBuffer) error {
 			return errors.Wrap(_blockStartErr, "Error serializing 'blockStart' field")
 		}
 
-		// Array Field (data)
-		// Byte Array field (data)
-		if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil {
-			return errors.Wrap(err, "Error serializing 'data' field")
+		// Array Field (statusBytes)
+		if pushErr := writeBuffer.PushContext("statusBytes", utils.WithRenderAsList(true)); pushErr != nil {
+			return errors.Wrap(pushErr, "Error pushing for statusBytes")
+		}
+		for _, _element := range m.GetStatusBytes() {
+			_elementErr := writeBuffer.WriteSerializable(_element)
+			if _elementErr != nil {
+				return errors.Wrap(_elementErr, "Error serializing 'statusBytes' field")
+			}
+		}
+		if popErr := writeBuffer.PopContext("statusBytes", utils.WithRenderAsList(true)); popErr != nil {
+			return errors.Wrap(popErr, "Error popping for statusBytes")
 		}
 
 		if popErr := writeBuffer.PopContext("CALDataStatus"); popErr != nil {
diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataStatusExtended.go b/plc4go/protocols/cbus/readwrite/model/CALDataStatusExtended.go
index bd84268f9..b1f1d706a 100644
--- a/plc4go/protocols/cbus/readwrite/model/CALDataStatusExtended.go
+++ b/plc4go/protocols/cbus/readwrite/model/CALDataStatusExtended.go
@@ -32,23 +32,19 @@ type CALDataStatusExtended interface {
 	utils.Serializable
 	CALData
 	// GetCoding returns Coding (property field)
-	GetCoding() uint8
+	GetCoding() StatusCoding
 	// GetApplication returns Application (property field)
 	GetApplication() ApplicationIdContainer
 	// GetBlockStart returns BlockStart (property field)
 	GetBlockStart() uint8
-	// GetData returns Data (property field)
-	GetData() []byte
-	// GetIsBinaryBySerialInterface returns IsBinaryBySerialInterface (virtual field)
-	GetIsBinaryBySerialInterface() bool
-	// GetIsBinaryByElsewhere returns IsBinaryByElsewhere (virtual field)
-	GetIsBinaryByElsewhere() bool
-	// GetIsLevelBySerialInterface returns IsLevelBySerialInterface (virtual field)
-	GetIsLevelBySerialInterface() bool
-	// GetIsLevelByElsewhere returns IsLevelByElsewhere (virtual field)
-	GetIsLevelByElsewhere() bool
-	// GetIsReserved returns IsReserved (virtual field)
-	GetIsReserved() bool
+	// GetStatusBytes returns StatusBytes (property field)
+	GetStatusBytes() []StatusByte
+	// GetLevelInformation returns LevelInformation (property field)
+	GetLevelInformation() []LevelInformation
+	// GetNumberOfStatusBytes returns NumberOfStatusBytes (virtual field)
+	GetNumberOfStatusBytes() uint8
+	// GetNumberOfLevelInformation returns NumberOfLevelInformation (virtual field)
+	GetNumberOfLevelInformation() uint8
 }
 
 // CALDataStatusExtendedExactly can be used when we want exactly this type and not a type which fulfills CALDataStatusExtended.
@@ -61,10 +57,11 @@ type CALDataStatusExtendedExactly interface {
 // _CALDataStatusExtended is the data-structure of this message
 type _CALDataStatusExtended struct {
 	*_CALData
-	Coding      uint8
-	Application ApplicationIdContainer
-	BlockStart  uint8
-	Data        []byte
+	Coding           StatusCoding
+	Application      ApplicationIdContainer
+	BlockStart       uint8
+	StatusBytes      []StatusByte
+	LevelInformation []LevelInformation
 }
 
 ///////////////////////////////////////////////////////////
@@ -91,7 +88,7 @@ func (m *_CALDataStatusExtended) GetParent() CALData {
 /////////////////////// Accessors for property fields.
 ///////////////////////
 
-func (m *_CALDataStatusExtended) GetCoding() uint8 {
+func (m *_CALDataStatusExtended) GetCoding() StatusCoding {
 	return m.Coding
 }
 
@@ -103,8 +100,12 @@ func (m *_CALDataStatusExtended) GetBlockStart() uint8 {
 	return m.BlockStart
 }
 
-func (m *_CALDataStatusExtended) GetData() []byte {
-	return m.Data
+func (m *_CALDataStatusExtended) GetStatusBytes() []StatusByte {
+	return m.StatusBytes
+}
+
+func (m *_CALDataStatusExtended) GetLevelInformation() []LevelInformation {
+	return m.LevelInformation
 }
 
 ///////////////////////
@@ -116,24 +117,14 @@ func (m *_CALDataStatusExtended) GetData() []byte {
 /////////////////////// Accessors for virtual fields.
 ///////////////////////
 
-func (m *_CALDataStatusExtended) GetIsBinaryBySerialInterface() bool {
-	return bool(bool((m.GetCoding()) == (0x00)))
-}
-
-func (m *_CALDataStatusExtended) GetIsBinaryByElsewhere() bool {
-	return bool(bool((m.GetCoding()) == (0x40)))
-}
-
-func (m *_CALDataStatusExtended) GetIsLevelBySerialInterface() bool {
-	return bool(bool((m.GetCoding()) == (0x07)))
-}
-
-func (m *_CALDataStatusExtended) GetIsLevelByElsewhere() bool {
-	return bool(bool((m.GetCoding()) == (0x47)))
+func (m *_CALDataStatusExtended) GetNumberOfStatusBytes() uint8 {
+	return uint8(utils.InlineIf((bool(bool((m.GetCoding()) == (StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE))) || bool(bool((m.GetCoding()) == (StatusCoding_BINARY_BY_ELSEWHERE)))), func() interface{} { return uint8((uint8(m.GetCommandTypeContainer().NumBytes()) - uint8(uint8(3)))) }, func() interface{} { return uint8((uint8(0))) }).(uint8))
 }
 
-func (m *_CALDataStatusExtended) GetIsReserved() bool {
-	return bool(bool(bool(bool(!(m.GetIsBinaryBySerialInterface())) && bool(!(m.GetIsBinaryByElsewhere()))) && bool(!(m.GetIsLevelBySerialInterface()))) && bool(!(m.GetIsLevelByElsewhere())))
+func (m *_CALDataStatusExtended) GetNumberOfLevelInformation() uint8 {
+	return uint8(utils.InlineIf((bool(bool((m.GetCoding()) == (StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE))) || bool(bool((m.GetCoding()) == (StatusCoding_LEVEL_BY_ELSEWHERE)))), func() interface{} {
+		return uint8((uint8((uint8(m.GetCommandTypeContainer().NumBytes()) - uint8(uint8(3)))) / uint8(uint8(2))))
+	}, func() interface{} { return uint8((uint8(0))) }).(uint8))
 }
 
 ///////////////////////
@@ -142,13 +133,14 @@ func (m *_CALDataStatusExtended) GetIsReserved() bool {
 ///////////////////////////////////////////////////////////
 
 // NewCALDataStatusExtended factory function for _CALDataStatusExtended
-func NewCALDataStatusExtended(coding uint8, application ApplicationIdContainer, blockStart uint8, data []byte, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataStatusExtended {
+func NewCALDataStatusExtended(coding StatusCoding, application ApplicationIdContainer, blockStart uint8, statusBytes []StatusByte, levelInformation []LevelInformation, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataStatusExtended {
 	_result := &_CALDataStatusExtended{
-		Coding:      coding,
-		Application: application,
-		BlockStart:  blockStart,
-		Data:        data,
-		_CALData:    NewCALData(commandTypeContainer, additionalData, requestContext),
+		Coding:           coding,
+		Application:      application,
+		BlockStart:       blockStart,
+		StatusBytes:      statusBytes,
+		LevelInformation: levelInformation,
+		_CALData:         NewCALData(commandTypeContainer, additionalData, requestContext),
 	}
 	_result._CALData._CALDataChildRequirements = _result
 	return _result
@@ -179,25 +171,30 @@ func (m *_CALDataStatusExtended) GetLengthInBitsConditional(lastItem bool) uint1
 	// Simple field (coding)
 	lengthInBits += 8
 
-	// A virtual field doesn't have any in- or output.
-
-	// A virtual field doesn't have any in- or output.
+	// Simple field (application)
+	lengthInBits += 8
 
-	// A virtual field doesn't have any in- or output.
+	// Simple field (blockStart)
+	lengthInBits += 8
 
 	// A virtual field doesn't have any in- or output.
 
 	// A virtual field doesn't have any in- or output.
 
-	// Simple field (application)
-	lengthInBits += 8
-
-	// Simple field (blockStart)
-	lengthInBits += 8
+	// Array field
+	if len(m.StatusBytes) > 0 {
+		for i, element := range m.StatusBytes {
+			last := i == len(m.StatusBytes)-1
+			lengthInBits += element.(interface{ GetLengthInBitsConditional(bool) uint16 }).GetLengthInBitsConditional(last)
+		}
+	}
 
 	// Array field
-	if len(m.Data) > 0 {
-		lengthInBits += 8 * uint16(len(m.Data))
+	if len(m.LevelInformation) > 0 {
+		for i, element := range m.LevelInformation {
+			last := i == len(m.LevelInformation)-1
+			lengthInBits += element.(interface{ GetLengthInBitsConditional(bool) uint16 }).GetLengthInBitsConditional(last)
+		}
 	}
 
 	return lengthInBits
@@ -217,36 +214,17 @@ func CALDataStatusExtendedParse(readBuffer utils.ReadBuffer, requestContext Requ
 	_ = currentPos
 
 	// Simple Field (coding)
-	_coding, _codingErr := readBuffer.ReadUint8("coding", 8)
+	if pullErr := readBuffer.PullContext("coding"); pullErr != nil {
+		return nil, errors.Wrap(pullErr, "Error pulling for coding")
+	}
+	_coding, _codingErr := StatusCodingParse(readBuffer)
 	if _codingErr != nil {
 		return nil, errors.Wrap(_codingErr, "Error parsing 'coding' field of CALDataStatusExtended")
 	}
 	coding := _coding
-
-	// Virtual field
-	_isBinaryBySerialInterface := bool((coding) == (0x00))
-	isBinaryBySerialInterface := bool(_isBinaryBySerialInterface)
-	_ = isBinaryBySerialInterface
-
-	// Virtual field
-	_isBinaryByElsewhere := bool((coding) == (0x40))
-	isBinaryByElsewhere := bool(_isBinaryByElsewhere)
-	_ = isBinaryByElsewhere
-
-	// Virtual field
-	_isLevelBySerialInterface := bool((coding) == (0x07))
-	isLevelBySerialInterface := bool(_isLevelBySerialInterface)
-	_ = isLevelBySerialInterface
-
-	// Virtual field
-	_isLevelByElsewhere := bool((coding) == (0x47))
-	isLevelByElsewhere := bool(_isLevelByElsewhere)
-	_ = isLevelByElsewhere
-
-	// Virtual field
-	_isReserved := bool(bool(bool(!(isBinaryBySerialInterface)) && bool(!(isBinaryByElsewhere))) && bool(!(isLevelBySerialInterface))) && bool(!(isLevelByElsewhere))
-	isReserved := bool(_isReserved)
-	_ = isReserved
+	if closeErr := readBuffer.CloseContext("coding"); closeErr != nil {
+		return nil, errors.Wrap(closeErr, "Error closing for coding")
+	}
 
 	// Simple Field (application)
 	if pullErr := readBuffer.PullContext("application"); pullErr != nil {
@@ -267,11 +245,63 @@ func CALDataStatusExtendedParse(readBuffer utils.ReadBuffer, requestContext Requ
 		return nil, errors.Wrap(_blockStartErr, "Error parsing 'blockStart' field of CALDataStatusExtended")
 	}
 	blockStart := _blockStart
-	// Byte Array field (data)
-	numberOfBytesdata := int(uint16(commandTypeContainer.NumBytes()) - uint16(uint16(2)))
-	data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata)
-	if _readArrayErr != nil {
-		return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of CALDataStatusExtended")
+
+	// Virtual field
+	_numberOfStatusBytes := utils.InlineIf((bool(bool((coding) == (StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE))) || bool(bool((coding) == (StatusCoding_BINARY_BY_ELSEWHERE)))), func() interface{} { return uint8((uint8(commandTypeContainer.NumBytes()) - uint8(uint8(3)))) }, func() interface{} { return uint8((uint8(0))) }).(uint8)
+	numberOfStatusBytes := uint8(_numberOfStatusBytes)
+	_ = numberOfStatusBytes
+
+	// Virtual field
+	_numberOfLevelInformation := utils.InlineIf((bool(bool((coding) == (StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE))) || bool(bool((coding) == (StatusCoding_LEVEL_BY_ELSEWHERE)))), func() interface{} {
+		return uint8((uint8((uint8(commandTypeContainer.NumBytes()) - uint8(uint8(3)))) / uint8(uint8(2))))
+	}, func() interface{} { return uint8((uint8(0))) }).(uint8)
+	numberOfLevelInformation := uint8(_numberOfLevelInformation)
+	_ = numberOfLevelInformation
+
+	// Array field (statusBytes)
+	if pullErr := readBuffer.PullContext("statusBytes", utils.WithRenderAsList(true)); pullErr != nil {
+		return nil, errors.Wrap(pullErr, "Error pulling for statusBytes")
+	}
+	// Count array
+	statusBytes := make([]StatusByte, numberOfStatusBytes)
+	// This happens when the size is set conditional to 0
+	if len(statusBytes) == 0 {
+		statusBytes = nil
+	}
+	{
+		for curItem := uint16(0); curItem < uint16(numberOfStatusBytes); curItem++ {
+			_item, _err := StatusByteParse(readBuffer)
+			if _err != nil {
+				return nil, errors.Wrap(_err, "Error parsing 'statusBytes' field of CALDataStatusExtended")
+			}
+			statusBytes[curItem] = _item.(StatusByte)
+		}
+	}
+	if closeErr := readBuffer.CloseContext("statusBytes", utils.WithRenderAsList(true)); closeErr != nil {
+		return nil, errors.Wrap(closeErr, "Error closing for statusBytes")
+	}
+
+	// Array field (levelInformation)
+	if pullErr := readBuffer.PullContext("levelInformation", utils.WithRenderAsList(true)); pullErr != nil {
+		return nil, errors.Wrap(pullErr, "Error pulling for levelInformation")
+	}
+	// Count array
+	levelInformation := make([]LevelInformation, numberOfLevelInformation)
+	// This happens when the size is set conditional to 0
+	if len(levelInformation) == 0 {
+		levelInformation = nil
+	}
+	{
+		for curItem := uint16(0); curItem < uint16(numberOfLevelInformation); curItem++ {
+			_item, _err := LevelInformationParse(readBuffer)
+			if _err != nil {
+				return nil, errors.Wrap(_err, "Error parsing 'levelInformation' field of CALDataStatusExtended")
+			}
+			levelInformation[curItem] = _item.(LevelInformation)
+		}
+	}
+	if closeErr := readBuffer.CloseContext("levelInformation", utils.WithRenderAsList(true)); closeErr != nil {
+		return nil, errors.Wrap(closeErr, "Error closing for levelInformation")
 	}
 
 	if closeErr := readBuffer.CloseContext("CALDataStatusExtended"); closeErr != nil {
@@ -280,10 +310,11 @@ func CALDataStatusExtendedParse(readBuffer utils.ReadBuffer, requestContext Requ
 
 	// Create a partially initialized instance
 	_child := &_CALDataStatusExtended{
-		Coding:      coding,
-		Application: application,
-		BlockStart:  blockStart,
-		Data:        data,
+		Coding:           coding,
+		Application:      application,
+		BlockStart:       blockStart,
+		StatusBytes:      statusBytes,
+		LevelInformation: levelInformation,
 		_CALData: &_CALData{
 			RequestContext: requestContext,
 		},
@@ -301,30 +332,15 @@ func (m *_CALDataStatusExtended) Serialize(writeBuffer utils.WriteBuffer) error
 		}
 
 		// Simple Field (coding)
-		coding := uint8(m.GetCoding())
-		_codingErr := writeBuffer.WriteUint8("coding", 8, (coding))
-		if _codingErr != nil {
-			return errors.Wrap(_codingErr, "Error serializing 'coding' field")
-		}
-		// Virtual field
-		if _isBinaryBySerialInterfaceErr := writeBuffer.WriteVirtual("isBinaryBySerialInterface", m.GetIsBinaryBySerialInterface()); _isBinaryBySerialInterfaceErr != nil {
-			return errors.Wrap(_isBinaryBySerialInterfaceErr, "Error serializing 'isBinaryBySerialInterface' field")
+		if pushErr := writeBuffer.PushContext("coding"); pushErr != nil {
+			return errors.Wrap(pushErr, "Error pushing for coding")
 		}
-		// Virtual field
-		if _isBinaryByElsewhereErr := writeBuffer.WriteVirtual("isBinaryByElsewhere", m.GetIsBinaryByElsewhere()); _isBinaryByElsewhereErr != nil {
-			return errors.Wrap(_isBinaryByElsewhereErr, "Error serializing 'isBinaryByElsewhere' field")
-		}
-		// Virtual field
-		if _isLevelBySerialInterfaceErr := writeBuffer.WriteVirtual("isLevelBySerialInterface", m.GetIsLevelBySerialInterface()); _isLevelBySerialInterfaceErr != nil {
-			return errors.Wrap(_isLevelBySerialInterfaceErr, "Error serializing 'isLevelBySerialInterface' field")
-		}
-		// Virtual field
-		if _isLevelByElsewhereErr := writeBuffer.WriteVirtual("isLevelByElsewhere", m.GetIsLevelByElsewhere()); _isLevelByElsewhereErr != nil {
-			return errors.Wrap(_isLevelByElsewhereErr, "Error serializing 'isLevelByElsewhere' field")
+		_codingErr := writeBuffer.WriteSerializable(m.GetCoding())
+		if popErr := writeBuffer.PopContext("coding"); popErr != nil {
+			return errors.Wrap(popErr, "Error popping for coding")
 		}
-		// Virtual field
-		if _isReservedErr := writeBuffer.WriteVirtual("isReserved", m.GetIsReserved()); _isReservedErr != nil {
-			return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field")
+		if _codingErr != nil {
+			return errors.Wrap(_codingErr, "Error serializing 'coding' field")
 		}
 
 		// Simple Field (application)
@@ -345,11 +361,41 @@ func (m *_CALDataStatusExtended) Serialize(writeBuffer utils.WriteBuffer) error
 		if _blockStartErr != nil {
 			return errors.Wrap(_blockStartErr, "Error serializing 'blockStart' field")
 		}
+		// Virtual field
+		if _numberOfStatusBytesErr := writeBuffer.WriteVirtual("numberOfStatusBytes", m.GetNumberOfStatusBytes()); _numberOfStatusBytesErr != nil {
+			return errors.Wrap(_numberOfStatusBytesErr, "Error serializing 'numberOfStatusBytes' field")
+		}
+		// Virtual field
+		if _numberOfLevelInformationErr := writeBuffer.WriteVirtual("numberOfLevelInformation", m.GetNumberOfLevelInformation()); _numberOfLevelInformationErr != nil {
+			return errors.Wrap(_numberOfLevelInformationErr, "Error serializing 'numberOfLevelInformation' field")
+		}
 
-		// Array Field (data)
-		// Byte Array field (data)
-		if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil {
-			return errors.Wrap(err, "Error serializing 'data' field")
+		// Array Field (statusBytes)
+		if pushErr := writeBuffer.PushContext("statusBytes", utils.WithRenderAsList(true)); pushErr != nil {
+			return errors.Wrap(pushErr, "Error pushing for statusBytes")
+		}
+		for _, _element := range m.GetStatusBytes() {
+			_elementErr := writeBuffer.WriteSerializable(_element)
+			if _elementErr != nil {
+				return errors.Wrap(_elementErr, "Error serializing 'statusBytes' field")
+			}
+		}
+		if popErr := writeBuffer.PopContext("statusBytes", utils.WithRenderAsList(true)); popErr != nil {
+			return errors.Wrap(popErr, "Error popping for statusBytes")
+		}
+
+		// Array Field (levelInformation)
+		if pushErr := writeBuffer.PushContext("levelInformation", utils.WithRenderAsList(true)); pushErr != nil {
+			return errors.Wrap(pushErr, "Error pushing for levelInformation")
+		}
+		for _, _element := range m.GetLevelInformation() {
+			_elementErr := writeBuffer.WriteSerializable(_element)
+			if _elementErr != nil {
+				return errors.Wrap(_elementErr, "Error serializing 'levelInformation' field")
+			}
+		}
+		if popErr := writeBuffer.PopContext("levelInformation", utils.WithRenderAsList(true)); popErr != nil {
+			return errors.Wrap(popErr, "Error popping for levelInformation")
 		}
 
 		if popErr := writeBuffer.PopContext("CALDataStatusExtended"); popErr != nil {
diff --git a/plc4go/protocols/cbus/readwrite/model/EncodedReply.go b/plc4go/protocols/cbus/readwrite/model/EncodedReply.go
index 3a529df1e..74ff28eac 100644
--- a/plc4go/protocols/cbus/readwrite/model/EncodedReply.go
+++ b/plc4go/protocols/cbus/readwrite/model/EncodedReply.go
@@ -34,12 +34,6 @@ type EncodedReply interface {
 	GetPeekedByte() byte
 	// GetIsMonitoredSAL returns IsMonitoredSAL (virtual field)
 	GetIsMonitoredSAL() bool
-	// GetIsCalCommand returns IsCalCommand (virtual field)
-	GetIsCalCommand() bool
-	// GetIsStandardFormatStatus returns IsStandardFormatStatus (virtual field)
-	GetIsStandardFormatStatus() bool
-	// GetIsExtendedFormatStatus returns IsExtendedFormatStatus (virtual field)
-	GetIsExtendedFormatStatus() bool
 }
 
 // EncodedReplyExactly can be used when we want exactly this type and not a type which fulfills EncodedReply.
@@ -98,19 +92,7 @@ func (m *_EncodedReply) GetPeekedByte() byte {
 ///////////////////////
 
 func (m *_EncodedReply) GetIsMonitoredSAL() bool {
-	return bool(bool(bool(bool((m.GetPeekedByte()&0x3F) == (0x05))) || bool(bool((m.GetPeekedByte()) == (0x00)))) || bool(bool((m.GetPeekedByte()&0xF8) == (0x00))))
-}
-
-func (m *_EncodedReply) GetIsCalCommand() bool {
-	return bool(bool(bool((m.GetPeekedByte()&0x3F) == (0x06))) || bool(m.RequestContext.GetSendCalCommandBefore()))
-}
-
-func (m *_EncodedReply) GetIsStandardFormatStatus() bool {
-	return bool(bool(bool((m.GetPeekedByte()&0xC0) == (0xC0))) && bool(!(m.CBusOptions.GetExstat())))
-}
-
-func (m *_EncodedReply) GetIsExtendedFormatStatus() bool {
-	return bool(bool(bool((m.GetPeekedByte()&0xE0) == (0xE0))) && bool((bool(m.CBusOptions.GetExstat()) || bool(m.RequestContext.GetSendStatusRequestLevelBefore()))))
+	return bool(bool((bool(bool(bool((m.GetPeekedByte()&0x3F) == (0x05))) || bool(bool((m.GetPeekedByte()) == (0x00)))) || bool(bool((m.GetPeekedByte()&0xF8) == (0x00))))) && bool(!(m.RequestContext.GetSendIdentifyRequestBefore())))
 }
 
 ///////////////////////
@@ -143,12 +125,6 @@ func (m *_EncodedReply) GetParentLengthInBits() uint16 {
 
 	// 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.
-
-	// A virtual field doesn't have any in- or output.
-
 	return lengthInBits
 }
 
@@ -175,25 +151,10 @@ func EncodedReplyParse(readBuffer utils.ReadBuffer, cBusOptions CBusOptions, req
 	readBuffer.Reset(currentPos)
 
 	// Virtual field
-	_isMonitoredSAL := bool(bool(bool((peekedByte&0x3F) == (0x05))) || bool(bool((peekedByte) == (0x00)))) || bool(bool((peekedByte&0xF8) == (0x00)))
+	_isMonitoredSAL := bool((bool(bool(bool((peekedByte&0x3F) == (0x05))) || bool(bool((peekedByte) == (0x00)))) || bool(bool((peekedByte&0xF8) == (0x00))))) && bool(!(requestContext.GetSendIdentifyRequestBefore()))
 	isMonitoredSAL := bool(_isMonitoredSAL)
 	_ = isMonitoredSAL
 
-	// Virtual field
-	_isCalCommand := bool(bool((peekedByte&0x3F) == (0x06))) || bool(requestContext.GetSendCalCommandBefore())
-	isCalCommand := bool(_isCalCommand)
-	_ = isCalCommand
-
-	// Virtual field
-	_isStandardFormatStatus := bool(bool((peekedByte&0xC0) == (0xC0))) && bool(!(cBusOptions.GetExstat()))
-	isStandardFormatStatus := bool(_isStandardFormatStatus)
-	_ = isStandardFormatStatus
-
-	// Virtual field
-	_isExtendedFormatStatus := bool(bool((peekedByte&0xE0) == (0xE0))) && bool((bool(cBusOptions.GetExstat()) || bool(requestContext.GetSendStatusRequestLevelBefore())))
-	isExtendedFormatStatus := bool(_isExtendedFormatStatus)
-	_ = isExtendedFormatStatus
-
 	// Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
 	type EncodedReplyChildSerializeRequirement interface {
 		EncodedReply
@@ -204,16 +165,12 @@ func EncodedReplyParse(readBuffer utils.ReadBuffer, cBusOptions CBusOptions, req
 	var _child EncodedReplyChildSerializeRequirement
 	var typeSwitchError error
 	switch {
-	case isMonitoredSAL == bool(true) && isCalCommand == bool(false) && isStandardFormatStatus == bool(false): // MonitoredSALReply
+	case isMonitoredSAL == bool(true): // MonitoredSALReply
 		_childTemp, typeSwitchError = MonitoredSALReplyParse(readBuffer, cBusOptions, requestContext)
-	case 0 == 0 && 1 == 1 && isStandardFormatStatus == bool(true) && isExtendedFormatStatus == bool(false): // EncodedReplyStandardFormatStatusReply
-		_childTemp, typeSwitchError = EncodedReplyStandardFormatStatusReplyParse(readBuffer, cBusOptions, requestContext)
-	case 0 == 0 && 1 == 1 && 2 == 2 && isExtendedFormatStatus == bool(true): // EncodedReplyExtendedFormatStatusReply
-		_childTemp, typeSwitchError = EncodedReplyExtendedFormatStatusReplyParse(readBuffer, cBusOptions, requestContext)
-	case 0 == 0 && isCalCommand == bool(true) && 2 == 2 && 3 == 3: // EncodedReplyCALReply
+	case 0 == 0: // EncodedReplyCALReply
 		_childTemp, typeSwitchError = EncodedReplyCALReplyParse(readBuffer, cBusOptions, requestContext)
 	default:
-		typeSwitchError = errors.Errorf("Unmapped type for parameters [isMonitoredSAL=%v, isCalCommand=%v, isStandardFormatStatus=%v, isExtendedFormatStatus=%v]", isMonitoredSAL, isCalCommand, isStandardFormatStatus, isExtendedFormatStatus)
+		typeSwitchError = errors.Errorf("Unmapped type for parameters [isMonitoredSAL=%v]", isMonitoredSAL)
 	}
 	if typeSwitchError != nil {
 		return nil, errors.Wrap(typeSwitchError, "Error parsing sub-type for type-switch of EncodedReply")
@@ -242,18 +199,6 @@ func (pm *_EncodedReply) SerializeParent(writeBuffer utils.WriteBuffer, child En
 	if _isMonitoredSALErr := writeBuffer.WriteVirtual("isMonitoredSAL", m.GetIsMonitoredSAL()); _isMonitoredSALErr != nil {
 		return errors.Wrap(_isMonitoredSALErr, "Error serializing 'isMonitoredSAL' field")
 	}
-	// Virtual field
-	if _isCalCommandErr := writeBuffer.WriteVirtual("isCalCommand", m.GetIsCalCommand()); _isCalCommandErr != nil {
-		return errors.Wrap(_isCalCommandErr, "Error serializing 'isCalCommand' field")
-	}
-	// Virtual field
-	if _isStandardFormatStatusErr := writeBuffer.WriteVirtual("isStandardFormatStatus", m.GetIsStandardFormatStatus()); _isStandardFormatStatusErr != nil {
-		return errors.Wrap(_isStandardFormatStatusErr, "Error serializing 'isStandardFormatStatus' field")
-	}
-	// Virtual field
-	if _isExtendedFormatStatusErr := writeBuffer.WriteVirtual("isExtendedFormatStatus", m.GetIsExtendedFormatStatus()); _isExtendedFormatStatusErr != nil {
-		return errors.Wrap(_isExtendedFormatStatusErr, "Error serializing 'isExtendedFormatStatus' field")
-	}
 
 	// Switch field (Depending on the discriminator values, passes the serialization to a sub-type)
 	if _typeSwitchErr := serializeChildFunction(); _typeSwitchErr != nil {
diff --git a/plc4go/protocols/cbus/readwrite/model/EncodedReplyExtendedFormatStatusReply.go b/plc4go/protocols/cbus/readwrite/model/EncodedReplyExtendedFormatStatusReply.go
deleted file mode 100644
index bac1c7107..000000000
--- a/plc4go/protocols/cbus/readwrite/model/EncodedReplyExtendedFormatStatusReply.go
+++ /dev/null
@@ -1,204 +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
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-	"github.com/pkg/errors"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// EncodedReplyExtendedFormatStatusReply is the corresponding interface of EncodedReplyExtendedFormatStatusReply
-type EncodedReplyExtendedFormatStatusReply interface {
-	utils.LengthAware
-	utils.Serializable
-	EncodedReply
-	// GetReply returns Reply (property field)
-	GetReply() ExtendedFormatStatusReply
-}
-
-// EncodedReplyExtendedFormatStatusReplyExactly can be used when we want exactly this type and not a type which fulfills EncodedReplyExtendedFormatStatusReply.
-// This is useful for switch cases.
-type EncodedReplyExtendedFormatStatusReplyExactly interface {
-	EncodedReplyExtendedFormatStatusReply
-	isEncodedReplyExtendedFormatStatusReply() bool
-}
-
-// _EncodedReplyExtendedFormatStatusReply is the data-structure of this message
-type _EncodedReplyExtendedFormatStatusReply struct {
-	*_EncodedReply
-	Reply ExtendedFormatStatusReply
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *_EncodedReplyExtendedFormatStatusReply) InitializeParent(parent EncodedReply, peekedByte byte) {
-	m.PeekedByte = peekedByte
-}
-
-func (m *_EncodedReplyExtendedFormatStatusReply) GetParent() EncodedReply {
-	return m._EncodedReply
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for property fields.
-///////////////////////
-
-func (m *_EncodedReplyExtendedFormatStatusReply) GetReply() ExtendedFormatStatusReply {
-	return m.Reply
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-// NewEncodedReplyExtendedFormatStatusReply factory function for _EncodedReplyExtendedFormatStatusReply
-func NewEncodedReplyExtendedFormatStatusReply(reply ExtendedFormatStatusReply, peekedByte byte, cBusOptions CBusOptions, requestContext RequestContext) *_EncodedReplyExtendedFormatStatusReply {
-	_result := &_EncodedReplyExtendedFormatStatusReply{
-		Reply:         reply,
-		_EncodedReply: NewEncodedReply(peekedByte, cBusOptions, requestContext),
-	}
-	_result._EncodedReply._EncodedReplyChildRequirements = _result
-	return _result
-}
-
-// Deprecated: use the interface for direct cast
-func CastEncodedReplyExtendedFormatStatusReply(structType interface{}) EncodedReplyExtendedFormatStatusReply {
-	if casted, ok := structType.(EncodedReplyExtendedFormatStatusReply); ok {
-		return casted
-	}
-	if casted, ok := structType.(*EncodedReplyExtendedFormatStatusReply); ok {
-		return *casted
-	}
-	return nil
-}
-
-func (m *_EncodedReplyExtendedFormatStatusReply) GetTypeName() string {
-	return "EncodedReplyExtendedFormatStatusReply"
-}
-
-func (m *_EncodedReplyExtendedFormatStatusReply) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *_EncodedReplyExtendedFormatStatusReply) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	// Simple field (reply)
-	lengthInBits += m.Reply.GetLengthInBits()
-
-	return lengthInBits
-}
-
-func (m *_EncodedReplyExtendedFormatStatusReply) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func EncodedReplyExtendedFormatStatusReplyParse(readBuffer utils.ReadBuffer, cBusOptions CBusOptions, requestContext RequestContext) (EncodedReplyExtendedFormatStatusReply, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("EncodedReplyExtendedFormatStatusReply"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for EncodedReplyExtendedFormatStatusReply")
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Simple Field (reply)
-	if pullErr := readBuffer.PullContext("reply"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for reply")
-	}
-	_reply, _replyErr := ExtendedFormatStatusReplyParse(readBuffer)
-	if _replyErr != nil {
-		return nil, errors.Wrap(_replyErr, "Error parsing 'reply' field of EncodedReplyExtendedFormatStatusReply")
-	}
-	reply := _reply.(ExtendedFormatStatusReply)
-	if closeErr := readBuffer.CloseContext("reply"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for reply")
-	}
-
-	if closeErr := readBuffer.CloseContext("EncodedReplyExtendedFormatStatusReply"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for EncodedReplyExtendedFormatStatusReply")
-	}
-
-	// Create a partially initialized instance
-	_child := &_EncodedReplyExtendedFormatStatusReply{
-		Reply: reply,
-		_EncodedReply: &_EncodedReply{
-			CBusOptions:    cBusOptions,
-			RequestContext: requestContext,
-		},
-	}
-	_child._EncodedReply._EncodedReplyChildRequirements = _child
-	return _child, nil
-}
-
-func (m *_EncodedReplyExtendedFormatStatusReply) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("EncodedReplyExtendedFormatStatusReply"); pushErr != nil {
-			return errors.Wrap(pushErr, "Error pushing for EncodedReplyExtendedFormatStatusReply")
-		}
-
-		// Simple Field (reply)
-		if pushErr := writeBuffer.PushContext("reply"); pushErr != nil {
-			return errors.Wrap(pushErr, "Error pushing for reply")
-		}
-		_replyErr := writeBuffer.WriteSerializable(m.GetReply())
-		if popErr := writeBuffer.PopContext("reply"); popErr != nil {
-			return errors.Wrap(popErr, "Error popping for reply")
-		}
-		if _replyErr != nil {
-			return errors.Wrap(_replyErr, "Error serializing 'reply' field")
-		}
-
-		if popErr := writeBuffer.PopContext("EncodedReplyExtendedFormatStatusReply"); popErr != nil {
-			return errors.Wrap(popErr, "Error popping for EncodedReplyExtendedFormatStatusReply")
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *_EncodedReplyExtendedFormatStatusReply) isEncodedReplyExtendedFormatStatusReply() bool {
-	return true
-}
-
-func (m *_EncodedReplyExtendedFormatStatusReply) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := writeBuffer.WriteSerializable(m); err != nil {
-		return err.Error()
-	}
-	return writeBuffer.GetBox().String()
-}
diff --git a/plc4go/protocols/cbus/readwrite/model/EncodedReplyStandardFormatStatusReply.go b/plc4go/protocols/cbus/readwrite/model/EncodedReplyStandardFormatStatusReply.go
deleted file mode 100644
index 303c836b3..000000000
--- a/plc4go/protocols/cbus/readwrite/model/EncodedReplyStandardFormatStatusReply.go
+++ /dev/null
@@ -1,204 +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
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-	"github.com/pkg/errors"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// EncodedReplyStandardFormatStatusReply is the corresponding interface of EncodedReplyStandardFormatStatusReply
-type EncodedReplyStandardFormatStatusReply interface {
-	utils.LengthAware
-	utils.Serializable
-	EncodedReply
-	// GetReply returns Reply (property field)
-	GetReply() StandardFormatStatusReply
-}
-
-// EncodedReplyStandardFormatStatusReplyExactly can be used when we want exactly this type and not a type which fulfills EncodedReplyStandardFormatStatusReply.
-// This is useful for switch cases.
-type EncodedReplyStandardFormatStatusReplyExactly interface {
-	EncodedReplyStandardFormatStatusReply
-	isEncodedReplyStandardFormatStatusReply() bool
-}
-
-// _EncodedReplyStandardFormatStatusReply is the data-structure of this message
-type _EncodedReplyStandardFormatStatusReply struct {
-	*_EncodedReply
-	Reply StandardFormatStatusReply
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for discriminator values.
-///////////////////////
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-func (m *_EncodedReplyStandardFormatStatusReply) InitializeParent(parent EncodedReply, peekedByte byte) {
-	m.PeekedByte = peekedByte
-}
-
-func (m *_EncodedReplyStandardFormatStatusReply) GetParent() EncodedReply {
-	return m._EncodedReply
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for property fields.
-///////////////////////
-
-func (m *_EncodedReplyStandardFormatStatusReply) GetReply() StandardFormatStatusReply {
-	return m.Reply
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-// NewEncodedReplyStandardFormatStatusReply factory function for _EncodedReplyStandardFormatStatusReply
-func NewEncodedReplyStandardFormatStatusReply(reply StandardFormatStatusReply, peekedByte byte, cBusOptions CBusOptions, requestContext RequestContext) *_EncodedReplyStandardFormatStatusReply {
-	_result := &_EncodedReplyStandardFormatStatusReply{
-		Reply:         reply,
-		_EncodedReply: NewEncodedReply(peekedByte, cBusOptions, requestContext),
-	}
-	_result._EncodedReply._EncodedReplyChildRequirements = _result
-	return _result
-}
-
-// Deprecated: use the interface for direct cast
-func CastEncodedReplyStandardFormatStatusReply(structType interface{}) EncodedReplyStandardFormatStatusReply {
-	if casted, ok := structType.(EncodedReplyStandardFormatStatusReply); ok {
-		return casted
-	}
-	if casted, ok := structType.(*EncodedReplyStandardFormatStatusReply); ok {
-		return *casted
-	}
-	return nil
-}
-
-func (m *_EncodedReplyStandardFormatStatusReply) GetTypeName() string {
-	return "EncodedReplyStandardFormatStatusReply"
-}
-
-func (m *_EncodedReplyStandardFormatStatusReply) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *_EncodedReplyStandardFormatStatusReply) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(m.GetParentLengthInBits())
-
-	// Simple field (reply)
-	lengthInBits += m.Reply.GetLengthInBits()
-
-	return lengthInBits
-}
-
-func (m *_EncodedReplyStandardFormatStatusReply) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func EncodedReplyStandardFormatStatusReplyParse(readBuffer utils.ReadBuffer, cBusOptions CBusOptions, requestContext RequestContext) (EncodedReplyStandardFormatStatusReply, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("EncodedReplyStandardFormatStatusReply"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for EncodedReplyStandardFormatStatusReply")
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Simple Field (reply)
-	if pullErr := readBuffer.PullContext("reply"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for reply")
-	}
-	_reply, _replyErr := StandardFormatStatusReplyParse(readBuffer)
-	if _replyErr != nil {
-		return nil, errors.Wrap(_replyErr, "Error parsing 'reply' field of EncodedReplyStandardFormatStatusReply")
-	}
-	reply := _reply.(StandardFormatStatusReply)
-	if closeErr := readBuffer.CloseContext("reply"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for reply")
-	}
-
-	if closeErr := readBuffer.CloseContext("EncodedReplyStandardFormatStatusReply"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for EncodedReplyStandardFormatStatusReply")
-	}
-
-	// Create a partially initialized instance
-	_child := &_EncodedReplyStandardFormatStatusReply{
-		Reply: reply,
-		_EncodedReply: &_EncodedReply{
-			CBusOptions:    cBusOptions,
-			RequestContext: requestContext,
-		},
-	}
-	_child._EncodedReply._EncodedReplyChildRequirements = _child
-	return _child, nil
-}
-
-func (m *_EncodedReplyStandardFormatStatusReply) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	ser := func() error {
-		if pushErr := writeBuffer.PushContext("EncodedReplyStandardFormatStatusReply"); pushErr != nil {
-			return errors.Wrap(pushErr, "Error pushing for EncodedReplyStandardFormatStatusReply")
-		}
-
-		// Simple Field (reply)
-		if pushErr := writeBuffer.PushContext("reply"); pushErr != nil {
-			return errors.Wrap(pushErr, "Error pushing for reply")
-		}
-		_replyErr := writeBuffer.WriteSerializable(m.GetReply())
-		if popErr := writeBuffer.PopContext("reply"); popErr != nil {
-			return errors.Wrap(popErr, "Error popping for reply")
-		}
-		if _replyErr != nil {
-			return errors.Wrap(_replyErr, "Error serializing 'reply' field")
-		}
-
-		if popErr := writeBuffer.PopContext("EncodedReplyStandardFormatStatusReply"); popErr != nil {
-			return errors.Wrap(popErr, "Error popping for EncodedReplyStandardFormatStatusReply")
-		}
-		return nil
-	}
-	return m.SerializeParent(writeBuffer, m, ser)
-}
-
-func (m *_EncodedReplyStandardFormatStatusReply) isEncodedReplyStandardFormatStatusReply() bool {
-	return true
-}
-
-func (m *_EncodedReplyStandardFormatStatusReply) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := writeBuffer.WriteSerializable(m); err != nil {
-		return err.Error()
-	}
-	return writeBuffer.GetBox().String()
-}
diff --git a/plc4go/protocols/cbus/readwrite/model/ExtendedFormatStatusReply.go b/plc4go/protocols/cbus/readwrite/model/ExtendedFormatStatusReply.go
deleted file mode 100644
index 1a8df7e66..000000000
--- a/plc4go/protocols/cbus/readwrite/model/ExtendedFormatStatusReply.go
+++ /dev/null
@@ -1,415 +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
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-	"github.com/pkg/errors"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// ExtendedFormatStatusReply is the corresponding interface of ExtendedFormatStatusReply
-type ExtendedFormatStatusReply interface {
-	utils.LengthAware
-	utils.Serializable
-	// GetStatusHeader returns StatusHeader (property field)
-	GetStatusHeader() ExtendedStatusHeader
-	// GetCoding returns Coding (property field)
-	GetCoding() StatusCoding
-	// GetApplication returns Application (property field)
-	GetApplication() ApplicationIdContainer
-	// GetBlockStart returns BlockStart (property field)
-	GetBlockStart() uint8
-	// GetStatusBytes returns StatusBytes (property field)
-	GetStatusBytes() []StatusByte
-	// GetLevelInformation returns LevelInformation (property field)
-	GetLevelInformation() []LevelInformation
-	// GetNumberOfStatusBytes returns NumberOfStatusBytes (virtual field)
-	GetNumberOfStatusBytes() uint8
-	// GetNumberOfLevelInformation returns NumberOfLevelInformation (virtual field)
-	GetNumberOfLevelInformation() uint8
-}
-
-// ExtendedFormatStatusReplyExactly can be used when we want exactly this type and not a type which fulfills ExtendedFormatStatusReply.
-// This is useful for switch cases.
-type ExtendedFormatStatusReplyExactly interface {
-	ExtendedFormatStatusReply
-	isExtendedFormatStatusReply() bool
-}
-
-// _ExtendedFormatStatusReply is the data-structure of this message
-type _ExtendedFormatStatusReply struct {
-	StatusHeader     ExtendedStatusHeader
-	Coding           StatusCoding
-	Application      ApplicationIdContainer
-	BlockStart       uint8
-	StatusBytes      []StatusByte
-	LevelInformation []LevelInformation
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for property fields.
-///////////////////////
-
-func (m *_ExtendedFormatStatusReply) GetStatusHeader() ExtendedStatusHeader {
-	return m.StatusHeader
-}
-
-func (m *_ExtendedFormatStatusReply) GetCoding() StatusCoding {
-	return m.Coding
-}
-
-func (m *_ExtendedFormatStatusReply) GetApplication() ApplicationIdContainer {
-	return m.Application
-}
-
-func (m *_ExtendedFormatStatusReply) GetBlockStart() uint8 {
-	return m.BlockStart
-}
-
-func (m *_ExtendedFormatStatusReply) GetStatusBytes() []StatusByte {
-	return m.StatusBytes
-}
-
-func (m *_ExtendedFormatStatusReply) GetLevelInformation() []LevelInformation {
-	return m.LevelInformation
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for virtual fields.
-///////////////////////
-
-func (m *_ExtendedFormatStatusReply) GetNumberOfStatusBytes() uint8 {
-	return uint8(utils.InlineIf((bool(bool((m.GetCoding()) == (StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE))) || bool(bool((m.GetCoding()) == (StatusCoding_BINARY_BY_ELSEWHERE)))), func() interface{} {
-		return uint8((uint8(m.GetStatusHeader().GetNumberOfCharacterPairs()) - uint8(uint8(3))))
-	}, func() interface{} { return uint8((uint8(0))) }).(uint8))
-}
-
-func (m *_ExtendedFormatStatusReply) GetNumberOfLevelInformation() uint8 {
-	return uint8(utils.InlineIf((bool(bool((m.GetCoding()) == (StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE))) || bool(bool((m.GetCoding()) == (StatusCoding_LEVEL_BY_ELSEWHERE)))), func() interface{} {
-		return uint8((uint8((uint8(m.GetStatusHeader().GetNumberOfCharacterPairs()) - uint8(uint8(3)))) / uint8(uint8(2))))
-	}, func() interface{} { return uint8((uint8(0))) }).(uint8))
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-// NewExtendedFormatStatusReply factory function for _ExtendedFormatStatusReply
-func NewExtendedFormatStatusReply(statusHeader ExtendedStatusHeader, coding StatusCoding, application ApplicationIdContainer, blockStart uint8, statusBytes []StatusByte, levelInformation []LevelInformation) *_ExtendedFormatStatusReply {
-	return &_ExtendedFormatStatusReply{StatusHeader: statusHeader, Coding: coding, Application: application, BlockStart: blockStart, StatusBytes: statusBytes, LevelInformation: levelInformation}
-}
-
-// Deprecated: use the interface for direct cast
-func CastExtendedFormatStatusReply(structType interface{}) ExtendedFormatStatusReply {
-	if casted, ok := structType.(ExtendedFormatStatusReply); ok {
-		return casted
-	}
-	if casted, ok := structType.(*ExtendedFormatStatusReply); ok {
-		return *casted
-	}
-	return nil
-}
-
-func (m *_ExtendedFormatStatusReply) GetTypeName() string {
-	return "ExtendedFormatStatusReply"
-}
-
-func (m *_ExtendedFormatStatusReply) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *_ExtendedFormatStatusReply) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(0)
-
-	// Simple field (statusHeader)
-	lengthInBits += m.StatusHeader.GetLengthInBits()
-
-	// Simple field (coding)
-	lengthInBits += 8
-
-	// Simple field (application)
-	lengthInBits += 8
-
-	// Simple field (blockStart)
-	lengthInBits += 8
-
-	// A virtual field doesn't have any in- or output.
-
-	// A virtual field doesn't have any in- or output.
-
-	// Array field
-	if len(m.StatusBytes) > 0 {
-		for i, element := range m.StatusBytes {
-			last := i == len(m.StatusBytes)-1
-			lengthInBits += element.(interface{ GetLengthInBitsConditional(bool) uint16 }).GetLengthInBitsConditional(last)
-		}
-	}
-
-	// Array field
-	if len(m.LevelInformation) > 0 {
-		for i, element := range m.LevelInformation {
-			last := i == len(m.LevelInformation)-1
-			lengthInBits += element.(interface{ GetLengthInBitsConditional(bool) uint16 }).GetLengthInBitsConditional(last)
-		}
-	}
-
-	return lengthInBits
-}
-
-func (m *_ExtendedFormatStatusReply) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func ExtendedFormatStatusReplyParse(readBuffer utils.ReadBuffer) (ExtendedFormatStatusReply, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("ExtendedFormatStatusReply"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for ExtendedFormatStatusReply")
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Simple Field (statusHeader)
-	if pullErr := readBuffer.PullContext("statusHeader"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for statusHeader")
-	}
-	_statusHeader, _statusHeaderErr := ExtendedStatusHeaderParse(readBuffer)
-	if _statusHeaderErr != nil {
-		return nil, errors.Wrap(_statusHeaderErr, "Error parsing 'statusHeader' field of ExtendedFormatStatusReply")
-	}
-	statusHeader := _statusHeader.(ExtendedStatusHeader)
-	if closeErr := readBuffer.CloseContext("statusHeader"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for statusHeader")
-	}
-
-	// Simple Field (coding)
-	if pullErr := readBuffer.PullContext("coding"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for coding")
-	}
-	_coding, _codingErr := StatusCodingParse(readBuffer)
-	if _codingErr != nil {
-		return nil, errors.Wrap(_codingErr, "Error parsing 'coding' field of ExtendedFormatStatusReply")
-	}
-	coding := _coding
-	if closeErr := readBuffer.CloseContext("coding"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for coding")
-	}
-
-	// Simple Field (application)
-	if pullErr := readBuffer.PullContext("application"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for application")
-	}
-	_application, _applicationErr := ApplicationIdContainerParse(readBuffer)
-	if _applicationErr != nil {
-		return nil, errors.Wrap(_applicationErr, "Error parsing 'application' field of ExtendedFormatStatusReply")
-	}
-	application := _application
-	if closeErr := readBuffer.CloseContext("application"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for application")
-	}
-
-	// Simple Field (blockStart)
-	_blockStart, _blockStartErr := readBuffer.ReadUint8("blockStart", 8)
-	if _blockStartErr != nil {
-		return nil, errors.Wrap(_blockStartErr, "Error parsing 'blockStart' field of ExtendedFormatStatusReply")
-	}
-	blockStart := _blockStart
-
-	// Virtual field
-	_numberOfStatusBytes := utils.InlineIf((bool(bool((coding) == (StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE))) || bool(bool((coding) == (StatusCoding_BINARY_BY_ELSEWHERE)))), func() interface{} { return uint8((uint8(statusHeader.GetNumberOfCharacterPairs()) - uint8(uint8(3)))) }, func() interface{} { return uint8((uint8(0))) }).(uint8)
-	numberOfStatusBytes := uint8(_numberOfStatusBytes)
-	_ = numberOfStatusBytes
-
-	// Virtual field
-	_numberOfLevelInformation := utils.InlineIf((bool(bool((coding) == (StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE))) || bool(bool((coding) == (StatusCoding_LEVEL_BY_ELSEWHERE)))), func() interface{} {
-		return uint8((uint8((uint8(statusHeader.GetNumberOfCharacterPairs()) - uint8(uint8(3)))) / uint8(uint8(2))))
-	}, func() interface{} { return uint8((uint8(0))) }).(uint8)
-	numberOfLevelInformation := uint8(_numberOfLevelInformation)
-	_ = numberOfLevelInformation
-
-	// Array field (statusBytes)
-	if pullErr := readBuffer.PullContext("statusBytes", utils.WithRenderAsList(true)); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for statusBytes")
-	}
-	// Count array
-	statusBytes := make([]StatusByte, numberOfStatusBytes)
-	// This happens when the size is set conditional to 0
-	if len(statusBytes) == 0 {
-		statusBytes = nil
-	}
-	{
-		for curItem := uint16(0); curItem < uint16(numberOfStatusBytes); curItem++ {
-			_item, _err := StatusByteParse(readBuffer)
-			if _err != nil {
-				return nil, errors.Wrap(_err, "Error parsing 'statusBytes' field of ExtendedFormatStatusReply")
-			}
-			statusBytes[curItem] = _item.(StatusByte)
-		}
-	}
-	if closeErr := readBuffer.CloseContext("statusBytes", utils.WithRenderAsList(true)); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for statusBytes")
-	}
-
-	// Array field (levelInformation)
-	if pullErr := readBuffer.PullContext("levelInformation", utils.WithRenderAsList(true)); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for levelInformation")
-	}
-	// Count array
-	levelInformation := make([]LevelInformation, numberOfLevelInformation)
-	// This happens when the size is set conditional to 0
-	if len(levelInformation) == 0 {
-		levelInformation = nil
-	}
-	{
-		for curItem := uint16(0); curItem < uint16(numberOfLevelInformation); curItem++ {
-			_item, _err := LevelInformationParse(readBuffer)
-			if _err != nil {
-				return nil, errors.Wrap(_err, "Error parsing 'levelInformation' field of ExtendedFormatStatusReply")
-			}
-			levelInformation[curItem] = _item.(LevelInformation)
-		}
-	}
-	if closeErr := readBuffer.CloseContext("levelInformation", utils.WithRenderAsList(true)); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for levelInformation")
-	}
-
-	if closeErr := readBuffer.CloseContext("ExtendedFormatStatusReply"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for ExtendedFormatStatusReply")
-	}
-
-	// Create the instance
-	return NewExtendedFormatStatusReply(statusHeader, coding, application, blockStart, statusBytes, levelInformation), nil
-}
-
-func (m *_ExtendedFormatStatusReply) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	if pushErr := writeBuffer.PushContext("ExtendedFormatStatusReply"); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for ExtendedFormatStatusReply")
-	}
-
-	// Simple Field (statusHeader)
-	if pushErr := writeBuffer.PushContext("statusHeader"); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for statusHeader")
-	}
-	_statusHeaderErr := writeBuffer.WriteSerializable(m.GetStatusHeader())
-	if popErr := writeBuffer.PopContext("statusHeader"); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for statusHeader")
-	}
-	if _statusHeaderErr != nil {
-		return errors.Wrap(_statusHeaderErr, "Error serializing 'statusHeader' field")
-	}
-
-	// Simple Field (coding)
-	if pushErr := writeBuffer.PushContext("coding"); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for coding")
-	}
-	_codingErr := writeBuffer.WriteSerializable(m.GetCoding())
-	if popErr := writeBuffer.PopContext("coding"); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for coding")
-	}
-	if _codingErr != nil {
-		return errors.Wrap(_codingErr, "Error serializing 'coding' field")
-	}
-
-	// Simple Field (application)
-	if pushErr := writeBuffer.PushContext("application"); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for application")
-	}
-	_applicationErr := writeBuffer.WriteSerializable(m.GetApplication())
-	if popErr := writeBuffer.PopContext("application"); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for application")
-	}
-	if _applicationErr != nil {
-		return errors.Wrap(_applicationErr, "Error serializing 'application' field")
-	}
-
-	// Simple Field (blockStart)
-	blockStart := uint8(m.GetBlockStart())
-	_blockStartErr := writeBuffer.WriteUint8("blockStart", 8, (blockStart))
-	if _blockStartErr != nil {
-		return errors.Wrap(_blockStartErr, "Error serializing 'blockStart' field")
-	}
-	// Virtual field
-	if _numberOfStatusBytesErr := writeBuffer.WriteVirtual("numberOfStatusBytes", m.GetNumberOfStatusBytes()); _numberOfStatusBytesErr != nil {
-		return errors.Wrap(_numberOfStatusBytesErr, "Error serializing 'numberOfStatusBytes' field")
-	}
-	// Virtual field
-	if _numberOfLevelInformationErr := writeBuffer.WriteVirtual("numberOfLevelInformation", m.GetNumberOfLevelInformation()); _numberOfLevelInformationErr != nil {
-		return errors.Wrap(_numberOfLevelInformationErr, "Error serializing 'numberOfLevelInformation' field")
-	}
-
-	// Array Field (statusBytes)
-	if pushErr := writeBuffer.PushContext("statusBytes", utils.WithRenderAsList(true)); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for statusBytes")
-	}
-	for _, _element := range m.GetStatusBytes() {
-		_elementErr := writeBuffer.WriteSerializable(_element)
-		if _elementErr != nil {
-			return errors.Wrap(_elementErr, "Error serializing 'statusBytes' field")
-		}
-	}
-	if popErr := writeBuffer.PopContext("statusBytes", utils.WithRenderAsList(true)); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for statusBytes")
-	}
-
-	// Array Field (levelInformation)
-	if pushErr := writeBuffer.PushContext("levelInformation", utils.WithRenderAsList(true)); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for levelInformation")
-	}
-	for _, _element := range m.GetLevelInformation() {
-		_elementErr := writeBuffer.WriteSerializable(_element)
-		if _elementErr != nil {
-			return errors.Wrap(_elementErr, "Error serializing 'levelInformation' field")
-		}
-	}
-	if popErr := writeBuffer.PopContext("levelInformation", utils.WithRenderAsList(true)); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for levelInformation")
-	}
-
-	if popErr := writeBuffer.PopContext("ExtendedFormatStatusReply"); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for ExtendedFormatStatusReply")
-	}
-	return nil
-}
-
-func (m *_ExtendedFormatStatusReply) isExtendedFormatStatusReply() bool {
-	return true
-}
-
-func (m *_ExtendedFormatStatusReply) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := writeBuffer.WriteSerializable(m); err != nil {
-		return err.Error()
-	}
-	return writeBuffer.GetBox().String()
-}
diff --git a/plc4go/protocols/cbus/readwrite/model/ExtendedStatusHeader.go b/plc4go/protocols/cbus/readwrite/model/ExtendedStatusHeader.go
deleted file mode 100644
index eaef5dbd3..000000000
--- a/plc4go/protocols/cbus/readwrite/model/ExtendedStatusHeader.go
+++ /dev/null
@@ -1,183 +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
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-	"github.com/pkg/errors"
-	"github.com/rs/zerolog/log"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// ExtendedStatusHeader is the corresponding interface of ExtendedStatusHeader
-type ExtendedStatusHeader interface {
-	utils.LengthAware
-	utils.Serializable
-	// GetNumberOfCharacterPairs returns NumberOfCharacterPairs (property field)
-	GetNumberOfCharacterPairs() uint8
-}
-
-// ExtendedStatusHeaderExactly can be used when we want exactly this type and not a type which fulfills ExtendedStatusHeader.
-// This is useful for switch cases.
-type ExtendedStatusHeaderExactly interface {
-	ExtendedStatusHeader
-	isExtendedStatusHeader() bool
-}
-
-// _ExtendedStatusHeader is the data-structure of this message
-type _ExtendedStatusHeader struct {
-	NumberOfCharacterPairs uint8
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for property fields.
-///////////////////////
-
-func (m *_ExtendedStatusHeader) GetNumberOfCharacterPairs() uint8 {
-	return m.NumberOfCharacterPairs
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-// NewExtendedStatusHeader factory function for _ExtendedStatusHeader
-func NewExtendedStatusHeader(numberOfCharacterPairs uint8) *_ExtendedStatusHeader {
-	return &_ExtendedStatusHeader{NumberOfCharacterPairs: numberOfCharacterPairs}
-}
-
-// Deprecated: use the interface for direct cast
-func CastExtendedStatusHeader(structType interface{}) ExtendedStatusHeader {
-	if casted, ok := structType.(ExtendedStatusHeader); ok {
-		return casted
-	}
-	if casted, ok := structType.(*ExtendedStatusHeader); ok {
-		return *casted
-	}
-	return nil
-}
-
-func (m *_ExtendedStatusHeader) GetTypeName() string {
-	return "ExtendedStatusHeader"
-}
-
-func (m *_ExtendedStatusHeader) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *_ExtendedStatusHeader) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(0)
-
-	// Reserved Field (reserved)
-	lengthInBits += 3
-
-	// Simple field (numberOfCharacterPairs)
-	lengthInBits += 5
-
-	return lengthInBits
-}
-
-func (m *_ExtendedStatusHeader) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func ExtendedStatusHeaderParse(readBuffer utils.ReadBuffer) (ExtendedStatusHeader, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("ExtendedStatusHeader"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for ExtendedStatusHeader")
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Reserved Field (Compartmentalized so the "reserved" variable can't leak)
-	{
-		reserved, _err := readBuffer.ReadUint8("reserved", 3)
-		if _err != nil {
-			return nil, errors.Wrap(_err, "Error parsing 'reserved' field of ExtendedStatusHeader")
-		}
-		if reserved != uint8(0x7) {
-			log.Info().Fields(map[string]interface{}{
-				"expected value": uint8(0x7),
-				"got value":      reserved,
-			}).Msg("Got unexpected response for reserved field.")
-		}
-	}
-
-	// Simple Field (numberOfCharacterPairs)
-	_numberOfCharacterPairs, _numberOfCharacterPairsErr := readBuffer.ReadUint8("numberOfCharacterPairs", 5)
-	if _numberOfCharacterPairsErr != nil {
-		return nil, errors.Wrap(_numberOfCharacterPairsErr, "Error parsing 'numberOfCharacterPairs' field of ExtendedStatusHeader")
-	}
-	numberOfCharacterPairs := _numberOfCharacterPairs
-
-	if closeErr := readBuffer.CloseContext("ExtendedStatusHeader"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for ExtendedStatusHeader")
-	}
-
-	// Create the instance
-	return NewExtendedStatusHeader(numberOfCharacterPairs), nil
-}
-
-func (m *_ExtendedStatusHeader) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	if pushErr := writeBuffer.PushContext("ExtendedStatusHeader"); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for ExtendedStatusHeader")
-	}
-
-	// Reserved Field (reserved)
-	{
-		_err := writeBuffer.WriteUint8("reserved", 3, uint8(0x7))
-		if _err != nil {
-			return errors.Wrap(_err, "Error serializing 'reserved' field")
-		}
-	}
-
-	// Simple Field (numberOfCharacterPairs)
-	numberOfCharacterPairs := uint8(m.GetNumberOfCharacterPairs())
-	_numberOfCharacterPairsErr := writeBuffer.WriteUint8("numberOfCharacterPairs", 5, (numberOfCharacterPairs))
-	if _numberOfCharacterPairsErr != nil {
-		return errors.Wrap(_numberOfCharacterPairsErr, "Error serializing 'numberOfCharacterPairs' field")
-	}
-
-	if popErr := writeBuffer.PopContext("ExtendedStatusHeader"); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for ExtendedStatusHeader")
-	}
-	return nil
-}
-
-func (m *_ExtendedStatusHeader) isExtendedStatusHeader() bool {
-	return true
-}
-
-func (m *_ExtendedStatusHeader) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := writeBuffer.WriteSerializable(m); err != nil {
-		return err.Error()
-	}
-	return writeBuffer.GetBox().String()
-}
diff --git a/plc4go/protocols/cbus/readwrite/model/RequestContext.go b/plc4go/protocols/cbus/readwrite/model/RequestContext.go
index 892f58e38..bc92cffb5 100644
--- a/plc4go/protocols/cbus/readwrite/model/RequestContext.go
+++ b/plc4go/protocols/cbus/readwrite/model/RequestContext.go
@@ -30,10 +30,6 @@ import (
 type RequestContext interface {
 	utils.LengthAware
 	utils.Serializable
-	// GetSendCalCommandBefore returns SendCalCommandBefore (property field)
-	GetSendCalCommandBefore() bool
-	// GetSendStatusRequestLevelBefore returns SendStatusRequestLevelBefore (property field)
-	GetSendStatusRequestLevelBefore() bool
 	// GetSendIdentifyRequestBefore returns SendIdentifyRequestBefore (property field)
 	GetSendIdentifyRequestBefore() bool
 }
@@ -47,9 +43,7 @@ type RequestContextExactly interface {
 
 // _RequestContext is the data-structure of this message
 type _RequestContext struct {
-	SendCalCommandBefore         bool
-	SendStatusRequestLevelBefore bool
-	SendIdentifyRequestBefore    bool
+	SendIdentifyRequestBefore bool
 }
 
 ///////////////////////////////////////////////////////////
@@ -57,14 +51,6 @@ type _RequestContext struct {
 /////////////////////// Accessors for property fields.
 ///////////////////////
 
-func (m *_RequestContext) GetSendCalCommandBefore() bool {
-	return m.SendCalCommandBefore
-}
-
-func (m *_RequestContext) GetSendStatusRequestLevelBefore() bool {
-	return m.SendStatusRequestLevelBefore
-}
-
 func (m *_RequestContext) GetSendIdentifyRequestBefore() bool {
 	return m.SendIdentifyRequestBefore
 }
@@ -75,8 +61,8 @@ func (m *_RequestContext) GetSendIdentifyRequestBefore() bool {
 ///////////////////////////////////////////////////////////
 
 // NewRequestContext factory function for _RequestContext
-func NewRequestContext(sendCalCommandBefore bool, sendStatusRequestLevelBefore bool, sendIdentifyRequestBefore bool) *_RequestContext {
-	return &_RequestContext{SendCalCommandBefore: sendCalCommandBefore, SendStatusRequestLevelBefore: sendStatusRequestLevelBefore, SendIdentifyRequestBefore: sendIdentifyRequestBefore}
+func NewRequestContext(sendIdentifyRequestBefore bool) *_RequestContext {
+	return &_RequestContext{SendIdentifyRequestBefore: sendIdentifyRequestBefore}
 }
 
 // Deprecated: use the interface for direct cast
@@ -101,12 +87,6 @@ func (m *_RequestContext) GetLengthInBits() uint16 {
 func (m *_RequestContext) GetLengthInBitsConditional(lastItem bool) uint16 {
 	lengthInBits := uint16(0)
 
-	// Simple field (sendCalCommandBefore)
-	lengthInBits += 1
-
-	// Simple field (sendStatusRequestLevelBefore)
-	lengthInBits += 1
-
 	// Simple field (sendIdentifyRequestBefore)
 	lengthInBits += 1
 
@@ -126,20 +106,6 @@ func RequestContextParse(readBuffer utils.ReadBuffer) (RequestContext, error) {
 	currentPos := positionAware.GetPos()
 	_ = currentPos
 
-	// Simple Field (sendCalCommandBefore)
-	_sendCalCommandBefore, _sendCalCommandBeforeErr := readBuffer.ReadBit("sendCalCommandBefore")
-	if _sendCalCommandBeforeErr != nil {
-		return nil, errors.Wrap(_sendCalCommandBeforeErr, "Error parsing 'sendCalCommandBefore' field of RequestContext")
-	}
-	sendCalCommandBefore := _sendCalCommandBefore
-
-	// Simple Field (sendStatusRequestLevelBefore)
-	_sendStatusRequestLevelBefore, _sendStatusRequestLevelBeforeErr := readBuffer.ReadBit("sendStatusRequestLevelBefore")
-	if _sendStatusRequestLevelBeforeErr != nil {
-		return nil, errors.Wrap(_sendStatusRequestLevelBeforeErr, "Error parsing 'sendStatusRequestLevelBefore' field of RequestContext")
-	}
-	sendStatusRequestLevelBefore := _sendStatusRequestLevelBefore
-
 	// Simple Field (sendIdentifyRequestBefore)
 	_sendIdentifyRequestBefore, _sendIdentifyRequestBeforeErr := readBuffer.ReadBit("sendIdentifyRequestBefore")
 	if _sendIdentifyRequestBeforeErr != nil {
@@ -152,7 +118,7 @@ func RequestContextParse(readBuffer utils.ReadBuffer) (RequestContext, error) {
 	}
 
 	// Create the instance
-	return NewRequestContext(sendCalCommandBefore, sendStatusRequestLevelBefore, sendIdentifyRequestBefore), nil
+	return NewRequestContext(sendIdentifyRequestBefore), nil
 }
 
 func (m *_RequestContext) Serialize(writeBuffer utils.WriteBuffer) error {
@@ -162,20 +128,6 @@ func (m *_RequestContext) Serialize(writeBuffer utils.WriteBuffer) error {
 		return errors.Wrap(pushErr, "Error pushing for RequestContext")
 	}
 
-	// Simple Field (sendCalCommandBefore)
-	sendCalCommandBefore := bool(m.GetSendCalCommandBefore())
-	_sendCalCommandBeforeErr := writeBuffer.WriteBit("sendCalCommandBefore", (sendCalCommandBefore))
-	if _sendCalCommandBeforeErr != nil {
-		return errors.Wrap(_sendCalCommandBeforeErr, "Error serializing 'sendCalCommandBefore' field")
-	}
-
-	// Simple Field (sendStatusRequestLevelBefore)
-	sendStatusRequestLevelBefore := bool(m.GetSendStatusRequestLevelBefore())
-	_sendStatusRequestLevelBeforeErr := writeBuffer.WriteBit("sendStatusRequestLevelBefore", (sendStatusRequestLevelBefore))
-	if _sendStatusRequestLevelBeforeErr != nil {
-		return errors.Wrap(_sendStatusRequestLevelBeforeErr, "Error serializing 'sendStatusRequestLevelBefore' field")
-	}
-
 	// Simple Field (sendIdentifyRequestBefore)
 	sendIdentifyRequestBefore := bool(m.GetSendIdentifyRequestBefore())
 	_sendIdentifyRequestBeforeErr := writeBuffer.WriteBit("sendIdentifyRequestBefore", (sendIdentifyRequestBefore))
diff --git a/plc4go/protocols/cbus/readwrite/model/StandardFormatStatusReply.go b/plc4go/protocols/cbus/readwrite/model/StandardFormatStatusReply.go
deleted file mode 100644
index 10ef6af85..000000000
--- a/plc4go/protocols/cbus/readwrite/model/StandardFormatStatusReply.go
+++ /dev/null
@@ -1,279 +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
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-	"github.com/pkg/errors"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// StandardFormatStatusReply is the corresponding interface of StandardFormatStatusReply
-type StandardFormatStatusReply interface {
-	utils.LengthAware
-	utils.Serializable
-	// GetStatusHeader returns StatusHeader (property field)
-	GetStatusHeader() StatusHeader
-	// GetApplication returns Application (property field)
-	GetApplication() ApplicationIdContainer
-	// GetBlockStart returns BlockStart (property field)
-	GetBlockStart() uint8
-	// GetStatusBytes returns StatusBytes (property field)
-	GetStatusBytes() []StatusByte
-}
-
-// StandardFormatStatusReplyExactly can be used when we want exactly this type and not a type which fulfills StandardFormatStatusReply.
-// This is useful for switch cases.
-type StandardFormatStatusReplyExactly interface {
-	StandardFormatStatusReply
-	isStandardFormatStatusReply() bool
-}
-
-// _StandardFormatStatusReply is the data-structure of this message
-type _StandardFormatStatusReply struct {
-	StatusHeader StatusHeader
-	Application  ApplicationIdContainer
-	BlockStart   uint8
-	StatusBytes  []StatusByte
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for property fields.
-///////////////////////
-
-func (m *_StandardFormatStatusReply) GetStatusHeader() StatusHeader {
-	return m.StatusHeader
-}
-
-func (m *_StandardFormatStatusReply) GetApplication() ApplicationIdContainer {
-	return m.Application
-}
-
-func (m *_StandardFormatStatusReply) GetBlockStart() uint8 {
-	return m.BlockStart
-}
-
-func (m *_StandardFormatStatusReply) GetStatusBytes() []StatusByte {
-	return m.StatusBytes
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-// NewStandardFormatStatusReply factory function for _StandardFormatStatusReply
-func NewStandardFormatStatusReply(statusHeader StatusHeader, application ApplicationIdContainer, blockStart uint8, statusBytes []StatusByte) *_StandardFormatStatusReply {
-	return &_StandardFormatStatusReply{StatusHeader: statusHeader, Application: application, BlockStart: blockStart, StatusBytes: statusBytes}
-}
-
-// Deprecated: use the interface for direct cast
-func CastStandardFormatStatusReply(structType interface{}) StandardFormatStatusReply {
-	if casted, ok := structType.(StandardFormatStatusReply); ok {
-		return casted
-	}
-	if casted, ok := structType.(*StandardFormatStatusReply); ok {
-		return *casted
-	}
-	return nil
-}
-
-func (m *_StandardFormatStatusReply) GetTypeName() string {
-	return "StandardFormatStatusReply"
-}
-
-func (m *_StandardFormatStatusReply) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *_StandardFormatStatusReply) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(0)
-
-	// Simple field (statusHeader)
-	lengthInBits += m.StatusHeader.GetLengthInBits()
-
-	// Simple field (application)
-	lengthInBits += 8
-
-	// Simple field (blockStart)
-	lengthInBits += 8
-
-	// Array field
-	if len(m.StatusBytes) > 0 {
-		for i, element := range m.StatusBytes {
-			last := i == len(m.StatusBytes)-1
-			lengthInBits += element.(interface{ GetLengthInBitsConditional(bool) uint16 }).GetLengthInBitsConditional(last)
-		}
-	}
-
-	return lengthInBits
-}
-
-func (m *_StandardFormatStatusReply) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func StandardFormatStatusReplyParse(readBuffer utils.ReadBuffer) (StandardFormatStatusReply, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("StandardFormatStatusReply"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for StandardFormatStatusReply")
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Simple Field (statusHeader)
-	if pullErr := readBuffer.PullContext("statusHeader"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for statusHeader")
-	}
-	_statusHeader, _statusHeaderErr := StatusHeaderParse(readBuffer)
-	if _statusHeaderErr != nil {
-		return nil, errors.Wrap(_statusHeaderErr, "Error parsing 'statusHeader' field of StandardFormatStatusReply")
-	}
-	statusHeader := _statusHeader.(StatusHeader)
-	if closeErr := readBuffer.CloseContext("statusHeader"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for statusHeader")
-	}
-
-	// Simple Field (application)
-	if pullErr := readBuffer.PullContext("application"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for application")
-	}
-	_application, _applicationErr := ApplicationIdContainerParse(readBuffer)
-	if _applicationErr != nil {
-		return nil, errors.Wrap(_applicationErr, "Error parsing 'application' field of StandardFormatStatusReply")
-	}
-	application := _application
-	if closeErr := readBuffer.CloseContext("application"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for application")
-	}
-
-	// Simple Field (blockStart)
-	_blockStart, _blockStartErr := readBuffer.ReadUint8("blockStart", 8)
-	if _blockStartErr != nil {
-		return nil, errors.Wrap(_blockStartErr, "Error parsing 'blockStart' field of StandardFormatStatusReply")
-	}
-	blockStart := _blockStart
-
-	// Array field (statusBytes)
-	if pullErr := readBuffer.PullContext("statusBytes", utils.WithRenderAsList(true)); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for statusBytes")
-	}
-	// Count array
-	statusBytes := make([]StatusByte, uint16(statusHeader.GetNumberOfCharacterPairs())-uint16(uint16(2)))
-	// This happens when the size is set conditional to 0
-	if len(statusBytes) == 0 {
-		statusBytes = nil
-	}
-	{
-		for curItem := uint16(0); curItem < uint16(uint16(statusHeader.GetNumberOfCharacterPairs())-uint16(uint16(2))); curItem++ {
-			_item, _err := StatusByteParse(readBuffer)
-			if _err != nil {
-				return nil, errors.Wrap(_err, "Error parsing 'statusBytes' field of StandardFormatStatusReply")
-			}
-			statusBytes[curItem] = _item.(StatusByte)
-		}
-	}
-	if closeErr := readBuffer.CloseContext("statusBytes", utils.WithRenderAsList(true)); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for statusBytes")
-	}
-
-	if closeErr := readBuffer.CloseContext("StandardFormatStatusReply"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for StandardFormatStatusReply")
-	}
-
-	// Create the instance
-	return NewStandardFormatStatusReply(statusHeader, application, blockStart, statusBytes), nil
-}
-
-func (m *_StandardFormatStatusReply) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	if pushErr := writeBuffer.PushContext("StandardFormatStatusReply"); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for StandardFormatStatusReply")
-	}
-
-	// Simple Field (statusHeader)
-	if pushErr := writeBuffer.PushContext("statusHeader"); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for statusHeader")
-	}
-	_statusHeaderErr := writeBuffer.WriteSerializable(m.GetStatusHeader())
-	if popErr := writeBuffer.PopContext("statusHeader"); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for statusHeader")
-	}
-	if _statusHeaderErr != nil {
-		return errors.Wrap(_statusHeaderErr, "Error serializing 'statusHeader' field")
-	}
-
-	// Simple Field (application)
-	if pushErr := writeBuffer.PushContext("application"); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for application")
-	}
-	_applicationErr := writeBuffer.WriteSerializable(m.GetApplication())
-	if popErr := writeBuffer.PopContext("application"); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for application")
-	}
-	if _applicationErr != nil {
-		return errors.Wrap(_applicationErr, "Error serializing 'application' field")
-	}
-
-	// Simple Field (blockStart)
-	blockStart := uint8(m.GetBlockStart())
-	_blockStartErr := writeBuffer.WriteUint8("blockStart", 8, (blockStart))
-	if _blockStartErr != nil {
-		return errors.Wrap(_blockStartErr, "Error serializing 'blockStart' field")
-	}
-
-	// Array Field (statusBytes)
-	if pushErr := writeBuffer.PushContext("statusBytes", utils.WithRenderAsList(true)); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for statusBytes")
-	}
-	for _, _element := range m.GetStatusBytes() {
-		_elementErr := writeBuffer.WriteSerializable(_element)
-		if _elementErr != nil {
-			return errors.Wrap(_elementErr, "Error serializing 'statusBytes' field")
-		}
-	}
-	if popErr := writeBuffer.PopContext("statusBytes", utils.WithRenderAsList(true)); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for statusBytes")
-	}
-
-	if popErr := writeBuffer.PopContext("StandardFormatStatusReply"); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for StandardFormatStatusReply")
-	}
-	return nil
-}
-
-func (m *_StandardFormatStatusReply) isStandardFormatStatusReply() bool {
-	return true
-}
-
-func (m *_StandardFormatStatusReply) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := writeBuffer.WriteSerializable(m); err != nil {
-		return err.Error()
-	}
-	return writeBuffer.GetBox().String()
-}
diff --git a/plc4go/protocols/cbus/readwrite/model/StatusHeader.go b/plc4go/protocols/cbus/readwrite/model/StatusHeader.go
deleted file mode 100644
index 70af45bf3..000000000
--- a/plc4go/protocols/cbus/readwrite/model/StatusHeader.go
+++ /dev/null
@@ -1,183 +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
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package model
-
-import (
-	"github.com/apache/plc4x/plc4go/internal/spi/utils"
-	"github.com/pkg/errors"
-	"github.com/rs/zerolog/log"
-)
-
-// Code generated by code-generation. DO NOT EDIT.
-
-// StatusHeader is the corresponding interface of StatusHeader
-type StatusHeader interface {
-	utils.LengthAware
-	utils.Serializable
-	// GetNumberOfCharacterPairs returns NumberOfCharacterPairs (property field)
-	GetNumberOfCharacterPairs() uint8
-}
-
-// StatusHeaderExactly can be used when we want exactly this type and not a type which fulfills StatusHeader.
-// This is useful for switch cases.
-type StatusHeaderExactly interface {
-	StatusHeader
-	isStatusHeader() bool
-}
-
-// _StatusHeader is the data-structure of this message
-type _StatusHeader struct {
-	NumberOfCharacterPairs uint8
-}
-
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for property fields.
-///////////////////////
-
-func (m *_StatusHeader) GetNumberOfCharacterPairs() uint8 {
-	return m.NumberOfCharacterPairs
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-// NewStatusHeader factory function for _StatusHeader
-func NewStatusHeader(numberOfCharacterPairs uint8) *_StatusHeader {
-	return &_StatusHeader{NumberOfCharacterPairs: numberOfCharacterPairs}
-}
-
-// Deprecated: use the interface for direct cast
-func CastStatusHeader(structType interface{}) StatusHeader {
-	if casted, ok := structType.(StatusHeader); ok {
-		return casted
-	}
-	if casted, ok := structType.(*StatusHeader); ok {
-		return *casted
-	}
-	return nil
-}
-
-func (m *_StatusHeader) GetTypeName() string {
-	return "StatusHeader"
-}
-
-func (m *_StatusHeader) GetLengthInBits() uint16 {
-	return m.GetLengthInBitsConditional(false)
-}
-
-func (m *_StatusHeader) GetLengthInBitsConditional(lastItem bool) uint16 {
-	lengthInBits := uint16(0)
-
-	// Reserved Field (reserved)
-	lengthInBits += 2
-
-	// Simple field (numberOfCharacterPairs)
-	lengthInBits += 6
-
-	return lengthInBits
-}
-
-func (m *_StatusHeader) GetLengthInBytes() uint16 {
-	return m.GetLengthInBits() / 8
-}
-
-func StatusHeaderParse(readBuffer utils.ReadBuffer) (StatusHeader, error) {
-	positionAware := readBuffer
-	_ = positionAware
-	if pullErr := readBuffer.PullContext("StatusHeader"); pullErr != nil {
-		return nil, errors.Wrap(pullErr, "Error pulling for StatusHeader")
-	}
-	currentPos := positionAware.GetPos()
-	_ = currentPos
-
-	// Reserved Field (Compartmentalized so the "reserved" variable can't leak)
-	{
-		reserved, _err := readBuffer.ReadUint8("reserved", 2)
-		if _err != nil {
-			return nil, errors.Wrap(_err, "Error parsing 'reserved' field of StatusHeader")
-		}
-		if reserved != uint8(0x3) {
-			log.Info().Fields(map[string]interface{}{
-				"expected value": uint8(0x3),
-				"got value":      reserved,
-			}).Msg("Got unexpected response for reserved field.")
-		}
-	}
-
-	// Simple Field (numberOfCharacterPairs)
-	_numberOfCharacterPairs, _numberOfCharacterPairsErr := readBuffer.ReadUint8("numberOfCharacterPairs", 6)
-	if _numberOfCharacterPairsErr != nil {
-		return nil, errors.Wrap(_numberOfCharacterPairsErr, "Error parsing 'numberOfCharacterPairs' field of StatusHeader")
-	}
-	numberOfCharacterPairs := _numberOfCharacterPairs
-
-	if closeErr := readBuffer.CloseContext("StatusHeader"); closeErr != nil {
-		return nil, errors.Wrap(closeErr, "Error closing for StatusHeader")
-	}
-
-	// Create the instance
-	return NewStatusHeader(numberOfCharacterPairs), nil
-}
-
-func (m *_StatusHeader) Serialize(writeBuffer utils.WriteBuffer) error {
-	positionAware := writeBuffer
-	_ = positionAware
-	if pushErr := writeBuffer.PushContext("StatusHeader"); pushErr != nil {
-		return errors.Wrap(pushErr, "Error pushing for StatusHeader")
-	}
-
-	// Reserved Field (reserved)
-	{
-		_err := writeBuffer.WriteUint8("reserved", 2, uint8(0x3))
-		if _err != nil {
-			return errors.Wrap(_err, "Error serializing 'reserved' field")
-		}
-	}
-
-	// Simple Field (numberOfCharacterPairs)
-	numberOfCharacterPairs := uint8(m.GetNumberOfCharacterPairs())
-	_numberOfCharacterPairsErr := writeBuffer.WriteUint8("numberOfCharacterPairs", 6, (numberOfCharacterPairs))
-	if _numberOfCharacterPairsErr != nil {
-		return errors.Wrap(_numberOfCharacterPairsErr, "Error serializing 'numberOfCharacterPairs' field")
-	}
-
-	if popErr := writeBuffer.PopContext("StatusHeader"); popErr != nil {
-		return errors.Wrap(popErr, "Error popping for StatusHeader")
-	}
-	return nil
-}
-
-func (m *_StatusHeader) isStatusHeader() bool {
-	return true
-}
-
-func (m *_StatusHeader) String() string {
-	if m == nil {
-		return "<nil>"
-	}
-	writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
-	if err := writeBuffer.WriteSerializable(m); err != nil {
-		return err.Error()
-	}
-	return writeBuffer.GetBox().String()
-}
diff --git a/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go b/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go
index 5753427ea..92724de14 100644
--- a/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go
+++ b/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go
@@ -51,7 +51,7 @@ func (a *Analyzer) Init() {
 	if a.initialized {
 		return
 	}
-	a.requestContext = model.NewRequestContext(false, false, false)
+	a.requestContext = model.NewRequestContext(false)
 	a.cBusOptions = model.NewCBusOptions(config.CBusConfigInstance.Connect, config.CBusConfigInstance.Smart, config.CBusConfigInstance.Idmon, config.CBusConfigInstance.Exstat, config.CBusConfigInstance.Monitor, config.CBusConfigInstance.Monall, config.CBusConfigInstance.Pun, config.CBusConfigInstance.Pcn, config.CBusConfigInstance.Srchk)
 	a.currentInboundPayloads = make(map[string][]byte)
 	a.currentPrefilterInboundPayloads = make(map[string][]byte)
@@ -93,7 +93,7 @@ func (a *Analyzer) PackageParse(packetInformation common.PacketInformation, payl
 	a.lastParsePayload = currentPayload
 	parse, err := model.CBusMessageParse(utils.NewReadBufferByteBased(currentPayload), isResponse, a.requestContext, cBusOptions)
 	if err != nil {
-		if secondParse, err := model.CBusMessageParse(utils.NewReadBufferByteBased(currentPayload), isResponse, model.NewRequestContext(false, false, false), model.NewCBusOptions(false, false, false, false, false, false, false, false, false)); err != nil {
+		if secondParse, err := model.CBusMessageParse(utils.NewReadBufferByteBased(currentPayload), isResponse, model.NewRequestContext(false), model.NewCBusOptions(false, false, false, false, false, false, false, false, false)); err != nil {
 			log.Debug().Err(err).Msg("Second parse failed too")
 			return nil, errors.Wrap(err, "Error parsing CBusCommand")
 		} else {
@@ -180,7 +180,7 @@ func mergeCheck(currentPayload *[]byte, srcUip string, mergeCallback func(int),
 				if reflect.DeepEqual(headPayload, *lastPayload) {
 					// This means that we have a merge where the last payload is an echo. In that case we discard that here to not offset all numbers
 					*currentPayload = tailPayload
-					log.Debug().Msgf("We cut the echo message %s out of the response to keep numbering", headPayload, *currentPayload)
+					log.Debug().Msgf("We cut the echo message %s out of the response to keep numbering", headPayload)
 					return mergeCheck(currentPayload, srcUip, mergeCallback, currentInboundPayloads, lastPayload)
 				} else {
 					if mergeCallback != nil {
@@ -253,12 +253,6 @@ func (a *Analyzer) PrettyPrint(message interface{}) {
 					switch reply := reply.GetReply().(type) {
 					case model.ReplyEncodedReplyExactly:
 						switch reply := reply.GetEncodedReply().(type) {
-						case model.EncodedReplyExtendedFormatStatusReplyExactly:
-							// We print this a second time as the first print contains only the hex part
-							fmt.Printf("%v\n", reply.GetReply())
-						case model.EncodedReplyStandardFormatStatusReplyExactly:
-							// We print this a second time as the first print contains only the hex part
-							fmt.Printf("%v\n", reply.GetReply())
 						case model.EncodedReplyCALReplyExactly:
 							// We print this a second time as the first print contains only the hex part
 							fmt.Printf("%v\n", reply.GetCalReply())
@@ -272,15 +266,12 @@ func (a *Analyzer) PrettyPrint(message interface{}) {
 				switch reply := reply.GetReply().(type) {
 				case model.ReplyEncodedReplyExactly:
 					switch reply := reply.GetEncodedReply().(type) {
-					case model.EncodedReplyExtendedFormatStatusReplyExactly:
-						// We print this a second time as the first print contains only the hex part
-						fmt.Printf("%v\n", reply.GetReply())
-					case model.EncodedReplyStandardFormatStatusReplyExactly:
-						// We print this a second time as the first print contains only the hex part
-						fmt.Printf("%v\n", reply.GetReply())
 					case model.EncodedReplyCALReplyExactly:
 						// We print this a second time as the first print contains only the hex part
 						fmt.Printf("%v\n", reply.GetCalReply())
+					case model.MonitoredSALReplyExactly:
+						// We print this a second time as the first print contains only the hex part
+						fmt.Printf("%v\n", reply.GetMonitoredSAL())
 					}
 				}
 			}
diff --git a/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java b/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java
index f52141a1a..15c22fd77 100644
--- a/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java
+++ b/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java
@@ -116,7 +116,7 @@ public class StaticHelper {
                 checksum += aByte;
             }
             if (checksum != 0x0) {
-                throw new ParseException("Checksum validation failed");
+                //throw new ParseException("Checksum validation failed");
             }
             // We need to reset the last to hex bytes
             readBuffer.reset(readBuffer.getPos() - 2);
diff --git a/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/RandomPackagesTest.java b/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/RandomPackagesTest.java
index 789afc012..71e5364b2 100644
--- a/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/RandomPackagesTest.java
+++ b/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/RandomPackagesTest.java
@@ -38,7 +38,7 @@ public class RandomPackagesTest {
 
     @BeforeEach
     void setUp() {
-        requestContext = new RequestContext(false, false, false);
+        requestContext = new RequestContext(false);
         cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, false);
     }
 
@@ -82,7 +82,7 @@ public class RandomPackagesTest {
         byte[] bytes = "g.890150435F434E49454421\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
         // We know we send an identify command so we set the cal flag
-        requestContext = new RequestContext(true, false, false);
+        requestContext = new RequestContext(false);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
@@ -99,7 +99,7 @@ public class RandomPackagesTest {
     void someResponse() throws Exception {
         byte[] bytes = "nl.8220025C\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-        requestContext = new RequestContext(true, false, false);
+        requestContext = new RequestContext(false);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
@@ -143,7 +143,7 @@ public class RandomPackagesTest {
         byte[] bytes = "i.8902352E342E3030202010\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
         // We know we send an identify command so we set the cal flag
-        requestContext = new RequestContext(true, false, true);
+        requestContext = new RequestContext(false);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
@@ -178,7 +178,7 @@ public class RandomPackagesTest {
     void identifyTypeReply() throws Exception {
         byte[] bytes = "h.890150435F434E49454421\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-        requestContext = new RequestContext(true, false, true);
+        requestContext = new RequestContext(false);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
@@ -209,7 +209,7 @@ public class RandomPackagesTest {
     void strangeNotYetParsableCommandResponse() throws Exception {
         byte[] bytes = "s.860202003230977D\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-        requestContext = new RequestContext(true, false, false);
+        requestContext = new RequestContext(false);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
@@ -243,14 +243,11 @@ public class RandomPackagesTest {
     void wat() throws Exception {
         byte[] bytes = "D8FF0024000002000000000000000008000000000000000000\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-        requestContext = new RequestContext(true, false, false);
+        requestContext = new RequestContext(false);
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
         System.out.println(msg);
-        CBusMessageToClient messageToClient = (CBusMessageToClient) msg;
-        ReplyOrConfirmationReply reply = (ReplyOrConfirmationReply) messageToClient.getReply();
-        EncodedReplyStandardFormatStatusReply encodedReplyCALReply = (EncodedReplyStandardFormatStatusReply) ((ReplyEncodedReply) reply.getReply()).getEncodedReply();
-        System.out.println(encodedReplyCALReply.getReply());
+        System.out.println(((ReplyEncodedReply) ((ReplyOrConfirmationReply) ((CBusMessageToClient) msg).getReply()).getReply()).getEncodedReply());
         assertMessageMatches(bytes, msg);
     }
 
@@ -271,13 +268,11 @@ public class RandomPackagesTest {
         byte[] bytes = "D8FF5800000000000000000000000000000000000000000000D1\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
-        requestContext = new RequestContext(false, true, false);
+        requestContext = new RequestContext(false);
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
         System.out.println(msg);
-        Reply normalReply = ((ReplyOrConfirmationReply) ((CBusMessageToClient) msg).getReply()).getReply();
-        EncodedReplyStandardFormatStatusReply encodedReplyStandardFormatStatusReply = (EncodedReplyStandardFormatStatusReply) ((ReplyEncodedReply) normalReply).getEncodedReply();
-        System.out.println(encodedReplyStandardFormatStatusReply.getReply());
+        System.out.println(((ReplyEncodedReply) ((ReplyOrConfirmationReply) ((CBusMessageToClient) msg).getReply()).getReply()).getEncodedReply());
 
         assertMessageMatches(bytes, msg);
     }
@@ -300,7 +295,7 @@ public class RandomPackagesTest {
         byte[] bytes = "o.8510020000FF6A\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
-        requestContext = new RequestContext(true, false, true);
+        requestContext = new RequestContext(true);
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
         System.out.println(msg);
@@ -314,7 +309,7 @@ public class RandomPackagesTest {
         byte[] bytes = "0531AC0079042F0401430316000011\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
-        requestContext = new RequestContext(false, false, false);
+        requestContext = new RequestContext(false);
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
         System.out.println(msg);
@@ -329,7 +324,7 @@ public class RandomPackagesTest {
         byte[] bytes = "h.860102008902312E362E30302020832138FFAE\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
-        requestContext = new RequestContext(false, false, true);
+        requestContext = new RequestContext(false);
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
         System.out.println(msg);
@@ -343,7 +338,7 @@ public class RandomPackagesTest {
         byte[] bytes = "r.8631020100320041D3\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
-        requestContext = new RequestContext(false, false, true);
+        requestContext = new RequestContext(false);
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
         System.out.println(msg);
@@ -357,7 +352,7 @@ public class RandomPackagesTest {
         byte[] bytes = "w.860C02008A08000000C8000000000012\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
-        requestContext = new RequestContext(false, false, true);
+        requestContext = new RequestContext(false);
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
         System.out.println(msg);
@@ -370,7 +365,7 @@ public class RandomPackagesTest {
     void SetHvacLevel() throws Exception {
         byte[] bytes = "0531AC0036040108FF0000DC\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-        requestContext = new RequestContext(false, false, false);
+        requestContext = new RequestContext(false);
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
         System.out.println(msg);
@@ -385,7 +380,7 @@ public class RandomPackagesTest {
         byte[] bytes = "0531AC0036040142037F001F\r\n".getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
         cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
-        requestContext = new RequestContext(false, false, false);
+        requestContext = new RequestContext(false);
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
         System.out.println(msg);
@@ -435,6 +430,7 @@ public class RandomPackagesTest {
     void incmoingMMI() throws Exception {
         byte[] bytes = ("86040200F940380001000000000000000008000000000000000000000000FA\r\n").getBytes(StandardCharsets.UTF_8);
         ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
+        cBusOptions = C_BUS_OPTIONS_WITH_SRCHK;
         CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
         assertThat(msg).isNotNull();
         System.out.println(msg);
diff --git a/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java b/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java
index 25a4a727c..d6a2e1aac 100644
--- a/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java
+++ b/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java
@@ -38,7 +38,7 @@ public class ReferenceTest {
 
     @BeforeEach
     void setUp() {
-        requestContext = new RequestContext(false, false, false);
+        requestContext = new RequestContext(false);
         cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, false);
     }
 
@@ -302,7 +302,7 @@ public class ReferenceTest {
             void calReplyNormal() throws Exception {
                 byte[] bytes = "8902312E322E363620200A\r\n".getBytes(StandardCharsets.UTF_8);
                 ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-                requestContext = new RequestContext(true, false, false);
+                requestContext = new RequestContext(false);
                 cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
                 CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                 assertThat(msg).isNotNull();
@@ -316,7 +316,7 @@ public class ReferenceTest {
                 //byte[] bytes = "860593008902312E322E363620207F\r\n".getBytes(StandardCharsets.UTF_8);
                 byte[] bytes = "860593008902312E322E36362020EC\r\n".getBytes(StandardCharsets.UTF_8);
                 ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-                requestContext = new RequestContext(true, false, false);
+                requestContext = new RequestContext(false);
                 cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
                 CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                 assertThat(msg).isNotNull();
@@ -402,7 +402,7 @@ public class ReferenceTest {
         void StandardFormatStatusReply1() throws Exception {
             byte[] bytes = "D8380068AA0140550550001000000014000000000000000000CF\r\n".getBytes(StandardCharsets.UTF_8);
             ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-            requestContext = new RequestContext(false, true, false);
+            requestContext = new RequestContext(true);
             cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
             CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
             assertThat(msg).isNotNull();
@@ -414,7 +414,7 @@ public class ReferenceTest {
         void StandardFormatStatusReply2() throws Exception {
             byte[] bytes = "D838580000000000000000000000000000000000000000000098\r\n".getBytes(StandardCharsets.UTF_8);
             ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-            requestContext = new RequestContext(false, true, false);
+            requestContext = new RequestContext(true);
             cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
             CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
             assertThat(msg).isNotNull();
@@ -426,7 +426,7 @@ public class ReferenceTest {
         void StandardFormatStatusReply3() throws Exception {
             byte[] bytes = "D638B000000000FF00000000000000000000000000000043\r\n".getBytes(StandardCharsets.UTF_8);
             ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-            requestContext = new RequestContext(false, true, false);
+            requestContext = new RequestContext(true);
             cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
             CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
             assertThat(msg).isNotNull();
@@ -439,7 +439,7 @@ public class ReferenceTest {
         void ExtendedFormatStatusReply1() throws Exception {
             byte[] bytes = "F9073800AAAA000095990000000055550000000000005555555548\r\n".getBytes(StandardCharsets.UTF_8);
             ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-            requestContext = new RequestContext(false, true, false);
+            requestContext = new RequestContext(true);
             cBusOptions = new CBusOptions(false, false, false, true, false, false, false, false, true);
             CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
             assertThat(msg).isNotNull();
@@ -452,7 +452,7 @@ public class ReferenceTest {
         void ExtendedFormatStatusReply2() throws Exception {
             byte[] bytes = "F907380B0000000000005555000000000000000000000000000013\r\n".getBytes(StandardCharsets.UTF_8);
             ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-            requestContext = new RequestContext(false, true, false);
+            requestContext = new RequestContext(true);
             cBusOptions = new CBusOptions(false, false, false, true, false, false, false, false, true);
             CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
             assertThat(msg).isNotNull();
@@ -464,7 +464,7 @@ public class ReferenceTest {
         void ExtendedFormatStatusReply3() throws Exception {
             byte[] bytes = "F70738160000000000000000000000000000000000000000B4\r\n".getBytes(StandardCharsets.UTF_8);
             ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-            requestContext = new RequestContext(false, true, false);
+            requestContext = new RequestContext(true);
             cBusOptions = new CBusOptions(false, false, false, true, false, false, false, false, true);
             CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
             assertThat(msg).isNotNull();
@@ -501,13 +501,12 @@ public class ReferenceTest {
             void LightningStatusReply1() throws Exception {
                 byte[] bytes = "D83800A8AA02000000000000000000000000000000000000009C\r\n".getBytes(StandardCharsets.UTF_8);
                 ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-                requestContext = new RequestContext(false, true, false);
+                requestContext = new RequestContext(true);
                 cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
                 CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                 assertThat(msg).isNotNull();
                 System.out.println(msg);
-                StandardFormatStatusReply reply = ((EncodedReplyStandardFormatStatusReply) ((ReplyEncodedReply) ((ReplyOrConfirmationReply) ((CBusMessageToClient) msg).getReply()).getReply()).getEncodedReply()).getReply();
-                System.out.println(reply);
+                System.out.println(((ReplyEncodedReply) ((ReplyOrConfirmationReply) ((CBusMessageToClient) msg).getReply()).getReply()).getEncodedReply());
                 assertMessageMatches(bytes, msg);
             }
 
@@ -519,7 +518,7 @@ public class ReferenceTest {
                 CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                 assertThat(msg).isNotNull();
                 System.out.println(msg);
-                System.out.println(((EncodedReplyStandardFormatStatusReply) ((ReplyEncodedReply) ((ReplyOrConfirmationReply) ((CBusMessageToClient) msg).getReply()).getReply()).getEncodedReply()).getReply());
+                System.out.println(((ReplyEncodedReply) ((ReplyOrConfirmationReply) ((CBusMessageToClient) msg).getReply()).getReply()).getEncodedReply());
                 assertMessageMatches(bytes, msg);
             }
 
@@ -531,15 +530,17 @@ public class ReferenceTest {
                 CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                 assertThat(msg).isNotNull();
                 System.out.println(msg);
-                System.out.println(((EncodedReplyStandardFormatStatusReply) ((ReplyEncodedReply) ((ReplyOrConfirmationReply) ((CBusMessageToClient) msg).getReply()).getReply()).getEncodedReply()).getReply());
+                System.out.println(((ReplyEncodedReply) ((ReplyOrConfirmationReply) ((CBusMessageToClient) msg).getReply()).getReply()).getEncodedReply());
                 assertMessageMatches(bytes, msg);
             }
 
             @Test
             void LightningStatusReply4() throws Exception {
-                byte[] bytes = "86999900F8003800A8AA0200000000000000000000000000000000000000C4\r\n".getBytes(StandardCharsets.UTF_8);
+                // TODO: the command header seems wrong as it is missing a byte
+                //byte[] bytes = "86999900F8003800A8AA0200000000000000000000000000000000000000C4\r\n".getBytes(StandardCharsets.UTF_8);
+                byte[] bytes = "86999900F9003800A8AA0200000000000000000000000000000000000000C3\r\n".getBytes(StandardCharsets.UTF_8);
                 ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-                cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
+                cBusOptions = new CBusOptions(false, false, false, true, false, false, false, false, true);
                 CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                 assertThat(msg).isNotNull();
                 System.out.println(msg);
@@ -550,9 +551,11 @@ public class ReferenceTest {
 
             @Test
             void LightningStatusReply5() throws Exception {
-                byte[] bytes = "86999900F800385800000000000000000000000000000000000000000000C0\r\n".getBytes(StandardCharsets.UTF_8);
+                // TODO: the command header seems wrong as it is missing a byte
+                // byte[] bytes = "86999900F800385800000000000000000000000000000000000000000000C0\r\n".getBytes(StandardCharsets.UTF_8);
+                byte[] bytes = "86999900F900385800000000000000000000000000000000000000000000BF\r\n".getBytes(StandardCharsets.UTF_8);
                 ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-                cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
+                cBusOptions = new CBusOptions(false, false, false, true, false, false, false, false, true);
                 CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                 assertThat(msg).isNotNull();
                 System.out.println(msg);
@@ -563,10 +566,11 @@ public class ReferenceTest {
             @Test
             void LightningStatusReply6() throws Exception {
                 // TODO: wrong checksum in this example???
+                // TODO: the command header seems wrong as it is missing a byte
                 //byte[] bytes = "86999900F60038B000000000000000000000000000000000000000008F\r\n".getBytes(StandardCharsets.UTF_8);
-                byte[] bytes = "86999900F60038B000000000000000000000000000000000000000006A\r\n".getBytes(StandardCharsets.UTF_8);
+                byte[] bytes = "86999900F70038B0000000000000000000000000000000000000000069\r\n".getBytes(StandardCharsets.UTF_8);
                 ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-                cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
+                cBusOptions = new CBusOptions(false, false, false, true, false, false, false, false, true);
                 CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                 assertThat(msg).isNotNull();
                 System.out.println(msg);
@@ -732,7 +736,7 @@ public class ReferenceTest {
                 void writeSomethingResponse() throws Exception {
                     byte[] bytes = "g.322100AD\r\n".getBytes(StandardCharsets.UTF_8);
                     ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-                    requestContext = new RequestContext(true, false, false);
+                    requestContext = new RequestContext(false);
                     CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                     assertThat(msg).isNotNull();
                     System.out.println(msg);
@@ -753,7 +757,7 @@ public class ReferenceTest {
                 void writeSomethingResponse2() throws Exception {
                     byte[] bytes = "g.3242008C\r\n".getBytes(StandardCharsets.UTF_8);
                     ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-                    requestContext = new RequestContext(true, false, false);
+                    requestContext = new RequestContext(false);
                     CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                     assertThat(msg).isNotNull();
                     System.out.println(msg);
@@ -774,7 +778,7 @@ public class ReferenceTest {
                 void writeSomethingResponse3() throws Exception {
                     byte[] bytes = "g.8600000032300000\r\n".getBytes(StandardCharsets.UTF_8);
                     ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-                    requestContext = new RequestContext(true, false, false);
+                    requestContext = new RequestContext(false);
                     CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                     assertThat(msg).isNotNull();
                     System.out.println(msg);
@@ -959,7 +963,7 @@ public class ReferenceTest {
             void BigMMI1() throws Exception {
                 byte[] bytes = "D8380068AA0140550550001000000014000000000000000000CF\r\n".getBytes(StandardCharsets.UTF_8);
                 ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
-                cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
+                cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, false);
                 CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, true, requestContext, cBusOptions);
                 assertThat(msg).isNotNull();
                 System.out.println(msg);
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
index 234bb8816..3c18bd8e1 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
@@ -22,10 +22,6 @@
 ]
 
 [type RequestContext
-    // Useful for response parsing: Set this to true if you send a CAL before. This will change the way the response will be parsed
-    [simple   bit       sendCalCommandBefore        ]
-    // Useful for response parsing: Set this to true if you send a SAL status request request level before. This will change the way the response will be parsed
-    [simple   bit       sendStatusRequestLevelBefore  ]
     // Useful for response parsing: Set this to true if you send a identify request before. This will change the way the response will be parsed
     [simple   bit       sendIdentifyRequestBefore   ]
 ]
@@ -584,20 +580,30 @@
             [simple uint 8    code                                                          ]
         ]
         ['STATUS'           *Status(CALCommandTypeContainer commandTypeContainer)               // Reply
-            [simple ApplicationIdContainer application                                                 ]
-            [simple uint 8                 blockStart                                                  ]
-            [array  byte                   data        count 'commandTypeContainer.numBytes - 2'       ]
+            [simple     ApplicationIdContainer
+                                application                                 ]
+            [simple     uint 8  blockStart                                  ]
+            [array      StatusByte
+                                statusBytes
+                                    count
+                                    'commandTypeContainer.numBytes - 2'     ]
         ]
         ['STATUS_EXTENDED'  *StatusExtended(CALCommandTypeContainer commandTypeContainer)       // Reply
-            [simple uint 8                 coding                                                      ]
-            [virtual bit                   isBinaryBySerialInterface 'coding == 0x00'                  ]
-            [virtual bit                   isBinaryByElsewhere       'coding == 0x40'                  ]
-            [virtual bit                   isLevelBySerialInterface  'coding == 0x07'                  ]
-            [virtual bit                   isLevelByElsewhere        'coding == 0x47'                  ]
-            [virtual bit                   isReserved                '!isBinaryBySerialInterface && !isBinaryByElsewhere && !isLevelBySerialInterface && !isLevelByElsewhere']
-            [simple ApplicationIdContainer application                                                 ]
-            [simple uint 8                 blockStart                                                  ]
-            [array  byte                   data        count 'commandTypeContainer.numBytes - 2'       ] // TODO: this should be -3 but somehow it is -2 with the examples
+            [simple     StatusCoding
+                                coding                                      ]
+            [simple     ApplicationIdContainer
+                                application                                 ]
+            [simple     uint 8  blockStart                                  ]
+            [virtual    uint 5  numberOfStatusBytes '(coding == StatusCoding.BINARY_BY_THIS_SERIAL_INTERFACE || coding == StatusCoding.BINARY_BY_ELSEWHERE)?(commandTypeContainer.numBytes - 3):(0)']
+            [virtual    uint 5  numberOfLevelInformation '(coding == StatusCoding.LEVEL_BY_THIS_SERIAL_INTERFACE || coding == StatusCoding.LEVEL_BY_ELSEWHERE)?((commandTypeContainer.numBytes - 3) / 2):(0)']
+            [array      StatusByte
+                                statusBytes
+                                    count
+                                    'numberOfStatusBytes'                   ]
+            [array      LevelInformation
+                                levelInformation
+                                    count
+                                    'numberOfLevelInformation'              ]
         ]
     ]
     // Note: we omit the request context as it is only useful for the first element
@@ -1467,21 +1473,12 @@
 [type EncodedReply(CBusOptions cBusOptions, RequestContext requestContext)
     [peek    byte peekedByte                                                        ]
     // TODO: if we reliable can detect this with the mask we don't need the request context anymore
-    [virtual bit  isMonitoredSAL            '(peekedByte & 0x3F) == 0x05 || peekedByte == 0x00 || (peekedByte & 0xF8) == 0x00'] // First check if it is in long mode, second for short mode, third for bridged short mode
-    [virtual bit  isCalCommand              '(peekedByte & 0x3F) == 0x06 || requestContext.sendCalCommandBefore'    ] // The 0x3F and 0x06 doesn't seem to work always
-    [virtual bit  isStandardFormatStatus    '(peekedByte & 0xC0) == 0xC0 && !cBusOptions.exstat'                    ]
-    [virtual bit  isExtendedFormatStatus    '(peekedByte & 0xE0) == 0xE0 && (cBusOptions.exstat || requestContext.sendStatusRequestLevelBefore)']
-    [typeSwitch isMonitoredSAL, isCalCommand, isStandardFormatStatus, isExtendedFormatStatus
-        ['true', 'false', 'false'   MonitoredSALReply
+    [virtual bit  isMonitoredSAL            '((peekedByte & 0x3F) == 0x05 || peekedByte == 0x00 || (peekedByte & 0xF8) == 0x00) && !requestContext.sendIdentifyRequestBefore'] // First check if it is in long mode, second for short mode, third for bridged short mode
+    [typeSwitch isMonitoredSAL
+        ['true'  MonitoredSALReply
             [simple   MonitoredSAL('cBusOptions')                   monitoredSAL    ]
         ]
-        [*, *, 'true', 'false'      *StandardFormatStatusReply
-            [simple   StandardFormatStatusReply                     reply           ]
-        ]
-        [*, *, *, 'true'            *ExtendedFormatStatusReply
-            [simple   ExtendedFormatStatusReply                     reply           ]
-        ]
-        [*, 'true', *, *            *CALReply
+        [*       *CALReply
             [simple   CALReply('cBusOptions', 'requestContext')     calReply        ]
         ]
     ]
@@ -1570,48 +1567,6 @@
     [simple byte value]
 ]
 
-[type StandardFormatStatusReply
-    [simple     StatusHeader
-                        statusHeader                                ]
-    [simple     ApplicationIdContainer
-                        application                                 ]
-    [simple     uint 8  blockStart                                  ]
-    [array      StatusByte
-                        statusBytes
-                        count
-                        'statusHeader.numberOfCharacterPairs - 2'   ]
-]
-
-[type StatusHeader
-    [reserved   uint 2                 '0x3'                        ]
-    [simple     uint 6  numberOfCharacterPairs                      ]
-]
-
-[type ExtendedFormatStatusReply
-    [simple     ExtendedStatusHeader
-                        statusHeader                                ]
-    [simple     StatusCoding
-                        coding                                      ]
-    [simple     ApplicationIdContainer
-                        application                                 ]
-    [simple     uint 8  blockStart                                  ]
-    [virtual    uint 5  numberOfStatusBytes '(coding == StatusCoding.BINARY_BY_THIS_SERIAL_INTERFACE || coding == StatusCoding.BINARY_BY_ELSEWHERE)?(statusHeader.numberOfCharacterPairs - 3):(0)']
-    [virtual    uint 5  numberOfLevelInformation '(coding == StatusCoding.LEVEL_BY_THIS_SERIAL_INTERFACE || coding == StatusCoding.LEVEL_BY_ELSEWHERE)?((statusHeader.numberOfCharacterPairs - 3) / 2):(0)']
-    [array      StatusByte
-                        statusBytes
-                            count
-                            'numberOfStatusBytes'                   ]
-    [array      LevelInformation
-                        levelInformation
-                            count
-                            'numberOfLevelInformation'              ]
-]
-
-[type ExtendedStatusHeader
-    [reserved   uint 3                 '0x7'                        ]
-    [simple     uint 5  numberOfCharacterPairs                      ]
-]
-
 [enum byte StatusCoding
     ['0x00' BINARY_BY_THIS_SERIAL_INTERFACE     ]
     ['0x40' BINARY_BY_ELSEWHERE                 ]


[plc4x] 02/03: feat(plc4xpcapanalyzer/cbus): echo in merge requests should now be discarded so numbering won't get messed up

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 c8893e012624bc05192445d6d67e7df1e218e806
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Aug 4 13:29:34 2022 +0200

    feat(plc4xpcapanalyzer/cbus): echo in merge requests should now be discarded so numbering won't get messed up
---
 .../internal/analyzer/analyzer.go                  |   2 +
 .../internal/cbusanalyzer/analyzer.go              | 126 +++++++++++++--------
 .../plc4xpcapanalyzer/internal/common/common.go    |   4 +
 3 files changed, 85 insertions(+), 47 deletions(-)

diff --git a/plc4go/tools/plc4xpcapanalyzer/internal/analyzer/analyzer.go b/plc4go/tools/plc4xpcapanalyzer/internal/analyzer/analyzer.go
index c53c06191..17b9f147b 100644
--- a/plc4go/tools/plc4xpcapanalyzer/internal/analyzer/analyzer.go
+++ b/plc4go/tools/plc4xpcapanalyzer/internal/analyzer/analyzer.go
@@ -126,6 +126,8 @@ func Analyze(pcapFile, protocolType string) {
 				log.Info().Stringer("packetInformation", packetInformation).Msgf("No.[%d] is unterminated", realPacketNumber)
 			case common.ErrEmptyPackage:
 				log.Info().Stringer("packetInformation", packetInformation).Msgf("No.[%d] is empty", realPacketNumber)
+			case common.ErrEcho:
+				log.Info().Stringer("packetInformation", packetInformation).Msgf("No.[%d] is echo", realPacketNumber)
 			default:
 				parseFails++
 				// TODO: write report to xml or something
diff --git a/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go b/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go
index f6573b92f..5753427ea 100644
--- a/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go
+++ b/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go
@@ -28,6 +28,7 @@ import (
 	"github.com/apache/plc4x/plc4go/tools/plc4xpcapanalyzer/internal/common"
 	"github.com/google/gopacket"
 	"github.com/pkg/errors"
+	"github.com/rs/zerolog"
 	"github.com/rs/zerolog/log"
 	"net"
 	"reflect"
@@ -41,6 +42,9 @@ type Analyzer struct {
 	currentInboundPayloads          map[string][]byte
 	currentPrefilterInboundPayloads map[string][]byte
 	mappedPacketChan                chan gopacket.Packet
+
+	lastParsePayload []byte
+	lastMapPayload   []byte
 }
 
 func (a *Analyzer) Init() {
@@ -76,14 +80,26 @@ func (a *Analyzer) PackageParse(packetInformation common.PacketInformation, payl
 			true,
 		)
 	}
-	currentPayload, err := a.getCurrentPayload(packetInformation, payload, isResponse, true, false)
+	mergeCallback := func(index int) {
+		log.Warn().Stringer("packetInformation", packetInformation).Msgf("we have a split at index %d", index)
+	}
+	currentPayload, err := a.getCurrentPayload(packetInformation, payload, mergeCallback, a.currentInboundPayloads, &a.lastParsePayload)
 	if err != nil {
 		return nil, err
 	}
-	// TODO: apparently we only do crc on receive with our tests so we need to implement that
+	if reflect.DeepEqual(currentPayload, a.lastParsePayload) {
+		return nil, common.ErrEcho
+	}
+	a.lastParsePayload = currentPayload
 	parse, err := model.CBusMessageParse(utils.NewReadBufferByteBased(currentPayload), isResponse, a.requestContext, cBusOptions)
 	if err != nil {
-		return nil, errors.Wrap(err, "Error parsing CBusCommand")
+		if secondParse, err := model.CBusMessageParse(utils.NewReadBufferByteBased(currentPayload), isResponse, model.NewRequestContext(false, false, false), model.NewCBusOptions(false, false, false, false, false, false, false, false, false)); err != nil {
+			log.Debug().Err(err).Msg("Second parse failed too")
+			return nil, errors.Wrap(err, "Error parsing CBusCommand")
+		} else {
+			log.Warn().Stringer("packetInformation", packetInformation).Msgf("package got overridden by second parse... probably a MMI\n%s", secondParse)
+			parse = secondParse
+		}
 	}
 	a.requestContext = cbus.CreateRequestContextWithInfoCallback(parse, func(infoString string) {
 		log.Debug().Msgf("No.[%d] %s", packetInformation.PacketNumber, infoString)
@@ -98,64 +114,33 @@ func (a *Analyzer) isResponse(packetInformation common.PacketInformation) bool {
 	return isResponse
 }
 
-func (a *Analyzer) getCurrentPayload(packetInformation common.PacketInformation, payload []byte, isResponse bool, warnAboutSplit bool, usePrefilterPayloads bool) ([]byte, error) {
+func (a *Analyzer) getCurrentPayload(packetInformation common.PacketInformation, payload []byte, mergeCallback func(int), currentInboundPayloads map[string][]byte, lastPayload *[]byte) ([]byte, error) {
 	srcUip := packetInformation.SrcIp.String()
 	payload = filterXOnXOff(payload)
 	if len(payload) == 0 {
 		return nil, common.ErrEmptyPackage
 	}
 	// Check if we have a termination in the middle
-	currentInboundPayloads := a.currentInboundPayloads
-	if usePrefilterPayloads {
-		currentInboundPayloads = a.currentPrefilterInboundPayloads
-	}
 	currentPayload := currentInboundPayloads[srcUip]
-	currentPayload = append(currentPayload, payload...)
-	shouldClearInboundPayload := true
-	isMergedMessage := false
-	// Check if we have a merged message
-mergeCheck:
-	for i, b := range currentPayload {
-		if i == 0 {
-			// TODO: we ignore the first byte as this is typical for reset etc... so maybe this is good or bad we will see
-			continue
-		}
-		switch b {
-		case 0x0D:
-			if i+1 < len(currentPayload) && currentPayload[i+1] == 0x0A {
-				// If we know the next is a newline we jump to that index...
-				i++
-			}
-			// ... other than that the logic is the same
-			fallthrough
-		case 0x0A:
-			// We have a merged message if we are not at the end
-			if i < len(currentPayload)-1 {
-				event := log.Warn()
-				if !warnAboutSplit {
-					event = log.Debug()
-				}
-				event.Stringer("packetInformation", packetInformation).Msgf("we have a split at index %d (usePrefilterPayloads=%t)", i, usePrefilterPayloads)
-				// In this case we need to put the tail into our "buffer"
-				currentInboundPayloads[srcUip] = currentPayload[i+1:]
-				// and use the beginning as current payload
-				currentPayload = currentPayload[:i+1]
-				shouldClearInboundPayload = false
-				isMergedMessage = true
-				break mergeCheck
-			}
-		}
+	if currentPayload != nil {
+		log.Debug().Func(func(e *zerolog.Event) {
+			e.Msgf("Prepending current payload %+q to actual payload %+q: %+q", currentPayload, payload, append(currentPayload, payload...))
+		})
+		currentPayload = append(currentPayload, payload...)
+	} else {
+		currentPayload = payload
 	}
+	isMergedMessage, shouldClearInboundPayload := mergeCheck(&currentPayload, srcUip, mergeCallback, currentInboundPayloads, lastPayload)
 	if !isMergedMessage {
 		// When we have a merge message we already set the current payload to the tail
 		currentInboundPayloads[srcUip] = currentPayload
 	} else {
 		log.Debug().Stringer("packetInformation", packetInformation).Msgf("Remainder %+q", currentInboundPayloads[srcUip])
 	}
-	if lastElement := currentPayload[len(currentPayload)-1]; (!isResponse /*a request must end with cr*/ && lastElement != 0x0D /*cr*/) || (isResponse /*a response must end with lf*/ && lastElement != 0x0A /*lf*/) {
+	if lastElement := currentPayload[len(currentPayload)-1]; (lastElement != '\r') && (lastElement != '\n') {
 		return nil, common.ErrUnterminatedPackage
 	} else {
-		log.Debug().Msgf("Last element 0x%x", lastElement)
+		log.Debug().Stringer("packetInformation", packetInformation).Msgf("Last element 0x%x", lastElement)
 		if shouldClearInboundPayload {
 			if currentSavedPayload := currentInboundPayloads[srcUip]; currentSavedPayload != nil {
 				// We remove our current payload from the beginning of the cache
@@ -172,12 +157,55 @@ mergeCheck:
 	return currentPayload, nil
 }
 
+func mergeCheck(currentPayload *[]byte, srcUip string, mergeCallback func(int), currentInboundPayloads map[string][]byte, lastPayload *[]byte) (isMergedMessage, shouldClearInboundPayload bool) {
+	// Check if we have a merged message
+	for i, b := range *currentPayload {
+		if i == 0 {
+			// we ignore the first byte as this is typical for reset etc... so maybe this is good or bad we will see
+			continue
+		}
+		switch b {
+		case 0x0D:
+			if i+1 < len(*currentPayload) && (*currentPayload)[i+1] == 0x0A {
+				// If we know the next is a newline we jump to that index...
+				i++
+			}
+			// ... other than that the logic is the same
+			fallthrough
+		case 0x0A:
+			// We have a merged message if we are not at the end
+			if i < len(*currentPayload)-1 {
+				headPayload := (*currentPayload)[:i+1]
+				tailPayload := (*currentPayload)[i+1:]
+				if reflect.DeepEqual(headPayload, *lastPayload) {
+					// This means that we have a merge where the last payload is an echo. In that case we discard that here to not offset all numbers
+					*currentPayload = tailPayload
+					log.Debug().Msgf("We cut the echo message %s out of the response to keep numbering", headPayload, *currentPayload)
+					return mergeCheck(currentPayload, srcUip, mergeCallback, currentInboundPayloads, lastPayload)
+				} else {
+					if mergeCallback != nil {
+						mergeCallback(i)
+					}
+					// In this case we need to put the tail into our "buffer"
+					currentInboundPayloads[srcUip] = tailPayload
+					// and use the beginning as current payload
+					*currentPayload = headPayload
+					return true, false
+				}
+			}
+		}
+	}
+	return false, true
+}
+
 func filterXOnXOff(payload []byte) []byte {
 	n := 0
-	for _, b := range payload {
+	for i, b := range payload {
 		switch b {
 		case 0x11: // Filter XON
+			fallthrough
 		case 0x13: // Filter XOFF
+			log.Trace().Msgf("Filtering %x at %d for %+q", b, i, payload)
 		default:
 			payload[n] = b
 			n++
@@ -277,7 +305,10 @@ func (a *Analyzer) MapPackets(in chan gopacket.Packet, packetInformationCreator
 					a.mappedPacketChan <- packet
 				default:
 					packetInformation := packetInformationCreator(packet)
-					if payload, err := a.getCurrentPayload(packetInformation, packet.ApplicationLayer().Payload(), a.isResponse(packetInformation), false, true); err != nil {
+					mergeCallback := func(index int) {
+						log.Warn().Stringer("packetInformation", packetInformation).Msgf("we have a split at index %d", index)
+					}
+					if payload, err := a.getCurrentPayload(packetInformation, packet.ApplicationLayer().Payload(), mergeCallback, a.currentPrefilterInboundPayloads, &a.lastMapPayload); err != nil {
 						log.Debug().Err(err).Stringer("packetInformation", packetInformation).Msg("Filtering message")
 						a.mappedPacketChan <- common.NewFilteredPackage(err, packet)
 					} else {
@@ -287,6 +318,7 @@ func (a *Analyzer) MapPackets(in chan gopacket.Packet, packetInformationCreator
 							log.Debug().Msgf("Replacing payload %q with %q", currentApplicationLayer.Payload(), payload)
 							packet = &manipulatedPackage{Packet: packet, newApplicationLayer: newPayload}
 						}
+						a.lastMapPayload = payload
 						a.mappedPacketChan <- packet
 					}
 				}
diff --git a/plc4go/tools/plc4xpcapanalyzer/internal/common/common.go b/plc4go/tools/plc4xpcapanalyzer/internal/common/common.go
index e914a27ad..bd20adabb 100644
--- a/plc4go/tools/plc4xpcapanalyzer/internal/common/common.go
+++ b/plc4go/tools/plc4xpcapanalyzer/internal/common/common.go
@@ -42,8 +42,12 @@ func (p PacketInformation) String() string {
 // ErrUnterminatedPackage is used when a transmission is incomplete (usually when package is split)
 var ErrUnterminatedPackage = errors.New("ErrUnterminatedPackage")
 
+// ErrEmptyPackage is used when there is no payload
 var ErrEmptyPackage = errors.New("ErrEmptyPackage")
 
+// ErrEcho is used when the package is a echo from the previous
+var ErrEcho = errors.New("ErrEcho")
+
 type FilteredPackage interface {
 	gopacket.Packet
 	IsFilteredPackage() bool


[plc4x] 01/03: fix(plc4xpcapanalyzer): fixed unnecessary replacing of payloads

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 4d379b194b8321700ea403ef02da4546ae1ab740
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Aug 4 11:38:28 2022 +0200

    fix(plc4xpcapanalyzer): fixed unnecessary replacing of payloads
---
 plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go b/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go
index 796228f02..f6573b92f 100644
--- a/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go
+++ b/plc4go/tools/plc4xpcapanalyzer/internal/cbusanalyzer/analyzer.go
@@ -283,7 +283,7 @@ func (a *Analyzer) MapPackets(in chan gopacket.Packet, packetInformationCreator
 					} else {
 						currentApplicationLayer := packet.ApplicationLayer()
 						newPayload := gopacket.Payload(payload)
-						if !reflect.DeepEqual(currentApplicationLayer.Payload(), newPayload) {
+						if !reflect.DeepEqual(currentApplicationLayer.Payload(), payload) {
 							log.Debug().Msgf("Replacing payload %q with %q", currentApplicationLayer.Payload(), payload)
 							packet = &manipulatedPackage{Packet: packet, newApplicationLayer: newPayload}
 						}