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/06/07 17:49:11 UTC
[plc4x] branch develop updated: feat(bacnet): implemented unique properties for device type
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
The following commit(s) were added to refs/heads/develop by this push:
new 0be992d35b feat(bacnet): implemented unique properties for device type
0be992d35b is described below
commit 0be992d35b83cd054c527de93a5491414f30ae17
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Jun 7 19:09:45 2022 +0200
feat(bacnet): implemented unique properties for device type
- ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS
- ACTIVE_COV_SUBSCRIPTIONS
- ACTIVE_VT_SESSIONS
- APDU_SEGMENT_TIMEOUT
- APDU_TIMEOUT
- APPLICATION_SOFTWARE_VERSION
- BACKUP_AND_RESTORE_STATE
- BACKUP_FAILURE_TIMEOUT
- BACKUP_PREPARATION_TIME
- CONFIGURATION_FILES
- DATABASE_REVISION
- DAYLIGHT_SAVINGS_STATUS
- DEPLOYED_PROFILE_LOCATION
- DEVICE_ADDRESS_BINDING
- FIRMWARE_REVISION
- LAST_RESTART_REASON
- LAST_RESTORE_TIME
- LOCAL_DATE
- LOCAL_TIME
- LOCATION
- MAX_APDU_LENGTH_ACCEPTED
- MAX_SEGMENTS_ACCEPTED
- MODEL_NAME
- NUMBER_OF_APDU_RETRIES
- OBJECT_LIST
- PROTOCOL_OBJECT_TYPES_SUPPORTED
- PROTOCOL_REVISION
- PROTOCOL_SERVICES_SUPPORTED
- PROTOCOL_VERSION
- RESTART_NOTIFICATION_RECIPIENTS
- RESTORE_COMPLETION_TIME
- RESTORE_PREPARATION_TIME
- SEGMENTATION_SUPPORTED
- SERIAL_NUMBER
- STRUCTURED_OBJECT_LIST
- SYSTEM_STATUS
- TIME_OF_DEVICE_RESTART
- TIME_SYNCHRONIZATION_INTERVAL
- TIME_SYNCHRONIZATION_RECIPIENTS
- UTC_OFFSET
- UTC_TIME_SYNCHRONIZATION_RECIPIENTS
- VENDOR_IDENTIFIER
- VENDOR_NAME
- VT_CLASSES_SUPPORTED
---
.../protocols/bacnetip/readwrite/ParserHelper.go | 38 ++
.../bacnetip/readwrite/XmlParserHelper.go | 42 +++
.../readwrite/model/BACnetAddressEnclosed.go | 46 +--
.../model/BACnetCOVMultipleSubscription.go | 300 ++++++++++++++++
...bscriptionListOfCovSubscriptionSpecification.go | 248 +++++++++++++
...ptionListOfCovSubscriptionSpecificationEntry.go | 195 +++++++++++
...riptionSpecificationEntryListOfCovReferences.go | 248 +++++++++++++
...onSpecificationEntryListOfCovReferencesEntry.go | 245 +++++++++++++
.../readwrite/model/BACnetCOVSubscription.go | 315 +++++++++++++++++
.../readwrite/model/BACnetConstructedData.go | 88 +++++
.../BACnetConstructedDataAPDUSegmentTimeout.go | 211 +++++++++++
.../model/BACnetConstructedDataAPDUTimeout.go | 211 +++++++++++
...onstructedDataActiveCOVMultipleSubscriptions.go | 226 ++++++++++++
.../BACnetConstructedDataActiveCOVSubscriptions.go | 226 ++++++++++++
.../model/BACnetConstructedDataActiveVTSessions.go | 226 ++++++++++++
...netConstructedDataApplicationSoftwareVersion.go | 211 +++++++++++
.../BACnetConstructedDataBackupAndRestoreState.go | 211 +++++++++++
.../BACnetConstructedDataBackupFailureTimeout.go | 211 +++++++++++
.../BACnetConstructedDataBackupPreparationTime.go | 211 +++++++++++
.../BACnetConstructedDataConfigurationFiles.go | 226 ++++++++++++
.../model/BACnetConstructedDataDatabaseRevision.go | 211 +++++++++++
.../BACnetConstructedDataDaylightSavingsStatus.go | 211 +++++++++++
...BACnetConstructedDataDeployedProfileLocation.go | 211 +++++++++++
.../BACnetConstructedDataDeviceAddressBinding.go | 226 ++++++++++++
.../model/BACnetConstructedDataFirmwareRevision.go | 211 +++++++++++
.../BACnetConstructedDataLastRestartReason.go | 211 +++++++++++
.../model/BACnetConstructedDataLastRestoreTime.go | 211 +++++++++++
.../model/BACnetConstructedDataLocalDate.go | 211 +++++++++++
.../model/BACnetConstructedDataLocalTime.go | 211 +++++++++++
.../model/BACnetConstructedDataLocation.go | 211 +++++++++++
.../BACnetConstructedDataMaxAPDULengthAccepted.go | 211 +++++++++++
.../BACnetConstructedDataMaxSegmentsAccepted.go | 211 +++++++++++
.../model/BACnetConstructedDataModelName.go | 211 +++++++++++
.../BACnetConstructedDataNumberOfAPDURetries.go | 211 +++++++++++
.../model/BACnetConstructedDataObjectList.go | 226 ++++++++++++
...tConstructedDataProtocolObjectTypesSupported.go | 211 +++++++++++
.../model/BACnetConstructedDataProtocolRevision.go | 211 +++++++++++
...CnetConstructedDataProtocolServicesSupported.go | 211 +++++++++++
.../model/BACnetConstructedDataProtocolVersion.go | 211 +++++++++++
...ConstructedDataRestartNotificationRecipients.go | 226 ++++++++++++
.../BACnetConstructedDataRestoreCompletionTime.go | 211 +++++++++++
.../BACnetConstructedDataRestorePreparationTime.go | 211 +++++++++++
.../BACnetConstructedDataSegmentationSupported.go | 211 +++++++++++
.../model/BACnetConstructedDataSerialNumber.go | 211 +++++++++++
.../BACnetConstructedDataStructuredObjectList.go | 226 ++++++++++++
.../model/BACnetConstructedDataSystemStatus.go | 211 +++++++++++
.../BACnetConstructedDataTimeOfDeviceRestart.go | 211 +++++++++++
...etConstructedDataTimeSynchronizationInterval.go | 211 +++++++++++
...ConstructedDataTimeSynchronizationRecipients.go | 226 ++++++++++++
.../model/BACnetConstructedDataUTCOffset.go | 211 +++++++++++
...structedDataUTCTimeSynchronizationRecipients.go | 226 ++++++++++++
.../BACnetConstructedDataVTClassesSupported.go | 226 ++++++++++++
.../model/BACnetConstructedDataVendorIdentifier.go | 211 +++++++++++
.../model/BACnetConstructedDataVendorName.go | 211 +++++++++++
.../BACnetObjectIdentifierOrUnsignedInteger.go | 320 +++++++++++++++++
.../model/BACnetObjectTypesSupportedTagged.go | 388 +++++++++++++++++++++
.../model/BACnetServicesSupportedTagged.go | 388 +++++++++++++++++++++
.../bacnetip/readwrite/model/BACnetVTSession.go | 230 ++++++++++++
.../plc4x/java/bacnetip/RandomPackagesTest.java | 312 +++++++----------
.../protocols/bacnetip/bacnet-bit-strings.mspec | 120 +++----
.../protocols/bacnetip/bacnet-enums.mspec | 300 ++++++++--------
.../resources/protocols/bacnetip/bacnetip.mspec | 318 ++++++++++++++---
.../src/main/script/produceTaggedBitStrings.groovy | 5 +-
63 files changed, 13129 insertions(+), 466 deletions(-)
diff --git a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
index 1b49121e69..31e7121f1d 100644
--- a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
+++ b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
@@ -193,6 +193,13 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
}
tagClass := model.TagClassByName(arguments[1])
return model.BACnetAccessRuleTimeRangeSpecifierTaggedParse(io, tagNumber, tagClass)
+ case "BACnetObjectTypesSupportedTagged":
+ tagNumber, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ tagClass := model.TagClassByName(arguments[1])
+ return model.BACnetObjectTypesSupportedTaggedParse(io, tagNumber, tagClass)
case "BVLCBroadcastDistributionTableEntry":
return model.BVLCBroadcastDistributionTableEntryParse(io)
case "BACnetBackupStateTagged":
@@ -208,6 +215,12 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
return nil, errors.Wrap(err, "Error parsing")
}
return model.BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValuesParse(io, tagNumber)
+ case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification":
+ tagNumber, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParse(io, tagNumber)
case "BACnetDeviceStatusTagged":
tagNumber, err := utils.StrToUint8(arguments[0])
if err != nil {
@@ -267,6 +280,12 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
return nil, errors.Wrap(err, "Error parsing")
}
return model.BACnetConfirmedServiceRequestParse(io, serviceRequestLength)
+ case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences":
+ tagNumber, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesParse(io, tagNumber)
case "BACnetTagPayloadUnsignedInteger":
actualLength, err := utils.StrToUint32(arguments[0])
if err != nil {
@@ -422,6 +441,8 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
}
tagClass := model.TagClassByName(arguments[1])
return model.BACnetAccessRuleLocationSpecifierTaggedParse(io, tagNumber, tagClass)
+ case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry":
+ return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntryParse(io)
case "BACnetAuthenticationFactorFormat":
return model.BACnetAuthenticationFactorFormatParse(io)
case "BACnetMaintenanceTagged":
@@ -541,6 +562,8 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
}
tagClass := model.TagClassByName(arguments[1])
return model.BACnetLifeSafetyStateTaggedParse(io, tagNumber, tagClass)
+ case "BACnetVTSession":
+ return model.BACnetVTSessionParse(io)
case "BACnetEventTimestampsEnclosed":
tagNumber, err := utils.StrToUint8(arguments[0])
if err != nil {
@@ -601,6 +624,8 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
}
tagClass := model.TagClassByName(arguments[1])
return model.MaxApduLengthAcceptedTaggedParse(io, tagNumber, tagClass)
+ case "BACnetObjectIdentifierOrUnsignedInteger":
+ return model.BACnetObjectIdentifierOrUnsignedIntegerParse(io)
case "BACnetPropertyStatesEnclosed":
tagNumber, err := utils.StrToUint8(arguments[0])
if err != nil {
@@ -676,6 +701,8 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
case "BACnetPropertyValue":
objectTypeArgument := model.BACnetObjectTypeByName(arguments[0])
return model.BACnetPropertyValueParse(io, objectTypeArgument)
+ case "BACnetCOVSubscription":
+ return model.BACnetCOVSubscriptionParse(io)
case "BACnetFaultParameterFaultLifeSafetyListOfFaultValues":
tagNumber, err := utils.StrToUint8(arguments[0])
if err != nil {
@@ -836,6 +863,13 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
}
tagClass := model.TagClassByName(arguments[1])
return model.BACnetDoorAlarmStateTaggedParse(io, tagNumber, tagClass)
+ case "BACnetServicesSupportedTagged":
+ tagNumber, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ tagClass := model.TagClassByName(arguments[1])
+ return model.BACnetServicesSupportedTaggedParse(io, tagNumber, tagClass)
case "BACnetWriteStatusTagged":
tagNumber, err := utils.StrToUint8(arguments[0])
if err != nil {
@@ -1251,6 +1285,8 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
return nil, errors.Wrap(err, "Error parsing")
}
return model.BACnetTimeStampsEnclosedParse(io, tagNumber)
+ case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry":
+ return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryParse(io)
case "BACnetHostAddressEnclosed":
tagNumber, err := utils.StrToUint8(arguments[0])
if err != nil {
@@ -1282,6 +1318,8 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
}
tagClass := model.TagClassByName(arguments[1])
return model.BACnetProtocolLevelTaggedParse(io, tagNumber, tagClass)
+ case "BACnetCOVMultipleSubscription":
+ return model.BACnetCOVMultipleSubscriptionParse(io)
case "BACnetActionList":
return model.BACnetActionListParse(io)
case "BACnetLightingCommand":
diff --git a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
index 63f4872c1c..f9ec3a5774 100644
--- a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
@@ -226,6 +226,14 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
tagNumber := uint8(parsedUint0)
tagClass := model.TagClassByName(parserArguments[1])
return model.BACnetAccessRuleTimeRangeSpecifierTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
+ case "BACnetObjectTypesSupportedTagged":
+ parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
+ if err != nil {
+ return nil, err
+ }
+ tagNumber := uint8(parsedUint0)
+ tagClass := model.TagClassByName(parserArguments[1])
+ return model.BACnetObjectTypesSupportedTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
case "BVLCBroadcastDistributionTableEntry":
return model.BVLCBroadcastDistributionTableEntryParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetBackupStateTagged":
@@ -243,6 +251,13 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
}
tagNumber := uint8(parsedUint0)
return model.BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValuesParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber)
+ case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification":
+ parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
+ if err != nil {
+ return nil, err
+ }
+ tagNumber := uint8(parsedUint0)
+ return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber)
case "BACnetDeviceStatusTagged":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
if err != nil {
@@ -310,6 +325,13 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
}
serviceRequestLength := uint16(parsedUint0)
return model.BACnetConfirmedServiceRequestParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), serviceRequestLength)
+ case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences":
+ parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
+ if err != nil {
+ return nil, err
+ }
+ tagNumber := uint8(parsedUint0)
+ return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber)
case "BACnetTagPayloadUnsignedInteger":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32)
if err != nil {
@@ -486,6 +508,8 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
tagNumber := uint8(parsedUint0)
tagClass := model.TagClassByName(parserArguments[1])
return model.BACnetAccessRuleLocationSpecifierTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
+ case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry":
+ return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntryParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetAuthenticationFactorFormat":
return model.BACnetAuthenticationFactorFormatParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetMaintenanceTagged":
@@ -620,6 +644,8 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
tagNumber := uint8(parsedUint0)
tagClass := model.TagClassByName(parserArguments[1])
return model.BACnetLifeSafetyStateTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
+ case "BACnetVTSession":
+ return model.BACnetVTSessionParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetEventTimestampsEnclosed":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
if err != nil {
@@ -688,6 +714,8 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
tagNumber := uint8(parsedUint0)
tagClass := model.TagClassByName(parserArguments[1])
return model.MaxApduLengthAcceptedTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
+ case "BACnetObjectIdentifierOrUnsignedInteger":
+ return model.BACnetObjectIdentifierOrUnsignedIntegerParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetPropertyStatesEnclosed":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
if err != nil {
@@ -772,6 +800,8 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
case "BACnetPropertyValue":
objectTypeArgument := model.BACnetObjectTypeByName(parserArguments[0])
return model.BACnetPropertyValueParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument)
+ case "BACnetCOVSubscription":
+ return model.BACnetCOVSubscriptionParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetFaultParameterFaultLifeSafetyListOfFaultValues":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
if err != nil {
@@ -954,6 +984,14 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
tagNumber := uint8(parsedUint0)
tagClass := model.TagClassByName(parserArguments[1])
return model.BACnetDoorAlarmStateTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
+ case "BACnetServicesSupportedTagged":
+ parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
+ if err != nil {
+ return nil, err
+ }
+ tagNumber := uint8(parsedUint0)
+ tagClass := model.TagClassByName(parserArguments[1])
+ return model.BACnetServicesSupportedTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
case "BACnetWriteStatusTagged":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
if err != nil {
@@ -1418,6 +1456,8 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
}
tagNumber := uint8(parsedUint0)
return model.BACnetTimeStampsEnclosedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber)
+ case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry":
+ return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetHostAddressEnclosed":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
if err != nil {
@@ -1453,6 +1493,8 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
tagNumber := uint8(parsedUint0)
tagClass := model.TagClassByName(parserArguments[1])
return model.BACnetProtocolLevelTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
+ case "BACnetCOVMultipleSubscription":
+ return model.BACnetCOVMultipleSubscriptionParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetActionList":
return model.BACnetActionListParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetLightingCommand":
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressEnclosed.go
index 14144eca59..ddb2cc8890 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressEnclosed.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressEnclosed.go
@@ -29,7 +29,7 @@ import (
// BACnetAddressEnclosed is the data-structure of this message
type BACnetAddressEnclosed struct {
OpeningTag *BACnetOpeningTag
- Recipient *BACnetRecipient
+ Address *BACnetAddress
ClosingTag *BACnetClosingTag
// Arguments.
@@ -40,8 +40,8 @@ type BACnetAddressEnclosed struct {
type IBACnetAddressEnclosed interface {
// GetOpeningTag returns OpeningTag (property field)
GetOpeningTag() *BACnetOpeningTag
- // GetRecipient returns Recipient (property field)
- GetRecipient() *BACnetRecipient
+ // GetAddress returns Address (property field)
+ GetAddress() *BACnetAddress
// GetClosingTag returns ClosingTag (property field)
GetClosingTag() *BACnetClosingTag
// GetLengthInBytes returns the length in bytes
@@ -61,8 +61,8 @@ func (m *BACnetAddressEnclosed) GetOpeningTag() *BACnetOpeningTag {
return m.OpeningTag
}
-func (m *BACnetAddressEnclosed) GetRecipient() *BACnetRecipient {
- return m.Recipient
+func (m *BACnetAddressEnclosed) GetAddress() *BACnetAddress {
+ return m.Address
}
func (m *BACnetAddressEnclosed) GetClosingTag() *BACnetClosingTag {
@@ -75,8 +75,8 @@ func (m *BACnetAddressEnclosed) GetClosingTag() *BACnetClosingTag {
///////////////////////////////////////////////////////////
// NewBACnetAddressEnclosed factory function for BACnetAddressEnclosed
-func NewBACnetAddressEnclosed(openingTag *BACnetOpeningTag, recipient *BACnetRecipient, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetAddressEnclosed {
- return &BACnetAddressEnclosed{OpeningTag: openingTag, Recipient: recipient, ClosingTag: closingTag, TagNumber: tagNumber}
+func NewBACnetAddressEnclosed(openingTag *BACnetOpeningTag, address *BACnetAddress, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetAddressEnclosed {
+ return &BACnetAddressEnclosed{OpeningTag: openingTag, Address: address, ClosingTag: closingTag, TagNumber: tagNumber}
}
func CastBACnetAddressEnclosed(structType interface{}) *BACnetAddressEnclosed {
@@ -103,8 +103,8 @@ func (m *BACnetAddressEnclosed) GetLengthInBitsConditional(lastItem bool) uint16
// Simple field (openingTag)
lengthInBits += m.OpeningTag.GetLengthInBits()
- // Simple field (recipient)
- lengthInBits += m.Recipient.GetLengthInBits()
+ // Simple field (address)
+ lengthInBits += m.Address.GetLengthInBits()
// Simple field (closingTag)
lengthInBits += m.ClosingTag.GetLengthInBits()
@@ -138,16 +138,16 @@ func BACnetAddressEnclosedParse(readBuffer utils.ReadBuffer, tagNumber uint8) (*
return nil, closeErr
}
- // Simple Field (recipient)
- if pullErr := readBuffer.PullContext("recipient"); pullErr != nil {
+ // Simple Field (address)
+ if pullErr := readBuffer.PullContext("address"); pullErr != nil {
return nil, pullErr
}
- _recipient, _recipientErr := BACnetRecipientParse(readBuffer)
- if _recipientErr != nil {
- return nil, errors.Wrap(_recipientErr, "Error parsing 'recipient' field")
+ _address, _addressErr := BACnetAddressParse(readBuffer)
+ if _addressErr != nil {
+ return nil, errors.Wrap(_addressErr, "Error parsing 'address' field")
}
- recipient := CastBACnetRecipient(_recipient)
- if closeErr := readBuffer.CloseContext("recipient"); closeErr != nil {
+ address := CastBACnetAddress(_address)
+ if closeErr := readBuffer.CloseContext("address"); closeErr != nil {
return nil, closeErr
}
@@ -169,7 +169,7 @@ func BACnetAddressEnclosedParse(readBuffer utils.ReadBuffer, tagNumber uint8) (*
}
// Create the instance
- return NewBACnetAddressEnclosed(openingTag, recipient, closingTag, tagNumber), nil
+ return NewBACnetAddressEnclosed(openingTag, address, closingTag, tagNumber), nil
}
func (m *BACnetAddressEnclosed) Serialize(writeBuffer utils.WriteBuffer) error {
@@ -191,16 +191,16 @@ func (m *BACnetAddressEnclosed) Serialize(writeBuffer utils.WriteBuffer) error {
return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field")
}
- // Simple Field (recipient)
- if pushErr := writeBuffer.PushContext("recipient"); pushErr != nil {
+ // Simple Field (address)
+ if pushErr := writeBuffer.PushContext("address"); pushErr != nil {
return pushErr
}
- _recipientErr := m.Recipient.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("recipient"); popErr != nil {
+ _addressErr := m.Address.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("address"); popErr != nil {
return popErr
}
- if _recipientErr != nil {
- return errors.Wrap(_recipientErr, "Error serializing 'recipient' field")
+ if _addressErr != nil {
+ return errors.Wrap(_addressErr, "Error serializing 'address' field")
}
// Simple Field (closingTag)
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscription.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscription.go
new file mode 100644
index 0000000000..4ce5d79be4
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscription.go
@@ -0,0 +1,300 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetCOVMultipleSubscription is the data-structure of this message
+type BACnetCOVMultipleSubscription struct {
+ Recipient *BACnetRecipientProcessEnclosed
+ IssueConfirmedNotifications *BACnetContextTagBoolean
+ TimeRemaining *BACnetContextTagUnsignedInteger
+ MaxNotificationDelay *BACnetContextTagUnsignedInteger
+ ListOfCovSubscriptionSpecification *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification
+}
+
+// IBACnetCOVMultipleSubscription is the corresponding interface of BACnetCOVMultipleSubscription
+type IBACnetCOVMultipleSubscription interface {
+ // GetRecipient returns Recipient (property field)
+ GetRecipient() *BACnetRecipientProcessEnclosed
+ // GetIssueConfirmedNotifications returns IssueConfirmedNotifications (property field)
+ GetIssueConfirmedNotifications() *BACnetContextTagBoolean
+ // GetTimeRemaining returns TimeRemaining (property field)
+ GetTimeRemaining() *BACnetContextTagUnsignedInteger
+ // GetMaxNotificationDelay returns MaxNotificationDelay (property field)
+ GetMaxNotificationDelay() *BACnetContextTagUnsignedInteger
+ // GetListOfCovSubscriptionSpecification returns ListOfCovSubscriptionSpecification (property field)
+ GetListOfCovSubscriptionSpecification() *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetCOVMultipleSubscription) GetRecipient() *BACnetRecipientProcessEnclosed {
+ return m.Recipient
+}
+
+func (m *BACnetCOVMultipleSubscription) GetIssueConfirmedNotifications() *BACnetContextTagBoolean {
+ return m.IssueConfirmedNotifications
+}
+
+func (m *BACnetCOVMultipleSubscription) GetTimeRemaining() *BACnetContextTagUnsignedInteger {
+ return m.TimeRemaining
+}
+
+func (m *BACnetCOVMultipleSubscription) GetMaxNotificationDelay() *BACnetContextTagUnsignedInteger {
+ return m.MaxNotificationDelay
+}
+
+func (m *BACnetCOVMultipleSubscription) GetListOfCovSubscriptionSpecification() *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification {
+ return m.ListOfCovSubscriptionSpecification
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetCOVMultipleSubscription factory function for BACnetCOVMultipleSubscription
+func NewBACnetCOVMultipleSubscription(recipient *BACnetRecipientProcessEnclosed, issueConfirmedNotifications *BACnetContextTagBoolean, timeRemaining *BACnetContextTagUnsignedInteger, maxNotificationDelay *BACnetContextTagUnsignedInteger, listOfCovSubscriptionSpecification *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) *BACnetCOVMultipleSubscription {
+ return &BACnetCOVMultipleSubscription{Recipient: recipient, IssueConfirmedNotifications: issueConfirmedNotifications, TimeRemaining: timeRemaining, MaxNotificationDelay: maxNotificationDelay, ListOfCovSubscriptionSpecification: listOfCovSubscriptionSpecification}
+}
+
+func CastBACnetCOVMultipleSubscription(structType interface{}) *BACnetCOVMultipleSubscription {
+ if casted, ok := structType.(BACnetCOVMultipleSubscription); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetCOVMultipleSubscription); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetCOVMultipleSubscription) GetTypeName() string {
+ return "BACnetCOVMultipleSubscription"
+}
+
+func (m *BACnetCOVMultipleSubscription) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetCOVMultipleSubscription) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (recipient)
+ lengthInBits += m.Recipient.GetLengthInBits()
+
+ // Simple field (issueConfirmedNotifications)
+ lengthInBits += m.IssueConfirmedNotifications.GetLengthInBits()
+
+ // Simple field (timeRemaining)
+ lengthInBits += m.TimeRemaining.GetLengthInBits()
+
+ // Simple field (maxNotificationDelay)
+ lengthInBits += m.MaxNotificationDelay.GetLengthInBits()
+
+ // Simple field (listOfCovSubscriptionSpecification)
+ lengthInBits += m.ListOfCovSubscriptionSpecification.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetCOVMultipleSubscription) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetCOVMultipleSubscriptionParse(readBuffer utils.ReadBuffer) (*BACnetCOVMultipleSubscription, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetCOVMultipleSubscription"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (recipient)
+ if pullErr := readBuffer.PullContext("recipient"); pullErr != nil {
+ return nil, pullErr
+ }
+ _recipient, _recipientErr := BACnetRecipientProcessEnclosedParse(readBuffer, uint8(uint8(0)))
+ if _recipientErr != nil {
+ return nil, errors.Wrap(_recipientErr, "Error parsing 'recipient' field")
+ }
+ recipient := CastBACnetRecipientProcessEnclosed(_recipient)
+ if closeErr := readBuffer.CloseContext("recipient"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Simple Field (issueConfirmedNotifications)
+ if pullErr := readBuffer.PullContext("issueConfirmedNotifications"); pullErr != nil {
+ return nil, pullErr
+ }
+ _issueConfirmedNotifications, _issueConfirmedNotificationsErr := BACnetContextTagParse(readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BOOLEAN))
+ if _issueConfirmedNotificationsErr != nil {
+ return nil, errors.Wrap(_issueConfirmedNotificationsErr, "Error parsing 'issueConfirmedNotifications' field")
+ }
+ issueConfirmedNotifications := CastBACnetContextTagBoolean(_issueConfirmedNotifications)
+ if closeErr := readBuffer.CloseContext("issueConfirmedNotifications"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Simple Field (timeRemaining)
+ if pullErr := readBuffer.PullContext("timeRemaining"); pullErr != nil {
+ return nil, pullErr
+ }
+ _timeRemaining, _timeRemainingErr := BACnetContextTagParse(readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER))
+ if _timeRemainingErr != nil {
+ return nil, errors.Wrap(_timeRemainingErr, "Error parsing 'timeRemaining' field")
+ }
+ timeRemaining := CastBACnetContextTagUnsignedInteger(_timeRemaining)
+ if closeErr := readBuffer.CloseContext("timeRemaining"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Simple Field (maxNotificationDelay)
+ if pullErr := readBuffer.PullContext("maxNotificationDelay"); pullErr != nil {
+ return nil, pullErr
+ }
+ _maxNotificationDelay, _maxNotificationDelayErr := BACnetContextTagParse(readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER))
+ if _maxNotificationDelayErr != nil {
+ return nil, errors.Wrap(_maxNotificationDelayErr, "Error parsing 'maxNotificationDelay' field")
+ }
+ maxNotificationDelay := CastBACnetContextTagUnsignedInteger(_maxNotificationDelay)
+ if closeErr := readBuffer.CloseContext("maxNotificationDelay"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Simple Field (listOfCovSubscriptionSpecification)
+ if pullErr := readBuffer.PullContext("listOfCovSubscriptionSpecification"); pullErr != nil {
+ return nil, pullErr
+ }
+ _listOfCovSubscriptionSpecification, _listOfCovSubscriptionSpecificationErr := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParse(readBuffer, uint8(uint8(4)))
+ if _listOfCovSubscriptionSpecificationErr != nil {
+ return nil, errors.Wrap(_listOfCovSubscriptionSpecificationErr, "Error parsing 'listOfCovSubscriptionSpecification' field")
+ }
+ listOfCovSubscriptionSpecification := CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification(_listOfCovSubscriptionSpecification)
+ if closeErr := readBuffer.CloseContext("listOfCovSubscriptionSpecification"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetCOVMultipleSubscription"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetCOVMultipleSubscription(recipient, issueConfirmedNotifications, timeRemaining, maxNotificationDelay, listOfCovSubscriptionSpecification), nil
+}
+
+func (m *BACnetCOVMultipleSubscription) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetCOVMultipleSubscription"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (recipient)
+ if pushErr := writeBuffer.PushContext("recipient"); pushErr != nil {
+ return pushErr
+ }
+ _recipientErr := m.Recipient.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("recipient"); popErr != nil {
+ return popErr
+ }
+ if _recipientErr != nil {
+ return errors.Wrap(_recipientErr, "Error serializing 'recipient' field")
+ }
+
+ // Simple Field (issueConfirmedNotifications)
+ if pushErr := writeBuffer.PushContext("issueConfirmedNotifications"); pushErr != nil {
+ return pushErr
+ }
+ _issueConfirmedNotificationsErr := m.IssueConfirmedNotifications.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("issueConfirmedNotifications"); popErr != nil {
+ return popErr
+ }
+ if _issueConfirmedNotificationsErr != nil {
+ return errors.Wrap(_issueConfirmedNotificationsErr, "Error serializing 'issueConfirmedNotifications' field")
+ }
+
+ // Simple Field (timeRemaining)
+ if pushErr := writeBuffer.PushContext("timeRemaining"); pushErr != nil {
+ return pushErr
+ }
+ _timeRemainingErr := m.TimeRemaining.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("timeRemaining"); popErr != nil {
+ return popErr
+ }
+ if _timeRemainingErr != nil {
+ return errors.Wrap(_timeRemainingErr, "Error serializing 'timeRemaining' field")
+ }
+
+ // Simple Field (maxNotificationDelay)
+ if pushErr := writeBuffer.PushContext("maxNotificationDelay"); pushErr != nil {
+ return pushErr
+ }
+ _maxNotificationDelayErr := m.MaxNotificationDelay.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("maxNotificationDelay"); popErr != nil {
+ return popErr
+ }
+ if _maxNotificationDelayErr != nil {
+ return errors.Wrap(_maxNotificationDelayErr, "Error serializing 'maxNotificationDelay' field")
+ }
+
+ // Simple Field (listOfCovSubscriptionSpecification)
+ if pushErr := writeBuffer.PushContext("listOfCovSubscriptionSpecification"); pushErr != nil {
+ return pushErr
+ }
+ _listOfCovSubscriptionSpecificationErr := m.ListOfCovSubscriptionSpecification.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("listOfCovSubscriptionSpecification"); popErr != nil {
+ return popErr
+ }
+ if _listOfCovSubscriptionSpecificationErr != nil {
+ return errors.Wrap(_listOfCovSubscriptionSpecificationErr, "Error serializing 'listOfCovSubscriptionSpecification' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetCOVMultipleSubscription"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetCOVMultipleSubscription) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification.go
new file mode 100644
index 0000000000..9a730fe1ad
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification.go
@@ -0,0 +1,248 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification is the data-structure of this message
+type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification struct {
+ OpeningTag *BACnetOpeningTag
+ ListOfCovSubscriptionSpecificationEntry []*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry
+ ClosingTag *BACnetClosingTag
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification is the corresponding interface of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification
+type IBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification interface {
+ // GetOpeningTag returns OpeningTag (property field)
+ GetOpeningTag() *BACnetOpeningTag
+ // GetListOfCovSubscriptionSpecificationEntry returns ListOfCovSubscriptionSpecificationEntry (property field)
+ GetListOfCovSubscriptionSpecificationEntry() []*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry
+ // GetClosingTag returns ClosingTag (property field)
+ GetClosingTag() *BACnetClosingTag
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) GetOpeningTag() *BACnetOpeningTag {
+ return m.OpeningTag
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) GetListOfCovSubscriptionSpecificationEntry() []*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry {
+ return m.ListOfCovSubscriptionSpecificationEntry
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) GetClosingTag() *BACnetClosingTag {
+ return m.ClosingTag
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification factory function for BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification
+func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification(openingTag *BACnetOpeningTag, listOfCovSubscriptionSpecificationEntry []*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification {
+ return &BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification{OpeningTag: openingTag, ListOfCovSubscriptionSpecificationEntry: listOfCovSubscriptionSpecificationEntry, ClosingTag: closingTag, TagNumber: tagNumber}
+}
+
+func CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification(structType interface{}) *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification {
+ if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) GetTypeName() string {
+ return "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification"
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (openingTag)
+ lengthInBits += m.OpeningTag.GetLengthInBits()
+
+ // Array field
+ if len(m.ListOfCovSubscriptionSpecificationEntry) > 0 {
+ for _, element := range m.ListOfCovSubscriptionSpecificationEntry {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ // Simple field (closingTag)
+ lengthInBits += m.ClosingTag.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParse(readBuffer utils.ReadBuffer, tagNumber uint8) (*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (openingTag)
+ if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil {
+ return nil, pullErr
+ }
+ _openingTag, _openingTagErr := BACnetOpeningTagParse(readBuffer, uint8(tagNumber))
+ if _openingTagErr != nil {
+ return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field")
+ }
+ openingTag := CastBACnetOpeningTag(_openingTag)
+ if closeErr := readBuffer.CloseContext("openingTag"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Array field (listOfCovSubscriptionSpecificationEntry)
+ if pullErr := readBuffer.PullContext("listOfCovSubscriptionSpecificationEntry", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ listOfCovSubscriptionSpecificationEntry := make([]*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'listOfCovSubscriptionSpecificationEntry' field")
+ }
+ listOfCovSubscriptionSpecificationEntry = append(listOfCovSubscriptionSpecificationEntry, CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("listOfCovSubscriptionSpecificationEntry", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Simple Field (closingTag)
+ if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil {
+ return nil, pullErr
+ }
+ _closingTag, _closingTagErr := BACnetClosingTagParse(readBuffer, uint8(tagNumber))
+ if _closingTagErr != nil {
+ return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field")
+ }
+ closingTag := CastBACnetClosingTag(_closingTag)
+ if closeErr := readBuffer.CloseContext("closingTag"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification(openingTag, listOfCovSubscriptionSpecificationEntry, closingTag, tagNumber), nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (openingTag)
+ if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil {
+ return pushErr
+ }
+ _openingTagErr := m.OpeningTag.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("openingTag"); popErr != nil {
+ return popErr
+ }
+ if _openingTagErr != nil {
+ return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field")
+ }
+
+ // Array Field (listOfCovSubscriptionSpecificationEntry)
+ if m.ListOfCovSubscriptionSpecificationEntry != nil {
+ if pushErr := writeBuffer.PushContext("listOfCovSubscriptionSpecificationEntry", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.ListOfCovSubscriptionSpecificationEntry {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'listOfCovSubscriptionSpecificationEntry' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("listOfCovSubscriptionSpecificationEntry", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ // Simple Field (closingTag)
+ if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil {
+ return pushErr
+ }
+ _closingTagErr := m.ClosingTag.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("closingTag"); popErr != nil {
+ return popErr
+ }
+ if _closingTagErr != nil {
+ return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry.go
new file mode 100644
index 0000000000..c643b124c3
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry.go
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry is the data-structure of this message
+type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry struct {
+ MonitoredObjectIdentifier *BACnetContextTagObjectIdentifier
+ ListOfCovReferences *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences
+}
+
+// IBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry is the corresponding interface of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry
+type IBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry interface {
+ // GetMonitoredObjectIdentifier returns MonitoredObjectIdentifier (property field)
+ GetMonitoredObjectIdentifier() *BACnetContextTagObjectIdentifier
+ // GetListOfCovReferences returns ListOfCovReferences (property field)
+ GetListOfCovReferences() *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) GetMonitoredObjectIdentifier() *BACnetContextTagObjectIdentifier {
+ return m.MonitoredObjectIdentifier
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) GetListOfCovReferences() *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences {
+ return m.ListOfCovReferences
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry factory function for BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry
+func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry(monitoredObjectIdentifier *BACnetContextTagObjectIdentifier, listOfCovReferences *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry {
+ return &BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry{MonitoredObjectIdentifier: monitoredObjectIdentifier, ListOfCovReferences: listOfCovReferences}
+}
+
+func CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry(structType interface{}) *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry {
+ if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) GetTypeName() string {
+ return "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry"
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (monitoredObjectIdentifier)
+ lengthInBits += m.MonitoredObjectIdentifier.GetLengthInBits()
+
+ // Simple field (listOfCovReferences)
+ lengthInBits += m.ListOfCovReferences.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryParse(readBuffer utils.ReadBuffer) (*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (monitoredObjectIdentifier)
+ if pullErr := readBuffer.PullContext("monitoredObjectIdentifier"); pullErr != nil {
+ return nil, pullErr
+ }
+ _monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParse(readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER))
+ if _monitoredObjectIdentifierErr != nil {
+ return nil, errors.Wrap(_monitoredObjectIdentifierErr, "Error parsing 'monitoredObjectIdentifier' field")
+ }
+ monitoredObjectIdentifier := CastBACnetContextTagObjectIdentifier(_monitoredObjectIdentifier)
+ if closeErr := readBuffer.CloseContext("monitoredObjectIdentifier"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Simple Field (listOfCovReferences)
+ if pullErr := readBuffer.PullContext("listOfCovReferences"); pullErr != nil {
+ return nil, pullErr
+ }
+ _listOfCovReferences, _listOfCovReferencesErr := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesParse(readBuffer, uint8(uint8(1)))
+ if _listOfCovReferencesErr != nil {
+ return nil, errors.Wrap(_listOfCovReferencesErr, "Error parsing 'listOfCovReferences' field")
+ }
+ listOfCovReferences := CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences(_listOfCovReferences)
+ if closeErr := readBuffer.CloseContext("listOfCovReferences"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry(monitoredObjectIdentifier, listOfCovReferences), nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (monitoredObjectIdentifier)
+ if pushErr := writeBuffer.PushContext("monitoredObjectIdentifier"); pushErr != nil {
+ return pushErr
+ }
+ _monitoredObjectIdentifierErr := m.MonitoredObjectIdentifier.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("monitoredObjectIdentifier"); popErr != nil {
+ return popErr
+ }
+ if _monitoredObjectIdentifierErr != nil {
+ return errors.Wrap(_monitoredObjectIdentifierErr, "Error serializing 'monitoredObjectIdentifier' field")
+ }
+
+ // Simple Field (listOfCovReferences)
+ if pushErr := writeBuffer.PushContext("listOfCovReferences"); pushErr != nil {
+ return pushErr
+ }
+ _listOfCovReferencesErr := m.ListOfCovReferences.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("listOfCovReferences"); popErr != nil {
+ return popErr
+ }
+ if _listOfCovReferencesErr != nil {
+ return errors.Wrap(_listOfCovReferencesErr, "Error serializing 'listOfCovReferences' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences.go
new file mode 100644
index 0000000000..85f9cc32d0
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences.go
@@ -0,0 +1,248 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences is the data-structure of this message
+type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences struct {
+ OpeningTag *BACnetOpeningTag
+ ListOfCovReferences []*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry
+ ClosingTag *BACnetClosingTag
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences is the corresponding interface of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences
+type IBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences interface {
+ // GetOpeningTag returns OpeningTag (property field)
+ GetOpeningTag() *BACnetOpeningTag
+ // GetListOfCovReferences returns ListOfCovReferences (property field)
+ GetListOfCovReferences() []*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry
+ // GetClosingTag returns ClosingTag (property field)
+ GetClosingTag() *BACnetClosingTag
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) GetOpeningTag() *BACnetOpeningTag {
+ return m.OpeningTag
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) GetListOfCovReferences() []*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry {
+ return m.ListOfCovReferences
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) GetClosingTag() *BACnetClosingTag {
+ return m.ClosingTag
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences factory function for BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences
+func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences(openingTag *BACnetOpeningTag, listOfCovReferences []*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences {
+ return &BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences{OpeningTag: openingTag, ListOfCovReferences: listOfCovReferences, ClosingTag: closingTag, TagNumber: tagNumber}
+}
+
+func CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences(structType interface{}) *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences {
+ if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) GetTypeName() string {
+ return "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences"
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (openingTag)
+ lengthInBits += m.OpeningTag.GetLengthInBits()
+
+ // Array field
+ if len(m.ListOfCovReferences) > 0 {
+ for _, element := range m.ListOfCovReferences {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ // Simple field (closingTag)
+ lengthInBits += m.ClosingTag.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesParse(readBuffer utils.ReadBuffer, tagNumber uint8) (*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (openingTag)
+ if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil {
+ return nil, pullErr
+ }
+ _openingTag, _openingTagErr := BACnetOpeningTagParse(readBuffer, uint8(tagNumber))
+ if _openingTagErr != nil {
+ return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field")
+ }
+ openingTag := CastBACnetOpeningTag(_openingTag)
+ if closeErr := readBuffer.CloseContext("openingTag"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Array field (listOfCovReferences)
+ if pullErr := readBuffer.PullContext("listOfCovReferences", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ listOfCovReferences := make([]*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntryParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'listOfCovReferences' field")
+ }
+ listOfCovReferences = append(listOfCovReferences, CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("listOfCovReferences", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Simple Field (closingTag)
+ if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil {
+ return nil, pullErr
+ }
+ _closingTag, _closingTagErr := BACnetClosingTagParse(readBuffer, uint8(tagNumber))
+ if _closingTagErr != nil {
+ return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field")
+ }
+ closingTag := CastBACnetClosingTag(_closingTag)
+ if closeErr := readBuffer.CloseContext("closingTag"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences(openingTag, listOfCovReferences, closingTag, tagNumber), nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (openingTag)
+ if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil {
+ return pushErr
+ }
+ _openingTagErr := m.OpeningTag.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("openingTag"); popErr != nil {
+ return popErr
+ }
+ if _openingTagErr != nil {
+ return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field")
+ }
+
+ // Array Field (listOfCovReferences)
+ if m.ListOfCovReferences != nil {
+ if pushErr := writeBuffer.PushContext("listOfCovReferences", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.ListOfCovReferences {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'listOfCovReferences' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("listOfCovReferences", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ // Simple Field (closingTag)
+ if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil {
+ return pushErr
+ }
+ _closingTagErr := m.ClosingTag.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("closingTag"); popErr != nil {
+ return popErr
+ }
+ if _closingTagErr != nil {
+ return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry.go
new file mode 100644
index 0000000000..7431d9656a
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry.go
@@ -0,0 +1,245 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "io"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry is the data-structure of this message
+type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry struct {
+ MonitoredProperty *BACnetPropertyReferenceEnclosed
+ CovIncrement *BACnetContextTagReal
+ Timestamped *BACnetContextTagBoolean
+}
+
+// IBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry is the corresponding interface of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry
+type IBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry interface {
+ // GetMonitoredProperty returns MonitoredProperty (property field)
+ GetMonitoredProperty() *BACnetPropertyReferenceEnclosed
+ // GetCovIncrement returns CovIncrement (property field)
+ GetCovIncrement() *BACnetContextTagReal
+ // GetTimestamped returns Timestamped (property field)
+ GetTimestamped() *BACnetContextTagBoolean
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) GetMonitoredProperty() *BACnetPropertyReferenceEnclosed {
+ return m.MonitoredProperty
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) GetCovIncrement() *BACnetContextTagReal {
+ return m.CovIncrement
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) GetTimestamped() *BACnetContextTagBoolean {
+ return m.Timestamped
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry factory function for BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry
+func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry(monitoredProperty *BACnetPropertyReferenceEnclosed, covIncrement *BACnetContextTagReal, timestamped *BACnetContextTagBoolean) *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry {
+ return &BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry{MonitoredProperty: monitoredProperty, CovIncrement: covIncrement, Timestamped: timestamped}
+}
+
+func CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry(structType interface{}) *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry {
+ if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) GetTypeName() string {
+ return "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry"
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (monitoredProperty)
+ lengthInBits += m.MonitoredProperty.GetLengthInBits()
+
+ // Optional Field (covIncrement)
+ if m.CovIncrement != nil {
+ lengthInBits += (*m.CovIncrement).GetLengthInBits()
+ }
+
+ // Simple field (timestamped)
+ lengthInBits += m.Timestamped.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntryParse(readBuffer utils.ReadBuffer) (*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (monitoredProperty)
+ if pullErr := readBuffer.PullContext("monitoredProperty"); pullErr != nil {
+ return nil, pullErr
+ }
+ _monitoredProperty, _monitoredPropertyErr := BACnetPropertyReferenceEnclosedParse(readBuffer, uint8(uint8(0)))
+ if _monitoredPropertyErr != nil {
+ return nil, errors.Wrap(_monitoredPropertyErr, "Error parsing 'monitoredProperty' field")
+ }
+ monitoredProperty := CastBACnetPropertyReferenceEnclosed(_monitoredProperty)
+ if closeErr := readBuffer.CloseContext("monitoredProperty"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Optional Field (covIncrement) (Can be skipped, if a given expression evaluates to false)
+ var covIncrement *BACnetContextTagReal = nil
+ {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("covIncrement"); pullErr != nil {
+ return nil, pullErr
+ }
+ _val, _err := BACnetContextTagParse(readBuffer, uint8(1), BACnetDataType_REAL)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'covIncrement' field")
+ default:
+ covIncrement = CastBACnetContextTagReal(_val)
+ if closeErr := readBuffer.CloseContext("covIncrement"); closeErr != nil {
+ return nil, closeErr
+ }
+ }
+ }
+
+ // Simple Field (timestamped)
+ if pullErr := readBuffer.PullContext("timestamped"); pullErr != nil {
+ return nil, pullErr
+ }
+ _timestamped, _timestampedErr := BACnetContextTagParse(readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BOOLEAN))
+ if _timestampedErr != nil {
+ return nil, errors.Wrap(_timestampedErr, "Error parsing 'timestamped' field")
+ }
+ timestamped := CastBACnetContextTagBoolean(_timestamped)
+ if closeErr := readBuffer.CloseContext("timestamped"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry(monitoredProperty, covIncrement, timestamped), nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (monitoredProperty)
+ if pushErr := writeBuffer.PushContext("monitoredProperty"); pushErr != nil {
+ return pushErr
+ }
+ _monitoredPropertyErr := m.MonitoredProperty.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("monitoredProperty"); popErr != nil {
+ return popErr
+ }
+ if _monitoredPropertyErr != nil {
+ return errors.Wrap(_monitoredPropertyErr, "Error serializing 'monitoredProperty' field")
+ }
+
+ // Optional Field (covIncrement) (Can be skipped, if the value is null)
+ var covIncrement *BACnetContextTagReal = nil
+ if m.CovIncrement != nil {
+ if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil {
+ return pushErr
+ }
+ covIncrement = m.CovIncrement
+ _covIncrementErr := covIncrement.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil {
+ return popErr
+ }
+ if _covIncrementErr != nil {
+ return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field")
+ }
+ }
+
+ // Simple Field (timestamped)
+ if pushErr := writeBuffer.PushContext("timestamped"); pushErr != nil {
+ return pushErr
+ }
+ _timestampedErr := m.Timestamped.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("timestamped"); popErr != nil {
+ return popErr
+ }
+ if _timestampedErr != nil {
+ return errors.Wrap(_timestampedErr, "Error serializing 'timestamped' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVSubscription.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVSubscription.go
new file mode 100644
index 0000000000..a2fd7e9390
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVSubscription.go
@@ -0,0 +1,315 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "io"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetCOVSubscription is the data-structure of this message
+type BACnetCOVSubscription struct {
+ Recipient *BACnetRecipientProcessEnclosed
+ MonitoredPropertyReference *BACnetObjectPropertyReferenceEnclosed
+ IssueConfirmedNotifications *BACnetContextTagBoolean
+ TimeRemaining *BACnetContextTagUnsignedInteger
+ CovIncrement *BACnetContextTagReal
+}
+
+// IBACnetCOVSubscription is the corresponding interface of BACnetCOVSubscription
+type IBACnetCOVSubscription interface {
+ // GetRecipient returns Recipient (property field)
+ GetRecipient() *BACnetRecipientProcessEnclosed
+ // GetMonitoredPropertyReference returns MonitoredPropertyReference (property field)
+ GetMonitoredPropertyReference() *BACnetObjectPropertyReferenceEnclosed
+ // GetIssueConfirmedNotifications returns IssueConfirmedNotifications (property field)
+ GetIssueConfirmedNotifications() *BACnetContextTagBoolean
+ // GetTimeRemaining returns TimeRemaining (property field)
+ GetTimeRemaining() *BACnetContextTagUnsignedInteger
+ // GetCovIncrement returns CovIncrement (property field)
+ GetCovIncrement() *BACnetContextTagReal
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetCOVSubscription) GetRecipient() *BACnetRecipientProcessEnclosed {
+ return m.Recipient
+}
+
+func (m *BACnetCOVSubscription) GetMonitoredPropertyReference() *BACnetObjectPropertyReferenceEnclosed {
+ return m.MonitoredPropertyReference
+}
+
+func (m *BACnetCOVSubscription) GetIssueConfirmedNotifications() *BACnetContextTagBoolean {
+ return m.IssueConfirmedNotifications
+}
+
+func (m *BACnetCOVSubscription) GetTimeRemaining() *BACnetContextTagUnsignedInteger {
+ return m.TimeRemaining
+}
+
+func (m *BACnetCOVSubscription) GetCovIncrement() *BACnetContextTagReal {
+ return m.CovIncrement
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetCOVSubscription factory function for BACnetCOVSubscription
+func NewBACnetCOVSubscription(recipient *BACnetRecipientProcessEnclosed, monitoredPropertyReference *BACnetObjectPropertyReferenceEnclosed, issueConfirmedNotifications *BACnetContextTagBoolean, timeRemaining *BACnetContextTagUnsignedInteger, covIncrement *BACnetContextTagReal) *BACnetCOVSubscription {
+ return &BACnetCOVSubscription{Recipient: recipient, MonitoredPropertyReference: monitoredPropertyReference, IssueConfirmedNotifications: issueConfirmedNotifications, TimeRemaining: timeRemaining, CovIncrement: covIncrement}
+}
+
+func CastBACnetCOVSubscription(structType interface{}) *BACnetCOVSubscription {
+ if casted, ok := structType.(BACnetCOVSubscription); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetCOVSubscription); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetCOVSubscription) GetTypeName() string {
+ return "BACnetCOVSubscription"
+}
+
+func (m *BACnetCOVSubscription) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetCOVSubscription) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (recipient)
+ lengthInBits += m.Recipient.GetLengthInBits()
+
+ // Simple field (monitoredPropertyReference)
+ lengthInBits += m.MonitoredPropertyReference.GetLengthInBits()
+
+ // Simple field (issueConfirmedNotifications)
+ lengthInBits += m.IssueConfirmedNotifications.GetLengthInBits()
+
+ // Simple field (timeRemaining)
+ lengthInBits += m.TimeRemaining.GetLengthInBits()
+
+ // Optional Field (covIncrement)
+ if m.CovIncrement != nil {
+ lengthInBits += (*m.CovIncrement).GetLengthInBits()
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetCOVSubscription) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetCOVSubscriptionParse(readBuffer utils.ReadBuffer) (*BACnetCOVSubscription, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetCOVSubscription"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (recipient)
+ if pullErr := readBuffer.PullContext("recipient"); pullErr != nil {
+ return nil, pullErr
+ }
+ _recipient, _recipientErr := BACnetRecipientProcessEnclosedParse(readBuffer, uint8(uint8(0)))
+ if _recipientErr != nil {
+ return nil, errors.Wrap(_recipientErr, "Error parsing 'recipient' field")
+ }
+ recipient := CastBACnetRecipientProcessEnclosed(_recipient)
+ if closeErr := readBuffer.CloseContext("recipient"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Simple Field (monitoredPropertyReference)
+ if pullErr := readBuffer.PullContext("monitoredPropertyReference"); pullErr != nil {
+ return nil, pullErr
+ }
+ _monitoredPropertyReference, _monitoredPropertyReferenceErr := BACnetObjectPropertyReferenceEnclosedParse(readBuffer, uint8(uint8(1)))
+ if _monitoredPropertyReferenceErr != nil {
+ return nil, errors.Wrap(_monitoredPropertyReferenceErr, "Error parsing 'monitoredPropertyReference' field")
+ }
+ monitoredPropertyReference := CastBACnetObjectPropertyReferenceEnclosed(_monitoredPropertyReference)
+ if closeErr := readBuffer.CloseContext("monitoredPropertyReference"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Simple Field (issueConfirmedNotifications)
+ if pullErr := readBuffer.PullContext("issueConfirmedNotifications"); pullErr != nil {
+ return nil, pullErr
+ }
+ _issueConfirmedNotifications, _issueConfirmedNotificationsErr := BACnetContextTagParse(readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_BOOLEAN))
+ if _issueConfirmedNotificationsErr != nil {
+ return nil, errors.Wrap(_issueConfirmedNotificationsErr, "Error parsing 'issueConfirmedNotifications' field")
+ }
+ issueConfirmedNotifications := CastBACnetContextTagBoolean(_issueConfirmedNotifications)
+ if closeErr := readBuffer.CloseContext("issueConfirmedNotifications"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Simple Field (timeRemaining)
+ if pullErr := readBuffer.PullContext("timeRemaining"); pullErr != nil {
+ return nil, pullErr
+ }
+ _timeRemaining, _timeRemainingErr := BACnetContextTagParse(readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER))
+ if _timeRemainingErr != nil {
+ return nil, errors.Wrap(_timeRemainingErr, "Error parsing 'timeRemaining' field")
+ }
+ timeRemaining := CastBACnetContextTagUnsignedInteger(_timeRemaining)
+ if closeErr := readBuffer.CloseContext("timeRemaining"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Optional Field (covIncrement) (Can be skipped, if a given expression evaluates to false)
+ var covIncrement *BACnetContextTagReal = nil
+ {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("covIncrement"); pullErr != nil {
+ return nil, pullErr
+ }
+ _val, _err := BACnetContextTagParse(readBuffer, uint8(4), BACnetDataType_REAL)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'covIncrement' field")
+ default:
+ covIncrement = CastBACnetContextTagReal(_val)
+ if closeErr := readBuffer.CloseContext("covIncrement"); closeErr != nil {
+ return nil, closeErr
+ }
+ }
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetCOVSubscription"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetCOVSubscription(recipient, monitoredPropertyReference, issueConfirmedNotifications, timeRemaining, covIncrement), nil
+}
+
+func (m *BACnetCOVSubscription) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetCOVSubscription"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (recipient)
+ if pushErr := writeBuffer.PushContext("recipient"); pushErr != nil {
+ return pushErr
+ }
+ _recipientErr := m.Recipient.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("recipient"); popErr != nil {
+ return popErr
+ }
+ if _recipientErr != nil {
+ return errors.Wrap(_recipientErr, "Error serializing 'recipient' field")
+ }
+
+ // Simple Field (monitoredPropertyReference)
+ if pushErr := writeBuffer.PushContext("monitoredPropertyReference"); pushErr != nil {
+ return pushErr
+ }
+ _monitoredPropertyReferenceErr := m.MonitoredPropertyReference.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("monitoredPropertyReference"); popErr != nil {
+ return popErr
+ }
+ if _monitoredPropertyReferenceErr != nil {
+ return errors.Wrap(_monitoredPropertyReferenceErr, "Error serializing 'monitoredPropertyReference' field")
+ }
+
+ // Simple Field (issueConfirmedNotifications)
+ if pushErr := writeBuffer.PushContext("issueConfirmedNotifications"); pushErr != nil {
+ return pushErr
+ }
+ _issueConfirmedNotificationsErr := m.IssueConfirmedNotifications.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("issueConfirmedNotifications"); popErr != nil {
+ return popErr
+ }
+ if _issueConfirmedNotificationsErr != nil {
+ return errors.Wrap(_issueConfirmedNotificationsErr, "Error serializing 'issueConfirmedNotifications' field")
+ }
+
+ // Simple Field (timeRemaining)
+ if pushErr := writeBuffer.PushContext("timeRemaining"); pushErr != nil {
+ return pushErr
+ }
+ _timeRemainingErr := m.TimeRemaining.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("timeRemaining"); popErr != nil {
+ return popErr
+ }
+ if _timeRemainingErr != nil {
+ return errors.Wrap(_timeRemainingErr, "Error serializing 'timeRemaining' field")
+ }
+
+ // Optional Field (covIncrement) (Can be skipped, if the value is null)
+ var covIncrement *BACnetContextTagReal = nil
+ if m.CovIncrement != nil {
+ if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil {
+ return pushErr
+ }
+ covIncrement = m.CovIncrement
+ _covIncrementErr := covIncrement.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil {
+ return popErr
+ }
+ if _covIncrementErr != nil {
+ return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field")
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetCOVSubscription"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetCOVSubscription) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go
index e6400f92f6..1019f35ed0 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go
@@ -198,6 +198,12 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataActivationTimeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_AUTHENTICATION_POLICY: // BACnetConstructedDataActiveAuthenticationPolicy
_child, typeSwitchError = BACnetConstructedDataActiveAuthenticationPolicyParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS: // BACnetConstructedDataActiveCOVMultipleSubscriptions
+ _child, typeSwitchError = BACnetConstructedDataActiveCOVMultipleSubscriptionsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_COV_SUBSCRIPTIONS: // BACnetConstructedDataActiveCOVSubscriptions
+ _child, typeSwitchError = BACnetConstructedDataActiveCOVSubscriptionsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_VT_SESSIONS: // BACnetConstructedDataActiveVTSessions
+ _child, typeSwitchError = BACnetConstructedDataActiveVTSessionsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTUAL_SHED_LEVEL: // BACnetConstructedDataActualShedLevel
_child, typeSwitchError = BACnetConstructedDataActualShedLevelParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_POINT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES: // BACnetConstructedDataLifeSafetyPointAlarmValues
@@ -324,6 +330,12 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataTrendLogMultipleAllParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_APDU_LENGTH: // BACnetConstructedDataAPDULength
_child, typeSwitchError = BACnetConstructedDataAPDULengthParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_APDU_SEGMENT_TIMEOUT: // BACnetConstructedDataAPDUSegmentTimeout
+ _child, typeSwitchError = BACnetConstructedDataAPDUSegmentTimeoutParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_APDU_TIMEOUT: // BACnetConstructedDataAPDUTimeout
+ _child, typeSwitchError = BACnetConstructedDataAPDUTimeoutParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_APPLICATION_SOFTWARE_VERSION: // BACnetConstructedDataApplicationSoftwareVersion
+ _child, typeSwitchError = BACnetConstructedDataApplicationSoftwareVersionParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ARCHIVE: // BACnetConstructedDataArchive
_child, typeSwitchError = BACnetConstructedDataArchiveParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ASSIGNED_ACCESS_RIGHTS: // BACnetConstructedDataAssignedAccessRights
@@ -344,6 +356,12 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataAuthorizationModeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTO_SLAVE_DISCOVERY: // BACnetConstructedDataAutoSlaveDiscovery
_child, typeSwitchError = BACnetConstructedDataAutoSlaveDiscoveryParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_BACKUP_AND_RESTORE_STATE: // BACnetConstructedDataBackupAndRestoreState
+ _child, typeSwitchError = BACnetConstructedDataBackupAndRestoreStateParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_BACKUP_FAILURE_TIMEOUT: // BACnetConstructedDataBackupFailureTimeout
+ _child, typeSwitchError = BACnetConstructedDataBackupFailureTimeoutParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_BACKUP_PREPARATION_TIME: // BACnetConstructedDataBackupPreparationTime
+ _child, typeSwitchError = BACnetConstructedDataBackupPreparationTimeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_GLOBAL_ADDRESS: // BACnetConstructedDataBACnetIPGlobalAddress
_child, typeSwitchError = BACnetConstructedDataBACnetIPGlobalAddressParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_MODE: // BACnetConstructedDataBACnetIPMode
@@ -402,6 +420,8 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataChangesPendingParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_COMMAND: // BACnetConstructedDataCommand
_child, typeSwitchError = BACnetConstructedDataCommandParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_CONFIGURATION_FILES: // BACnetConstructedDataConfigurationFiles
+ _child, typeSwitchError = BACnetConstructedDataConfigurationFilesParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_CONTROLLED_VARIABLE_REFERENCE: // BACnetConstructedDataControlledVariableReference
_child, typeSwitchError = BACnetConstructedDataControlledVariableReferenceParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_CONTROLLED_VARIABLE_UNITS: // BACnetConstructedDataControlledVariableUnits
@@ -428,6 +448,10 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataCredentialStatusParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_CREDENTIALS: // BACnetConstructedDataCredentials
_child, typeSwitchError = BACnetConstructedDataCredentialsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DATABASE_REVISION: // BACnetConstructedDataDatabaseRevision
+ _child, typeSwitchError = BACnetConstructedDataDatabaseRevisionParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DAYLIGHT_SAVINGS_STATUS: // BACnetConstructedDataDaylightSavingsStatus
+ _child, typeSwitchError = BACnetConstructedDataDaylightSavingsStatusParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DAYS_REMAINING: // BACnetConstructedDataDaysRemaining
_child, typeSwitchError = BACnetConstructedDataDaysRemainingParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DEADBAND: // BACnetConstructedDataDeadband
@@ -442,6 +466,8 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataDefaultSubordinateRelationshipParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_TIMEOUT: // BACnetConstructedDataDefaultTimeout
_child, typeSwitchError = BACnetConstructedDataDefaultTimeoutParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DEPLOYED_PROFILE_LOCATION: // BACnetConstructedDataDeployedProfileLocation
+ _child, typeSwitchError = BACnetConstructedDataDeployedProfileLocationParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DERIVATIVE_CONSTANT: // BACnetConstructedDataDerivativeConstant
_child, typeSwitchError = BACnetConstructedDataDerivativeConstantParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DERIVATIVE_CONSTANT_UNITS: // BACnetConstructedDataDerivativeConstantUnits
@@ -450,6 +476,8 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataDescriptionParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DESCRIPTION_OF_HALT: // BACnetConstructedDataDescriptionOfHalt
_child, typeSwitchError = BACnetConstructedDataDescriptionOfHaltParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DEVICE_ADDRESS_BINDING: // BACnetConstructedDataDeviceAddressBinding
+ _child, typeSwitchError = BACnetConstructedDataDeviceAddressBindingParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DEVICE_TYPE: // BACnetConstructedDataDeviceType
_child, typeSwitchError = BACnetConstructedDataDeviceTypeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DIRECT_READING: // BACnetConstructedDataDirectReading
@@ -532,6 +560,8 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataFileSizeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_FILE_TYPE: // BACnetConstructedDataFileType
_child, typeSwitchError = BACnetConstructedDataFileTypeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_FIRMWARE_REVISION: // BACnetConstructedDataFirmwareRevision
+ _child, typeSwitchError = BACnetConstructedDataFirmwareRevisionParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_FLOOR_TEXT: // BACnetConstructedDataFloorText
_child, typeSwitchError = BACnetConstructedDataFloorTextParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_FULL_DUTY_BASELINE: // BACnetConstructedDataFullDutyBaseline
@@ -610,6 +640,10 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataLastAccessPointParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_KEY_SERVER: // BACnetConstructedDataLastKeyServer
_child, typeSwitchError = BACnetConstructedDataLastKeyServerParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_RESTART_REASON: // BACnetConstructedDataLastRestartReason
+ _child, typeSwitchError = BACnetConstructedDataLastRestartReasonParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_RESTORE_TIME: // BACnetConstructedDataLastRestoreTime
+ _child, typeSwitchError = BACnetConstructedDataLastRestoreTimeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_STATE_CHANGE: // BACnetConstructedDataLastStateChange
_child, typeSwitchError = BACnetConstructedDataLastStateChangeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_USE_TIME: // BACnetConstructedDataLastUseTime
@@ -632,8 +666,14 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataListOfGroupMembersParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES: // BACnetConstructedDataListOfObjectPropertyReferences
_child, typeSwitchError = BACnetConstructedDataListOfObjectPropertyReferencesParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCAL_DATE: // BACnetConstructedDataLocalDate
+ _child, typeSwitchError = BACnetConstructedDataLocalDateParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCAL_FORWARDING_ONLY: // BACnetConstructedDataLocalForwardingOnly
_child, typeSwitchError = BACnetConstructedDataLocalForwardingOnlyParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCAL_TIME: // BACnetConstructedDataLocalTime
+ _child, typeSwitchError = BACnetConstructedDataLocalTimeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCATION: // BACnetConstructedDataLocation
+ _child, typeSwitchError = BACnetConstructedDataLocationParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCK_STATUS: // BACnetConstructedDataLockStatus
_child, typeSwitchError = BACnetConstructedDataLockStatusParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCKOUT: // BACnetConstructedDataLockout
@@ -662,12 +702,16 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataMaskedAlarmValuesParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_ACTUAL_VALUE: // BACnetConstructedDataMaxActualValue
_child, typeSwitchError = BACnetConstructedDataMaxActualValueParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_APDU_LENGTH_ACCEPTED: // BACnetConstructedDataMaxAPDULengthAccepted
+ _child, typeSwitchError = BACnetConstructedDataMaxAPDULengthAcceptedParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_FAILED_ATTEMPTS: // BACnetConstructedDataMaxFailedAttempts
_child, typeSwitchError = BACnetConstructedDataMaxFailedAttemptsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE: // BACnetConstructedDataAccumulatorMaxPresValue
_child, typeSwitchError = BACnetConstructedDataAccumulatorMaxPresValueParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE: // BACnetConstructedDataMaxPresValue
_child, typeSwitchError = BACnetConstructedDataMaxPresValueParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_SEGMENTS_ACCEPTED: // BACnetConstructedDataMaxSegmentsAccepted
+ _child, typeSwitchError = BACnetConstructedDataMaxSegmentsAcceptedParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_MAXIMUM_OUTPUT: // BACnetConstructedDataMaximumOutput
_child, typeSwitchError = BACnetConstructedDataMaximumOutputParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_MEMBER_OF: // BACnetConstructedDataMemberOf
@@ -686,6 +730,8 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataMinimumOutputParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_MINIMUM_VALUE: // BACnetConstructedDataMinimumValue
_child, typeSwitchError = BACnetConstructedDataMinimumValueParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_MODEL_NAME: // BACnetConstructedDataModelName
+ _child, typeSwitchError = BACnetConstructedDataModelNameParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_MODIFICATION_DATE: // BACnetConstructedDataModificationDate
_child, typeSwitchError = BACnetConstructedDataModificationDateParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_MUSTER_POINT: // BACnetConstructedDataMusterPoint
@@ -712,10 +758,14 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataNotificationClassParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_NOTIFY_TYPE: // BACnetConstructedDataNotifyType
_child, typeSwitchError = BACnetConstructedDataNotifyTypeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_NUMBER_OF_APDU_RETRIES: // BACnetConstructedDataNumberOfAPDURetries
+ _child, typeSwitchError = BACnetConstructedDataNumberOfAPDURetriesParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_NUMBER_OF_AUTHENTICATION_POLICIES: // BACnetConstructedDataNumberOfAuthenticationPolicies
_child, typeSwitchError = BACnetConstructedDataNumberOfAuthenticationPoliciesParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_IDENTIFIER: // BACnetConstructedDataObjectIdentifier
_child, typeSwitchError = BACnetConstructedDataObjectIdentifierParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_LIST: // BACnetConstructedDataObjectList
+ _child, typeSwitchError = BACnetConstructedDataObjectListParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_NAME: // BACnetConstructedDataObjectName
_child, typeSwitchError = BACnetConstructedDataObjectNameParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_TYPE: // BACnetConstructedDataObjectType
@@ -766,6 +816,14 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataProportionalConstantUnitsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_LEVEL: // BACnetConstructedDataProtocolLevel
_child, typeSwitchError = BACnetConstructedDataProtocolLevelParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_OBJECT_TYPES_SUPPORTED: // BACnetConstructedDataProtocolObjectTypesSupported
+ _child, typeSwitchError = BACnetConstructedDataProtocolObjectTypesSupportedParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_REVISION: // BACnetConstructedDataProtocolRevision
+ _child, typeSwitchError = BACnetConstructedDataProtocolRevisionParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_SERVICES_SUPPORTED: // BACnetConstructedDataProtocolServicesSupported
+ _child, typeSwitchError = BACnetConstructedDataProtocolServicesSupportedParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_VERSION: // BACnetConstructedDataProtocolVersion
+ _child, typeSwitchError = BACnetConstructedDataProtocolVersionParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_READ_ONLY: // BACnetConstructedDataReadOnly
_child, typeSwitchError = BACnetConstructedDataReadOnlyParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_REASON_FOR_DISABLE: // BACnetConstructedDataReasonForDisable
@@ -788,6 +846,12 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataRequestedUpdateIntervalParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_RESOLUTION: // BACnetConstructedDataResolution
_child, typeSwitchError = BACnetConstructedDataResolutionParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_RESTART_NOTIFICATION_RECIPIENTS: // BACnetConstructedDataRestartNotificationRecipients
+ _child, typeSwitchError = BACnetConstructedDataRestartNotificationRecipientsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_RESTORE_COMPLETION_TIME: // BACnetConstructedDataRestoreCompletionTime
+ _child, typeSwitchError = BACnetConstructedDataRestoreCompletionTimeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_RESTORE_PREPARATION_TIME: // BACnetConstructedDataRestorePreparationTime
+ _child, typeSwitchError = BACnetConstructedDataRestorePreparationTimeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ROUTING_TABLE: // BACnetConstructedDataRoutingTable
_child, typeSwitchError = BACnetConstructedDataRoutingTableParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SCALE_FACTOR: // BACnetConstructedDataScaleFactor
@@ -800,6 +864,10 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataSecurityPDUTimeoutParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SECURITY_TIME_WINDOW: // BACnetConstructedDataSecurityTimeWindow
_child, typeSwitchError = BACnetConstructedDataSecurityTimeWindowParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SEGMENTATION_SUPPORTED: // BACnetConstructedDataSegmentationSupported
+ _child, typeSwitchError = BACnetConstructedDataSegmentationSupportedParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SERIAL_NUMBER: // BACnetConstructedDataSerialNumber
+ _child, typeSwitchError = BACnetConstructedDataSerialNumberParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SETPOINT: // BACnetConstructedDataSetpoint
_child, typeSwitchError = BACnetConstructedDataSetpointParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SETPOINT_REFERENCE: // BACnetConstructedDataSetpointReference
@@ -824,6 +892,8 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataStatusFlagsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_STRIKE_COUNT: // BACnetConstructedDataStrikeCount
_child, typeSwitchError = BACnetConstructedDataStrikeCountParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_STRUCTURED_OBJECT_LIST: // BACnetConstructedDataStructuredObjectList
+ _child, typeSwitchError = BACnetConstructedDataStructuredObjectListParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_ANNOTATIONS: // BACnetConstructedDataSubordinateAnnotations
_child, typeSwitchError = BACnetConstructedDataSubordinateAnnotationsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_LIST: // BACnetConstructedDataSubordinateList
@@ -838,6 +908,8 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataSubscribedRecipientsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SUPPORTED_SECURITY_ALGORITHMS: // BACnetConstructedDataSupportedSecurityAlgorithms
_child, typeSwitchError = BACnetConstructedDataSupportedSecurityAlgorithmsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SYSTEM_STATUS: // BACnetConstructedDataSystemStatus
+ _child, typeSwitchError = BACnetConstructedDataSystemStatusParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_TAGS: // BACnetConstructedDataTags
_child, typeSwitchError = BACnetConstructedDataTagsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_THREAT_AUTHORITY: // BACnetConstructedDataThreatAuthority
@@ -848,8 +920,14 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataTimeDelayParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_DELAY_NORMAL: // BACnetConstructedDataTimeDelayNormal
_child, typeSwitchError = BACnetConstructedDataTimeDelayNormalParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_OF_DEVICE_RESTART: // BACnetConstructedDataTimeOfDeviceRestart
+ _child, typeSwitchError = BACnetConstructedDataTimeOfDeviceRestartParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_OF_STRIKE_COUNT_RESET: // BACnetConstructedDataTimeOfStrikeCountReset
_child, typeSwitchError = BACnetConstructedDataTimeOfStrikeCountResetParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_INTERVAL: // BACnetConstructedDataTimeSynchronizationInterval
+ _child, typeSwitchError = BACnetConstructedDataTimeSynchronizationIntervalParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_RECIPIENTS: // BACnetConstructedDataTimeSynchronizationRecipients
+ _child, typeSwitchError = BACnetConstructedDataTimeSynchronizationRecipientsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_TIMER_RUNNING: // BACnetConstructedDataTimerRunning
_child, typeSwitchError = BACnetConstructedDataTimerRunningParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_TIMER_STATE: // BACnetConstructedDataTimerState
@@ -876,10 +954,20 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataUserTypeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_USES_REMAINING: // BACnetConstructedDataUsesRemaining
_child, typeSwitchError = BACnetConstructedDataUsesRemainingParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_UTC_OFFSET: // BACnetConstructedDataUTCOffset
+ _child, typeSwitchError = BACnetConstructedDataUTCOffsetParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_UTC_TIME_SYNCHRONIZATION_RECIPIENTS: // BACnetConstructedDataUTCTimeSynchronizationRecipients
+ _child, typeSwitchError = BACnetConstructedDataUTCTimeSynchronizationRecipientsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_VENDOR_IDENTIFIER: // BACnetConstructedDataVendorIdentifier
+ _child, typeSwitchError = BACnetConstructedDataVendorIdentifierParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_VENDOR_NAME: // BACnetConstructedDataVendorName
+ _child, typeSwitchError = BACnetConstructedDataVendorNameParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_VERIFICATION_TIME: // BACnetConstructedDataVerificationTime
_child, typeSwitchError = BACnetConstructedDataVerificationTimeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_VIRTUAL_MAC_ADDRESS_TABLE: // BACnetConstructedDataVirtualMACAddressTable
_child, typeSwitchError = BACnetConstructedDataVirtualMACAddressTableParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_VT_CLASSES_SUPPORTED: // BACnetConstructedDataVTClassesSupported
+ _child, typeSwitchError = BACnetConstructedDataVTClassesSupportedParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_WEEKLY_SCHEDULE: // BACnetConstructedDataWeeklySchedule
_child, typeSwitchError = BACnetConstructedDataWeeklyScheduleParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ZONE_FROM: // BACnetConstructedDataZoneFrom
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUSegmentTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUSegmentTimeout.go
new file mode 100644
index 0000000000..c898819a43
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUSegmentTimeout.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataAPDUSegmentTimeout is the data-structure of this message
+type BACnetConstructedDataAPDUSegmentTimeout struct {
+ *BACnetConstructedData
+ ApduSegmentTimeout *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataAPDUSegmentTimeout is the corresponding interface of BACnetConstructedDataAPDUSegmentTimeout
+type IBACnetConstructedDataAPDUSegmentTimeout interface {
+ IBACnetConstructedData
+ // GetApduSegmentTimeout returns ApduSegmentTimeout (property field)
+ GetApduSegmentTimeout() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataAPDUSegmentTimeout) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataAPDUSegmentTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_APDU_SEGMENT_TIMEOUT
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataAPDUSegmentTimeout) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataAPDUSegmentTimeout) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataAPDUSegmentTimeout) GetApduSegmentTimeout() *BACnetApplicationTagUnsignedInteger {
+ return m.ApduSegmentTimeout
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataAPDUSegmentTimeout factory function for BACnetConstructedDataAPDUSegmentTimeout
+func NewBACnetConstructedDataAPDUSegmentTimeout(apduSegmentTimeout *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataAPDUSegmentTimeout {
+ _result := &BACnetConstructedDataAPDUSegmentTimeout{
+ ApduSegmentTimeout: apduSegmentTimeout,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataAPDUSegmentTimeout(structType interface{}) *BACnetConstructedDataAPDUSegmentTimeout {
+ if casted, ok := structType.(BACnetConstructedDataAPDUSegmentTimeout); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataAPDUSegmentTimeout); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataAPDUSegmentTimeout(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataAPDUSegmentTimeout(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataAPDUSegmentTimeout) GetTypeName() string {
+ return "BACnetConstructedDataAPDUSegmentTimeout"
+}
+
+func (m *BACnetConstructedDataAPDUSegmentTimeout) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataAPDUSegmentTimeout) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (apduSegmentTimeout)
+ lengthInBits += m.ApduSegmentTimeout.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataAPDUSegmentTimeout) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataAPDUSegmentTimeoutParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataAPDUSegmentTimeout, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataAPDUSegmentTimeout"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (apduSegmentTimeout)
+ if pullErr := readBuffer.PullContext("apduSegmentTimeout"); pullErr != nil {
+ return nil, pullErr
+ }
+ _apduSegmentTimeout, _apduSegmentTimeoutErr := BACnetApplicationTagParse(readBuffer)
+ if _apduSegmentTimeoutErr != nil {
+ return nil, errors.Wrap(_apduSegmentTimeoutErr, "Error parsing 'apduSegmentTimeout' field")
+ }
+ apduSegmentTimeout := CastBACnetApplicationTagUnsignedInteger(_apduSegmentTimeout)
+ if closeErr := readBuffer.CloseContext("apduSegmentTimeout"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataAPDUSegmentTimeout"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataAPDUSegmentTimeout{
+ ApduSegmentTimeout: CastBACnetApplicationTagUnsignedInteger(apduSegmentTimeout),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataAPDUSegmentTimeout) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataAPDUSegmentTimeout"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (apduSegmentTimeout)
+ if pushErr := writeBuffer.PushContext("apduSegmentTimeout"); pushErr != nil {
+ return pushErr
+ }
+ _apduSegmentTimeoutErr := m.ApduSegmentTimeout.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("apduSegmentTimeout"); popErr != nil {
+ return popErr
+ }
+ if _apduSegmentTimeoutErr != nil {
+ return errors.Wrap(_apduSegmentTimeoutErr, "Error serializing 'apduSegmentTimeout' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataAPDUSegmentTimeout"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataAPDUSegmentTimeout) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUTimeout.go
new file mode 100644
index 0000000000..a13d9fa512
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUTimeout.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataAPDUTimeout is the data-structure of this message
+type BACnetConstructedDataAPDUTimeout struct {
+ *BACnetConstructedData
+ ApduTimeout *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataAPDUTimeout is the corresponding interface of BACnetConstructedDataAPDUTimeout
+type IBACnetConstructedDataAPDUTimeout interface {
+ IBACnetConstructedData
+ // GetApduTimeout returns ApduTimeout (property field)
+ GetApduTimeout() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataAPDUTimeout) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataAPDUTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_APDU_TIMEOUT
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataAPDUTimeout) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataAPDUTimeout) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataAPDUTimeout) GetApduTimeout() *BACnetApplicationTagUnsignedInteger {
+ return m.ApduTimeout
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataAPDUTimeout factory function for BACnetConstructedDataAPDUTimeout
+func NewBACnetConstructedDataAPDUTimeout(apduTimeout *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataAPDUTimeout {
+ _result := &BACnetConstructedDataAPDUTimeout{
+ ApduTimeout: apduTimeout,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataAPDUTimeout(structType interface{}) *BACnetConstructedDataAPDUTimeout {
+ if casted, ok := structType.(BACnetConstructedDataAPDUTimeout); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataAPDUTimeout); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataAPDUTimeout(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataAPDUTimeout(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataAPDUTimeout) GetTypeName() string {
+ return "BACnetConstructedDataAPDUTimeout"
+}
+
+func (m *BACnetConstructedDataAPDUTimeout) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataAPDUTimeout) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (apduTimeout)
+ lengthInBits += m.ApduTimeout.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataAPDUTimeout) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataAPDUTimeoutParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataAPDUTimeout, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataAPDUTimeout"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (apduTimeout)
+ if pullErr := readBuffer.PullContext("apduTimeout"); pullErr != nil {
+ return nil, pullErr
+ }
+ _apduTimeout, _apduTimeoutErr := BACnetApplicationTagParse(readBuffer)
+ if _apduTimeoutErr != nil {
+ return nil, errors.Wrap(_apduTimeoutErr, "Error parsing 'apduTimeout' field")
+ }
+ apduTimeout := CastBACnetApplicationTagUnsignedInteger(_apduTimeout)
+ if closeErr := readBuffer.CloseContext("apduTimeout"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataAPDUTimeout"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataAPDUTimeout{
+ ApduTimeout: CastBACnetApplicationTagUnsignedInteger(apduTimeout),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataAPDUTimeout) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataAPDUTimeout"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (apduTimeout)
+ if pushErr := writeBuffer.PushContext("apduTimeout"); pushErr != nil {
+ return pushErr
+ }
+ _apduTimeoutErr := m.ApduTimeout.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("apduTimeout"); popErr != nil {
+ return popErr
+ }
+ if _apduTimeoutErr != nil {
+ return errors.Wrap(_apduTimeoutErr, "Error serializing 'apduTimeout' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataAPDUTimeout"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataAPDUTimeout) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVMultipleSubscriptions.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVMultipleSubscriptions.go
new file mode 100644
index 0000000000..afebdb91fa
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVMultipleSubscriptions.go
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataActiveCOVMultipleSubscriptions is the data-structure of this message
+type BACnetConstructedDataActiveCOVMultipleSubscriptions struct {
+ *BACnetConstructedData
+ ActiveCOVMultipleSubscriptions []*BACnetCOVMultipleSubscription
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataActiveCOVMultipleSubscriptions is the corresponding interface of BACnetConstructedDataActiveCOVMultipleSubscriptions
+type IBACnetConstructedDataActiveCOVMultipleSubscriptions interface {
+ IBACnetConstructedData
+ // GetActiveCOVMultipleSubscriptions returns ActiveCOVMultipleSubscriptions (property field)
+ GetActiveCOVMultipleSubscriptions() []*BACnetCOVMultipleSubscription
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataActiveCOVMultipleSubscriptions) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataActiveCOVMultipleSubscriptions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataActiveCOVMultipleSubscriptions) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataActiveCOVMultipleSubscriptions) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataActiveCOVMultipleSubscriptions) GetActiveCOVMultipleSubscriptions() []*BACnetCOVMultipleSubscription {
+ return m.ActiveCOVMultipleSubscriptions
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataActiveCOVMultipleSubscriptions factory function for BACnetConstructedDataActiveCOVMultipleSubscriptions
+func NewBACnetConstructedDataActiveCOVMultipleSubscriptions(activeCOVMultipleSubscriptions []*BACnetCOVMultipleSubscription, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataActiveCOVMultipleSubscriptions {
+ _result := &BACnetConstructedDataActiveCOVMultipleSubscriptions{
+ ActiveCOVMultipleSubscriptions: activeCOVMultipleSubscriptions,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataActiveCOVMultipleSubscriptions(structType interface{}) *BACnetConstructedDataActiveCOVMultipleSubscriptions {
+ if casted, ok := structType.(BACnetConstructedDataActiveCOVMultipleSubscriptions); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataActiveCOVMultipleSubscriptions); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataActiveCOVMultipleSubscriptions(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataActiveCOVMultipleSubscriptions(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataActiveCOVMultipleSubscriptions) GetTypeName() string {
+ return "BACnetConstructedDataActiveCOVMultipleSubscriptions"
+}
+
+func (m *BACnetConstructedDataActiveCOVMultipleSubscriptions) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataActiveCOVMultipleSubscriptions) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.ActiveCOVMultipleSubscriptions) > 0 {
+ for _, element := range m.ActiveCOVMultipleSubscriptions {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataActiveCOVMultipleSubscriptions) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataActiveCOVMultipleSubscriptionsParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataActiveCOVMultipleSubscriptions, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataActiveCOVMultipleSubscriptions"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (activeCOVMultipleSubscriptions)
+ if pullErr := readBuffer.PullContext("activeCOVMultipleSubscriptions", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ activeCOVMultipleSubscriptions := make([]*BACnetCOVMultipleSubscription, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetCOVMultipleSubscriptionParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'activeCOVMultipleSubscriptions' field")
+ }
+ activeCOVMultipleSubscriptions = append(activeCOVMultipleSubscriptions, CastBACnetCOVMultipleSubscription(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("activeCOVMultipleSubscriptions", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataActiveCOVMultipleSubscriptions"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataActiveCOVMultipleSubscriptions{
+ ActiveCOVMultipleSubscriptions: activeCOVMultipleSubscriptions,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataActiveCOVMultipleSubscriptions) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataActiveCOVMultipleSubscriptions"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (activeCOVMultipleSubscriptions)
+ if m.ActiveCOVMultipleSubscriptions != nil {
+ if pushErr := writeBuffer.PushContext("activeCOVMultipleSubscriptions", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.ActiveCOVMultipleSubscriptions {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'activeCOVMultipleSubscriptions' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("activeCOVMultipleSubscriptions", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataActiveCOVMultipleSubscriptions"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataActiveCOVMultipleSubscriptions) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVSubscriptions.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVSubscriptions.go
new file mode 100644
index 0000000000..0d8923ec80
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVSubscriptions.go
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataActiveCOVSubscriptions is the data-structure of this message
+type BACnetConstructedDataActiveCOVSubscriptions struct {
+ *BACnetConstructedData
+ ActiveCOVSubscriptions []*BACnetCOVSubscription
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataActiveCOVSubscriptions is the corresponding interface of BACnetConstructedDataActiveCOVSubscriptions
+type IBACnetConstructedDataActiveCOVSubscriptions interface {
+ IBACnetConstructedData
+ // GetActiveCOVSubscriptions returns ActiveCOVSubscriptions (property field)
+ GetActiveCOVSubscriptions() []*BACnetCOVSubscription
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataActiveCOVSubscriptions) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataActiveCOVSubscriptions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_ACTIVE_COV_SUBSCRIPTIONS
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataActiveCOVSubscriptions) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataActiveCOVSubscriptions) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataActiveCOVSubscriptions) GetActiveCOVSubscriptions() []*BACnetCOVSubscription {
+ return m.ActiveCOVSubscriptions
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataActiveCOVSubscriptions factory function for BACnetConstructedDataActiveCOVSubscriptions
+func NewBACnetConstructedDataActiveCOVSubscriptions(activeCOVSubscriptions []*BACnetCOVSubscription, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataActiveCOVSubscriptions {
+ _result := &BACnetConstructedDataActiveCOVSubscriptions{
+ ActiveCOVSubscriptions: activeCOVSubscriptions,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataActiveCOVSubscriptions(structType interface{}) *BACnetConstructedDataActiveCOVSubscriptions {
+ if casted, ok := structType.(BACnetConstructedDataActiveCOVSubscriptions); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataActiveCOVSubscriptions); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataActiveCOVSubscriptions(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataActiveCOVSubscriptions(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataActiveCOVSubscriptions) GetTypeName() string {
+ return "BACnetConstructedDataActiveCOVSubscriptions"
+}
+
+func (m *BACnetConstructedDataActiveCOVSubscriptions) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataActiveCOVSubscriptions) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.ActiveCOVSubscriptions) > 0 {
+ for _, element := range m.ActiveCOVSubscriptions {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataActiveCOVSubscriptions) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataActiveCOVSubscriptionsParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataActiveCOVSubscriptions, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataActiveCOVSubscriptions"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (activeCOVSubscriptions)
+ if pullErr := readBuffer.PullContext("activeCOVSubscriptions", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ activeCOVSubscriptions := make([]*BACnetCOVSubscription, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetCOVSubscriptionParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'activeCOVSubscriptions' field")
+ }
+ activeCOVSubscriptions = append(activeCOVSubscriptions, CastBACnetCOVSubscription(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("activeCOVSubscriptions", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataActiveCOVSubscriptions"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataActiveCOVSubscriptions{
+ ActiveCOVSubscriptions: activeCOVSubscriptions,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataActiveCOVSubscriptions) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataActiveCOVSubscriptions"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (activeCOVSubscriptions)
+ if m.ActiveCOVSubscriptions != nil {
+ if pushErr := writeBuffer.PushContext("activeCOVSubscriptions", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.ActiveCOVSubscriptions {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'activeCOVSubscriptions' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("activeCOVSubscriptions", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataActiveCOVSubscriptions"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataActiveCOVSubscriptions) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveVTSessions.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveVTSessions.go
new file mode 100644
index 0000000000..5d2f64e80e
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveVTSessions.go
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataActiveVTSessions is the data-structure of this message
+type BACnetConstructedDataActiveVTSessions struct {
+ *BACnetConstructedData
+ ActiveVTSession []*BACnetVTSession
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataActiveVTSessions is the corresponding interface of BACnetConstructedDataActiveVTSessions
+type IBACnetConstructedDataActiveVTSessions interface {
+ IBACnetConstructedData
+ // GetActiveVTSession returns ActiveVTSession (property field)
+ GetActiveVTSession() []*BACnetVTSession
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataActiveVTSessions) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataActiveVTSessions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_ACTIVE_VT_SESSIONS
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataActiveVTSessions) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataActiveVTSessions) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataActiveVTSessions) GetActiveVTSession() []*BACnetVTSession {
+ return m.ActiveVTSession
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataActiveVTSessions factory function for BACnetConstructedDataActiveVTSessions
+func NewBACnetConstructedDataActiveVTSessions(activeVTSession []*BACnetVTSession, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataActiveVTSessions {
+ _result := &BACnetConstructedDataActiveVTSessions{
+ ActiveVTSession: activeVTSession,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataActiveVTSessions(structType interface{}) *BACnetConstructedDataActiveVTSessions {
+ if casted, ok := structType.(BACnetConstructedDataActiveVTSessions); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataActiveVTSessions); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataActiveVTSessions(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataActiveVTSessions(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataActiveVTSessions) GetTypeName() string {
+ return "BACnetConstructedDataActiveVTSessions"
+}
+
+func (m *BACnetConstructedDataActiveVTSessions) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataActiveVTSessions) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.ActiveVTSession) > 0 {
+ for _, element := range m.ActiveVTSession {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataActiveVTSessions) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataActiveVTSessionsParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataActiveVTSessions, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataActiveVTSessions"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (activeVTSession)
+ if pullErr := readBuffer.PullContext("activeVTSession", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ activeVTSession := make([]*BACnetVTSession, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetVTSessionParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'activeVTSession' field")
+ }
+ activeVTSession = append(activeVTSession, CastBACnetVTSession(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("activeVTSession", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataActiveVTSessions"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataActiveVTSessions{
+ ActiveVTSession: activeVTSession,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataActiveVTSessions) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataActiveVTSessions"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (activeVTSession)
+ if m.ActiveVTSession != nil {
+ if pushErr := writeBuffer.PushContext("activeVTSession", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.ActiveVTSession {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'activeVTSession' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("activeVTSession", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataActiveVTSessions"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataActiveVTSessions) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataApplicationSoftwareVersion.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataApplicationSoftwareVersion.go
new file mode 100644
index 0000000000..b44fcddbc5
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataApplicationSoftwareVersion.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataApplicationSoftwareVersion is the data-structure of this message
+type BACnetConstructedDataApplicationSoftwareVersion struct {
+ *BACnetConstructedData
+ ApplicationSoftwareVersion *BACnetApplicationTagCharacterString
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataApplicationSoftwareVersion is the corresponding interface of BACnetConstructedDataApplicationSoftwareVersion
+type IBACnetConstructedDataApplicationSoftwareVersion interface {
+ IBACnetConstructedData
+ // GetApplicationSoftwareVersion returns ApplicationSoftwareVersion (property field)
+ GetApplicationSoftwareVersion() *BACnetApplicationTagCharacterString
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataApplicationSoftwareVersion) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataApplicationSoftwareVersion) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_APPLICATION_SOFTWARE_VERSION
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataApplicationSoftwareVersion) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataApplicationSoftwareVersion) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataApplicationSoftwareVersion) GetApplicationSoftwareVersion() *BACnetApplicationTagCharacterString {
+ return m.ApplicationSoftwareVersion
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataApplicationSoftwareVersion factory function for BACnetConstructedDataApplicationSoftwareVersion
+func NewBACnetConstructedDataApplicationSoftwareVersion(applicationSoftwareVersion *BACnetApplicationTagCharacterString, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataApplicationSoftwareVersion {
+ _result := &BACnetConstructedDataApplicationSoftwareVersion{
+ ApplicationSoftwareVersion: applicationSoftwareVersion,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataApplicationSoftwareVersion(structType interface{}) *BACnetConstructedDataApplicationSoftwareVersion {
+ if casted, ok := structType.(BACnetConstructedDataApplicationSoftwareVersion); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataApplicationSoftwareVersion); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataApplicationSoftwareVersion(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataApplicationSoftwareVersion(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataApplicationSoftwareVersion) GetTypeName() string {
+ return "BACnetConstructedDataApplicationSoftwareVersion"
+}
+
+func (m *BACnetConstructedDataApplicationSoftwareVersion) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataApplicationSoftwareVersion) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (applicationSoftwareVersion)
+ lengthInBits += m.ApplicationSoftwareVersion.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataApplicationSoftwareVersion) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataApplicationSoftwareVersionParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataApplicationSoftwareVersion, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataApplicationSoftwareVersion"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (applicationSoftwareVersion)
+ if pullErr := readBuffer.PullContext("applicationSoftwareVersion"); pullErr != nil {
+ return nil, pullErr
+ }
+ _applicationSoftwareVersion, _applicationSoftwareVersionErr := BACnetApplicationTagParse(readBuffer)
+ if _applicationSoftwareVersionErr != nil {
+ return nil, errors.Wrap(_applicationSoftwareVersionErr, "Error parsing 'applicationSoftwareVersion' field")
+ }
+ applicationSoftwareVersion := CastBACnetApplicationTagCharacterString(_applicationSoftwareVersion)
+ if closeErr := readBuffer.CloseContext("applicationSoftwareVersion"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataApplicationSoftwareVersion"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataApplicationSoftwareVersion{
+ ApplicationSoftwareVersion: CastBACnetApplicationTagCharacterString(applicationSoftwareVersion),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataApplicationSoftwareVersion) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataApplicationSoftwareVersion"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (applicationSoftwareVersion)
+ if pushErr := writeBuffer.PushContext("applicationSoftwareVersion"); pushErr != nil {
+ return pushErr
+ }
+ _applicationSoftwareVersionErr := m.ApplicationSoftwareVersion.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("applicationSoftwareVersion"); popErr != nil {
+ return popErr
+ }
+ if _applicationSoftwareVersionErr != nil {
+ return errors.Wrap(_applicationSoftwareVersionErr, "Error serializing 'applicationSoftwareVersion' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataApplicationSoftwareVersion"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataApplicationSoftwareVersion) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupAndRestoreState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupAndRestoreState.go
new file mode 100644
index 0000000000..92acd9e6ef
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupAndRestoreState.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataBackupAndRestoreState is the data-structure of this message
+type BACnetConstructedDataBackupAndRestoreState struct {
+ *BACnetConstructedData
+ BackupAndRestoreState *BACnetBackupStateTagged
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataBackupAndRestoreState is the corresponding interface of BACnetConstructedDataBackupAndRestoreState
+type IBACnetConstructedDataBackupAndRestoreState interface {
+ IBACnetConstructedData
+ // GetBackupAndRestoreState returns BackupAndRestoreState (property field)
+ GetBackupAndRestoreState() *BACnetBackupStateTagged
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataBackupAndRestoreState) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataBackupAndRestoreState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_BACKUP_AND_RESTORE_STATE
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataBackupAndRestoreState) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataBackupAndRestoreState) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataBackupAndRestoreState) GetBackupAndRestoreState() *BACnetBackupStateTagged {
+ return m.BackupAndRestoreState
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataBackupAndRestoreState factory function for BACnetConstructedDataBackupAndRestoreState
+func NewBACnetConstructedDataBackupAndRestoreState(backupAndRestoreState *BACnetBackupStateTagged, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataBackupAndRestoreState {
+ _result := &BACnetConstructedDataBackupAndRestoreState{
+ BackupAndRestoreState: backupAndRestoreState,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataBackupAndRestoreState(structType interface{}) *BACnetConstructedDataBackupAndRestoreState {
+ if casted, ok := structType.(BACnetConstructedDataBackupAndRestoreState); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataBackupAndRestoreState); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataBackupAndRestoreState(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataBackupAndRestoreState(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataBackupAndRestoreState) GetTypeName() string {
+ return "BACnetConstructedDataBackupAndRestoreState"
+}
+
+func (m *BACnetConstructedDataBackupAndRestoreState) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataBackupAndRestoreState) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (backupAndRestoreState)
+ lengthInBits += m.BackupAndRestoreState.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataBackupAndRestoreState) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataBackupAndRestoreStateParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataBackupAndRestoreState, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataBackupAndRestoreState"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (backupAndRestoreState)
+ if pullErr := readBuffer.PullContext("backupAndRestoreState"); pullErr != nil {
+ return nil, pullErr
+ }
+ _backupAndRestoreState, _backupAndRestoreStateErr := BACnetBackupStateTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
+ if _backupAndRestoreStateErr != nil {
+ return nil, errors.Wrap(_backupAndRestoreStateErr, "Error parsing 'backupAndRestoreState' field")
+ }
+ backupAndRestoreState := CastBACnetBackupStateTagged(_backupAndRestoreState)
+ if closeErr := readBuffer.CloseContext("backupAndRestoreState"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataBackupAndRestoreState"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataBackupAndRestoreState{
+ BackupAndRestoreState: CastBACnetBackupStateTagged(backupAndRestoreState),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataBackupAndRestoreState) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataBackupAndRestoreState"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (backupAndRestoreState)
+ if pushErr := writeBuffer.PushContext("backupAndRestoreState"); pushErr != nil {
+ return pushErr
+ }
+ _backupAndRestoreStateErr := m.BackupAndRestoreState.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("backupAndRestoreState"); popErr != nil {
+ return popErr
+ }
+ if _backupAndRestoreStateErr != nil {
+ return errors.Wrap(_backupAndRestoreStateErr, "Error serializing 'backupAndRestoreState' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataBackupAndRestoreState"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataBackupAndRestoreState) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupFailureTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupFailureTimeout.go
new file mode 100644
index 0000000000..ea6b2e13be
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupFailureTimeout.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataBackupFailureTimeout is the data-structure of this message
+type BACnetConstructedDataBackupFailureTimeout struct {
+ *BACnetConstructedData
+ BackupFailureTimeout *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataBackupFailureTimeout is the corresponding interface of BACnetConstructedDataBackupFailureTimeout
+type IBACnetConstructedDataBackupFailureTimeout interface {
+ IBACnetConstructedData
+ // GetBackupFailureTimeout returns BackupFailureTimeout (property field)
+ GetBackupFailureTimeout() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataBackupFailureTimeout) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataBackupFailureTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_BACKUP_FAILURE_TIMEOUT
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataBackupFailureTimeout) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataBackupFailureTimeout) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataBackupFailureTimeout) GetBackupFailureTimeout() *BACnetApplicationTagUnsignedInteger {
+ return m.BackupFailureTimeout
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataBackupFailureTimeout factory function for BACnetConstructedDataBackupFailureTimeout
+func NewBACnetConstructedDataBackupFailureTimeout(backupFailureTimeout *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataBackupFailureTimeout {
+ _result := &BACnetConstructedDataBackupFailureTimeout{
+ BackupFailureTimeout: backupFailureTimeout,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataBackupFailureTimeout(structType interface{}) *BACnetConstructedDataBackupFailureTimeout {
+ if casted, ok := structType.(BACnetConstructedDataBackupFailureTimeout); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataBackupFailureTimeout); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataBackupFailureTimeout(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataBackupFailureTimeout(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataBackupFailureTimeout) GetTypeName() string {
+ return "BACnetConstructedDataBackupFailureTimeout"
+}
+
+func (m *BACnetConstructedDataBackupFailureTimeout) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataBackupFailureTimeout) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (backupFailureTimeout)
+ lengthInBits += m.BackupFailureTimeout.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataBackupFailureTimeout) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataBackupFailureTimeoutParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataBackupFailureTimeout, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataBackupFailureTimeout"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (backupFailureTimeout)
+ if pullErr := readBuffer.PullContext("backupFailureTimeout"); pullErr != nil {
+ return nil, pullErr
+ }
+ _backupFailureTimeout, _backupFailureTimeoutErr := BACnetApplicationTagParse(readBuffer)
+ if _backupFailureTimeoutErr != nil {
+ return nil, errors.Wrap(_backupFailureTimeoutErr, "Error parsing 'backupFailureTimeout' field")
+ }
+ backupFailureTimeout := CastBACnetApplicationTagUnsignedInteger(_backupFailureTimeout)
+ if closeErr := readBuffer.CloseContext("backupFailureTimeout"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataBackupFailureTimeout"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataBackupFailureTimeout{
+ BackupFailureTimeout: CastBACnetApplicationTagUnsignedInteger(backupFailureTimeout),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataBackupFailureTimeout) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataBackupFailureTimeout"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (backupFailureTimeout)
+ if pushErr := writeBuffer.PushContext("backupFailureTimeout"); pushErr != nil {
+ return pushErr
+ }
+ _backupFailureTimeoutErr := m.BackupFailureTimeout.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("backupFailureTimeout"); popErr != nil {
+ return popErr
+ }
+ if _backupFailureTimeoutErr != nil {
+ return errors.Wrap(_backupFailureTimeoutErr, "Error serializing 'backupFailureTimeout' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataBackupFailureTimeout"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataBackupFailureTimeout) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupPreparationTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupPreparationTime.go
new file mode 100644
index 0000000000..a3458d5505
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupPreparationTime.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataBackupPreparationTime is the data-structure of this message
+type BACnetConstructedDataBackupPreparationTime struct {
+ *BACnetConstructedData
+ BackupPreparationTime *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataBackupPreparationTime is the corresponding interface of BACnetConstructedDataBackupPreparationTime
+type IBACnetConstructedDataBackupPreparationTime interface {
+ IBACnetConstructedData
+ // GetBackupPreparationTime returns BackupPreparationTime (property field)
+ GetBackupPreparationTime() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataBackupPreparationTime) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataBackupPreparationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_BACKUP_PREPARATION_TIME
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataBackupPreparationTime) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataBackupPreparationTime) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataBackupPreparationTime) GetBackupPreparationTime() *BACnetApplicationTagUnsignedInteger {
+ return m.BackupPreparationTime
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataBackupPreparationTime factory function for BACnetConstructedDataBackupPreparationTime
+func NewBACnetConstructedDataBackupPreparationTime(backupPreparationTime *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataBackupPreparationTime {
+ _result := &BACnetConstructedDataBackupPreparationTime{
+ BackupPreparationTime: backupPreparationTime,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataBackupPreparationTime(structType interface{}) *BACnetConstructedDataBackupPreparationTime {
+ if casted, ok := structType.(BACnetConstructedDataBackupPreparationTime); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataBackupPreparationTime); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataBackupPreparationTime(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataBackupPreparationTime(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataBackupPreparationTime) GetTypeName() string {
+ return "BACnetConstructedDataBackupPreparationTime"
+}
+
+func (m *BACnetConstructedDataBackupPreparationTime) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataBackupPreparationTime) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (backupPreparationTime)
+ lengthInBits += m.BackupPreparationTime.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataBackupPreparationTime) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataBackupPreparationTimeParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataBackupPreparationTime, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataBackupPreparationTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (backupPreparationTime)
+ if pullErr := readBuffer.PullContext("backupPreparationTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ _backupPreparationTime, _backupPreparationTimeErr := BACnetApplicationTagParse(readBuffer)
+ if _backupPreparationTimeErr != nil {
+ return nil, errors.Wrap(_backupPreparationTimeErr, "Error parsing 'backupPreparationTime' field")
+ }
+ backupPreparationTime := CastBACnetApplicationTagUnsignedInteger(_backupPreparationTime)
+ if closeErr := readBuffer.CloseContext("backupPreparationTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataBackupPreparationTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataBackupPreparationTime{
+ BackupPreparationTime: CastBACnetApplicationTagUnsignedInteger(backupPreparationTime),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataBackupPreparationTime) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataBackupPreparationTime"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (backupPreparationTime)
+ if pushErr := writeBuffer.PushContext("backupPreparationTime"); pushErr != nil {
+ return pushErr
+ }
+ _backupPreparationTimeErr := m.BackupPreparationTime.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("backupPreparationTime"); popErr != nil {
+ return popErr
+ }
+ if _backupPreparationTimeErr != nil {
+ return errors.Wrap(_backupPreparationTimeErr, "Error serializing 'backupPreparationTime' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataBackupPreparationTime"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataBackupPreparationTime) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataConfigurationFiles.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataConfigurationFiles.go
new file mode 100644
index 0000000000..cb10cb3711
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataConfigurationFiles.go
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataConfigurationFiles is the data-structure of this message
+type BACnetConstructedDataConfigurationFiles struct {
+ *BACnetConstructedData
+ ConfigurationFiles []*BACnetApplicationTagObjectIdentifier
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataConfigurationFiles is the corresponding interface of BACnetConstructedDataConfigurationFiles
+type IBACnetConstructedDataConfigurationFiles interface {
+ IBACnetConstructedData
+ // GetConfigurationFiles returns ConfigurationFiles (property field)
+ GetConfigurationFiles() []*BACnetApplicationTagObjectIdentifier
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataConfigurationFiles) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataConfigurationFiles) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_CONFIGURATION_FILES
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataConfigurationFiles) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataConfigurationFiles) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataConfigurationFiles) GetConfigurationFiles() []*BACnetApplicationTagObjectIdentifier {
+ return m.ConfigurationFiles
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataConfigurationFiles factory function for BACnetConstructedDataConfigurationFiles
+func NewBACnetConstructedDataConfigurationFiles(configurationFiles []*BACnetApplicationTagObjectIdentifier, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataConfigurationFiles {
+ _result := &BACnetConstructedDataConfigurationFiles{
+ ConfigurationFiles: configurationFiles,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataConfigurationFiles(structType interface{}) *BACnetConstructedDataConfigurationFiles {
+ if casted, ok := structType.(BACnetConstructedDataConfigurationFiles); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataConfigurationFiles); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataConfigurationFiles(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataConfigurationFiles(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataConfigurationFiles) GetTypeName() string {
+ return "BACnetConstructedDataConfigurationFiles"
+}
+
+func (m *BACnetConstructedDataConfigurationFiles) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataConfigurationFiles) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.ConfigurationFiles) > 0 {
+ for _, element := range m.ConfigurationFiles {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataConfigurationFiles) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataConfigurationFilesParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataConfigurationFiles, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataConfigurationFiles"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (configurationFiles)
+ if pullErr := readBuffer.PullContext("configurationFiles", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ configurationFiles := make([]*BACnetApplicationTagObjectIdentifier, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetApplicationTagParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'configurationFiles' field")
+ }
+ configurationFiles = append(configurationFiles, CastBACnetApplicationTagObjectIdentifier(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("configurationFiles", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataConfigurationFiles"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataConfigurationFiles{
+ ConfigurationFiles: configurationFiles,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataConfigurationFiles) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataConfigurationFiles"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (configurationFiles)
+ if m.ConfigurationFiles != nil {
+ if pushErr := writeBuffer.PushContext("configurationFiles", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.ConfigurationFiles {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'configurationFiles' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("configurationFiles", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataConfigurationFiles"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataConfigurationFiles) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatabaseRevision.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatabaseRevision.go
new file mode 100644
index 0000000000..3e749b88e4
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatabaseRevision.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataDatabaseRevision is the data-structure of this message
+type BACnetConstructedDataDatabaseRevision struct {
+ *BACnetConstructedData
+ DatabaseRevision *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataDatabaseRevision is the corresponding interface of BACnetConstructedDataDatabaseRevision
+type IBACnetConstructedDataDatabaseRevision interface {
+ IBACnetConstructedData
+ // GetDatabaseRevision returns DatabaseRevision (property field)
+ GetDatabaseRevision() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataDatabaseRevision) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataDatabaseRevision) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_DATABASE_REVISION
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataDatabaseRevision) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataDatabaseRevision) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataDatabaseRevision) GetDatabaseRevision() *BACnetApplicationTagUnsignedInteger {
+ return m.DatabaseRevision
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataDatabaseRevision factory function for BACnetConstructedDataDatabaseRevision
+func NewBACnetConstructedDataDatabaseRevision(databaseRevision *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataDatabaseRevision {
+ _result := &BACnetConstructedDataDatabaseRevision{
+ DatabaseRevision: databaseRevision,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataDatabaseRevision(structType interface{}) *BACnetConstructedDataDatabaseRevision {
+ if casted, ok := structType.(BACnetConstructedDataDatabaseRevision); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataDatabaseRevision); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataDatabaseRevision(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataDatabaseRevision(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataDatabaseRevision) GetTypeName() string {
+ return "BACnetConstructedDataDatabaseRevision"
+}
+
+func (m *BACnetConstructedDataDatabaseRevision) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataDatabaseRevision) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (databaseRevision)
+ lengthInBits += m.DatabaseRevision.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataDatabaseRevision) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataDatabaseRevisionParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataDatabaseRevision, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataDatabaseRevision"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (databaseRevision)
+ if pullErr := readBuffer.PullContext("databaseRevision"); pullErr != nil {
+ return nil, pullErr
+ }
+ _databaseRevision, _databaseRevisionErr := BACnetApplicationTagParse(readBuffer)
+ if _databaseRevisionErr != nil {
+ return nil, errors.Wrap(_databaseRevisionErr, "Error parsing 'databaseRevision' field")
+ }
+ databaseRevision := CastBACnetApplicationTagUnsignedInteger(_databaseRevision)
+ if closeErr := readBuffer.CloseContext("databaseRevision"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataDatabaseRevision"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataDatabaseRevision{
+ DatabaseRevision: CastBACnetApplicationTagUnsignedInteger(databaseRevision),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataDatabaseRevision) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataDatabaseRevision"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (databaseRevision)
+ if pushErr := writeBuffer.PushContext("databaseRevision"); pushErr != nil {
+ return pushErr
+ }
+ _databaseRevisionErr := m.DatabaseRevision.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("databaseRevision"); popErr != nil {
+ return popErr
+ }
+ if _databaseRevisionErr != nil {
+ return errors.Wrap(_databaseRevisionErr, "Error serializing 'databaseRevision' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataDatabaseRevision"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataDatabaseRevision) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDaylightSavingsStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDaylightSavingsStatus.go
new file mode 100644
index 0000000000..f6052de5aa
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDaylightSavingsStatus.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataDaylightSavingsStatus is the data-structure of this message
+type BACnetConstructedDataDaylightSavingsStatus struct {
+ *BACnetConstructedData
+ DaylightSavingsStatus *BACnetApplicationTagBoolean
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataDaylightSavingsStatus is the corresponding interface of BACnetConstructedDataDaylightSavingsStatus
+type IBACnetConstructedDataDaylightSavingsStatus interface {
+ IBACnetConstructedData
+ // GetDaylightSavingsStatus returns DaylightSavingsStatus (property field)
+ GetDaylightSavingsStatus() *BACnetApplicationTagBoolean
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataDaylightSavingsStatus) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataDaylightSavingsStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_DAYLIGHT_SAVINGS_STATUS
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataDaylightSavingsStatus) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataDaylightSavingsStatus) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataDaylightSavingsStatus) GetDaylightSavingsStatus() *BACnetApplicationTagBoolean {
+ return m.DaylightSavingsStatus
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataDaylightSavingsStatus factory function for BACnetConstructedDataDaylightSavingsStatus
+func NewBACnetConstructedDataDaylightSavingsStatus(daylightSavingsStatus *BACnetApplicationTagBoolean, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataDaylightSavingsStatus {
+ _result := &BACnetConstructedDataDaylightSavingsStatus{
+ DaylightSavingsStatus: daylightSavingsStatus,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataDaylightSavingsStatus(structType interface{}) *BACnetConstructedDataDaylightSavingsStatus {
+ if casted, ok := structType.(BACnetConstructedDataDaylightSavingsStatus); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataDaylightSavingsStatus); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataDaylightSavingsStatus(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataDaylightSavingsStatus(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataDaylightSavingsStatus) GetTypeName() string {
+ return "BACnetConstructedDataDaylightSavingsStatus"
+}
+
+func (m *BACnetConstructedDataDaylightSavingsStatus) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataDaylightSavingsStatus) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (daylightSavingsStatus)
+ lengthInBits += m.DaylightSavingsStatus.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataDaylightSavingsStatus) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataDaylightSavingsStatusParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataDaylightSavingsStatus, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataDaylightSavingsStatus"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (daylightSavingsStatus)
+ if pullErr := readBuffer.PullContext("daylightSavingsStatus"); pullErr != nil {
+ return nil, pullErr
+ }
+ _daylightSavingsStatus, _daylightSavingsStatusErr := BACnetApplicationTagParse(readBuffer)
+ if _daylightSavingsStatusErr != nil {
+ return nil, errors.Wrap(_daylightSavingsStatusErr, "Error parsing 'daylightSavingsStatus' field")
+ }
+ daylightSavingsStatus := CastBACnetApplicationTagBoolean(_daylightSavingsStatus)
+ if closeErr := readBuffer.CloseContext("daylightSavingsStatus"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataDaylightSavingsStatus"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataDaylightSavingsStatus{
+ DaylightSavingsStatus: CastBACnetApplicationTagBoolean(daylightSavingsStatus),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataDaylightSavingsStatus) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataDaylightSavingsStatus"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (daylightSavingsStatus)
+ if pushErr := writeBuffer.PushContext("daylightSavingsStatus"); pushErr != nil {
+ return pushErr
+ }
+ _daylightSavingsStatusErr := m.DaylightSavingsStatus.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("daylightSavingsStatus"); popErr != nil {
+ return popErr
+ }
+ if _daylightSavingsStatusErr != nil {
+ return errors.Wrap(_daylightSavingsStatusErr, "Error serializing 'daylightSavingsStatus' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataDaylightSavingsStatus"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataDaylightSavingsStatus) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeployedProfileLocation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeployedProfileLocation.go
new file mode 100644
index 0000000000..2723ad3d3a
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeployedProfileLocation.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataDeployedProfileLocation is the data-structure of this message
+type BACnetConstructedDataDeployedProfileLocation struct {
+ *BACnetConstructedData
+ DeployedProfileLocation *BACnetApplicationTagCharacterString
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataDeployedProfileLocation is the corresponding interface of BACnetConstructedDataDeployedProfileLocation
+type IBACnetConstructedDataDeployedProfileLocation interface {
+ IBACnetConstructedData
+ // GetDeployedProfileLocation returns DeployedProfileLocation (property field)
+ GetDeployedProfileLocation() *BACnetApplicationTagCharacterString
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataDeployedProfileLocation) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataDeployedProfileLocation) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_DEPLOYED_PROFILE_LOCATION
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataDeployedProfileLocation) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataDeployedProfileLocation) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataDeployedProfileLocation) GetDeployedProfileLocation() *BACnetApplicationTagCharacterString {
+ return m.DeployedProfileLocation
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataDeployedProfileLocation factory function for BACnetConstructedDataDeployedProfileLocation
+func NewBACnetConstructedDataDeployedProfileLocation(deployedProfileLocation *BACnetApplicationTagCharacterString, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataDeployedProfileLocation {
+ _result := &BACnetConstructedDataDeployedProfileLocation{
+ DeployedProfileLocation: deployedProfileLocation,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataDeployedProfileLocation(structType interface{}) *BACnetConstructedDataDeployedProfileLocation {
+ if casted, ok := structType.(BACnetConstructedDataDeployedProfileLocation); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataDeployedProfileLocation); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataDeployedProfileLocation(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataDeployedProfileLocation(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataDeployedProfileLocation) GetTypeName() string {
+ return "BACnetConstructedDataDeployedProfileLocation"
+}
+
+func (m *BACnetConstructedDataDeployedProfileLocation) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataDeployedProfileLocation) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (deployedProfileLocation)
+ lengthInBits += m.DeployedProfileLocation.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataDeployedProfileLocation) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataDeployedProfileLocationParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataDeployedProfileLocation, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataDeployedProfileLocation"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (deployedProfileLocation)
+ if pullErr := readBuffer.PullContext("deployedProfileLocation"); pullErr != nil {
+ return nil, pullErr
+ }
+ _deployedProfileLocation, _deployedProfileLocationErr := BACnetApplicationTagParse(readBuffer)
+ if _deployedProfileLocationErr != nil {
+ return nil, errors.Wrap(_deployedProfileLocationErr, "Error parsing 'deployedProfileLocation' field")
+ }
+ deployedProfileLocation := CastBACnetApplicationTagCharacterString(_deployedProfileLocation)
+ if closeErr := readBuffer.CloseContext("deployedProfileLocation"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataDeployedProfileLocation"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataDeployedProfileLocation{
+ DeployedProfileLocation: CastBACnetApplicationTagCharacterString(deployedProfileLocation),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataDeployedProfileLocation) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataDeployedProfileLocation"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (deployedProfileLocation)
+ if pushErr := writeBuffer.PushContext("deployedProfileLocation"); pushErr != nil {
+ return pushErr
+ }
+ _deployedProfileLocationErr := m.DeployedProfileLocation.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("deployedProfileLocation"); popErr != nil {
+ return popErr
+ }
+ if _deployedProfileLocationErr != nil {
+ return errors.Wrap(_deployedProfileLocationErr, "Error serializing 'deployedProfileLocation' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataDeployedProfileLocation"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataDeployedProfileLocation) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceAddressBinding.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceAddressBinding.go
new file mode 100644
index 0000000000..ed6594518d
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceAddressBinding.go
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataDeviceAddressBinding is the data-structure of this message
+type BACnetConstructedDataDeviceAddressBinding struct {
+ *BACnetConstructedData
+ DeviceAddressBinding []*BACnetAddressBinding
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataDeviceAddressBinding is the corresponding interface of BACnetConstructedDataDeviceAddressBinding
+type IBACnetConstructedDataDeviceAddressBinding interface {
+ IBACnetConstructedData
+ // GetDeviceAddressBinding returns DeviceAddressBinding (property field)
+ GetDeviceAddressBinding() []*BACnetAddressBinding
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataDeviceAddressBinding) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataDeviceAddressBinding) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_DEVICE_ADDRESS_BINDING
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataDeviceAddressBinding) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataDeviceAddressBinding) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataDeviceAddressBinding) GetDeviceAddressBinding() []*BACnetAddressBinding {
+ return m.DeviceAddressBinding
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataDeviceAddressBinding factory function for BACnetConstructedDataDeviceAddressBinding
+func NewBACnetConstructedDataDeviceAddressBinding(deviceAddressBinding []*BACnetAddressBinding, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataDeviceAddressBinding {
+ _result := &BACnetConstructedDataDeviceAddressBinding{
+ DeviceAddressBinding: deviceAddressBinding,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataDeviceAddressBinding(structType interface{}) *BACnetConstructedDataDeviceAddressBinding {
+ if casted, ok := structType.(BACnetConstructedDataDeviceAddressBinding); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataDeviceAddressBinding); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataDeviceAddressBinding(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataDeviceAddressBinding(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataDeviceAddressBinding) GetTypeName() string {
+ return "BACnetConstructedDataDeviceAddressBinding"
+}
+
+func (m *BACnetConstructedDataDeviceAddressBinding) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataDeviceAddressBinding) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.DeviceAddressBinding) > 0 {
+ for _, element := range m.DeviceAddressBinding {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataDeviceAddressBinding) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataDeviceAddressBindingParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataDeviceAddressBinding, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataDeviceAddressBinding"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (deviceAddressBinding)
+ if pullErr := readBuffer.PullContext("deviceAddressBinding", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ deviceAddressBinding := make([]*BACnetAddressBinding, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetAddressBindingParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'deviceAddressBinding' field")
+ }
+ deviceAddressBinding = append(deviceAddressBinding, CastBACnetAddressBinding(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("deviceAddressBinding", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataDeviceAddressBinding"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataDeviceAddressBinding{
+ DeviceAddressBinding: deviceAddressBinding,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataDeviceAddressBinding) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataDeviceAddressBinding"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (deviceAddressBinding)
+ if m.DeviceAddressBinding != nil {
+ if pushErr := writeBuffer.PushContext("deviceAddressBinding", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.DeviceAddressBinding {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'deviceAddressBinding' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("deviceAddressBinding", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataDeviceAddressBinding"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataDeviceAddressBinding) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFirmwareRevision.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFirmwareRevision.go
new file mode 100644
index 0000000000..135be57f61
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFirmwareRevision.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataFirmwareRevision is the data-structure of this message
+type BACnetConstructedDataFirmwareRevision struct {
+ *BACnetConstructedData
+ FirmwareRevision *BACnetApplicationTagCharacterString
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataFirmwareRevision is the corresponding interface of BACnetConstructedDataFirmwareRevision
+type IBACnetConstructedDataFirmwareRevision interface {
+ IBACnetConstructedData
+ // GetFirmwareRevision returns FirmwareRevision (property field)
+ GetFirmwareRevision() *BACnetApplicationTagCharacterString
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataFirmwareRevision) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataFirmwareRevision) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_FIRMWARE_REVISION
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataFirmwareRevision) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataFirmwareRevision) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataFirmwareRevision) GetFirmwareRevision() *BACnetApplicationTagCharacterString {
+ return m.FirmwareRevision
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataFirmwareRevision factory function for BACnetConstructedDataFirmwareRevision
+func NewBACnetConstructedDataFirmwareRevision(firmwareRevision *BACnetApplicationTagCharacterString, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataFirmwareRevision {
+ _result := &BACnetConstructedDataFirmwareRevision{
+ FirmwareRevision: firmwareRevision,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataFirmwareRevision(structType interface{}) *BACnetConstructedDataFirmwareRevision {
+ if casted, ok := structType.(BACnetConstructedDataFirmwareRevision); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataFirmwareRevision); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataFirmwareRevision(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataFirmwareRevision(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataFirmwareRevision) GetTypeName() string {
+ return "BACnetConstructedDataFirmwareRevision"
+}
+
+func (m *BACnetConstructedDataFirmwareRevision) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataFirmwareRevision) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (firmwareRevision)
+ lengthInBits += m.FirmwareRevision.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataFirmwareRevision) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataFirmwareRevisionParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataFirmwareRevision, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataFirmwareRevision"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (firmwareRevision)
+ if pullErr := readBuffer.PullContext("firmwareRevision"); pullErr != nil {
+ return nil, pullErr
+ }
+ _firmwareRevision, _firmwareRevisionErr := BACnetApplicationTagParse(readBuffer)
+ if _firmwareRevisionErr != nil {
+ return nil, errors.Wrap(_firmwareRevisionErr, "Error parsing 'firmwareRevision' field")
+ }
+ firmwareRevision := CastBACnetApplicationTagCharacterString(_firmwareRevision)
+ if closeErr := readBuffer.CloseContext("firmwareRevision"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataFirmwareRevision"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataFirmwareRevision{
+ FirmwareRevision: CastBACnetApplicationTagCharacterString(firmwareRevision),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataFirmwareRevision) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataFirmwareRevision"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (firmwareRevision)
+ if pushErr := writeBuffer.PushContext("firmwareRevision"); pushErr != nil {
+ return pushErr
+ }
+ _firmwareRevisionErr := m.FirmwareRevision.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("firmwareRevision"); popErr != nil {
+ return popErr
+ }
+ if _firmwareRevisionErr != nil {
+ return errors.Wrap(_firmwareRevisionErr, "Error serializing 'firmwareRevision' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataFirmwareRevision"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataFirmwareRevision) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestartReason.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestartReason.go
new file mode 100644
index 0000000000..1ffd1d6833
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestartReason.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataLastRestartReason is the data-structure of this message
+type BACnetConstructedDataLastRestartReason struct {
+ *BACnetConstructedData
+ LastRestartReason *BACnetRestartReasonTagged
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataLastRestartReason is the corresponding interface of BACnetConstructedDataLastRestartReason
+type IBACnetConstructedDataLastRestartReason interface {
+ IBACnetConstructedData
+ // GetLastRestartReason returns LastRestartReason (property field)
+ GetLastRestartReason() *BACnetRestartReasonTagged
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataLastRestartReason) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataLastRestartReason) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_LAST_RESTART_REASON
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataLastRestartReason) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataLastRestartReason) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataLastRestartReason) GetLastRestartReason() *BACnetRestartReasonTagged {
+ return m.LastRestartReason
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataLastRestartReason factory function for BACnetConstructedDataLastRestartReason
+func NewBACnetConstructedDataLastRestartReason(lastRestartReason *BACnetRestartReasonTagged, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataLastRestartReason {
+ _result := &BACnetConstructedDataLastRestartReason{
+ LastRestartReason: lastRestartReason,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataLastRestartReason(structType interface{}) *BACnetConstructedDataLastRestartReason {
+ if casted, ok := structType.(BACnetConstructedDataLastRestartReason); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataLastRestartReason); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastRestartReason(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastRestartReason(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataLastRestartReason) GetTypeName() string {
+ return "BACnetConstructedDataLastRestartReason"
+}
+
+func (m *BACnetConstructedDataLastRestartReason) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataLastRestartReason) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (lastRestartReason)
+ lengthInBits += m.LastRestartReason.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataLastRestartReason) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataLastRestartReasonParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataLastRestartReason, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataLastRestartReason"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (lastRestartReason)
+ if pullErr := readBuffer.PullContext("lastRestartReason"); pullErr != nil {
+ return nil, pullErr
+ }
+ _lastRestartReason, _lastRestartReasonErr := BACnetRestartReasonTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
+ if _lastRestartReasonErr != nil {
+ return nil, errors.Wrap(_lastRestartReasonErr, "Error parsing 'lastRestartReason' field")
+ }
+ lastRestartReason := CastBACnetRestartReasonTagged(_lastRestartReason)
+ if closeErr := readBuffer.CloseContext("lastRestartReason"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataLastRestartReason"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataLastRestartReason{
+ LastRestartReason: CastBACnetRestartReasonTagged(lastRestartReason),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataLastRestartReason) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataLastRestartReason"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (lastRestartReason)
+ if pushErr := writeBuffer.PushContext("lastRestartReason"); pushErr != nil {
+ return pushErr
+ }
+ _lastRestartReasonErr := m.LastRestartReason.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("lastRestartReason"); popErr != nil {
+ return popErr
+ }
+ if _lastRestartReasonErr != nil {
+ return errors.Wrap(_lastRestartReasonErr, "Error serializing 'lastRestartReason' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataLastRestartReason"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataLastRestartReason) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestoreTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestoreTime.go
new file mode 100644
index 0000000000..b021ac1faa
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestoreTime.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataLastRestoreTime is the data-structure of this message
+type BACnetConstructedDataLastRestoreTime struct {
+ *BACnetConstructedData
+ LastRestoreTime *BACnetTimeStamp
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataLastRestoreTime is the corresponding interface of BACnetConstructedDataLastRestoreTime
+type IBACnetConstructedDataLastRestoreTime interface {
+ IBACnetConstructedData
+ // GetLastRestoreTime returns LastRestoreTime (property field)
+ GetLastRestoreTime() *BACnetTimeStamp
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataLastRestoreTime) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataLastRestoreTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_LAST_RESTORE_TIME
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataLastRestoreTime) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataLastRestoreTime) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataLastRestoreTime) GetLastRestoreTime() *BACnetTimeStamp {
+ return m.LastRestoreTime
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataLastRestoreTime factory function for BACnetConstructedDataLastRestoreTime
+func NewBACnetConstructedDataLastRestoreTime(lastRestoreTime *BACnetTimeStamp, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataLastRestoreTime {
+ _result := &BACnetConstructedDataLastRestoreTime{
+ LastRestoreTime: lastRestoreTime,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataLastRestoreTime(structType interface{}) *BACnetConstructedDataLastRestoreTime {
+ if casted, ok := structType.(BACnetConstructedDataLastRestoreTime); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataLastRestoreTime); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastRestoreTime(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastRestoreTime(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataLastRestoreTime) GetTypeName() string {
+ return "BACnetConstructedDataLastRestoreTime"
+}
+
+func (m *BACnetConstructedDataLastRestoreTime) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataLastRestoreTime) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (lastRestoreTime)
+ lengthInBits += m.LastRestoreTime.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataLastRestoreTime) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataLastRestoreTimeParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataLastRestoreTime, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataLastRestoreTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (lastRestoreTime)
+ if pullErr := readBuffer.PullContext("lastRestoreTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ _lastRestoreTime, _lastRestoreTimeErr := BACnetTimeStampParse(readBuffer)
+ if _lastRestoreTimeErr != nil {
+ return nil, errors.Wrap(_lastRestoreTimeErr, "Error parsing 'lastRestoreTime' field")
+ }
+ lastRestoreTime := CastBACnetTimeStamp(_lastRestoreTime)
+ if closeErr := readBuffer.CloseContext("lastRestoreTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataLastRestoreTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataLastRestoreTime{
+ LastRestoreTime: CastBACnetTimeStamp(lastRestoreTime),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataLastRestoreTime) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataLastRestoreTime"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (lastRestoreTime)
+ if pushErr := writeBuffer.PushContext("lastRestoreTime"); pushErr != nil {
+ return pushErr
+ }
+ _lastRestoreTimeErr := m.LastRestoreTime.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("lastRestoreTime"); popErr != nil {
+ return popErr
+ }
+ if _lastRestoreTimeErr != nil {
+ return errors.Wrap(_lastRestoreTimeErr, "Error serializing 'lastRestoreTime' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataLastRestoreTime"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataLastRestoreTime) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalDate.go
new file mode 100644
index 0000000000..f45f7b1d61
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalDate.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataLocalDate is the data-structure of this message
+type BACnetConstructedDataLocalDate struct {
+ *BACnetConstructedData
+ LocalDate *BACnetApplicationTagDate
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataLocalDate is the corresponding interface of BACnetConstructedDataLocalDate
+type IBACnetConstructedDataLocalDate interface {
+ IBACnetConstructedData
+ // GetLocalDate returns LocalDate (property field)
+ GetLocalDate() *BACnetApplicationTagDate
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataLocalDate) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataLocalDate) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_LOCAL_DATE
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataLocalDate) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataLocalDate) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataLocalDate) GetLocalDate() *BACnetApplicationTagDate {
+ return m.LocalDate
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataLocalDate factory function for BACnetConstructedDataLocalDate
+func NewBACnetConstructedDataLocalDate(localDate *BACnetApplicationTagDate, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataLocalDate {
+ _result := &BACnetConstructedDataLocalDate{
+ LocalDate: localDate,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataLocalDate(structType interface{}) *BACnetConstructedDataLocalDate {
+ if casted, ok := structType.(BACnetConstructedDataLocalDate); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataLocalDate); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLocalDate(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLocalDate(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataLocalDate) GetTypeName() string {
+ return "BACnetConstructedDataLocalDate"
+}
+
+func (m *BACnetConstructedDataLocalDate) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataLocalDate) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (localDate)
+ lengthInBits += m.LocalDate.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataLocalDate) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataLocalDateParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataLocalDate, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataLocalDate"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (localDate)
+ if pullErr := readBuffer.PullContext("localDate"); pullErr != nil {
+ return nil, pullErr
+ }
+ _localDate, _localDateErr := BACnetApplicationTagParse(readBuffer)
+ if _localDateErr != nil {
+ return nil, errors.Wrap(_localDateErr, "Error parsing 'localDate' field")
+ }
+ localDate := CastBACnetApplicationTagDate(_localDate)
+ if closeErr := readBuffer.CloseContext("localDate"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataLocalDate"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataLocalDate{
+ LocalDate: CastBACnetApplicationTagDate(localDate),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataLocalDate) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataLocalDate"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (localDate)
+ if pushErr := writeBuffer.PushContext("localDate"); pushErr != nil {
+ return pushErr
+ }
+ _localDateErr := m.LocalDate.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("localDate"); popErr != nil {
+ return popErr
+ }
+ if _localDateErr != nil {
+ return errors.Wrap(_localDateErr, "Error serializing 'localDate' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataLocalDate"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataLocalDate) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalTime.go
new file mode 100644
index 0000000000..c44e2d7b05
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalTime.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataLocalTime is the data-structure of this message
+type BACnetConstructedDataLocalTime struct {
+ *BACnetConstructedData
+ LocalTime *BACnetApplicationTagTime
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataLocalTime is the corresponding interface of BACnetConstructedDataLocalTime
+type IBACnetConstructedDataLocalTime interface {
+ IBACnetConstructedData
+ // GetLocalTime returns LocalTime (property field)
+ GetLocalTime() *BACnetApplicationTagTime
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataLocalTime) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataLocalTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_LOCAL_TIME
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataLocalTime) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataLocalTime) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataLocalTime) GetLocalTime() *BACnetApplicationTagTime {
+ return m.LocalTime
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataLocalTime factory function for BACnetConstructedDataLocalTime
+func NewBACnetConstructedDataLocalTime(localTime *BACnetApplicationTagTime, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataLocalTime {
+ _result := &BACnetConstructedDataLocalTime{
+ LocalTime: localTime,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataLocalTime(structType interface{}) *BACnetConstructedDataLocalTime {
+ if casted, ok := structType.(BACnetConstructedDataLocalTime); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataLocalTime); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLocalTime(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLocalTime(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataLocalTime) GetTypeName() string {
+ return "BACnetConstructedDataLocalTime"
+}
+
+func (m *BACnetConstructedDataLocalTime) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataLocalTime) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (localTime)
+ lengthInBits += m.LocalTime.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataLocalTime) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataLocalTimeParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataLocalTime, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataLocalTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (localTime)
+ if pullErr := readBuffer.PullContext("localTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ _localTime, _localTimeErr := BACnetApplicationTagParse(readBuffer)
+ if _localTimeErr != nil {
+ return nil, errors.Wrap(_localTimeErr, "Error parsing 'localTime' field")
+ }
+ localTime := CastBACnetApplicationTagTime(_localTime)
+ if closeErr := readBuffer.CloseContext("localTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataLocalTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataLocalTime{
+ LocalTime: CastBACnetApplicationTagTime(localTime),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataLocalTime) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataLocalTime"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (localTime)
+ if pushErr := writeBuffer.PushContext("localTime"); pushErr != nil {
+ return pushErr
+ }
+ _localTimeErr := m.LocalTime.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("localTime"); popErr != nil {
+ return popErr
+ }
+ if _localTimeErr != nil {
+ return errors.Wrap(_localTimeErr, "Error serializing 'localTime' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataLocalTime"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataLocalTime) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocation.go
new file mode 100644
index 0000000000..049cdf75ca
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocation.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataLocation is the data-structure of this message
+type BACnetConstructedDataLocation struct {
+ *BACnetConstructedData
+ Location *BACnetApplicationTagCharacterString
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataLocation is the corresponding interface of BACnetConstructedDataLocation
+type IBACnetConstructedDataLocation interface {
+ IBACnetConstructedData
+ // GetLocation returns Location (property field)
+ GetLocation() *BACnetApplicationTagCharacterString
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataLocation) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataLocation) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_LOCATION
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataLocation) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataLocation) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataLocation) GetLocation() *BACnetApplicationTagCharacterString {
+ return m.Location
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataLocation factory function for BACnetConstructedDataLocation
+func NewBACnetConstructedDataLocation(location *BACnetApplicationTagCharacterString, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataLocation {
+ _result := &BACnetConstructedDataLocation{
+ Location: location,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataLocation(structType interface{}) *BACnetConstructedDataLocation {
+ if casted, ok := structType.(BACnetConstructedDataLocation); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataLocation); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLocation(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLocation(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataLocation) GetTypeName() string {
+ return "BACnetConstructedDataLocation"
+}
+
+func (m *BACnetConstructedDataLocation) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataLocation) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (location)
+ lengthInBits += m.Location.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataLocation) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataLocationParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataLocation, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataLocation"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (location)
+ if pullErr := readBuffer.PullContext("location"); pullErr != nil {
+ return nil, pullErr
+ }
+ _location, _locationErr := BACnetApplicationTagParse(readBuffer)
+ if _locationErr != nil {
+ return nil, errors.Wrap(_locationErr, "Error parsing 'location' field")
+ }
+ location := CastBACnetApplicationTagCharacterString(_location)
+ if closeErr := readBuffer.CloseContext("location"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataLocation"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataLocation{
+ Location: CastBACnetApplicationTagCharacterString(location),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataLocation) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataLocation"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (location)
+ if pushErr := writeBuffer.PushContext("location"); pushErr != nil {
+ return pushErr
+ }
+ _locationErr := m.Location.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("location"); popErr != nil {
+ return popErr
+ }
+ if _locationErr != nil {
+ return errors.Wrap(_locationErr, "Error serializing 'location' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataLocation"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataLocation) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxAPDULengthAccepted.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxAPDULengthAccepted.go
new file mode 100644
index 0000000000..345018044a
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxAPDULengthAccepted.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataMaxAPDULengthAccepted is the data-structure of this message
+type BACnetConstructedDataMaxAPDULengthAccepted struct {
+ *BACnetConstructedData
+ MaxApduLengthAccepted *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataMaxAPDULengthAccepted is the corresponding interface of BACnetConstructedDataMaxAPDULengthAccepted
+type IBACnetConstructedDataMaxAPDULengthAccepted interface {
+ IBACnetConstructedData
+ // GetMaxApduLengthAccepted returns MaxApduLengthAccepted (property field)
+ GetMaxApduLengthAccepted() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataMaxAPDULengthAccepted) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataMaxAPDULengthAccepted) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_MAX_APDU_LENGTH_ACCEPTED
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataMaxAPDULengthAccepted) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataMaxAPDULengthAccepted) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataMaxAPDULengthAccepted) GetMaxApduLengthAccepted() *BACnetApplicationTagUnsignedInteger {
+ return m.MaxApduLengthAccepted
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataMaxAPDULengthAccepted factory function for BACnetConstructedDataMaxAPDULengthAccepted
+func NewBACnetConstructedDataMaxAPDULengthAccepted(maxApduLengthAccepted *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataMaxAPDULengthAccepted {
+ _result := &BACnetConstructedDataMaxAPDULengthAccepted{
+ MaxApduLengthAccepted: maxApduLengthAccepted,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataMaxAPDULengthAccepted(structType interface{}) *BACnetConstructedDataMaxAPDULengthAccepted {
+ if casted, ok := structType.(BACnetConstructedDataMaxAPDULengthAccepted); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataMaxAPDULengthAccepted); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataMaxAPDULengthAccepted(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataMaxAPDULengthAccepted(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataMaxAPDULengthAccepted) GetTypeName() string {
+ return "BACnetConstructedDataMaxAPDULengthAccepted"
+}
+
+func (m *BACnetConstructedDataMaxAPDULengthAccepted) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataMaxAPDULengthAccepted) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (maxApduLengthAccepted)
+ lengthInBits += m.MaxApduLengthAccepted.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataMaxAPDULengthAccepted) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataMaxAPDULengthAcceptedParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataMaxAPDULengthAccepted, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataMaxAPDULengthAccepted"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (maxApduLengthAccepted)
+ if pullErr := readBuffer.PullContext("maxApduLengthAccepted"); pullErr != nil {
+ return nil, pullErr
+ }
+ _maxApduLengthAccepted, _maxApduLengthAcceptedErr := BACnetApplicationTagParse(readBuffer)
+ if _maxApduLengthAcceptedErr != nil {
+ return nil, errors.Wrap(_maxApduLengthAcceptedErr, "Error parsing 'maxApduLengthAccepted' field")
+ }
+ maxApduLengthAccepted := CastBACnetApplicationTagUnsignedInteger(_maxApduLengthAccepted)
+ if closeErr := readBuffer.CloseContext("maxApduLengthAccepted"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataMaxAPDULengthAccepted"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataMaxAPDULengthAccepted{
+ MaxApduLengthAccepted: CastBACnetApplicationTagUnsignedInteger(maxApduLengthAccepted),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataMaxAPDULengthAccepted) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataMaxAPDULengthAccepted"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (maxApduLengthAccepted)
+ if pushErr := writeBuffer.PushContext("maxApduLengthAccepted"); pushErr != nil {
+ return pushErr
+ }
+ _maxApduLengthAcceptedErr := m.MaxApduLengthAccepted.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("maxApduLengthAccepted"); popErr != nil {
+ return popErr
+ }
+ if _maxApduLengthAcceptedErr != nil {
+ return errors.Wrap(_maxApduLengthAcceptedErr, "Error serializing 'maxApduLengthAccepted' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataMaxAPDULengthAccepted"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataMaxAPDULengthAccepted) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxSegmentsAccepted.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxSegmentsAccepted.go
new file mode 100644
index 0000000000..eb207faa76
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxSegmentsAccepted.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataMaxSegmentsAccepted is the data-structure of this message
+type BACnetConstructedDataMaxSegmentsAccepted struct {
+ *BACnetConstructedData
+ MaxSegmentsAccepted *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataMaxSegmentsAccepted is the corresponding interface of BACnetConstructedDataMaxSegmentsAccepted
+type IBACnetConstructedDataMaxSegmentsAccepted interface {
+ IBACnetConstructedData
+ // GetMaxSegmentsAccepted returns MaxSegmentsAccepted (property field)
+ GetMaxSegmentsAccepted() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataMaxSegmentsAccepted) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataMaxSegmentsAccepted) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_MAX_SEGMENTS_ACCEPTED
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataMaxSegmentsAccepted) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataMaxSegmentsAccepted) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataMaxSegmentsAccepted) GetMaxSegmentsAccepted() *BACnetApplicationTagUnsignedInteger {
+ return m.MaxSegmentsAccepted
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataMaxSegmentsAccepted factory function for BACnetConstructedDataMaxSegmentsAccepted
+func NewBACnetConstructedDataMaxSegmentsAccepted(maxSegmentsAccepted *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataMaxSegmentsAccepted {
+ _result := &BACnetConstructedDataMaxSegmentsAccepted{
+ MaxSegmentsAccepted: maxSegmentsAccepted,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataMaxSegmentsAccepted(structType interface{}) *BACnetConstructedDataMaxSegmentsAccepted {
+ if casted, ok := structType.(BACnetConstructedDataMaxSegmentsAccepted); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataMaxSegmentsAccepted); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataMaxSegmentsAccepted(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataMaxSegmentsAccepted(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataMaxSegmentsAccepted) GetTypeName() string {
+ return "BACnetConstructedDataMaxSegmentsAccepted"
+}
+
+func (m *BACnetConstructedDataMaxSegmentsAccepted) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataMaxSegmentsAccepted) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (maxSegmentsAccepted)
+ lengthInBits += m.MaxSegmentsAccepted.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataMaxSegmentsAccepted) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataMaxSegmentsAcceptedParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataMaxSegmentsAccepted, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataMaxSegmentsAccepted"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (maxSegmentsAccepted)
+ if pullErr := readBuffer.PullContext("maxSegmentsAccepted"); pullErr != nil {
+ return nil, pullErr
+ }
+ _maxSegmentsAccepted, _maxSegmentsAcceptedErr := BACnetApplicationTagParse(readBuffer)
+ if _maxSegmentsAcceptedErr != nil {
+ return nil, errors.Wrap(_maxSegmentsAcceptedErr, "Error parsing 'maxSegmentsAccepted' field")
+ }
+ maxSegmentsAccepted := CastBACnetApplicationTagUnsignedInteger(_maxSegmentsAccepted)
+ if closeErr := readBuffer.CloseContext("maxSegmentsAccepted"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataMaxSegmentsAccepted"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataMaxSegmentsAccepted{
+ MaxSegmentsAccepted: CastBACnetApplicationTagUnsignedInteger(maxSegmentsAccepted),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataMaxSegmentsAccepted) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataMaxSegmentsAccepted"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (maxSegmentsAccepted)
+ if pushErr := writeBuffer.PushContext("maxSegmentsAccepted"); pushErr != nil {
+ return pushErr
+ }
+ _maxSegmentsAcceptedErr := m.MaxSegmentsAccepted.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("maxSegmentsAccepted"); popErr != nil {
+ return popErr
+ }
+ if _maxSegmentsAcceptedErr != nil {
+ return errors.Wrap(_maxSegmentsAcceptedErr, "Error serializing 'maxSegmentsAccepted' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataMaxSegmentsAccepted"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataMaxSegmentsAccepted) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataModelName.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataModelName.go
new file mode 100644
index 0000000000..b9779daf87
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataModelName.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataModelName is the data-structure of this message
+type BACnetConstructedDataModelName struct {
+ *BACnetConstructedData
+ ModelName *BACnetApplicationTagCharacterString
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataModelName is the corresponding interface of BACnetConstructedDataModelName
+type IBACnetConstructedDataModelName interface {
+ IBACnetConstructedData
+ // GetModelName returns ModelName (property field)
+ GetModelName() *BACnetApplicationTagCharacterString
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataModelName) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataModelName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_MODEL_NAME
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataModelName) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataModelName) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataModelName) GetModelName() *BACnetApplicationTagCharacterString {
+ return m.ModelName
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataModelName factory function for BACnetConstructedDataModelName
+func NewBACnetConstructedDataModelName(modelName *BACnetApplicationTagCharacterString, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataModelName {
+ _result := &BACnetConstructedDataModelName{
+ ModelName: modelName,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataModelName(structType interface{}) *BACnetConstructedDataModelName {
+ if casted, ok := structType.(BACnetConstructedDataModelName); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataModelName); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataModelName(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataModelName(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataModelName) GetTypeName() string {
+ return "BACnetConstructedDataModelName"
+}
+
+func (m *BACnetConstructedDataModelName) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataModelName) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (modelName)
+ lengthInBits += m.ModelName.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataModelName) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataModelNameParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataModelName, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataModelName"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (modelName)
+ if pullErr := readBuffer.PullContext("modelName"); pullErr != nil {
+ return nil, pullErr
+ }
+ _modelName, _modelNameErr := BACnetApplicationTagParse(readBuffer)
+ if _modelNameErr != nil {
+ return nil, errors.Wrap(_modelNameErr, "Error parsing 'modelName' field")
+ }
+ modelName := CastBACnetApplicationTagCharacterString(_modelName)
+ if closeErr := readBuffer.CloseContext("modelName"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataModelName"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataModelName{
+ ModelName: CastBACnetApplicationTagCharacterString(modelName),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataModelName) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataModelName"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (modelName)
+ if pushErr := writeBuffer.PushContext("modelName"); pushErr != nil {
+ return pushErr
+ }
+ _modelNameErr := m.ModelName.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("modelName"); popErr != nil {
+ return popErr
+ }
+ if _modelNameErr != nil {
+ return errors.Wrap(_modelNameErr, "Error serializing 'modelName' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataModelName"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataModelName) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfAPDURetries.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfAPDURetries.go
new file mode 100644
index 0000000000..04d3d32a48
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfAPDURetries.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataNumberOfAPDURetries is the data-structure of this message
+type BACnetConstructedDataNumberOfAPDURetries struct {
+ *BACnetConstructedData
+ NumberOfApduRetries *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataNumberOfAPDURetries is the corresponding interface of BACnetConstructedDataNumberOfAPDURetries
+type IBACnetConstructedDataNumberOfAPDURetries interface {
+ IBACnetConstructedData
+ // GetNumberOfApduRetries returns NumberOfApduRetries (property field)
+ GetNumberOfApduRetries() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataNumberOfAPDURetries) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataNumberOfAPDURetries) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_NUMBER_OF_APDU_RETRIES
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataNumberOfAPDURetries) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataNumberOfAPDURetries) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataNumberOfAPDURetries) GetNumberOfApduRetries() *BACnetApplicationTagUnsignedInteger {
+ return m.NumberOfApduRetries
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataNumberOfAPDURetries factory function for BACnetConstructedDataNumberOfAPDURetries
+func NewBACnetConstructedDataNumberOfAPDURetries(numberOfApduRetries *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataNumberOfAPDURetries {
+ _result := &BACnetConstructedDataNumberOfAPDURetries{
+ NumberOfApduRetries: numberOfApduRetries,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataNumberOfAPDURetries(structType interface{}) *BACnetConstructedDataNumberOfAPDURetries {
+ if casted, ok := structType.(BACnetConstructedDataNumberOfAPDURetries); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataNumberOfAPDURetries); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataNumberOfAPDURetries(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataNumberOfAPDURetries(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataNumberOfAPDURetries) GetTypeName() string {
+ return "BACnetConstructedDataNumberOfAPDURetries"
+}
+
+func (m *BACnetConstructedDataNumberOfAPDURetries) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataNumberOfAPDURetries) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (numberOfApduRetries)
+ lengthInBits += m.NumberOfApduRetries.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataNumberOfAPDURetries) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataNumberOfAPDURetriesParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataNumberOfAPDURetries, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataNumberOfAPDURetries"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (numberOfApduRetries)
+ if pullErr := readBuffer.PullContext("numberOfApduRetries"); pullErr != nil {
+ return nil, pullErr
+ }
+ _numberOfApduRetries, _numberOfApduRetriesErr := BACnetApplicationTagParse(readBuffer)
+ if _numberOfApduRetriesErr != nil {
+ return nil, errors.Wrap(_numberOfApduRetriesErr, "Error parsing 'numberOfApduRetries' field")
+ }
+ numberOfApduRetries := CastBACnetApplicationTagUnsignedInteger(_numberOfApduRetries)
+ if closeErr := readBuffer.CloseContext("numberOfApduRetries"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataNumberOfAPDURetries"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataNumberOfAPDURetries{
+ NumberOfApduRetries: CastBACnetApplicationTagUnsignedInteger(numberOfApduRetries),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataNumberOfAPDURetries) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataNumberOfAPDURetries"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (numberOfApduRetries)
+ if pushErr := writeBuffer.PushContext("numberOfApduRetries"); pushErr != nil {
+ return pushErr
+ }
+ _numberOfApduRetriesErr := m.NumberOfApduRetries.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("numberOfApduRetries"); popErr != nil {
+ return popErr
+ }
+ if _numberOfApduRetriesErr != nil {
+ return errors.Wrap(_numberOfApduRetriesErr, "Error serializing 'numberOfApduRetries' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataNumberOfAPDURetries"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataNumberOfAPDURetries) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectList.go
new file mode 100644
index 0000000000..97cd8ddde4
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectList.go
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataObjectList is the data-structure of this message
+type BACnetConstructedDataObjectList struct {
+ *BACnetConstructedData
+ ObjectList []*BACnetObjectIdentifierOrUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataObjectList is the corresponding interface of BACnetConstructedDataObjectList
+type IBACnetConstructedDataObjectList interface {
+ IBACnetConstructedData
+ // GetObjectList returns ObjectList (property field)
+ GetObjectList() []*BACnetObjectIdentifierOrUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataObjectList) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataObjectList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_OBJECT_LIST
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataObjectList) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataObjectList) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataObjectList) GetObjectList() []*BACnetObjectIdentifierOrUnsignedInteger {
+ return m.ObjectList
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataObjectList factory function for BACnetConstructedDataObjectList
+func NewBACnetConstructedDataObjectList(objectList []*BACnetObjectIdentifierOrUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataObjectList {
+ _result := &BACnetConstructedDataObjectList{
+ ObjectList: objectList,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataObjectList(structType interface{}) *BACnetConstructedDataObjectList {
+ if casted, ok := structType.(BACnetConstructedDataObjectList); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataObjectList); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataObjectList(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataObjectList(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataObjectList) GetTypeName() string {
+ return "BACnetConstructedDataObjectList"
+}
+
+func (m *BACnetConstructedDataObjectList) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataObjectList) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.ObjectList) > 0 {
+ for _, element := range m.ObjectList {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataObjectList) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataObjectListParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataObjectList, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataObjectList"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (objectList)
+ if pullErr := readBuffer.PullContext("objectList", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ objectList := make([]*BACnetObjectIdentifierOrUnsignedInteger, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetObjectIdentifierOrUnsignedIntegerParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'objectList' field")
+ }
+ objectList = append(objectList, CastBACnetObjectIdentifierOrUnsignedInteger(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("objectList", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataObjectList"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataObjectList{
+ ObjectList: objectList,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataObjectList) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataObjectList"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (objectList)
+ if m.ObjectList != nil {
+ if pushErr := writeBuffer.PushContext("objectList", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.ObjectList {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'objectList' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("objectList", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataObjectList"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataObjectList) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolObjectTypesSupported.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolObjectTypesSupported.go
new file mode 100644
index 0000000000..7a37513064
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolObjectTypesSupported.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataProtocolObjectTypesSupported is the data-structure of this message
+type BACnetConstructedDataProtocolObjectTypesSupported struct {
+ *BACnetConstructedData
+ ProtocolObjectTypesSupported *BACnetObjectTypesSupportedTagged
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataProtocolObjectTypesSupported is the corresponding interface of BACnetConstructedDataProtocolObjectTypesSupported
+type IBACnetConstructedDataProtocolObjectTypesSupported interface {
+ IBACnetConstructedData
+ // GetProtocolObjectTypesSupported returns ProtocolObjectTypesSupported (property field)
+ GetProtocolObjectTypesSupported() *BACnetObjectTypesSupportedTagged
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataProtocolObjectTypesSupported) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataProtocolObjectTypesSupported) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_PROTOCOL_OBJECT_TYPES_SUPPORTED
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataProtocolObjectTypesSupported) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataProtocolObjectTypesSupported) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataProtocolObjectTypesSupported) GetProtocolObjectTypesSupported() *BACnetObjectTypesSupportedTagged {
+ return m.ProtocolObjectTypesSupported
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataProtocolObjectTypesSupported factory function for BACnetConstructedDataProtocolObjectTypesSupported
+func NewBACnetConstructedDataProtocolObjectTypesSupported(protocolObjectTypesSupported *BACnetObjectTypesSupportedTagged, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataProtocolObjectTypesSupported {
+ _result := &BACnetConstructedDataProtocolObjectTypesSupported{
+ ProtocolObjectTypesSupported: protocolObjectTypesSupported,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataProtocolObjectTypesSupported(structType interface{}) *BACnetConstructedDataProtocolObjectTypesSupported {
+ if casted, ok := structType.(BACnetConstructedDataProtocolObjectTypesSupported); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataProtocolObjectTypesSupported); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataProtocolObjectTypesSupported(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataProtocolObjectTypesSupported(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataProtocolObjectTypesSupported) GetTypeName() string {
+ return "BACnetConstructedDataProtocolObjectTypesSupported"
+}
+
+func (m *BACnetConstructedDataProtocolObjectTypesSupported) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataProtocolObjectTypesSupported) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (protocolObjectTypesSupported)
+ lengthInBits += m.ProtocolObjectTypesSupported.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataProtocolObjectTypesSupported) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataProtocolObjectTypesSupportedParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataProtocolObjectTypesSupported, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataProtocolObjectTypesSupported"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (protocolObjectTypesSupported)
+ if pullErr := readBuffer.PullContext("protocolObjectTypesSupported"); pullErr != nil {
+ return nil, pullErr
+ }
+ _protocolObjectTypesSupported, _protocolObjectTypesSupportedErr := BACnetObjectTypesSupportedTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
+ if _protocolObjectTypesSupportedErr != nil {
+ return nil, errors.Wrap(_protocolObjectTypesSupportedErr, "Error parsing 'protocolObjectTypesSupported' field")
+ }
+ protocolObjectTypesSupported := CastBACnetObjectTypesSupportedTagged(_protocolObjectTypesSupported)
+ if closeErr := readBuffer.CloseContext("protocolObjectTypesSupported"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataProtocolObjectTypesSupported"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataProtocolObjectTypesSupported{
+ ProtocolObjectTypesSupported: CastBACnetObjectTypesSupportedTagged(protocolObjectTypesSupported),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataProtocolObjectTypesSupported) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataProtocolObjectTypesSupported"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (protocolObjectTypesSupported)
+ if pushErr := writeBuffer.PushContext("protocolObjectTypesSupported"); pushErr != nil {
+ return pushErr
+ }
+ _protocolObjectTypesSupportedErr := m.ProtocolObjectTypesSupported.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("protocolObjectTypesSupported"); popErr != nil {
+ return popErr
+ }
+ if _protocolObjectTypesSupportedErr != nil {
+ return errors.Wrap(_protocolObjectTypesSupportedErr, "Error serializing 'protocolObjectTypesSupported' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataProtocolObjectTypesSupported"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataProtocolObjectTypesSupported) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolRevision.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolRevision.go
new file mode 100644
index 0000000000..4cac0f10ee
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolRevision.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataProtocolRevision is the data-structure of this message
+type BACnetConstructedDataProtocolRevision struct {
+ *BACnetConstructedData
+ ProtocolRevision *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataProtocolRevision is the corresponding interface of BACnetConstructedDataProtocolRevision
+type IBACnetConstructedDataProtocolRevision interface {
+ IBACnetConstructedData
+ // GetProtocolRevision returns ProtocolRevision (property field)
+ GetProtocolRevision() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataProtocolRevision) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataProtocolRevision) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_PROTOCOL_REVISION
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataProtocolRevision) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataProtocolRevision) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataProtocolRevision) GetProtocolRevision() *BACnetApplicationTagUnsignedInteger {
+ return m.ProtocolRevision
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataProtocolRevision factory function for BACnetConstructedDataProtocolRevision
+func NewBACnetConstructedDataProtocolRevision(protocolRevision *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataProtocolRevision {
+ _result := &BACnetConstructedDataProtocolRevision{
+ ProtocolRevision: protocolRevision,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataProtocolRevision(structType interface{}) *BACnetConstructedDataProtocolRevision {
+ if casted, ok := structType.(BACnetConstructedDataProtocolRevision); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataProtocolRevision); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataProtocolRevision(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataProtocolRevision(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataProtocolRevision) GetTypeName() string {
+ return "BACnetConstructedDataProtocolRevision"
+}
+
+func (m *BACnetConstructedDataProtocolRevision) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataProtocolRevision) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (protocolRevision)
+ lengthInBits += m.ProtocolRevision.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataProtocolRevision) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataProtocolRevisionParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataProtocolRevision, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataProtocolRevision"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (protocolRevision)
+ if pullErr := readBuffer.PullContext("protocolRevision"); pullErr != nil {
+ return nil, pullErr
+ }
+ _protocolRevision, _protocolRevisionErr := BACnetApplicationTagParse(readBuffer)
+ if _protocolRevisionErr != nil {
+ return nil, errors.Wrap(_protocolRevisionErr, "Error parsing 'protocolRevision' field")
+ }
+ protocolRevision := CastBACnetApplicationTagUnsignedInteger(_protocolRevision)
+ if closeErr := readBuffer.CloseContext("protocolRevision"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataProtocolRevision"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataProtocolRevision{
+ ProtocolRevision: CastBACnetApplicationTagUnsignedInteger(protocolRevision),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataProtocolRevision) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataProtocolRevision"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (protocolRevision)
+ if pushErr := writeBuffer.PushContext("protocolRevision"); pushErr != nil {
+ return pushErr
+ }
+ _protocolRevisionErr := m.ProtocolRevision.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("protocolRevision"); popErr != nil {
+ return popErr
+ }
+ if _protocolRevisionErr != nil {
+ return errors.Wrap(_protocolRevisionErr, "Error serializing 'protocolRevision' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataProtocolRevision"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataProtocolRevision) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolServicesSupported.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolServicesSupported.go
new file mode 100644
index 0000000000..668cf386fb
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolServicesSupported.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataProtocolServicesSupported is the data-structure of this message
+type BACnetConstructedDataProtocolServicesSupported struct {
+ *BACnetConstructedData
+ ProtocolServicesSupported *BACnetServicesSupportedTagged
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataProtocolServicesSupported is the corresponding interface of BACnetConstructedDataProtocolServicesSupported
+type IBACnetConstructedDataProtocolServicesSupported interface {
+ IBACnetConstructedData
+ // GetProtocolServicesSupported returns ProtocolServicesSupported (property field)
+ GetProtocolServicesSupported() *BACnetServicesSupportedTagged
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataProtocolServicesSupported) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataProtocolServicesSupported) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_PROTOCOL_SERVICES_SUPPORTED
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataProtocolServicesSupported) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataProtocolServicesSupported) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataProtocolServicesSupported) GetProtocolServicesSupported() *BACnetServicesSupportedTagged {
+ return m.ProtocolServicesSupported
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataProtocolServicesSupported factory function for BACnetConstructedDataProtocolServicesSupported
+func NewBACnetConstructedDataProtocolServicesSupported(protocolServicesSupported *BACnetServicesSupportedTagged, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataProtocolServicesSupported {
+ _result := &BACnetConstructedDataProtocolServicesSupported{
+ ProtocolServicesSupported: protocolServicesSupported,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataProtocolServicesSupported(structType interface{}) *BACnetConstructedDataProtocolServicesSupported {
+ if casted, ok := structType.(BACnetConstructedDataProtocolServicesSupported); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataProtocolServicesSupported); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataProtocolServicesSupported(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataProtocolServicesSupported(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataProtocolServicesSupported) GetTypeName() string {
+ return "BACnetConstructedDataProtocolServicesSupported"
+}
+
+func (m *BACnetConstructedDataProtocolServicesSupported) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataProtocolServicesSupported) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (protocolServicesSupported)
+ lengthInBits += m.ProtocolServicesSupported.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataProtocolServicesSupported) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataProtocolServicesSupportedParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataProtocolServicesSupported, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataProtocolServicesSupported"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (protocolServicesSupported)
+ if pullErr := readBuffer.PullContext("protocolServicesSupported"); pullErr != nil {
+ return nil, pullErr
+ }
+ _protocolServicesSupported, _protocolServicesSupportedErr := BACnetServicesSupportedTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
+ if _protocolServicesSupportedErr != nil {
+ return nil, errors.Wrap(_protocolServicesSupportedErr, "Error parsing 'protocolServicesSupported' field")
+ }
+ protocolServicesSupported := CastBACnetServicesSupportedTagged(_protocolServicesSupported)
+ if closeErr := readBuffer.CloseContext("protocolServicesSupported"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataProtocolServicesSupported"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataProtocolServicesSupported{
+ ProtocolServicesSupported: CastBACnetServicesSupportedTagged(protocolServicesSupported),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataProtocolServicesSupported) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataProtocolServicesSupported"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (protocolServicesSupported)
+ if pushErr := writeBuffer.PushContext("protocolServicesSupported"); pushErr != nil {
+ return pushErr
+ }
+ _protocolServicesSupportedErr := m.ProtocolServicesSupported.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("protocolServicesSupported"); popErr != nil {
+ return popErr
+ }
+ if _protocolServicesSupportedErr != nil {
+ return errors.Wrap(_protocolServicesSupportedErr, "Error serializing 'protocolServicesSupported' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataProtocolServicesSupported"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataProtocolServicesSupported) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolVersion.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolVersion.go
new file mode 100644
index 0000000000..34bfdfd15b
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolVersion.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataProtocolVersion is the data-structure of this message
+type BACnetConstructedDataProtocolVersion struct {
+ *BACnetConstructedData
+ ProtocolVersion *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataProtocolVersion is the corresponding interface of BACnetConstructedDataProtocolVersion
+type IBACnetConstructedDataProtocolVersion interface {
+ IBACnetConstructedData
+ // GetProtocolVersion returns ProtocolVersion (property field)
+ GetProtocolVersion() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataProtocolVersion) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataProtocolVersion) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_PROTOCOL_VERSION
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataProtocolVersion) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataProtocolVersion) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataProtocolVersion) GetProtocolVersion() *BACnetApplicationTagUnsignedInteger {
+ return m.ProtocolVersion
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataProtocolVersion factory function for BACnetConstructedDataProtocolVersion
+func NewBACnetConstructedDataProtocolVersion(protocolVersion *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataProtocolVersion {
+ _result := &BACnetConstructedDataProtocolVersion{
+ ProtocolVersion: protocolVersion,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataProtocolVersion(structType interface{}) *BACnetConstructedDataProtocolVersion {
+ if casted, ok := structType.(BACnetConstructedDataProtocolVersion); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataProtocolVersion); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataProtocolVersion(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataProtocolVersion(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataProtocolVersion) GetTypeName() string {
+ return "BACnetConstructedDataProtocolVersion"
+}
+
+func (m *BACnetConstructedDataProtocolVersion) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataProtocolVersion) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (protocolVersion)
+ lengthInBits += m.ProtocolVersion.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataProtocolVersion) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataProtocolVersionParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataProtocolVersion, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataProtocolVersion"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (protocolVersion)
+ if pullErr := readBuffer.PullContext("protocolVersion"); pullErr != nil {
+ return nil, pullErr
+ }
+ _protocolVersion, _protocolVersionErr := BACnetApplicationTagParse(readBuffer)
+ if _protocolVersionErr != nil {
+ return nil, errors.Wrap(_protocolVersionErr, "Error parsing 'protocolVersion' field")
+ }
+ protocolVersion := CastBACnetApplicationTagUnsignedInteger(_protocolVersion)
+ if closeErr := readBuffer.CloseContext("protocolVersion"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataProtocolVersion"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataProtocolVersion{
+ ProtocolVersion: CastBACnetApplicationTagUnsignedInteger(protocolVersion),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataProtocolVersion) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataProtocolVersion"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (protocolVersion)
+ if pushErr := writeBuffer.PushContext("protocolVersion"); pushErr != nil {
+ return pushErr
+ }
+ _protocolVersionErr := m.ProtocolVersion.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("protocolVersion"); popErr != nil {
+ return popErr
+ }
+ if _protocolVersionErr != nil {
+ return errors.Wrap(_protocolVersionErr, "Error serializing 'protocolVersion' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataProtocolVersion"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataProtocolVersion) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestartNotificationRecipients.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestartNotificationRecipients.go
new file mode 100644
index 0000000000..b541e651c3
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestartNotificationRecipients.go
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataRestartNotificationRecipients is the data-structure of this message
+type BACnetConstructedDataRestartNotificationRecipients struct {
+ *BACnetConstructedData
+ RestartNotificationRecipients []*BACnetRecipient
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataRestartNotificationRecipients is the corresponding interface of BACnetConstructedDataRestartNotificationRecipients
+type IBACnetConstructedDataRestartNotificationRecipients interface {
+ IBACnetConstructedData
+ // GetRestartNotificationRecipients returns RestartNotificationRecipients (property field)
+ GetRestartNotificationRecipients() []*BACnetRecipient
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataRestartNotificationRecipients) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataRestartNotificationRecipients) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_RESTART_NOTIFICATION_RECIPIENTS
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataRestartNotificationRecipients) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataRestartNotificationRecipients) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataRestartNotificationRecipients) GetRestartNotificationRecipients() []*BACnetRecipient {
+ return m.RestartNotificationRecipients
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataRestartNotificationRecipients factory function for BACnetConstructedDataRestartNotificationRecipients
+func NewBACnetConstructedDataRestartNotificationRecipients(restartNotificationRecipients []*BACnetRecipient, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataRestartNotificationRecipients {
+ _result := &BACnetConstructedDataRestartNotificationRecipients{
+ RestartNotificationRecipients: restartNotificationRecipients,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataRestartNotificationRecipients(structType interface{}) *BACnetConstructedDataRestartNotificationRecipients {
+ if casted, ok := structType.(BACnetConstructedDataRestartNotificationRecipients); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataRestartNotificationRecipients); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataRestartNotificationRecipients(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataRestartNotificationRecipients(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataRestartNotificationRecipients) GetTypeName() string {
+ return "BACnetConstructedDataRestartNotificationRecipients"
+}
+
+func (m *BACnetConstructedDataRestartNotificationRecipients) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataRestartNotificationRecipients) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.RestartNotificationRecipients) > 0 {
+ for _, element := range m.RestartNotificationRecipients {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataRestartNotificationRecipients) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataRestartNotificationRecipientsParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataRestartNotificationRecipients, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataRestartNotificationRecipients"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (restartNotificationRecipients)
+ if pullErr := readBuffer.PullContext("restartNotificationRecipients", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ restartNotificationRecipients := make([]*BACnetRecipient, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetRecipientParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'restartNotificationRecipients' field")
+ }
+ restartNotificationRecipients = append(restartNotificationRecipients, CastBACnetRecipient(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("restartNotificationRecipients", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataRestartNotificationRecipients"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataRestartNotificationRecipients{
+ RestartNotificationRecipients: restartNotificationRecipients,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataRestartNotificationRecipients) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataRestartNotificationRecipients"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (restartNotificationRecipients)
+ if m.RestartNotificationRecipients != nil {
+ if pushErr := writeBuffer.PushContext("restartNotificationRecipients", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.RestartNotificationRecipients {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'restartNotificationRecipients' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("restartNotificationRecipients", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataRestartNotificationRecipients"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataRestartNotificationRecipients) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestoreCompletionTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestoreCompletionTime.go
new file mode 100644
index 0000000000..b8f472d72a
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestoreCompletionTime.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataRestoreCompletionTime is the data-structure of this message
+type BACnetConstructedDataRestoreCompletionTime struct {
+ *BACnetConstructedData
+ CompletionTime *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataRestoreCompletionTime is the corresponding interface of BACnetConstructedDataRestoreCompletionTime
+type IBACnetConstructedDataRestoreCompletionTime interface {
+ IBACnetConstructedData
+ // GetCompletionTime returns CompletionTime (property field)
+ GetCompletionTime() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataRestoreCompletionTime) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataRestoreCompletionTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_RESTORE_COMPLETION_TIME
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataRestoreCompletionTime) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataRestoreCompletionTime) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataRestoreCompletionTime) GetCompletionTime() *BACnetApplicationTagUnsignedInteger {
+ return m.CompletionTime
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataRestoreCompletionTime factory function for BACnetConstructedDataRestoreCompletionTime
+func NewBACnetConstructedDataRestoreCompletionTime(completionTime *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataRestoreCompletionTime {
+ _result := &BACnetConstructedDataRestoreCompletionTime{
+ CompletionTime: completionTime,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataRestoreCompletionTime(structType interface{}) *BACnetConstructedDataRestoreCompletionTime {
+ if casted, ok := structType.(BACnetConstructedDataRestoreCompletionTime); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataRestoreCompletionTime); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataRestoreCompletionTime(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataRestoreCompletionTime(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataRestoreCompletionTime) GetTypeName() string {
+ return "BACnetConstructedDataRestoreCompletionTime"
+}
+
+func (m *BACnetConstructedDataRestoreCompletionTime) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataRestoreCompletionTime) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (completionTime)
+ lengthInBits += m.CompletionTime.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataRestoreCompletionTime) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataRestoreCompletionTimeParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataRestoreCompletionTime, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataRestoreCompletionTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (completionTime)
+ if pullErr := readBuffer.PullContext("completionTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ _completionTime, _completionTimeErr := BACnetApplicationTagParse(readBuffer)
+ if _completionTimeErr != nil {
+ return nil, errors.Wrap(_completionTimeErr, "Error parsing 'completionTime' field")
+ }
+ completionTime := CastBACnetApplicationTagUnsignedInteger(_completionTime)
+ if closeErr := readBuffer.CloseContext("completionTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataRestoreCompletionTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataRestoreCompletionTime{
+ CompletionTime: CastBACnetApplicationTagUnsignedInteger(completionTime),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataRestoreCompletionTime) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataRestoreCompletionTime"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (completionTime)
+ if pushErr := writeBuffer.PushContext("completionTime"); pushErr != nil {
+ return pushErr
+ }
+ _completionTimeErr := m.CompletionTime.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("completionTime"); popErr != nil {
+ return popErr
+ }
+ if _completionTimeErr != nil {
+ return errors.Wrap(_completionTimeErr, "Error serializing 'completionTime' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataRestoreCompletionTime"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataRestoreCompletionTime) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestorePreparationTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestorePreparationTime.go
new file mode 100644
index 0000000000..74b628080c
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestorePreparationTime.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataRestorePreparationTime is the data-structure of this message
+type BACnetConstructedDataRestorePreparationTime struct {
+ *BACnetConstructedData
+ RestorePreparationTime *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataRestorePreparationTime is the corresponding interface of BACnetConstructedDataRestorePreparationTime
+type IBACnetConstructedDataRestorePreparationTime interface {
+ IBACnetConstructedData
+ // GetRestorePreparationTime returns RestorePreparationTime (property field)
+ GetRestorePreparationTime() *BACnetApplicationTagUnsignedInteger
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataRestorePreparationTime) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataRestorePreparationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_RESTORE_PREPARATION_TIME
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataRestorePreparationTime) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataRestorePreparationTime) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataRestorePreparationTime) GetRestorePreparationTime() *BACnetApplicationTagUnsignedInteger {
+ return m.RestorePreparationTime
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataRestorePreparationTime factory function for BACnetConstructedDataRestorePreparationTime
+func NewBACnetConstructedDataRestorePreparationTime(restorePreparationTime *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataRestorePreparationTime {
+ _result := &BACnetConstructedDataRestorePreparationTime{
+ RestorePreparationTime: restorePreparationTime,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataRestorePreparationTime(structType interface{}) *BACnetConstructedDataRestorePreparationTime {
+ if casted, ok := structType.(BACnetConstructedDataRestorePreparationTime); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataRestorePreparationTime); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataRestorePreparationTime(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataRestorePreparationTime(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataRestorePreparationTime) GetTypeName() string {
+ return "BACnetConstructedDataRestorePreparationTime"
+}
+
+func (m *BACnetConstructedDataRestorePreparationTime) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataRestorePreparationTime) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (restorePreparationTime)
+ lengthInBits += m.RestorePreparationTime.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataRestorePreparationTime) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataRestorePreparationTimeParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataRestorePreparationTime, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataRestorePreparationTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (restorePreparationTime)
+ if pullErr := readBuffer.PullContext("restorePreparationTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ _restorePreparationTime, _restorePreparationTimeErr := BACnetApplicationTagParse(readBuffer)
+ if _restorePreparationTimeErr != nil {
+ return nil, errors.Wrap(_restorePreparationTimeErr, "Error parsing 'restorePreparationTime' field")
+ }
+ restorePreparationTime := CastBACnetApplicationTagUnsignedInteger(_restorePreparationTime)
+ if closeErr := readBuffer.CloseContext("restorePreparationTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataRestorePreparationTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataRestorePreparationTime{
+ RestorePreparationTime: CastBACnetApplicationTagUnsignedInteger(restorePreparationTime),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataRestorePreparationTime) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataRestorePreparationTime"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (restorePreparationTime)
+ if pushErr := writeBuffer.PushContext("restorePreparationTime"); pushErr != nil {
+ return pushErr
+ }
+ _restorePreparationTimeErr := m.RestorePreparationTime.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("restorePreparationTime"); popErr != nil {
+ return popErr
+ }
+ if _restorePreparationTimeErr != nil {
+ return errors.Wrap(_restorePreparationTimeErr, "Error serializing 'restorePreparationTime' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataRestorePreparationTime"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataRestorePreparationTime) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSegmentationSupported.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSegmentationSupported.go
new file mode 100644
index 0000000000..e40f58fbd6
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSegmentationSupported.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataSegmentationSupported is the data-structure of this message
+type BACnetConstructedDataSegmentationSupported struct {
+ *BACnetConstructedData
+ SegmentationSupported *BACnetSegmentationTagged
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataSegmentationSupported is the corresponding interface of BACnetConstructedDataSegmentationSupported
+type IBACnetConstructedDataSegmentationSupported interface {
+ IBACnetConstructedData
+ // GetSegmentationSupported returns SegmentationSupported (property field)
+ GetSegmentationSupported() *BACnetSegmentationTagged
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataSegmentationSupported) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataSegmentationSupported) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_SEGMENTATION_SUPPORTED
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataSegmentationSupported) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataSegmentationSupported) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataSegmentationSupported) GetSegmentationSupported() *BACnetSegmentationTagged {
+ return m.SegmentationSupported
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataSegmentationSupported factory function for BACnetConstructedDataSegmentationSupported
+func NewBACnetConstructedDataSegmentationSupported(segmentationSupported *BACnetSegmentationTagged, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataSegmentationSupported {
+ _result := &BACnetConstructedDataSegmentationSupported{
+ SegmentationSupported: segmentationSupported,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataSegmentationSupported(structType interface{}) *BACnetConstructedDataSegmentationSupported {
+ if casted, ok := structType.(BACnetConstructedDataSegmentationSupported); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataSegmentationSupported); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSegmentationSupported(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSegmentationSupported(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataSegmentationSupported) GetTypeName() string {
+ return "BACnetConstructedDataSegmentationSupported"
+}
+
+func (m *BACnetConstructedDataSegmentationSupported) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataSegmentationSupported) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (segmentationSupported)
+ lengthInBits += m.SegmentationSupported.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataSegmentationSupported) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataSegmentationSupportedParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataSegmentationSupported, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataSegmentationSupported"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (segmentationSupported)
+ if pullErr := readBuffer.PullContext("segmentationSupported"); pullErr != nil {
+ return nil, pullErr
+ }
+ _segmentationSupported, _segmentationSupportedErr := BACnetSegmentationTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
+ if _segmentationSupportedErr != nil {
+ return nil, errors.Wrap(_segmentationSupportedErr, "Error parsing 'segmentationSupported' field")
+ }
+ segmentationSupported := CastBACnetSegmentationTagged(_segmentationSupported)
+ if closeErr := readBuffer.CloseContext("segmentationSupported"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataSegmentationSupported"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataSegmentationSupported{
+ SegmentationSupported: CastBACnetSegmentationTagged(segmentationSupported),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataSegmentationSupported) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataSegmentationSupported"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (segmentationSupported)
+ if pushErr := writeBuffer.PushContext("segmentationSupported"); pushErr != nil {
+ return pushErr
+ }
+ _segmentationSupportedErr := m.SegmentationSupported.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("segmentationSupported"); popErr != nil {
+ return popErr
+ }
+ if _segmentationSupportedErr != nil {
+ return errors.Wrap(_segmentationSupportedErr, "Error serializing 'segmentationSupported' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataSegmentationSupported"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataSegmentationSupported) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSerialNumber.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSerialNumber.go
new file mode 100644
index 0000000000..161f7257e6
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSerialNumber.go
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataSerialNumber is the data-structure of this message
+type BACnetConstructedDataSerialNumber struct {
+ *BACnetConstructedData
+ SerialNumber *BACnetApplicationTagCharacterString
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataSerialNumber is the corresponding interface of BACnetConstructedDataSerialNumber
+type IBACnetConstructedDataSerialNumber interface {
+ IBACnetConstructedData
+ // GetSerialNumber returns SerialNumber (property field)
+ GetSerialNumber() *BACnetApplicationTagCharacterString
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataSerialNumber) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataSerialNumber) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_SERIAL_NUMBER
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataSerialNumber) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataSerialNumber) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataSerialNumber) GetSerialNumber() *BACnetApplicationTagCharacterString {
+ return m.SerialNumber
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataSerialNumber factory function for BACnetConstructedDataSerialNumber
+func NewBACnetConstructedDataSerialNumber(serialNumber *BACnetApplicationTagCharacterString, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataSerialNumber {
+ _result := &BACnetConstructedDataSerialNumber{
+ SerialNumber: serialNumber,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataSerialNumber(structType interface{}) *BACnetConstructedDataSerialNumber {
+ if casted, ok := structType.(BACnetConstructedDataSerialNumber); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataSerialNumber); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSerialNumber(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSerialNumber(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataSerialNumber) GetTypeName() string {
+ return "BACnetConstructedDataSerialNumber"
+}
+
+func (m *BACnetConstructedDataSerialNumber) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataSerialNumber) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (serialNumber)
+ lengthInBits += m.SerialNumber.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataSerialNumber) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataSerialNumberParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataSerialNumber, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataSerialNumber"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (serialNumber)
+ if pullErr := readBuffer.PullContext("serialNumber"); pullErr != nil {
+ return nil, pullErr
+ }
+ _serialNumber, _serialNumberErr := BACnetApplicationTagParse(readBuffer)
+ if _serialNumberErr != nil {
+ return nil, errors.Wrap(_serialNumberErr, "Error parsing 'serialNumber' field")
+ }
+ serialNumber := CastBACnetApplicationTagCharacterString(_serialNumber)
+ if closeErr := readBuffer.CloseContext("serialNumber"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataSerialNumber"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataSerialNumber{
+ SerialNumber: CastBACnetApplicationTagCharacterString(serialNumber),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataSerialNumber) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataSerialNumber"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (serialNumber)
+ if pushErr := writeBuffer.PushContext("serialNumber"); pushErr != nil {
+ return pushErr
+ }
+ _serialNumberErr := m.SerialNumber.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("serialNumber"); popErr != nil {
+ return popErr
+ }
+ if _serialNumberErr != nil {
+ return errors.Wrap(_serialNumberErr, "Error serializing 'serialNumber' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataSerialNumber"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataSerialNumber) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStructuredObjectList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStructuredObjectList.go
new file mode 100644
index 0000000000..5617ac82af
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStructuredObjectList.go
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetConstructedDataStructuredObjectList is the data-structure of this message
+type BACnetConstructedDataStructuredObjectList struct {
+ *BACnetConstructedData
+ StructuredObjectList []*BACnetApplicationTagObjectIdentifier
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataStructuredObjectList is the corresponding interface of BACnetConstructedDataStructuredObjectList
+type IBACnetConstructedDataStructuredObjectList interface {
+ IBACnetConstructedData
+ // GetStructuredObjectList returns StructuredObjectList (property field)
+ GetStructuredObjectList() []*BACnetApplicationTagObjectIdentifier
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *BACnetConstructedDataStructuredObjectList) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataStructuredObjectList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_STRUCTURED_OBJECT_LIST
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataStructuredObjectList) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataStructuredObjectList) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataStructuredObjectList) GetStructuredObjectList() []*BACnetApplicationTagObjectIdentifier {
+ return m.StructuredObjectList
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataStructuredObjectList factory function for BACnetConstructedDataStructuredObjectList
+func NewBACnetConstructedDataStructuredObjectList(structuredObjectList []*BACnetApplicationTagObjectIdentifier, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataStructuredObjectList {
+ _result := &BACnetConstructedDataStructuredObjectList{
+ StructuredObjectList: structuredObjectList,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataStructuredObjectList(structType interface{}) *BACnetConstructedDataStructuredObjectList {
+ if casted, ok := structType.(BACnetConstructedDataStructuredObjectList); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataStructuredObjectList); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataStructuredObjectList(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataStructuredObjectList(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataStructuredObjectList) GetTypeName() string {
+ return "BACnetConstructedDataStructuredObjectList"
+}
+
+func (m *BACnetConstructedDataStructuredObjectList) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataStructuredObjectList) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.StructuredObjectList) > 0 {
+ for _, element := range m.StructuredObjectList {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataStructuredObjectList) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataStructuredObjectListParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataStructuredObjectList, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataStructuredObjectList"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (structuredObjectList)
+ if pullErr := readBuffer.PullContext("structuredObjectList", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ structuredObjectList := make([]*BACnetApplicationTagObjectIdentifier, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetApplicationTagParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'structuredObjectList' field")
+ }
+ structuredObjectList = append(structuredObjectList, CastBACnetApplicationTagObjectIdentifier(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("structuredObjectList", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataStructuredObjectList"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataStructuredObjectList{
+ StructuredObjectList: structuredObjectList,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataStructuredObjectList) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataStructuredObjectList"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (structuredObjectList)
+ if m.StructuredObjectList != nil {
+ if pushErr := writeBuffer.PushContext("structuredObjectList", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.StructuredObjectList {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'structuredObjectList' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("structuredObjectList", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataStructuredObjectList"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
... 5081 lines suppressed ...