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/03 13:19:38 UTC
[plc4x] branch develop updated: feat(bacnet): implemented unique properties for structured view object 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 8a683e29d6 feat(bacnet): implemented unique properties for structured view object type
8a683e29d6 is described below
commit 8a683e29d6867d089efeaf6487e5d2bdd2c8f184
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Jun 3 15:19:32 2022 +0200
feat(bacnet): implemented unique properties for structured view object type
- DEFAULT_SUBORDINATE_RELATIONSHIP
- NODE_SUBTYPE
- NODE_TYPE
- SUBORDINATE_ANNOTATIONS
- SUBORDINATE_NODE_TYPES
- SUBORDINATE_RELATIONSHIPS
- SUBORDINATE_TAGS
---
.../readwrite/model/BACnetConstructedData.go | 14 ++
...onstructedDataDefaultSubordinateRelationship.go | 211 +++++++++++++++++++
.../model/BACnetConstructedDataNodeSubtype.go | 211 +++++++++++++++++++
.../model/BACnetConstructedDataNodeType.go | 211 +++++++++++++++++++
.../BACnetConstructedDataSubordinateAnnotations.go | 226 +++++++++++++++++++++
.../BACnetConstructedDataSubordinateNodeTypes.go | 226 +++++++++++++++++++++
...ACnetConstructedDataSubordinateRelationships.go | 226 +++++++++++++++++++++
.../model/BACnetConstructedDataSubordinateTags.go | 226 +++++++++++++++++++++
.../readwrite/model/BACnetNameValueCollection.go | 48 ++---
.../resources/protocols/bacnetip/bacnetip.mspec | 44 +++-
10 files changed, 1610 insertions(+), 33 deletions(-)
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go
index 48e1de9158..eeac8e33cb 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go
@@ -358,6 +358,8 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataDaysRemainingParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DEADBAND: // BACnetConstructedDataDeadband
_child, typeSwitchError = BACnetConstructedDataDeadbandParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_SUBORDINATE_RELATIONSHIP: // BACnetConstructedDataDefaultSubordinateRelationship
+ _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_DERIVATIVE_CONSTANT_UNITS: // BACnetConstructedDataDerivativeConstantUnits
@@ -472,6 +474,10 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataMusterPointParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_NEGATIVE_ACCESS_RULES: // BACnetConstructedDataNegativeAccessRules
_child, typeSwitchError = BACnetConstructedDataNegativeAccessRulesParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_NODE_SUBTYPE: // BACnetConstructedDataNodeSubtype
+ _child, typeSwitchError = BACnetConstructedDataNodeSubtypeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_NODE_TYPE: // BACnetConstructedDataNodeType
+ _child, typeSwitchError = BACnetConstructedDataNodeTypeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_NOTIFICATION_CLASS: // BACnetConstructedDataNotificationClass
_child, typeSwitchError = BACnetConstructedDataNotificationClassParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_NOTIFY_TYPE: // BACnetConstructedDataNotifyType
@@ -526,8 +532,16 @@ 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_SUBORDINATE_ANNOTATIONS: // BACnetConstructedDataSubordinateAnnotations
+ _child, typeSwitchError = BACnetConstructedDataSubordinateAnnotationsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_LIST: // BACnetConstructedDataSubordinateList
_child, typeSwitchError = BACnetConstructedDataSubordinateListParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_NODE_TYPES: // BACnetConstructedDataSubordinateNodeTypes
+ _child, typeSwitchError = BACnetConstructedDataSubordinateNodeTypesParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_RELATIONSHIPS: // BACnetConstructedDataSubordinateRelationships
+ _child, typeSwitchError = BACnetConstructedDataSubordinateRelationshipsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_TAGS: // BACnetConstructedDataSubordinateTags
+ _child, typeSwitchError = BACnetConstructedDataSubordinateTagsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_TAGS: // BACnetConstructedDataTags
_child, typeSwitchError = BACnetConstructedDataTagsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_THREAT_AUTHORITY: // BACnetConstructedDataThreatAuthority
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultSubordinateRelationship.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultSubordinateRelationship.go
new file mode 100644
index 0000000000..ce36e00c3f
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultSubordinateRelationship.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.
+
+// BACnetConstructedDataDefaultSubordinateRelationship is the data-structure of this message
+type BACnetConstructedDataDefaultSubordinateRelationship struct {
+ *BACnetConstructedData
+ DefaultSubordinateRelationship *BACnetRelationshipTagged
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataDefaultSubordinateRelationship is the corresponding interface of BACnetConstructedDataDefaultSubordinateRelationship
+type IBACnetConstructedDataDefaultSubordinateRelationship interface {
+ IBACnetConstructedData
+ // GetDefaultSubordinateRelationship returns DefaultSubordinateRelationship (property field)
+ GetDefaultSubordinateRelationship() *BACnetRelationshipTagged
+ // 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 *BACnetConstructedDataDefaultSubordinateRelationship) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataDefaultSubordinateRelationship) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_DEFAULT_SUBORDINATE_RELATIONSHIP
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataDefaultSubordinateRelationship) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataDefaultSubordinateRelationship) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataDefaultSubordinateRelationship) GetDefaultSubordinateRelationship() *BACnetRelationshipTagged {
+ return m.DefaultSubordinateRelationship
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataDefaultSubordinateRelationship factory function for BACnetConstructedDataDefaultSubordinateRelationship
+func NewBACnetConstructedDataDefaultSubordinateRelationship(defaultSubordinateRelationship *BACnetRelationshipTagged, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataDefaultSubordinateRelationship {
+ _result := &BACnetConstructedDataDefaultSubordinateRelationship{
+ DefaultSubordinateRelationship: defaultSubordinateRelationship,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataDefaultSubordinateRelationship(structType interface{}) *BACnetConstructedDataDefaultSubordinateRelationship {
+ if casted, ok := structType.(BACnetConstructedDataDefaultSubordinateRelationship); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataDefaultSubordinateRelationship); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataDefaultSubordinateRelationship(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataDefaultSubordinateRelationship(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataDefaultSubordinateRelationship) GetTypeName() string {
+ return "BACnetConstructedDataDefaultSubordinateRelationship"
+}
+
+func (m *BACnetConstructedDataDefaultSubordinateRelationship) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataDefaultSubordinateRelationship) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (defaultSubordinateRelationship)
+ lengthInBits += m.DefaultSubordinateRelationship.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataDefaultSubordinateRelationship) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataDefaultSubordinateRelationshipParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataDefaultSubordinateRelationship, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataDefaultSubordinateRelationship"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (defaultSubordinateRelationship)
+ if pullErr := readBuffer.PullContext("defaultSubordinateRelationship"); pullErr != nil {
+ return nil, pullErr
+ }
+ _defaultSubordinateRelationship, _defaultSubordinateRelationshipErr := BACnetRelationshipTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
+ if _defaultSubordinateRelationshipErr != nil {
+ return nil, errors.Wrap(_defaultSubordinateRelationshipErr, "Error parsing 'defaultSubordinateRelationship' field")
+ }
+ defaultSubordinateRelationship := CastBACnetRelationshipTagged(_defaultSubordinateRelationship)
+ if closeErr := readBuffer.CloseContext("defaultSubordinateRelationship"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataDefaultSubordinateRelationship"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataDefaultSubordinateRelationship{
+ DefaultSubordinateRelationship: CastBACnetRelationshipTagged(defaultSubordinateRelationship),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataDefaultSubordinateRelationship) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataDefaultSubordinateRelationship"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (defaultSubordinateRelationship)
+ if pushErr := writeBuffer.PushContext("defaultSubordinateRelationship"); pushErr != nil {
+ return pushErr
+ }
+ _defaultSubordinateRelationshipErr := m.DefaultSubordinateRelationship.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("defaultSubordinateRelationship"); popErr != nil {
+ return popErr
+ }
+ if _defaultSubordinateRelationshipErr != nil {
+ return errors.Wrap(_defaultSubordinateRelationshipErr, "Error serializing 'defaultSubordinateRelationship' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataDefaultSubordinateRelationship"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataDefaultSubordinateRelationship) 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/BACnetConstructedDataNodeSubtype.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeSubtype.go
new file mode 100644
index 0000000000..1c15d432f1
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeSubtype.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.
+
+// BACnetConstructedDataNodeSubtype is the data-structure of this message
+type BACnetConstructedDataNodeSubtype struct {
+ *BACnetConstructedData
+ NodeSubType *BACnetApplicationTagCharacterString
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataNodeSubtype is the corresponding interface of BACnetConstructedDataNodeSubtype
+type IBACnetConstructedDataNodeSubtype interface {
+ IBACnetConstructedData
+ // GetNodeSubType returns NodeSubType (property field)
+ GetNodeSubType() *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 *BACnetConstructedDataNodeSubtype) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataNodeSubtype) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_NODE_SUBTYPE
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataNodeSubtype) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataNodeSubtype) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataNodeSubtype) GetNodeSubType() *BACnetApplicationTagCharacterString {
+ return m.NodeSubType
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataNodeSubtype factory function for BACnetConstructedDataNodeSubtype
+func NewBACnetConstructedDataNodeSubtype(nodeSubType *BACnetApplicationTagCharacterString, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataNodeSubtype {
+ _result := &BACnetConstructedDataNodeSubtype{
+ NodeSubType: nodeSubType,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataNodeSubtype(structType interface{}) *BACnetConstructedDataNodeSubtype {
+ if casted, ok := structType.(BACnetConstructedDataNodeSubtype); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataNodeSubtype); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataNodeSubtype(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataNodeSubtype(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataNodeSubtype) GetTypeName() string {
+ return "BACnetConstructedDataNodeSubtype"
+}
+
+func (m *BACnetConstructedDataNodeSubtype) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataNodeSubtype) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (nodeSubType)
+ lengthInBits += m.NodeSubType.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataNodeSubtype) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataNodeSubtypeParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataNodeSubtype, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataNodeSubtype"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (nodeSubType)
+ if pullErr := readBuffer.PullContext("nodeSubType"); pullErr != nil {
+ return nil, pullErr
+ }
+ _nodeSubType, _nodeSubTypeErr := BACnetApplicationTagParse(readBuffer)
+ if _nodeSubTypeErr != nil {
+ return nil, errors.Wrap(_nodeSubTypeErr, "Error parsing 'nodeSubType' field")
+ }
+ nodeSubType := CastBACnetApplicationTagCharacterString(_nodeSubType)
+ if closeErr := readBuffer.CloseContext("nodeSubType"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataNodeSubtype"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataNodeSubtype{
+ NodeSubType: CastBACnetApplicationTagCharacterString(nodeSubType),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataNodeSubtype) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataNodeSubtype"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (nodeSubType)
+ if pushErr := writeBuffer.PushContext("nodeSubType"); pushErr != nil {
+ return pushErr
+ }
+ _nodeSubTypeErr := m.NodeSubType.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("nodeSubType"); popErr != nil {
+ return popErr
+ }
+ if _nodeSubTypeErr != nil {
+ return errors.Wrap(_nodeSubTypeErr, "Error serializing 'nodeSubType' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataNodeSubtype"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataNodeSubtype) 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/BACnetConstructedDataNodeType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeType.go
new file mode 100644
index 0000000000..a6408df6b0
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeType.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.
+
+// BACnetConstructedDataNodeType is the data-structure of this message
+type BACnetConstructedDataNodeType struct {
+ *BACnetConstructedData
+ NodeType *BACnetNodeTypeTagged
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataNodeType is the corresponding interface of BACnetConstructedDataNodeType
+type IBACnetConstructedDataNodeType interface {
+ IBACnetConstructedData
+ // GetNodeType returns NodeType (property field)
+ GetNodeType() *BACnetNodeTypeTagged
+ // 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 *BACnetConstructedDataNodeType) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataNodeType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_NODE_TYPE
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataNodeType) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataNodeType) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataNodeType) GetNodeType() *BACnetNodeTypeTagged {
+ return m.NodeType
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataNodeType factory function for BACnetConstructedDataNodeType
+func NewBACnetConstructedDataNodeType(nodeType *BACnetNodeTypeTagged, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataNodeType {
+ _result := &BACnetConstructedDataNodeType{
+ NodeType: nodeType,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataNodeType(structType interface{}) *BACnetConstructedDataNodeType {
+ if casted, ok := structType.(BACnetConstructedDataNodeType); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataNodeType); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataNodeType(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataNodeType(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataNodeType) GetTypeName() string {
+ return "BACnetConstructedDataNodeType"
+}
+
+func (m *BACnetConstructedDataNodeType) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataNodeType) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (nodeType)
+ lengthInBits += m.NodeType.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataNodeType) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataNodeTypeParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataNodeType, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataNodeType"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (nodeType)
+ if pullErr := readBuffer.PullContext("nodeType"); pullErr != nil {
+ return nil, pullErr
+ }
+ _nodeType, _nodeTypeErr := BACnetNodeTypeTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
+ if _nodeTypeErr != nil {
+ return nil, errors.Wrap(_nodeTypeErr, "Error parsing 'nodeType' field")
+ }
+ nodeType := CastBACnetNodeTypeTagged(_nodeType)
+ if closeErr := readBuffer.CloseContext("nodeType"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataNodeType"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataNodeType{
+ NodeType: CastBACnetNodeTypeTagged(nodeType),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataNodeType) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataNodeType"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (nodeType)
+ if pushErr := writeBuffer.PushContext("nodeType"); pushErr != nil {
+ return pushErr
+ }
+ _nodeTypeErr := m.NodeType.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("nodeType"); popErr != nil {
+ return popErr
+ }
+ if _nodeTypeErr != nil {
+ return errors.Wrap(_nodeTypeErr, "Error serializing 'nodeType' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataNodeType"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataNodeType) 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/BACnetConstructedDataSubordinateAnnotations.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateAnnotations.go
new file mode 100644
index 0000000000..1f8eac6a67
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateAnnotations.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.
+
+// BACnetConstructedDataSubordinateAnnotations is the data-structure of this message
+type BACnetConstructedDataSubordinateAnnotations struct {
+ *BACnetConstructedData
+ SubordinateAnnotations []*BACnetApplicationTagCharacterString
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataSubordinateAnnotations is the corresponding interface of BACnetConstructedDataSubordinateAnnotations
+type IBACnetConstructedDataSubordinateAnnotations interface {
+ IBACnetConstructedData
+ // GetSubordinateAnnotations returns SubordinateAnnotations (property field)
+ GetSubordinateAnnotations() []*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 *BACnetConstructedDataSubordinateAnnotations) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataSubordinateAnnotations) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_SUBORDINATE_ANNOTATIONS
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataSubordinateAnnotations) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataSubordinateAnnotations) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataSubordinateAnnotations) GetSubordinateAnnotations() []*BACnetApplicationTagCharacterString {
+ return m.SubordinateAnnotations
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataSubordinateAnnotations factory function for BACnetConstructedDataSubordinateAnnotations
+func NewBACnetConstructedDataSubordinateAnnotations(subordinateAnnotations []*BACnetApplicationTagCharacterString, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataSubordinateAnnotations {
+ _result := &BACnetConstructedDataSubordinateAnnotations{
+ SubordinateAnnotations: subordinateAnnotations,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataSubordinateAnnotations(structType interface{}) *BACnetConstructedDataSubordinateAnnotations {
+ if casted, ok := structType.(BACnetConstructedDataSubordinateAnnotations); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataSubordinateAnnotations); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSubordinateAnnotations(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSubordinateAnnotations(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataSubordinateAnnotations) GetTypeName() string {
+ return "BACnetConstructedDataSubordinateAnnotations"
+}
+
+func (m *BACnetConstructedDataSubordinateAnnotations) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataSubordinateAnnotations) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.SubordinateAnnotations) > 0 {
+ for _, element := range m.SubordinateAnnotations {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataSubordinateAnnotations) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataSubordinateAnnotationsParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataSubordinateAnnotations, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataSubordinateAnnotations"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (subordinateAnnotations)
+ if pullErr := readBuffer.PullContext("subordinateAnnotations", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ subordinateAnnotations := make([]*BACnetApplicationTagCharacterString, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetApplicationTagParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'subordinateAnnotations' field")
+ }
+ subordinateAnnotations = append(subordinateAnnotations, CastBACnetApplicationTagCharacterString(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("subordinateAnnotations", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataSubordinateAnnotations"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataSubordinateAnnotations{
+ SubordinateAnnotations: subordinateAnnotations,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataSubordinateAnnotations) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataSubordinateAnnotations"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (subordinateAnnotations)
+ if m.SubordinateAnnotations != nil {
+ if pushErr := writeBuffer.PushContext("subordinateAnnotations", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.SubordinateAnnotations {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'subordinateAnnotations' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("subordinateAnnotations", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataSubordinateAnnotations"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataSubordinateAnnotations) 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/BACnetConstructedDataSubordinateNodeTypes.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateNodeTypes.go
new file mode 100644
index 0000000000..26a5669f51
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateNodeTypes.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.
+
+// BACnetConstructedDataSubordinateNodeTypes is the data-structure of this message
+type BACnetConstructedDataSubordinateNodeTypes struct {
+ *BACnetConstructedData
+ SubordinateNodeTypes []*BACnetNodeTypeTagged
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataSubordinateNodeTypes is the corresponding interface of BACnetConstructedDataSubordinateNodeTypes
+type IBACnetConstructedDataSubordinateNodeTypes interface {
+ IBACnetConstructedData
+ // GetSubordinateNodeTypes returns SubordinateNodeTypes (property field)
+ GetSubordinateNodeTypes() []*BACnetNodeTypeTagged
+ // 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 *BACnetConstructedDataSubordinateNodeTypes) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataSubordinateNodeTypes) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_SUBORDINATE_NODE_TYPES
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataSubordinateNodeTypes) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataSubordinateNodeTypes) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataSubordinateNodeTypes) GetSubordinateNodeTypes() []*BACnetNodeTypeTagged {
+ return m.SubordinateNodeTypes
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataSubordinateNodeTypes factory function for BACnetConstructedDataSubordinateNodeTypes
+func NewBACnetConstructedDataSubordinateNodeTypes(subordinateNodeTypes []*BACnetNodeTypeTagged, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataSubordinateNodeTypes {
+ _result := &BACnetConstructedDataSubordinateNodeTypes{
+ SubordinateNodeTypes: subordinateNodeTypes,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataSubordinateNodeTypes(structType interface{}) *BACnetConstructedDataSubordinateNodeTypes {
+ if casted, ok := structType.(BACnetConstructedDataSubordinateNodeTypes); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataSubordinateNodeTypes); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSubordinateNodeTypes(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSubordinateNodeTypes(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataSubordinateNodeTypes) GetTypeName() string {
+ return "BACnetConstructedDataSubordinateNodeTypes"
+}
+
+func (m *BACnetConstructedDataSubordinateNodeTypes) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataSubordinateNodeTypes) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.SubordinateNodeTypes) > 0 {
+ for _, element := range m.SubordinateNodeTypes {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataSubordinateNodeTypes) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataSubordinateNodeTypesParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataSubordinateNodeTypes, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataSubordinateNodeTypes"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (subordinateNodeTypes)
+ if pullErr := readBuffer.PullContext("subordinateNodeTypes", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ subordinateNodeTypes := make([]*BACnetNodeTypeTagged, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetNodeTypeTaggedParse(readBuffer, uint8(0), TagClass_APPLICATION_TAGS)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'subordinateNodeTypes' field")
+ }
+ subordinateNodeTypes = append(subordinateNodeTypes, CastBACnetNodeTypeTagged(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("subordinateNodeTypes", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataSubordinateNodeTypes"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataSubordinateNodeTypes{
+ SubordinateNodeTypes: subordinateNodeTypes,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataSubordinateNodeTypes) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataSubordinateNodeTypes"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (subordinateNodeTypes)
+ if m.SubordinateNodeTypes != nil {
+ if pushErr := writeBuffer.PushContext("subordinateNodeTypes", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.SubordinateNodeTypes {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'subordinateNodeTypes' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("subordinateNodeTypes", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataSubordinateNodeTypes"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataSubordinateNodeTypes) 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/BACnetConstructedDataSubordinateRelationships.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateRelationships.go
new file mode 100644
index 0000000000..5af61706ee
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateRelationships.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.
+
+// BACnetConstructedDataSubordinateRelationships is the data-structure of this message
+type BACnetConstructedDataSubordinateRelationships struct {
+ *BACnetConstructedData
+ SubordinateRelationships []*BACnetRelationshipTagged
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataSubordinateRelationships is the corresponding interface of BACnetConstructedDataSubordinateRelationships
+type IBACnetConstructedDataSubordinateRelationships interface {
+ IBACnetConstructedData
+ // GetSubordinateRelationships returns SubordinateRelationships (property field)
+ GetSubordinateRelationships() []*BACnetRelationshipTagged
+ // 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 *BACnetConstructedDataSubordinateRelationships) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataSubordinateRelationships) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_SUBORDINATE_RELATIONSHIPS
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataSubordinateRelationships) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataSubordinateRelationships) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataSubordinateRelationships) GetSubordinateRelationships() []*BACnetRelationshipTagged {
+ return m.SubordinateRelationships
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataSubordinateRelationships factory function for BACnetConstructedDataSubordinateRelationships
+func NewBACnetConstructedDataSubordinateRelationships(subordinateRelationships []*BACnetRelationshipTagged, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataSubordinateRelationships {
+ _result := &BACnetConstructedDataSubordinateRelationships{
+ SubordinateRelationships: subordinateRelationships,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataSubordinateRelationships(structType interface{}) *BACnetConstructedDataSubordinateRelationships {
+ if casted, ok := structType.(BACnetConstructedDataSubordinateRelationships); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataSubordinateRelationships); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSubordinateRelationships(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSubordinateRelationships(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataSubordinateRelationships) GetTypeName() string {
+ return "BACnetConstructedDataSubordinateRelationships"
+}
+
+func (m *BACnetConstructedDataSubordinateRelationships) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataSubordinateRelationships) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.SubordinateRelationships) > 0 {
+ for _, element := range m.SubordinateRelationships {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataSubordinateRelationships) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataSubordinateRelationshipsParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataSubordinateRelationships, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataSubordinateRelationships"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (subordinateRelationships)
+ if pullErr := readBuffer.PullContext("subordinateRelationships", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ subordinateRelationships := make([]*BACnetRelationshipTagged, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetRelationshipTaggedParse(readBuffer, uint8(0), TagClass_APPLICATION_TAGS)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'subordinateRelationships' field")
+ }
+ subordinateRelationships = append(subordinateRelationships, CastBACnetRelationshipTagged(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("subordinateRelationships", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataSubordinateRelationships"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataSubordinateRelationships{
+ SubordinateRelationships: subordinateRelationships,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataSubordinateRelationships) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataSubordinateRelationships"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (subordinateRelationships)
+ if m.SubordinateRelationships != nil {
+ if pushErr := writeBuffer.PushContext("subordinateRelationships", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.SubordinateRelationships {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'subordinateRelationships' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("subordinateRelationships", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataSubordinateRelationships"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataSubordinateRelationships) 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/BACnetConstructedDataSubordinateTags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateTags.go
new file mode 100644
index 0000000000..88ea478f0a
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateTags.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.
+
+// BACnetConstructedDataSubordinateTags is the data-structure of this message
+type BACnetConstructedDataSubordinateTags struct {
+ *BACnetConstructedData
+ SubordinateList []*BACnetNameValueCollection
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataSubordinateTags is the corresponding interface of BACnetConstructedDataSubordinateTags
+type IBACnetConstructedDataSubordinateTags interface {
+ IBACnetConstructedData
+ // GetSubordinateList returns SubordinateList (property field)
+ GetSubordinateList() []*BACnetNameValueCollection
+ // 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 *BACnetConstructedDataSubordinateTags) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataSubordinateTags) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_SUBORDINATE_TAGS
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataSubordinateTags) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataSubordinateTags) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataSubordinateTags) GetSubordinateList() []*BACnetNameValueCollection {
+ return m.SubordinateList
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataSubordinateTags factory function for BACnetConstructedDataSubordinateTags
+func NewBACnetConstructedDataSubordinateTags(subordinateList []*BACnetNameValueCollection, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataSubordinateTags {
+ _result := &BACnetConstructedDataSubordinateTags{
+ SubordinateList: subordinateList,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataSubordinateTags(structType interface{}) *BACnetConstructedDataSubordinateTags {
+ if casted, ok := structType.(BACnetConstructedDataSubordinateTags); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataSubordinateTags); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSubordinateTags(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataSubordinateTags(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataSubordinateTags) GetTypeName() string {
+ return "BACnetConstructedDataSubordinateTags"
+}
+
+func (m *BACnetConstructedDataSubordinateTags) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataSubordinateTags) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.SubordinateList) > 0 {
+ for _, element := range m.SubordinateList {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataSubordinateTags) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataSubordinateTagsParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataSubordinateTags, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataSubordinateTags"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (subordinateList)
+ if pullErr := readBuffer.PullContext("subordinateList", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ subordinateList := make([]*BACnetNameValueCollection, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetNameValueCollectionParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'subordinateList' field")
+ }
+ subordinateList = append(subordinateList, CastBACnetNameValueCollection(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("subordinateList", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataSubordinateTags"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataSubordinateTags{
+ SubordinateList: subordinateList,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataSubordinateTags) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataSubordinateTags"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (subordinateList)
+ if m.SubordinateList != nil {
+ if pushErr := writeBuffer.PushContext("subordinateList", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.SubordinateList {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'subordinateList' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("subordinateList", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataSubordinateTags"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataSubordinateTags) 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/BACnetNameValueCollection.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNameValueCollection.go
index 4b375c3414..b8a7b09130 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNameValueCollection.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNameValueCollection.go
@@ -28,17 +28,17 @@ import (
// BACnetNameValueCollection is the data-structure of this message
type BACnetNameValueCollection struct {
- OpeningTag *BACnetOpeningTag
- SubordinateList []*BACnetNameValue
- ClosingTag *BACnetClosingTag
+ OpeningTag *BACnetOpeningTag
+ Members []*BACnetNameValue
+ ClosingTag *BACnetClosingTag
}
// IBACnetNameValueCollection is the corresponding interface of BACnetNameValueCollection
type IBACnetNameValueCollection interface {
// GetOpeningTag returns OpeningTag (property field)
GetOpeningTag() *BACnetOpeningTag
- // GetSubordinateList returns SubordinateList (property field)
- GetSubordinateList() []*BACnetNameValue
+ // GetMembers returns Members (property field)
+ GetMembers() []*BACnetNameValue
// GetClosingTag returns ClosingTag (property field)
GetClosingTag() *BACnetClosingTag
// GetLengthInBytes returns the length in bytes
@@ -58,8 +58,8 @@ func (m *BACnetNameValueCollection) GetOpeningTag() *BACnetOpeningTag {
return m.OpeningTag
}
-func (m *BACnetNameValueCollection) GetSubordinateList() []*BACnetNameValue {
- return m.SubordinateList
+func (m *BACnetNameValueCollection) GetMembers() []*BACnetNameValue {
+ return m.Members
}
func (m *BACnetNameValueCollection) GetClosingTag() *BACnetClosingTag {
@@ -72,8 +72,8 @@ func (m *BACnetNameValueCollection) GetClosingTag() *BACnetClosingTag {
///////////////////////////////////////////////////////////
// NewBACnetNameValueCollection factory function for BACnetNameValueCollection
-func NewBACnetNameValueCollection(openingTag *BACnetOpeningTag, subordinateList []*BACnetNameValue, closingTag *BACnetClosingTag) *BACnetNameValueCollection {
- return &BACnetNameValueCollection{OpeningTag: openingTag, SubordinateList: subordinateList, ClosingTag: closingTag}
+func NewBACnetNameValueCollection(openingTag *BACnetOpeningTag, members []*BACnetNameValue, closingTag *BACnetClosingTag) *BACnetNameValueCollection {
+ return &BACnetNameValueCollection{OpeningTag: openingTag, Members: members, ClosingTag: closingTag}
}
func CastBACnetNameValueCollection(structType interface{}) *BACnetNameValueCollection {
@@ -101,8 +101,8 @@ func (m *BACnetNameValueCollection) GetLengthInBitsConditional(lastItem bool) ui
lengthInBits += m.OpeningTag.GetLengthInBits()
// Array field
- if len(m.SubordinateList) > 0 {
- for _, element := range m.SubordinateList {
+ if len(m.Members) > 0 {
+ for _, element := range m.Members {
lengthInBits += element.GetLengthInBits()
}
}
@@ -139,23 +139,23 @@ func BACnetNameValueCollectionParse(readBuffer utils.ReadBuffer) (*BACnetNameVal
return nil, closeErr
}
- // Array field (subordinateList)
- if pullErr := readBuffer.PullContext("subordinateList", utils.WithRenderAsList(true)); pullErr != nil {
+ // Array field (members)
+ if pullErr := readBuffer.PullContext("members", utils.WithRenderAsList(true)); pullErr != nil {
return nil, pullErr
}
// Terminated array
- subordinateList := make([]*BACnetNameValue, 0)
+ members := make([]*BACnetNameValue, 0)
{
for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 0)) {
_item, _err := BACnetNameValueParse(readBuffer)
if _err != nil {
- return nil, errors.Wrap(_err, "Error parsing 'subordinateList' field")
+ return nil, errors.Wrap(_err, "Error parsing 'members' field")
}
- subordinateList = append(subordinateList, CastBACnetNameValue(_item))
+ members = append(members, CastBACnetNameValue(_item))
}
}
- if closeErr := readBuffer.CloseContext("subordinateList", utils.WithRenderAsList(true)); closeErr != nil {
+ if closeErr := readBuffer.CloseContext("members", utils.WithRenderAsList(true)); closeErr != nil {
return nil, closeErr
}
@@ -177,7 +177,7 @@ func BACnetNameValueCollectionParse(readBuffer utils.ReadBuffer) (*BACnetNameVal
}
// Create the instance
- return NewBACnetNameValueCollection(openingTag, subordinateList, closingTag), nil
+ return NewBACnetNameValueCollection(openingTag, members, closingTag), nil
}
func (m *BACnetNameValueCollection) Serialize(writeBuffer utils.WriteBuffer) error {
@@ -199,18 +199,18 @@ func (m *BACnetNameValueCollection) Serialize(writeBuffer utils.WriteBuffer) err
return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field")
}
- // Array Field (subordinateList)
- if m.SubordinateList != nil {
- if pushErr := writeBuffer.PushContext("subordinateList", utils.WithRenderAsList(true)); pushErr != nil {
+ // Array Field (members)
+ if m.Members != nil {
+ if pushErr := writeBuffer.PushContext("members", utils.WithRenderAsList(true)); pushErr != nil {
return pushErr
}
- for _, _element := range m.SubordinateList {
+ for _, _element := range m.Members {
_elementErr := _element.Serialize(writeBuffer)
if _elementErr != nil {
- return errors.Wrap(_elementErr, "Error serializing 'subordinateList' field")
+ return errors.Wrap(_elementErr, "Error serializing 'members' field")
}
}
- if popErr := writeBuffer.PopContext("subordinateList", utils.WithRenderAsList(true)); popErr != nil {
+ if popErr := writeBuffer.PopContext("members", utils.WithRenderAsList(true)); popErr != nil {
return popErr
}
}
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index a5323bc9d6..4d6b7acc44 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -2701,12 +2701,14 @@
[simple BACnetApplicationTagSignedInteger daysRemaining ]
]
[*, 'DEADBAND' BACnetConstructedDataDeadband
- [simple BACnetApplicationTagReal deadband ]
+ [simple BACnetApplicationTagReal deadband ]
]
//[*, 'DEFAULT_FADE_TIME' BACnetConstructedDataDefaultFadeTime [validation '1 == 2' "TODO: implement me DEFAULT_FADE_TIME BACnetConstructedDataDefaultFadeTime"]]
//[*, 'DEFAULT_RAMP_RATE' BACnetConstructedDataDefaultRampRate [validation '1 == 2' "TODO: implement me DEFAULT_RAMP_RATE BACnetConstructedDataDefaultRampRate"]]
//[*, 'DEFAULT_STEP_INCREMENT' BACnetConstructedDataDefaultStepIncrement [validation '1 == 2' "TODO: implement me DEFAULT_STEP_INCREMENT BACnetConstructedDataDefaultStepIncrement"]]
- //[*, 'DEFAULT_SUBORDINATE_RELATIONSHIP' BACnetConstructedDataDefaultSubordinateRelationship [validation '1 == 2' "TODO: implement me DEFAULT_SUBORDINATE_RELATIONSHIP BACnetConstructedDataDefaultSubordinateRelationship"]]
+ [*, 'DEFAULT_SUBORDINATE_RELATIONSHIP' BACnetConstructedDataDefaultSubordinateRelationship
+ [simple BACnetRelationshipTagged('0', 'TagClass.APPLICATION_TAGS') defaultSubordinateRelationship ]
+ ]
[*, 'DEFAULT_TIMEOUT' BACnetConstructedDataDefaultTimeout
[simple BACnetApplicationTagUnsignedInteger defaultTimeout ]
]
@@ -3040,8 +3042,12 @@
//[*, 'NETWORK_NUMBER_QUALITY' BACnetConstructedDataNetworkNumberQuality [validation '1 == 2' "TODO: implement me NETWORK_NUMBER_QUALITY BACnetConstructedDataNetworkNumberQuality"]]
//[*, 'NETWORK_TYPE' BACnetConstructedDataNetworkType [validation '1 == 2' "TODO: implement me NETWORK_TYPE BACnetConstructedDataNetworkType"]]
//[*, 'NEXT_STOPPING_FLOOR' BACnetConstructedDataNextStoppingFloor [validation '1 == 2' "TODO: implement me NEXT_STOPPING_FLOOR BACnetConstructedDataNextStoppingFloor"]]
- //[*, 'NODE_SUBTYPE' BACnetConstructedDataNodeSubtype [validation '1 == 2' "TODO: implement me NODE_SUBTYPE BACnetConstructedDataNodeSubtype"]]
- //[*, 'NODE_TYPE' BACnetConstructedDataNodeType [validation '1 == 2' "TODO: implement me NODE_TYPE BACnetConstructedDataNodeType"]]
+ [*, 'NODE_SUBTYPE' BACnetConstructedDataNodeSubtype
+ [simple BACnetApplicationTagCharacterString nodeSubType ]
+ ]
+ [*, 'NODE_TYPE' BACnetConstructedDataNodeType
+ [simple BACnetNodeTypeTagged('0', 'TagClass.APPLICATION_TAGS') nodeType ]
+ ]
[*, 'NOTIFICATION_CLASS' BACnetConstructedDataNotificationClass
[simple BACnetApplicationTagUnsignedInteger notificationClass ]
]
@@ -3211,16 +3217,36 @@
[simple BACnetApplicationTagUnsignedInteger strikeCount ]
]
//[*, 'STRUCTURED_OBJECT_LIST' BACnetConstructedDataStructuredObjectList [validation '1 == 2' "TODO: implement me STRUCTURED_OBJECT_LIST BACnetConstructedDataStructuredObjectList"]]
- //[*, 'SUBORDINATE_ANNOTATIONS' BACnetConstructedDataSubordinateAnnotations [validation '1 == 2' "TODO: implement me SUBORDINATE_ANNOTATIONS BACnetConstructedDataSubordinateAnnotations"]]
+ [*, 'SUBORDINATE_ANNOTATIONS' BACnetConstructedDataSubordinateAnnotations
+ [array BACnetApplicationTagCharacterString
+ subordinateAnnotations
+ terminated
+ 'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, tagNumber)' ]
+ ]
[*, 'SUBORDINATE_LIST' BACnetConstructedDataSubordinateList
[array BACnetDeviceObjectReference
subordinateList
terminated
'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, tagNumber)' ]
]
- //[*, 'SUBORDINATE_NODE_TYPES' BACnetConstructedDataSubordinateNodeTypes [validation '1 == 2' "TODO: implement me SUBORDINATE_NODE_TYPES BACnetConstructedDataSubordinateNodeTypes"]]
- //[*, 'SUBORDINATE_RELATIONSHIPS' BACnetConstructedDataSubordinateRelationships [validation '1 == 2' "TODO: implement me SUBORDINATE_RELATIONSHIPS BACnetConstructedDataSubordinateRelationships"]]
- //[*, 'SUBORDINATE_TAGS' BACnetConstructedDataSubordinateTags [validation '1 == 2' "TODO: implement me SUBORDINATE_TAGS BACnetConstructedDataSubordinateTags"]]
+ [*, 'SUBORDINATE_NODE_TYPES' BACnetConstructedDataSubordinateNodeTypes
+ [array BACnetNodeTypeTagged('0', 'TagClass.APPLICATION_TAGS')
+ subordinateNodeTypes
+ terminated
+ 'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, tagNumber)' ]
+ ]
+ [*, 'SUBORDINATE_RELATIONSHIPS' BACnetConstructedDataSubordinateRelationships
+ [array BACnetRelationshipTagged('0', 'TagClass.APPLICATION_TAGS')
+ subordinateRelationships
+ terminated
+ 'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, tagNumber)' ]
+ ]
+ [*, 'SUBORDINATE_TAGS' BACnetConstructedDataSubordinateTags
+ [array BACnetNameValueCollection
+ subordinateList
+ terminated
+ 'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, tagNumber)' ]
+ ]
//[*, 'SUBSCRIBED_RECIPIENTS' BACnetConstructedDataSubscribedRecipients [validation '1 == 2' "TODO: implement me SUBSCRIBED_RECIPIENTS BACnetConstructedDataSubscribedRecipients"]]
//[*, 'SUPPORTED_FORMAT_CLASSES' BACnetConstructedDataSupportedFormatClasses [validation '1 == 2' "TODO: implement me SUPPORTED_FORMAT_CLASSES BACnetConstructedDataSupportedFormatClasses"]]
//[*, 'SUPPORTED_FORMATS' BACnetConstructedDataSupportedFormats [validation '1 == 2' "TODO: implement me SUPPORTED_FORMATS BACnetConstructedDataSupportedFormats"]]
@@ -3455,7 +3481,7 @@
[simple BACnetOpeningTag('0')
openingTag ]
[array BACnetNameValue
- subordinateList
+ members
terminated
'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, 0)' ]
[simple BACnetClosingTag('0')