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/08 10:10:59 UTC
[plc4x] 07/08: feat(bacnet): implemented unique properties for access zone 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
commit 168884ff52527868d8e7ae160b400f1a7ad80203
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed Jun 8 12:03:32 2022 +0200
feat(bacnet): implemented unique properties for access zone type
- CREDENTIALS_IN_ZONE
- ENTRY_POINTS
- EXIT_POINTS
- LAST_CREDENTIAL_ADDED
- LAST_CREDENTIAL_ADDED_TIME
- LAST_CREDENTIAL_REMOVED
- LAST_CREDENTIAL_REMOVED_TIME
- OCCUPANCY_COUNT
- OCCUPANCY_COUNT_ENABLE
- OCCUPANCY_LOWER_LIMIT
- OCCUPANCY_STATE
- OCCUPANCY_UPPER_LIMIT
- PASSBACK_MODE
- PASSBACK_TIMEOUT
---
.../readwrite/model/BACnetConstructedData.go | 28 +++
.../BACnetConstructedDataCredentialsInZone.go | 226 +++++++++++++++++++++
.../model/BACnetConstructedDataEntryPoints.go | 226 +++++++++++++++++++++
.../model/BACnetConstructedDataExitPoints.go | 226 +++++++++++++++++++++
.../BACnetConstructedDataLastCredentialAdded.go | 211 +++++++++++++++++++
...BACnetConstructedDataLastCredentialAddedTime.go | 211 +++++++++++++++++++
.../BACnetConstructedDataLastCredentialRemoved.go | 211 +++++++++++++++++++
...CnetConstructedDataLastCredentialRemovedTime.go | 211 +++++++++++++++++++
.../model/BACnetConstructedDataOccupancyCount.go | 211 +++++++++++++++++++
.../BACnetConstructedDataOccupancyCountEnable.go | 211 +++++++++++++++++++
.../BACnetConstructedDataOccupancyLowerLimit.go | 211 +++++++++++++++++++
.../model/BACnetConstructedDataOccupancyState.go | 211 +++++++++++++++++++
.../BACnetConstructedDataOccupancyUpperLimit.go | 211 +++++++++++++++++++
.../model/BACnetConstructedDataPassbackMode.go | 211 +++++++++++++++++++
.../model/BACnetConstructedDataPassbackTimeout.go | 211 +++++++++++++++++++
.../resources/protocols/bacnetip/bacnetip.mspec | 67 ++++--
.../bacnetip/ObjectPropertyDeDuplicationTest.java | 1 -
17 files changed, 3079 insertions(+), 16 deletions(-)
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go
index 811550b117..3b645f60d5 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go
@@ -462,6 +462,8 @@ 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_CREDENTIALS_IN_ZONE: // BACnetConstructedDataCredentialsInZone
+ _child, typeSwitchError = BACnetConstructedDataCredentialsInZoneParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DATABASE_REVISION: // BACnetConstructedDataDatabaseRevision
_child, typeSwitchError = BACnetConstructedDataDatabaseRevisionParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_DATE_LIST: // BACnetConstructedDataDateList
@@ -520,6 +522,8 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataDutyWindowParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_EFFECTIVE_PERIOD: // BACnetConstructedDataEffectivePeriod
_child, typeSwitchError = BACnetConstructedDataEffectivePeriodParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ENTRY_POINTS: // BACnetConstructedDataEntryPoints
+ _child, typeSwitchError = BACnetConstructedDataEntryPointsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ERROR_LIMIT: // BACnetConstructedDataErrorLimit
_child, typeSwitchError = BACnetConstructedDataErrorLimitParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_ESCALATOR_MODE: // BACnetConstructedDataEscalatorMode
@@ -548,6 +552,8 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataExceptionScheduleParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_EXECUTION_DELAY: // BACnetConstructedDataExecutionDelay
_child, typeSwitchError = BACnetConstructedDataExecutionDelayParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_EXIT_POINTS: // BACnetConstructedDataExitPoints
+ _child, typeSwitchError = BACnetConstructedDataExitPointsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_EXPECTED_SHED_LEVEL: // BACnetConstructedDataExpectedShedLevel
_child, typeSwitchError = BACnetConstructedDataExpectedShedLevelParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_EXTENDED_TIME_ENABLE: // BACnetConstructedDataExtendedTimeEnable
@@ -658,6 +664,14 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataLastAccessEventParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_ACCESS_POINT: // BACnetConstructedDataLastAccessPoint
_child, typeSwitchError = BACnetConstructedDataLastAccessPointParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED: // BACnetConstructedDataLastCredentialAdded
+ _child, typeSwitchError = BACnetConstructedDataLastCredentialAddedParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED_TIME: // BACnetConstructedDataLastCredentialAddedTime
+ _child, typeSwitchError = BACnetConstructedDataLastCredentialAddedTimeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED: // BACnetConstructedDataLastCredentialRemoved
+ _child, typeSwitchError = BACnetConstructedDataLastCredentialRemovedParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED_TIME: // BACnetConstructedDataLastCredentialRemovedTime
+ _child, typeSwitchError = BACnetConstructedDataLastCredentialRemovedTimeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_KEY_SERVER: // BACnetConstructedDataLastKeyServer
_child, typeSwitchError = BACnetConstructedDataLastKeyServerParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_PRIORITY: // BACnetConstructedDataLastPriority
@@ -804,10 +818,20 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataObjectNameParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_TYPE: // BACnetConstructedDataObjectType
_child, typeSwitchError = BACnetConstructedDataObjectTypeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_COUNT: // BACnetConstructedDataOccupancyCount
+ _child, typeSwitchError = BACnetConstructedDataOccupancyCountParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_COUNT_ADJUST: // BACnetConstructedDataOccupancyCountAdjust
_child, typeSwitchError = BACnetConstructedDataOccupancyCountAdjustParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_COUNT_ENABLE: // BACnetConstructedDataOccupancyCountEnable
+ _child, typeSwitchError = BACnetConstructedDataOccupancyCountEnableParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT: // BACnetConstructedDataOccupancyLowerLimit
+ _child, typeSwitchError = BACnetConstructedDataOccupancyLowerLimitParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT_ENFORCED: // BACnetConstructedDataOccupancyLowerLimitEnforced
_child, typeSwitchError = BACnetConstructedDataOccupancyLowerLimitEnforcedParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_STATE: // BACnetConstructedDataOccupancyState
+ _child, typeSwitchError = BACnetConstructedDataOccupancyStateParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT: // BACnetConstructedDataOccupancyUpperLimit
+ _child, typeSwitchError = BACnetConstructedDataOccupancyUpperLimitParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT_ENFORCED: // BACnetConstructedDataOccupancyUpperLimitEnforced
_child, typeSwitchError = BACnetConstructedDataOccupancyUpperLimitEnforcedParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_OPERATION_DIRECTION: // BACnetConstructedDataOperationDirection
@@ -818,6 +842,10 @@ func BACnetConstructedDataParse(readBuffer utils.ReadBuffer, tagNumber uint8, ob
_child, typeSwitchError = BACnetConstructedDataOutputUnitsParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_PACKET_REORDER_TIME: // BACnetConstructedDataPacketReorderTime
_child, typeSwitchError = BACnetConstructedDataPacketReorderTimeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_PASSBACK_MODE: // BACnetConstructedDataPassbackMode
+ _child, typeSwitchError = BACnetConstructedDataPassbackModeParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
+ case true && propertyIdentifierArgument == BACnetPropertyIdentifier_PASSBACK_TIMEOUT: // BACnetConstructedDataPassbackTimeout
+ _child, typeSwitchError = BACnetConstructedDataPassbackTimeoutParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_PORT_FILTER: // BACnetConstructedDataPortFilter
_child, typeSwitchError = BACnetConstructedDataPortFilterParse(readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument)
case true && propertyIdentifierArgument == BACnetPropertyIdentifier_POSITIVE_ACCESS_RULES: // BACnetConstructedDataPositiveAccessRules
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialsInZone.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialsInZone.go
new file mode 100644
index 0000000000..ac6cbcc5db
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialsInZone.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.
+
+// BACnetConstructedDataCredentialsInZone is the data-structure of this message
+type BACnetConstructedDataCredentialsInZone struct {
+ *BACnetConstructedData
+ CredentialsInZone []*BACnetDeviceObjectReference
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataCredentialsInZone is the corresponding interface of BACnetConstructedDataCredentialsInZone
+type IBACnetConstructedDataCredentialsInZone interface {
+ IBACnetConstructedData
+ // GetCredentialsInZone returns CredentialsInZone (property field)
+ GetCredentialsInZone() []*BACnetDeviceObjectReference
+ // 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 *BACnetConstructedDataCredentialsInZone) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataCredentialsInZone) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_CREDENTIALS_IN_ZONE
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataCredentialsInZone) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataCredentialsInZone) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataCredentialsInZone) GetCredentialsInZone() []*BACnetDeviceObjectReference {
+ return m.CredentialsInZone
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataCredentialsInZone factory function for BACnetConstructedDataCredentialsInZone
+func NewBACnetConstructedDataCredentialsInZone(credentialsInZone []*BACnetDeviceObjectReference, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataCredentialsInZone {
+ _result := &BACnetConstructedDataCredentialsInZone{
+ CredentialsInZone: credentialsInZone,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataCredentialsInZone(structType interface{}) *BACnetConstructedDataCredentialsInZone {
+ if casted, ok := structType.(BACnetConstructedDataCredentialsInZone); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataCredentialsInZone); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataCredentialsInZone(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataCredentialsInZone(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataCredentialsInZone) GetTypeName() string {
+ return "BACnetConstructedDataCredentialsInZone"
+}
+
+func (m *BACnetConstructedDataCredentialsInZone) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataCredentialsInZone) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.CredentialsInZone) > 0 {
+ for _, element := range m.CredentialsInZone {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataCredentialsInZone) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataCredentialsInZoneParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataCredentialsInZone, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataCredentialsInZone"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (credentialsInZone)
+ if pullErr := readBuffer.PullContext("credentialsInZone", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ credentialsInZone := make([]*BACnetDeviceObjectReference, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetDeviceObjectReferenceParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'credentialsInZone' field")
+ }
+ credentialsInZone = append(credentialsInZone, CastBACnetDeviceObjectReference(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("credentialsInZone", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataCredentialsInZone"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataCredentialsInZone{
+ CredentialsInZone: credentialsInZone,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataCredentialsInZone) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataCredentialsInZone"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (credentialsInZone)
+ if m.CredentialsInZone != nil {
+ if pushErr := writeBuffer.PushContext("credentialsInZone", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.CredentialsInZone {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'credentialsInZone' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("credentialsInZone", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataCredentialsInZone"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataCredentialsInZone) 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/BACnetConstructedDataEntryPoints.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEntryPoints.go
new file mode 100644
index 0000000000..5a0e06dd8f
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEntryPoints.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.
+
+// BACnetConstructedDataEntryPoints is the data-structure of this message
+type BACnetConstructedDataEntryPoints struct {
+ *BACnetConstructedData
+ EntryPoints []*BACnetDeviceObjectReference
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataEntryPoints is the corresponding interface of BACnetConstructedDataEntryPoints
+type IBACnetConstructedDataEntryPoints interface {
+ IBACnetConstructedData
+ // GetEntryPoints returns EntryPoints (property field)
+ GetEntryPoints() []*BACnetDeviceObjectReference
+ // 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 *BACnetConstructedDataEntryPoints) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataEntryPoints) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_ENTRY_POINTS
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataEntryPoints) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataEntryPoints) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataEntryPoints) GetEntryPoints() []*BACnetDeviceObjectReference {
+ return m.EntryPoints
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataEntryPoints factory function for BACnetConstructedDataEntryPoints
+func NewBACnetConstructedDataEntryPoints(entryPoints []*BACnetDeviceObjectReference, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataEntryPoints {
+ _result := &BACnetConstructedDataEntryPoints{
+ EntryPoints: entryPoints,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataEntryPoints(structType interface{}) *BACnetConstructedDataEntryPoints {
+ if casted, ok := structType.(BACnetConstructedDataEntryPoints); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataEntryPoints); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataEntryPoints(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataEntryPoints(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataEntryPoints) GetTypeName() string {
+ return "BACnetConstructedDataEntryPoints"
+}
+
+func (m *BACnetConstructedDataEntryPoints) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataEntryPoints) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.EntryPoints) > 0 {
+ for _, element := range m.EntryPoints {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataEntryPoints) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataEntryPointsParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataEntryPoints, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataEntryPoints"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (entryPoints)
+ if pullErr := readBuffer.PullContext("entryPoints", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ entryPoints := make([]*BACnetDeviceObjectReference, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetDeviceObjectReferenceParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'entryPoints' field")
+ }
+ entryPoints = append(entryPoints, CastBACnetDeviceObjectReference(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("entryPoints", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataEntryPoints"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataEntryPoints{
+ EntryPoints: entryPoints,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataEntryPoints) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataEntryPoints"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (entryPoints)
+ if m.EntryPoints != nil {
+ if pushErr := writeBuffer.PushContext("entryPoints", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.EntryPoints {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'entryPoints' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("entryPoints", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataEntryPoints"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataEntryPoints) 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/BACnetConstructedDataExitPoints.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExitPoints.go
new file mode 100644
index 0000000000..5ec79eea2c
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExitPoints.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.
+
+// BACnetConstructedDataExitPoints is the data-structure of this message
+type BACnetConstructedDataExitPoints struct {
+ *BACnetConstructedData
+ ExitPoints []*BACnetDeviceObjectReference
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataExitPoints is the corresponding interface of BACnetConstructedDataExitPoints
+type IBACnetConstructedDataExitPoints interface {
+ IBACnetConstructedData
+ // GetExitPoints returns ExitPoints (property field)
+ GetExitPoints() []*BACnetDeviceObjectReference
+ // 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 *BACnetConstructedDataExitPoints) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataExitPoints) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_EXIT_POINTS
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataExitPoints) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataExitPoints) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataExitPoints) GetExitPoints() []*BACnetDeviceObjectReference {
+ return m.ExitPoints
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataExitPoints factory function for BACnetConstructedDataExitPoints
+func NewBACnetConstructedDataExitPoints(exitPoints []*BACnetDeviceObjectReference, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataExitPoints {
+ _result := &BACnetConstructedDataExitPoints{
+ ExitPoints: exitPoints,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataExitPoints(structType interface{}) *BACnetConstructedDataExitPoints {
+ if casted, ok := structType.(BACnetConstructedDataExitPoints); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataExitPoints); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataExitPoints(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataExitPoints(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataExitPoints) GetTypeName() string {
+ return "BACnetConstructedDataExitPoints"
+}
+
+func (m *BACnetConstructedDataExitPoints) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataExitPoints) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Array field
+ if len(m.ExitPoints) > 0 {
+ for _, element := range m.ExitPoints {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataExitPoints) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataExitPointsParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataExitPoints, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataExitPoints"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Array field (exitPoints)
+ if pullErr := readBuffer.PullContext("exitPoints", utils.WithRenderAsList(true)); pullErr != nil {
+ return nil, pullErr
+ }
+ // Terminated array
+ exitPoints := make([]*BACnetDeviceObjectReference, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetDeviceObjectReferenceParse(readBuffer)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'exitPoints' field")
+ }
+ exitPoints = append(exitPoints, CastBACnetDeviceObjectReference(_item))
+
+ }
+ }
+ if closeErr := readBuffer.CloseContext("exitPoints", utils.WithRenderAsList(true)); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataExitPoints"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataExitPoints{
+ ExitPoints: exitPoints,
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataExitPoints) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataExitPoints"); pushErr != nil {
+ return pushErr
+ }
+
+ // Array Field (exitPoints)
+ if m.ExitPoints != nil {
+ if pushErr := writeBuffer.PushContext("exitPoints", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.ExitPoints {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'exitPoints' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("exitPoints", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataExitPoints"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataExitPoints) 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/BACnetConstructedDataLastCredentialAdded.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAdded.go
new file mode 100644
index 0000000000..294ba02bd0
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAdded.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.
+
+// BACnetConstructedDataLastCredentialAdded is the data-structure of this message
+type BACnetConstructedDataLastCredentialAdded struct {
+ *BACnetConstructedData
+ LastCredentialAdded *BACnetDeviceObjectReference
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataLastCredentialAdded is the corresponding interface of BACnetConstructedDataLastCredentialAdded
+type IBACnetConstructedDataLastCredentialAdded interface {
+ IBACnetConstructedData
+ // GetLastCredentialAdded returns LastCredentialAdded (property field)
+ GetLastCredentialAdded() *BACnetDeviceObjectReference
+ // 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 *BACnetConstructedDataLastCredentialAdded) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataLastCredentialAdded) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataLastCredentialAdded) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataLastCredentialAdded) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataLastCredentialAdded) GetLastCredentialAdded() *BACnetDeviceObjectReference {
+ return m.LastCredentialAdded
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataLastCredentialAdded factory function for BACnetConstructedDataLastCredentialAdded
+func NewBACnetConstructedDataLastCredentialAdded(lastCredentialAdded *BACnetDeviceObjectReference, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataLastCredentialAdded {
+ _result := &BACnetConstructedDataLastCredentialAdded{
+ LastCredentialAdded: lastCredentialAdded,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataLastCredentialAdded(structType interface{}) *BACnetConstructedDataLastCredentialAdded {
+ if casted, ok := structType.(BACnetConstructedDataLastCredentialAdded); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataLastCredentialAdded); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastCredentialAdded(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastCredentialAdded(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataLastCredentialAdded) GetTypeName() string {
+ return "BACnetConstructedDataLastCredentialAdded"
+}
+
+func (m *BACnetConstructedDataLastCredentialAdded) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataLastCredentialAdded) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (lastCredentialAdded)
+ lengthInBits += m.LastCredentialAdded.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataLastCredentialAdded) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataLastCredentialAddedParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataLastCredentialAdded, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataLastCredentialAdded"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (lastCredentialAdded)
+ if pullErr := readBuffer.PullContext("lastCredentialAdded"); pullErr != nil {
+ return nil, pullErr
+ }
+ _lastCredentialAdded, _lastCredentialAddedErr := BACnetDeviceObjectReferenceParse(readBuffer)
+ if _lastCredentialAddedErr != nil {
+ return nil, errors.Wrap(_lastCredentialAddedErr, "Error parsing 'lastCredentialAdded' field")
+ }
+ lastCredentialAdded := CastBACnetDeviceObjectReference(_lastCredentialAdded)
+ if closeErr := readBuffer.CloseContext("lastCredentialAdded"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataLastCredentialAdded"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataLastCredentialAdded{
+ LastCredentialAdded: CastBACnetDeviceObjectReference(lastCredentialAdded),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataLastCredentialAdded) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataLastCredentialAdded"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (lastCredentialAdded)
+ if pushErr := writeBuffer.PushContext("lastCredentialAdded"); pushErr != nil {
+ return pushErr
+ }
+ _lastCredentialAddedErr := m.LastCredentialAdded.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("lastCredentialAdded"); popErr != nil {
+ return popErr
+ }
+ if _lastCredentialAddedErr != nil {
+ return errors.Wrap(_lastCredentialAddedErr, "Error serializing 'lastCredentialAdded' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataLastCredentialAdded"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataLastCredentialAdded) 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/BACnetConstructedDataLastCredentialAddedTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAddedTime.go
new file mode 100644
index 0000000000..f73580c7c8
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAddedTime.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.
+
+// BACnetConstructedDataLastCredentialAddedTime is the data-structure of this message
+type BACnetConstructedDataLastCredentialAddedTime struct {
+ *BACnetConstructedData
+ LastCredentialAddedTime *BACnetDateTime
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataLastCredentialAddedTime is the corresponding interface of BACnetConstructedDataLastCredentialAddedTime
+type IBACnetConstructedDataLastCredentialAddedTime interface {
+ IBACnetConstructedData
+ // GetLastCredentialAddedTime returns LastCredentialAddedTime (property field)
+ GetLastCredentialAddedTime() *BACnetDateTime
+ // 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 *BACnetConstructedDataLastCredentialAddedTime) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataLastCredentialAddedTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED_TIME
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataLastCredentialAddedTime) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataLastCredentialAddedTime) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataLastCredentialAddedTime) GetLastCredentialAddedTime() *BACnetDateTime {
+ return m.LastCredentialAddedTime
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataLastCredentialAddedTime factory function for BACnetConstructedDataLastCredentialAddedTime
+func NewBACnetConstructedDataLastCredentialAddedTime(lastCredentialAddedTime *BACnetDateTime, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataLastCredentialAddedTime {
+ _result := &BACnetConstructedDataLastCredentialAddedTime{
+ LastCredentialAddedTime: lastCredentialAddedTime,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataLastCredentialAddedTime(structType interface{}) *BACnetConstructedDataLastCredentialAddedTime {
+ if casted, ok := structType.(BACnetConstructedDataLastCredentialAddedTime); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataLastCredentialAddedTime); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastCredentialAddedTime(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastCredentialAddedTime(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataLastCredentialAddedTime) GetTypeName() string {
+ return "BACnetConstructedDataLastCredentialAddedTime"
+}
+
+func (m *BACnetConstructedDataLastCredentialAddedTime) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataLastCredentialAddedTime) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (lastCredentialAddedTime)
+ lengthInBits += m.LastCredentialAddedTime.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataLastCredentialAddedTime) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataLastCredentialAddedTimeParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataLastCredentialAddedTime, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataLastCredentialAddedTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (lastCredentialAddedTime)
+ if pullErr := readBuffer.PullContext("lastCredentialAddedTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ _lastCredentialAddedTime, _lastCredentialAddedTimeErr := BACnetDateTimeParse(readBuffer)
+ if _lastCredentialAddedTimeErr != nil {
+ return nil, errors.Wrap(_lastCredentialAddedTimeErr, "Error parsing 'lastCredentialAddedTime' field")
+ }
+ lastCredentialAddedTime := CastBACnetDateTime(_lastCredentialAddedTime)
+ if closeErr := readBuffer.CloseContext("lastCredentialAddedTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataLastCredentialAddedTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataLastCredentialAddedTime{
+ LastCredentialAddedTime: CastBACnetDateTime(lastCredentialAddedTime),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataLastCredentialAddedTime) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataLastCredentialAddedTime"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (lastCredentialAddedTime)
+ if pushErr := writeBuffer.PushContext("lastCredentialAddedTime"); pushErr != nil {
+ return pushErr
+ }
+ _lastCredentialAddedTimeErr := m.LastCredentialAddedTime.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("lastCredentialAddedTime"); popErr != nil {
+ return popErr
+ }
+ if _lastCredentialAddedTimeErr != nil {
+ return errors.Wrap(_lastCredentialAddedTimeErr, "Error serializing 'lastCredentialAddedTime' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataLastCredentialAddedTime"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataLastCredentialAddedTime) 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/BACnetConstructedDataLastCredentialRemoved.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemoved.go
new file mode 100644
index 0000000000..610a1e42c3
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemoved.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.
+
+// BACnetConstructedDataLastCredentialRemoved is the data-structure of this message
+type BACnetConstructedDataLastCredentialRemoved struct {
+ *BACnetConstructedData
+ LastCredentialRemoved *BACnetDeviceObjectReference
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataLastCredentialRemoved is the corresponding interface of BACnetConstructedDataLastCredentialRemoved
+type IBACnetConstructedDataLastCredentialRemoved interface {
+ IBACnetConstructedData
+ // GetLastCredentialRemoved returns LastCredentialRemoved (property field)
+ GetLastCredentialRemoved() *BACnetDeviceObjectReference
+ // 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 *BACnetConstructedDataLastCredentialRemoved) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataLastCredentialRemoved) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataLastCredentialRemoved) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataLastCredentialRemoved) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataLastCredentialRemoved) GetLastCredentialRemoved() *BACnetDeviceObjectReference {
+ return m.LastCredentialRemoved
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataLastCredentialRemoved factory function for BACnetConstructedDataLastCredentialRemoved
+func NewBACnetConstructedDataLastCredentialRemoved(lastCredentialRemoved *BACnetDeviceObjectReference, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataLastCredentialRemoved {
+ _result := &BACnetConstructedDataLastCredentialRemoved{
+ LastCredentialRemoved: lastCredentialRemoved,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataLastCredentialRemoved(structType interface{}) *BACnetConstructedDataLastCredentialRemoved {
+ if casted, ok := structType.(BACnetConstructedDataLastCredentialRemoved); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataLastCredentialRemoved); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastCredentialRemoved(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastCredentialRemoved(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataLastCredentialRemoved) GetTypeName() string {
+ return "BACnetConstructedDataLastCredentialRemoved"
+}
+
+func (m *BACnetConstructedDataLastCredentialRemoved) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataLastCredentialRemoved) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (lastCredentialRemoved)
+ lengthInBits += m.LastCredentialRemoved.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataLastCredentialRemoved) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataLastCredentialRemovedParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataLastCredentialRemoved, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataLastCredentialRemoved"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (lastCredentialRemoved)
+ if pullErr := readBuffer.PullContext("lastCredentialRemoved"); pullErr != nil {
+ return nil, pullErr
+ }
+ _lastCredentialRemoved, _lastCredentialRemovedErr := BACnetDeviceObjectReferenceParse(readBuffer)
+ if _lastCredentialRemovedErr != nil {
+ return nil, errors.Wrap(_lastCredentialRemovedErr, "Error parsing 'lastCredentialRemoved' field")
+ }
+ lastCredentialRemoved := CastBACnetDeviceObjectReference(_lastCredentialRemoved)
+ if closeErr := readBuffer.CloseContext("lastCredentialRemoved"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataLastCredentialRemoved"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataLastCredentialRemoved{
+ LastCredentialRemoved: CastBACnetDeviceObjectReference(lastCredentialRemoved),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataLastCredentialRemoved) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataLastCredentialRemoved"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (lastCredentialRemoved)
+ if pushErr := writeBuffer.PushContext("lastCredentialRemoved"); pushErr != nil {
+ return pushErr
+ }
+ _lastCredentialRemovedErr := m.LastCredentialRemoved.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("lastCredentialRemoved"); popErr != nil {
+ return popErr
+ }
+ if _lastCredentialRemovedErr != nil {
+ return errors.Wrap(_lastCredentialRemovedErr, "Error serializing 'lastCredentialRemoved' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataLastCredentialRemoved"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataLastCredentialRemoved) 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/BACnetConstructedDataLastCredentialRemovedTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemovedTime.go
new file mode 100644
index 0000000000..665e70495e
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemovedTime.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.
+
+// BACnetConstructedDataLastCredentialRemovedTime is the data-structure of this message
+type BACnetConstructedDataLastCredentialRemovedTime struct {
+ *BACnetConstructedData
+ LastCredentialRemovedTime *BACnetDateTime
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataLastCredentialRemovedTime is the corresponding interface of BACnetConstructedDataLastCredentialRemovedTime
+type IBACnetConstructedDataLastCredentialRemovedTime interface {
+ IBACnetConstructedData
+ // GetLastCredentialRemovedTime returns LastCredentialRemovedTime (property field)
+ GetLastCredentialRemovedTime() *BACnetDateTime
+ // 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 *BACnetConstructedDataLastCredentialRemovedTime) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataLastCredentialRemovedTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED_TIME
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataLastCredentialRemovedTime) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataLastCredentialRemovedTime) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataLastCredentialRemovedTime) GetLastCredentialRemovedTime() *BACnetDateTime {
+ return m.LastCredentialRemovedTime
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataLastCredentialRemovedTime factory function for BACnetConstructedDataLastCredentialRemovedTime
+func NewBACnetConstructedDataLastCredentialRemovedTime(lastCredentialRemovedTime *BACnetDateTime, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataLastCredentialRemovedTime {
+ _result := &BACnetConstructedDataLastCredentialRemovedTime{
+ LastCredentialRemovedTime: lastCredentialRemovedTime,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataLastCredentialRemovedTime(structType interface{}) *BACnetConstructedDataLastCredentialRemovedTime {
+ if casted, ok := structType.(BACnetConstructedDataLastCredentialRemovedTime); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataLastCredentialRemovedTime); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastCredentialRemovedTime(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataLastCredentialRemovedTime(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataLastCredentialRemovedTime) GetTypeName() string {
+ return "BACnetConstructedDataLastCredentialRemovedTime"
+}
+
+func (m *BACnetConstructedDataLastCredentialRemovedTime) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataLastCredentialRemovedTime) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (lastCredentialRemovedTime)
+ lengthInBits += m.LastCredentialRemovedTime.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataLastCredentialRemovedTime) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataLastCredentialRemovedTimeParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataLastCredentialRemovedTime, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataLastCredentialRemovedTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (lastCredentialRemovedTime)
+ if pullErr := readBuffer.PullContext("lastCredentialRemovedTime"); pullErr != nil {
+ return nil, pullErr
+ }
+ _lastCredentialRemovedTime, _lastCredentialRemovedTimeErr := BACnetDateTimeParse(readBuffer)
+ if _lastCredentialRemovedTimeErr != nil {
+ return nil, errors.Wrap(_lastCredentialRemovedTimeErr, "Error parsing 'lastCredentialRemovedTime' field")
+ }
+ lastCredentialRemovedTime := CastBACnetDateTime(_lastCredentialRemovedTime)
+ if closeErr := readBuffer.CloseContext("lastCredentialRemovedTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataLastCredentialRemovedTime"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataLastCredentialRemovedTime{
+ LastCredentialRemovedTime: CastBACnetDateTime(lastCredentialRemovedTime),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataLastCredentialRemovedTime) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataLastCredentialRemovedTime"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (lastCredentialRemovedTime)
+ if pushErr := writeBuffer.PushContext("lastCredentialRemovedTime"); pushErr != nil {
+ return pushErr
+ }
+ _lastCredentialRemovedTimeErr := m.LastCredentialRemovedTime.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("lastCredentialRemovedTime"); popErr != nil {
+ return popErr
+ }
+ if _lastCredentialRemovedTimeErr != nil {
+ return errors.Wrap(_lastCredentialRemovedTimeErr, "Error serializing 'lastCredentialRemovedTime' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataLastCredentialRemovedTime"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataLastCredentialRemovedTime) 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/BACnetConstructedDataOccupancyCount.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCount.go
new file mode 100644
index 0000000000..aa7edeea69
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCount.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.
+
+// BACnetConstructedDataOccupancyCount is the data-structure of this message
+type BACnetConstructedDataOccupancyCount struct {
+ *BACnetConstructedData
+ OccupancyCount *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataOccupancyCount is the corresponding interface of BACnetConstructedDataOccupancyCount
+type IBACnetConstructedDataOccupancyCount interface {
+ IBACnetConstructedData
+ // GetOccupancyCount returns OccupancyCount (property field)
+ GetOccupancyCount() *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 *BACnetConstructedDataOccupancyCount) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataOccupancyCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_OCCUPANCY_COUNT
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataOccupancyCount) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataOccupancyCount) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataOccupancyCount) GetOccupancyCount() *BACnetApplicationTagUnsignedInteger {
+ return m.OccupancyCount
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataOccupancyCount factory function for BACnetConstructedDataOccupancyCount
+func NewBACnetConstructedDataOccupancyCount(occupancyCount *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataOccupancyCount {
+ _result := &BACnetConstructedDataOccupancyCount{
+ OccupancyCount: occupancyCount,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataOccupancyCount(structType interface{}) *BACnetConstructedDataOccupancyCount {
+ if casted, ok := structType.(BACnetConstructedDataOccupancyCount); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataOccupancyCount); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataOccupancyCount(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataOccupancyCount(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataOccupancyCount) GetTypeName() string {
+ return "BACnetConstructedDataOccupancyCount"
+}
+
+func (m *BACnetConstructedDataOccupancyCount) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataOccupancyCount) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (occupancyCount)
+ lengthInBits += m.OccupancyCount.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataOccupancyCount) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataOccupancyCountParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataOccupancyCount, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataOccupancyCount"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (occupancyCount)
+ if pullErr := readBuffer.PullContext("occupancyCount"); pullErr != nil {
+ return nil, pullErr
+ }
+ _occupancyCount, _occupancyCountErr := BACnetApplicationTagParse(readBuffer)
+ if _occupancyCountErr != nil {
+ return nil, errors.Wrap(_occupancyCountErr, "Error parsing 'occupancyCount' field")
+ }
+ occupancyCount := CastBACnetApplicationTagUnsignedInteger(_occupancyCount)
+ if closeErr := readBuffer.CloseContext("occupancyCount"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataOccupancyCount"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataOccupancyCount{
+ OccupancyCount: CastBACnetApplicationTagUnsignedInteger(occupancyCount),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataOccupancyCount) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataOccupancyCount"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (occupancyCount)
+ if pushErr := writeBuffer.PushContext("occupancyCount"); pushErr != nil {
+ return pushErr
+ }
+ _occupancyCountErr := m.OccupancyCount.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("occupancyCount"); popErr != nil {
+ return popErr
+ }
+ if _occupancyCountErr != nil {
+ return errors.Wrap(_occupancyCountErr, "Error serializing 'occupancyCount' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyCount"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataOccupancyCount) 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/BACnetConstructedDataOccupancyCountEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCountEnable.go
new file mode 100644
index 0000000000..5dda3c6e24
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCountEnable.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.
+
+// BACnetConstructedDataOccupancyCountEnable is the data-structure of this message
+type BACnetConstructedDataOccupancyCountEnable struct {
+ *BACnetConstructedData
+ OccupancyCountEnable *BACnetApplicationTagBoolean
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataOccupancyCountEnable is the corresponding interface of BACnetConstructedDataOccupancyCountEnable
+type IBACnetConstructedDataOccupancyCountEnable interface {
+ IBACnetConstructedData
+ // GetOccupancyCountEnable returns OccupancyCountEnable (property field)
+ GetOccupancyCountEnable() *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 *BACnetConstructedDataOccupancyCountEnable) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataOccupancyCountEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_OCCUPANCY_COUNT_ENABLE
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataOccupancyCountEnable) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataOccupancyCountEnable) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataOccupancyCountEnable) GetOccupancyCountEnable() *BACnetApplicationTagBoolean {
+ return m.OccupancyCountEnable
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataOccupancyCountEnable factory function for BACnetConstructedDataOccupancyCountEnable
+func NewBACnetConstructedDataOccupancyCountEnable(occupancyCountEnable *BACnetApplicationTagBoolean, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataOccupancyCountEnable {
+ _result := &BACnetConstructedDataOccupancyCountEnable{
+ OccupancyCountEnable: occupancyCountEnable,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataOccupancyCountEnable(structType interface{}) *BACnetConstructedDataOccupancyCountEnable {
+ if casted, ok := structType.(BACnetConstructedDataOccupancyCountEnable); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataOccupancyCountEnable); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataOccupancyCountEnable(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataOccupancyCountEnable(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataOccupancyCountEnable) GetTypeName() string {
+ return "BACnetConstructedDataOccupancyCountEnable"
+}
+
+func (m *BACnetConstructedDataOccupancyCountEnable) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataOccupancyCountEnable) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (occupancyCountEnable)
+ lengthInBits += m.OccupancyCountEnable.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataOccupancyCountEnable) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataOccupancyCountEnableParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataOccupancyCountEnable, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataOccupancyCountEnable"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (occupancyCountEnable)
+ if pullErr := readBuffer.PullContext("occupancyCountEnable"); pullErr != nil {
+ return nil, pullErr
+ }
+ _occupancyCountEnable, _occupancyCountEnableErr := BACnetApplicationTagParse(readBuffer)
+ if _occupancyCountEnableErr != nil {
+ return nil, errors.Wrap(_occupancyCountEnableErr, "Error parsing 'occupancyCountEnable' field")
+ }
+ occupancyCountEnable := CastBACnetApplicationTagBoolean(_occupancyCountEnable)
+ if closeErr := readBuffer.CloseContext("occupancyCountEnable"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataOccupancyCountEnable"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataOccupancyCountEnable{
+ OccupancyCountEnable: CastBACnetApplicationTagBoolean(occupancyCountEnable),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataOccupancyCountEnable) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataOccupancyCountEnable"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (occupancyCountEnable)
+ if pushErr := writeBuffer.PushContext("occupancyCountEnable"); pushErr != nil {
+ return pushErr
+ }
+ _occupancyCountEnableErr := m.OccupancyCountEnable.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("occupancyCountEnable"); popErr != nil {
+ return popErr
+ }
+ if _occupancyCountEnableErr != nil {
+ return errors.Wrap(_occupancyCountEnableErr, "Error serializing 'occupancyCountEnable' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyCountEnable"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataOccupancyCountEnable) 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/BACnetConstructedDataOccupancyLowerLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyLowerLimit.go
new file mode 100644
index 0000000000..8abdcb1cf9
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyLowerLimit.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.
+
+// BACnetConstructedDataOccupancyLowerLimit is the data-structure of this message
+type BACnetConstructedDataOccupancyLowerLimit struct {
+ *BACnetConstructedData
+ OccupancyLowerLimit *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataOccupancyLowerLimit is the corresponding interface of BACnetConstructedDataOccupancyLowerLimit
+type IBACnetConstructedDataOccupancyLowerLimit interface {
+ IBACnetConstructedData
+ // GetOccupancyLowerLimit returns OccupancyLowerLimit (property field)
+ GetOccupancyLowerLimit() *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 *BACnetConstructedDataOccupancyLowerLimit) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataOccupancyLowerLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataOccupancyLowerLimit) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataOccupancyLowerLimit) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataOccupancyLowerLimit) GetOccupancyLowerLimit() *BACnetApplicationTagUnsignedInteger {
+ return m.OccupancyLowerLimit
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataOccupancyLowerLimit factory function for BACnetConstructedDataOccupancyLowerLimit
+func NewBACnetConstructedDataOccupancyLowerLimit(occupancyLowerLimit *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataOccupancyLowerLimit {
+ _result := &BACnetConstructedDataOccupancyLowerLimit{
+ OccupancyLowerLimit: occupancyLowerLimit,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataOccupancyLowerLimit(structType interface{}) *BACnetConstructedDataOccupancyLowerLimit {
+ if casted, ok := structType.(BACnetConstructedDataOccupancyLowerLimit); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataOccupancyLowerLimit); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataOccupancyLowerLimit(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataOccupancyLowerLimit(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataOccupancyLowerLimit) GetTypeName() string {
+ return "BACnetConstructedDataOccupancyLowerLimit"
+}
+
+func (m *BACnetConstructedDataOccupancyLowerLimit) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataOccupancyLowerLimit) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (occupancyLowerLimit)
+ lengthInBits += m.OccupancyLowerLimit.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataOccupancyLowerLimit) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataOccupancyLowerLimitParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataOccupancyLowerLimit, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataOccupancyLowerLimit"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (occupancyLowerLimit)
+ if pullErr := readBuffer.PullContext("occupancyLowerLimit"); pullErr != nil {
+ return nil, pullErr
+ }
+ _occupancyLowerLimit, _occupancyLowerLimitErr := BACnetApplicationTagParse(readBuffer)
+ if _occupancyLowerLimitErr != nil {
+ return nil, errors.Wrap(_occupancyLowerLimitErr, "Error parsing 'occupancyLowerLimit' field")
+ }
+ occupancyLowerLimit := CastBACnetApplicationTagUnsignedInteger(_occupancyLowerLimit)
+ if closeErr := readBuffer.CloseContext("occupancyLowerLimit"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataOccupancyLowerLimit"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataOccupancyLowerLimit{
+ OccupancyLowerLimit: CastBACnetApplicationTagUnsignedInteger(occupancyLowerLimit),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataOccupancyLowerLimit) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataOccupancyLowerLimit"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (occupancyLowerLimit)
+ if pushErr := writeBuffer.PushContext("occupancyLowerLimit"); pushErr != nil {
+ return pushErr
+ }
+ _occupancyLowerLimitErr := m.OccupancyLowerLimit.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("occupancyLowerLimit"); popErr != nil {
+ return popErr
+ }
+ if _occupancyLowerLimitErr != nil {
+ return errors.Wrap(_occupancyLowerLimitErr, "Error serializing 'occupancyLowerLimit' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyLowerLimit"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataOccupancyLowerLimit) 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/BACnetConstructedDataOccupancyState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyState.go
new file mode 100644
index 0000000000..86d2a7e020
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyState.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.
+
+// BACnetConstructedDataOccupancyState is the data-structure of this message
+type BACnetConstructedDataOccupancyState struct {
+ *BACnetConstructedData
+ OccupancyState *BACnetAccessZoneOccupancyStateTagged
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataOccupancyState is the corresponding interface of BACnetConstructedDataOccupancyState
+type IBACnetConstructedDataOccupancyState interface {
+ IBACnetConstructedData
+ // GetOccupancyState returns OccupancyState (property field)
+ GetOccupancyState() *BACnetAccessZoneOccupancyStateTagged
+ // 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 *BACnetConstructedDataOccupancyState) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataOccupancyState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_OCCUPANCY_STATE
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataOccupancyState) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataOccupancyState) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataOccupancyState) GetOccupancyState() *BACnetAccessZoneOccupancyStateTagged {
+ return m.OccupancyState
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataOccupancyState factory function for BACnetConstructedDataOccupancyState
+func NewBACnetConstructedDataOccupancyState(occupancyState *BACnetAccessZoneOccupancyStateTagged, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataOccupancyState {
+ _result := &BACnetConstructedDataOccupancyState{
+ OccupancyState: occupancyState,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataOccupancyState(structType interface{}) *BACnetConstructedDataOccupancyState {
+ if casted, ok := structType.(BACnetConstructedDataOccupancyState); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataOccupancyState); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataOccupancyState(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataOccupancyState(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataOccupancyState) GetTypeName() string {
+ return "BACnetConstructedDataOccupancyState"
+}
+
+func (m *BACnetConstructedDataOccupancyState) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataOccupancyState) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (occupancyState)
+ lengthInBits += m.OccupancyState.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataOccupancyState) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataOccupancyStateParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataOccupancyState, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataOccupancyState"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (occupancyState)
+ if pullErr := readBuffer.PullContext("occupancyState"); pullErr != nil {
+ return nil, pullErr
+ }
+ _occupancyState, _occupancyStateErr := BACnetAccessZoneOccupancyStateTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
+ if _occupancyStateErr != nil {
+ return nil, errors.Wrap(_occupancyStateErr, "Error parsing 'occupancyState' field")
+ }
+ occupancyState := CastBACnetAccessZoneOccupancyStateTagged(_occupancyState)
+ if closeErr := readBuffer.CloseContext("occupancyState"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataOccupancyState"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataOccupancyState{
+ OccupancyState: CastBACnetAccessZoneOccupancyStateTagged(occupancyState),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataOccupancyState) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataOccupancyState"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (occupancyState)
+ if pushErr := writeBuffer.PushContext("occupancyState"); pushErr != nil {
+ return pushErr
+ }
+ _occupancyStateErr := m.OccupancyState.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("occupancyState"); popErr != nil {
+ return popErr
+ }
+ if _occupancyStateErr != nil {
+ return errors.Wrap(_occupancyStateErr, "Error serializing 'occupancyState' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyState"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataOccupancyState) 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/BACnetConstructedDataOccupancyUpperLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyUpperLimit.go
new file mode 100644
index 0000000000..1ce7edfd0e
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyUpperLimit.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.
+
+// BACnetConstructedDataOccupancyUpperLimit is the data-structure of this message
+type BACnetConstructedDataOccupancyUpperLimit struct {
+ *BACnetConstructedData
+ OccupancyUpperLimit *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataOccupancyUpperLimit is the corresponding interface of BACnetConstructedDataOccupancyUpperLimit
+type IBACnetConstructedDataOccupancyUpperLimit interface {
+ IBACnetConstructedData
+ // GetOccupancyUpperLimit returns OccupancyUpperLimit (property field)
+ GetOccupancyUpperLimit() *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 *BACnetConstructedDataOccupancyUpperLimit) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataOccupancyUpperLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataOccupancyUpperLimit) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataOccupancyUpperLimit) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataOccupancyUpperLimit) GetOccupancyUpperLimit() *BACnetApplicationTagUnsignedInteger {
+ return m.OccupancyUpperLimit
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataOccupancyUpperLimit factory function for BACnetConstructedDataOccupancyUpperLimit
+func NewBACnetConstructedDataOccupancyUpperLimit(occupancyUpperLimit *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataOccupancyUpperLimit {
+ _result := &BACnetConstructedDataOccupancyUpperLimit{
+ OccupancyUpperLimit: occupancyUpperLimit,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataOccupancyUpperLimit(structType interface{}) *BACnetConstructedDataOccupancyUpperLimit {
+ if casted, ok := structType.(BACnetConstructedDataOccupancyUpperLimit); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataOccupancyUpperLimit); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataOccupancyUpperLimit(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataOccupancyUpperLimit(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataOccupancyUpperLimit) GetTypeName() string {
+ return "BACnetConstructedDataOccupancyUpperLimit"
+}
+
+func (m *BACnetConstructedDataOccupancyUpperLimit) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataOccupancyUpperLimit) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (occupancyUpperLimit)
+ lengthInBits += m.OccupancyUpperLimit.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataOccupancyUpperLimit) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataOccupancyUpperLimitParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataOccupancyUpperLimit, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataOccupancyUpperLimit"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (occupancyUpperLimit)
+ if pullErr := readBuffer.PullContext("occupancyUpperLimit"); pullErr != nil {
+ return nil, pullErr
+ }
+ _occupancyUpperLimit, _occupancyUpperLimitErr := BACnetApplicationTagParse(readBuffer)
+ if _occupancyUpperLimitErr != nil {
+ return nil, errors.Wrap(_occupancyUpperLimitErr, "Error parsing 'occupancyUpperLimit' field")
+ }
+ occupancyUpperLimit := CastBACnetApplicationTagUnsignedInteger(_occupancyUpperLimit)
+ if closeErr := readBuffer.CloseContext("occupancyUpperLimit"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataOccupancyUpperLimit"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataOccupancyUpperLimit{
+ OccupancyUpperLimit: CastBACnetApplicationTagUnsignedInteger(occupancyUpperLimit),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataOccupancyUpperLimit) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataOccupancyUpperLimit"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (occupancyUpperLimit)
+ if pushErr := writeBuffer.PushContext("occupancyUpperLimit"); pushErr != nil {
+ return pushErr
+ }
+ _occupancyUpperLimitErr := m.OccupancyUpperLimit.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("occupancyUpperLimit"); popErr != nil {
+ return popErr
+ }
+ if _occupancyUpperLimitErr != nil {
+ return errors.Wrap(_occupancyUpperLimitErr, "Error serializing 'occupancyUpperLimit' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyUpperLimit"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataOccupancyUpperLimit) 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/BACnetConstructedDataPassbackMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackMode.go
new file mode 100644
index 0000000000..4d66524c34
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackMode.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.
+
+// BACnetConstructedDataPassbackMode is the data-structure of this message
+type BACnetConstructedDataPassbackMode struct {
+ *BACnetConstructedData
+ PassbackMode *BACnetAccessPassbackModeTagged
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataPassbackMode is the corresponding interface of BACnetConstructedDataPassbackMode
+type IBACnetConstructedDataPassbackMode interface {
+ IBACnetConstructedData
+ // GetPassbackMode returns PassbackMode (property field)
+ GetPassbackMode() *BACnetAccessPassbackModeTagged
+ // 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 *BACnetConstructedDataPassbackMode) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataPassbackMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_PASSBACK_MODE
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataPassbackMode) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataPassbackMode) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataPassbackMode) GetPassbackMode() *BACnetAccessPassbackModeTagged {
+ return m.PassbackMode
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataPassbackMode factory function for BACnetConstructedDataPassbackMode
+func NewBACnetConstructedDataPassbackMode(passbackMode *BACnetAccessPassbackModeTagged, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataPassbackMode {
+ _result := &BACnetConstructedDataPassbackMode{
+ PassbackMode: passbackMode,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataPassbackMode(structType interface{}) *BACnetConstructedDataPassbackMode {
+ if casted, ok := structType.(BACnetConstructedDataPassbackMode); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataPassbackMode); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataPassbackMode(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataPassbackMode(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataPassbackMode) GetTypeName() string {
+ return "BACnetConstructedDataPassbackMode"
+}
+
+func (m *BACnetConstructedDataPassbackMode) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataPassbackMode) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (passbackMode)
+ lengthInBits += m.PassbackMode.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataPassbackMode) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataPassbackModeParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataPassbackMode, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataPassbackMode"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (passbackMode)
+ if pullErr := readBuffer.PullContext("passbackMode"); pullErr != nil {
+ return nil, pullErr
+ }
+ _passbackMode, _passbackModeErr := BACnetAccessPassbackModeTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
+ if _passbackModeErr != nil {
+ return nil, errors.Wrap(_passbackModeErr, "Error parsing 'passbackMode' field")
+ }
+ passbackMode := CastBACnetAccessPassbackModeTagged(_passbackMode)
+ if closeErr := readBuffer.CloseContext("passbackMode"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataPassbackMode"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataPassbackMode{
+ PassbackMode: CastBACnetAccessPassbackModeTagged(passbackMode),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataPassbackMode) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataPassbackMode"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (passbackMode)
+ if pushErr := writeBuffer.PushContext("passbackMode"); pushErr != nil {
+ return pushErr
+ }
+ _passbackModeErr := m.PassbackMode.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("passbackMode"); popErr != nil {
+ return popErr
+ }
+ if _passbackModeErr != nil {
+ return errors.Wrap(_passbackModeErr, "Error serializing 'passbackMode' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataPassbackMode"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataPassbackMode) 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/BACnetConstructedDataPassbackTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackTimeout.go
new file mode 100644
index 0000000000..49bee878ec
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackTimeout.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.
+
+// BACnetConstructedDataPassbackTimeout is the data-structure of this message
+type BACnetConstructedDataPassbackTimeout struct {
+ *BACnetConstructedData
+ PassbackTimeout *BACnetApplicationTagUnsignedInteger
+
+ // Arguments.
+ TagNumber uint8
+}
+
+// IBACnetConstructedDataPassbackTimeout is the corresponding interface of BACnetConstructedDataPassbackTimeout
+type IBACnetConstructedDataPassbackTimeout interface {
+ IBACnetConstructedData
+ // GetPassbackTimeout returns PassbackTimeout (property field)
+ GetPassbackTimeout() *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 *BACnetConstructedDataPassbackTimeout) GetObjectTypeArgument() BACnetObjectType {
+ return 0
+}
+
+func (m *BACnetConstructedDataPassbackTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier {
+ return BACnetPropertyIdentifier_PASSBACK_TIMEOUT
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *BACnetConstructedDataPassbackTimeout) InitializeParent(parent *BACnetConstructedData, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag) {
+ m.BACnetConstructedData.OpeningTag = openingTag
+ m.BACnetConstructedData.ClosingTag = closingTag
+}
+
+func (m *BACnetConstructedDataPassbackTimeout) GetParent() *BACnetConstructedData {
+ return m.BACnetConstructedData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetConstructedDataPassbackTimeout) GetPassbackTimeout() *BACnetApplicationTagUnsignedInteger {
+ return m.PassbackTimeout
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetConstructedDataPassbackTimeout factory function for BACnetConstructedDataPassbackTimeout
+func NewBACnetConstructedDataPassbackTimeout(passbackTimeout *BACnetApplicationTagUnsignedInteger, openingTag *BACnetOpeningTag, closingTag *BACnetClosingTag, tagNumber uint8) *BACnetConstructedDataPassbackTimeout {
+ _result := &BACnetConstructedDataPassbackTimeout{
+ PassbackTimeout: passbackTimeout,
+ BACnetConstructedData: NewBACnetConstructedData(openingTag, closingTag, tagNumber),
+ }
+ _result.Child = _result
+ return _result
+}
+
+func CastBACnetConstructedDataPassbackTimeout(structType interface{}) *BACnetConstructedDataPassbackTimeout {
+ if casted, ok := structType.(BACnetConstructedDataPassbackTimeout); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetConstructedDataPassbackTimeout); ok {
+ return casted
+ }
+ if casted, ok := structType.(BACnetConstructedData); ok {
+ return CastBACnetConstructedDataPassbackTimeout(casted.Child)
+ }
+ if casted, ok := structType.(*BACnetConstructedData); ok {
+ return CastBACnetConstructedDataPassbackTimeout(casted.Child)
+ }
+ return nil
+}
+
+func (m *BACnetConstructedDataPassbackTimeout) GetTypeName() string {
+ return "BACnetConstructedDataPassbackTimeout"
+}
+
+func (m *BACnetConstructedDataPassbackTimeout) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetConstructedDataPassbackTimeout) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (passbackTimeout)
+ lengthInBits += m.PassbackTimeout.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *BACnetConstructedDataPassbackTimeout) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetConstructedDataPassbackTimeoutParse(readBuffer utils.ReadBuffer, tagNumber uint8, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier) (*BACnetConstructedDataPassbackTimeout, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetConstructedDataPassbackTimeout"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (passbackTimeout)
+ if pullErr := readBuffer.PullContext("passbackTimeout"); pullErr != nil {
+ return nil, pullErr
+ }
+ _passbackTimeout, _passbackTimeoutErr := BACnetApplicationTagParse(readBuffer)
+ if _passbackTimeoutErr != nil {
+ return nil, errors.Wrap(_passbackTimeoutErr, "Error parsing 'passbackTimeout' field")
+ }
+ passbackTimeout := CastBACnetApplicationTagUnsignedInteger(_passbackTimeout)
+ if closeErr := readBuffer.CloseContext("passbackTimeout"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ if closeErr := readBuffer.CloseContext("BACnetConstructedDataPassbackTimeout"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create a partially initialized instance
+ _child := &BACnetConstructedDataPassbackTimeout{
+ PassbackTimeout: CastBACnetApplicationTagUnsignedInteger(passbackTimeout),
+ BACnetConstructedData: &BACnetConstructedData{},
+ }
+ _child.BACnetConstructedData.Child = _child
+ return _child, nil
+}
+
+func (m *BACnetConstructedDataPassbackTimeout) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("BACnetConstructedDataPassbackTimeout"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (passbackTimeout)
+ if pushErr := writeBuffer.PushContext("passbackTimeout"); pushErr != nil {
+ return pushErr
+ }
+ _passbackTimeoutErr := m.PassbackTimeout.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("passbackTimeout"); popErr != nil {
+ return popErr
+ }
+ if _passbackTimeoutErr != nil {
+ return errors.Wrap(_passbackTimeoutErr, "Error serializing 'passbackTimeout' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetConstructedDataPassbackTimeout"); popErr != nil {
+ return popErr
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *BACnetConstructedDataPassbackTimeout) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index d7a75d5530..8e93e680f4 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -2840,7 +2840,12 @@
terminated
'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, tagNumber)' ]
]
- //[*, 'CREDENTIALS_IN_ZONE' BACnetConstructedDataCredentialsInZone [validation '1 == 2' "TODO: implement me CREDENTIALS_IN_ZONE BACnetConstructedDataCredentialsInZone"]]
+ [*, 'CREDENTIALS_IN_ZONE' BACnetConstructedDataCredentialsInZone
+ [array BACnetDeviceObjectReference
+ credentialsInZone
+ terminated
+ 'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, tagNumber)' ]
+ ]
//[*, 'CURRENT_COMMAND_PRIORITY' BACnetConstructedDataCurrentCommandPriority [validation '1 == 2' "TODO: implement me CURRENT_COMMAND_PRIORITY BACnetConstructedDataCurrentCommandPriority"]]
[*, 'DATABASE_REVISION' BACnetConstructedDataDatabaseRevision
[simple BACnetApplicationTagUnsignedInteger databaseRevision ]
@@ -2947,7 +2952,12 @@
//[*, 'ENABLE' BACnetConstructedDataEnable [validation '1 == 2' "TODO: implement me ENABLE BACnetConstructedDataEnable"]]
//[*, 'ENERGY_METER' BACnetConstructedDataEnergyMeter [validation '1 == 2' "TODO: implement me ENERGY_METER BACnetConstructedDataEnergyMeter"]]
//[*, 'ENERGY_METER_REF' BACnetConstructedDataEnergyMeterRef [validation '1 == 2' "TODO: implement me ENERGY_METER_REF BACnetConstructedDataEnergyMeterRef"]]
- //[*, 'ENTRY_POINTS' BACnetConstructedDataEntryPoints [validation '1 == 2' "TODO: implement me ENTRY_POINTS BACnetConstructedDataEntryPoints"]]
+ [*, 'ENTRY_POINTS' BACnetConstructedDataEntryPoints
+ [array BACnetDeviceObjectReference
+ entryPoints
+ terminated
+ 'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, tagNumber)']
+ ]
[*, 'ERROR_LIMIT' BACnetConstructedDataErrorLimit
[simple BACnetApplicationTagReal errorLimit ]
]
@@ -2996,7 +3006,12 @@
terminated
'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, tagNumber)' ]
]
- //[*, 'EXIT_POINTS' BACnetConstructedDataExitPoints [validation '1 == 2' "TODO: implement me EXIT_POINTS BACnetConstructedDataExitPoints"]]
+ [*, 'EXIT_POINTS' BACnetConstructedDataExitPoints
+ [array BACnetDeviceObjectReference
+ exitPoints
+ terminated
+ 'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, tagNumber)' ]
+ ]
[*, 'EXPECTED_SHED_LEVEL' BACnetConstructedDataExpectedShedLevel
[simple BACnetShedLevel expectedShedLevel ]
]
@@ -3203,10 +3218,18 @@
[simple BACnetDeviceObjectReference lastAccessPoint ]
]
//[*, 'LAST_COMMAND_TIME' BACnetConstructedDataLastCommandTime [validation '1 == 2' "TODO: implement me LAST_COMMAND_TIME BACnetConstructedDataLastCommandTime"]]
- //[*, 'LAST_CREDENTIAL_ADDED' BACnetConstructedDataLastCredentialAdded [validation '1 == 2' "TODO: implement me LAST_CREDENTIAL_ADDED BACnetConstructedDataLastCredentialAdded"]]
- //[*, 'LAST_CREDENTIAL_ADDED_TIME' BACnetConstructedDataLastCredentialAddedTime [validation '1 == 2' "TODO: implement me LAST_CREDENTIAL_ADDED_TIME BACnetConstructedDataLastCredentialAddedTime"]]
- //[*, 'LAST_CREDENTIAL_REMOVED' BACnetConstructedDataLastCredentialRemoved [validation '1 == 2' "TODO: implement me LAST_CREDENTIAL_REMOVED BACnetConstructedDataLastCredentialRemoved"]]
- //[*, 'LAST_CREDENTIAL_REMOVED_TIME' BACnetConstructedDataLastCredentialRemovedTime [validation '1 == 2' "TODO: implement me LAST_CREDENTIAL_REMOVED_TIME BACnetConstructedDataLastCredentialRemovedTime"]]
+ [*, 'LAST_CREDENTIAL_ADDED' BACnetConstructedDataLastCredentialAdded
+ [simple BACnetDeviceObjectReference lastCredentialAdded ]
+ ]
+ [*, 'LAST_CREDENTIAL_ADDED_TIME' BACnetConstructedDataLastCredentialAddedTime
+ [simple BACnetDateTime lastCredentialAddedTime ]
+ ]
+ [*, 'LAST_CREDENTIAL_REMOVED' BACnetConstructedDataLastCredentialRemoved
+ [simple BACnetDeviceObjectReference lastCredentialRemoved ]
+ ]
+ [*, 'LAST_CREDENTIAL_REMOVED_TIME' BACnetConstructedDataLastCredentialRemovedTime
+ [simple BACnetDateTime lastCredentialRemovedTime ]
+ ]
[*, 'LAST_KEY_SERVER' BACnetConstructedDataLastKeyServer
[simple BACnetAddressBinding lastKeyServer ]
]
@@ -3462,7 +3485,7 @@
[simple BACnetApplicationTagObjectIdentifier objectIdentifier ]
]
[*, 'OBJECT_LIST' BACnetConstructedDataObjectList
- // TODO: we need property support
+ // TODO: we need index support
[array BACnetObjectIdentifierOrUnsignedInteger
objectList
terminated
@@ -3475,17 +3498,27 @@
[*, 'OBJECT_TYPE' BACnetConstructedDataObjectType
[simple BACnetObjectTypeTagged('0', 'TagClass.APPLICATION_TAGS') objectType ]
]
- //[*, 'OCCUPANCY_COUNT' BACnetConstructedDataOccupancyCount [validation '1 == 2' "TODO: implement me OCCUPANCY_COUNT BACnetConstructedDataOccupancyCount"]]
+ [*, 'OCCUPANCY_COUNT' BACnetConstructedDataOccupancyCount
+ [simple BACnetApplicationTagUnsignedInteger occupancyCount ]
+ ]
[*, 'OCCUPANCY_COUNT_ADJUST' BACnetConstructedDataOccupancyCountAdjust
[simple BACnetApplicationTagBoolean occupancyCountAdjust ]
]
- //[*, 'OCCUPANCY_COUNT_ENABLE' BACnetConstructedDataOccupancyCountEnable [validation '1 == 2' "TODO: implement me OCCUPANCY_COUNT_ENABLE BACnetConstructedDataOccupancyCountEnable"]]
- //[*, 'OCCUPANCY_LOWER_LIMIT' BACnetConstructedDataOccupancyLowerLimit [validation '1 == 2' "TODO: implement me OCCUPANCY_LOWER_LIMIT BACnetConstructedDataOccupancyLowerLimit"]]
+ [*, 'OCCUPANCY_COUNT_ENABLE' BACnetConstructedDataOccupancyCountEnable
+ [simple BACnetApplicationTagBoolean occupancyCountEnable ]
+ ]
+ [*, 'OCCUPANCY_LOWER_LIMIT' BACnetConstructedDataOccupancyLowerLimit
+ [simple BACnetApplicationTagUnsignedInteger occupancyLowerLimit ]
+ ]
[*, 'OCCUPANCY_LOWER_LIMIT_ENFORCED' BACnetConstructedDataOccupancyLowerLimitEnforced
[simple BACnetApplicationTagBoolean occupancyLowerLimitEnforced ]
]
- //[*, 'OCCUPANCY_STATE' BACnetConstructedDataOccupancyState [validation '1 == 2' "TODO: implement me OCCUPANCY_STATE BACnetConstructedDataOccupancyState"]]
- //[*, 'OCCUPANCY_UPPER_LIMIT' BACnetConstructedDataOccupancyUpperLimit [validation '1 == 2' "TODO: implement me OCCUPANCY_UPPER_LIMIT BACnetConstructedDataOccupancyUpperLimit"]]
+ [*, 'OCCUPANCY_STATE' BACnetConstructedDataOccupancyState
+ [simple BACnetAccessZoneOccupancyStateTagged('0', 'TagClass.APPLICATION_TAGS') occupancyState ]
+ ]
+ [*, 'OCCUPANCY_UPPER_LIMIT' BACnetConstructedDataOccupancyUpperLimit
+ [simple BACnetApplicationTagUnsignedInteger occupancyUpperLimit ]
+ ]
[*, 'OCCUPANCY_UPPER_LIMIT_ENFORCED' BACnetConstructedDataOccupancyUpperLimitEnforced
[simple BACnetApplicationTagBoolean occupancyUpperLimitEnforced ]
]
@@ -3503,8 +3536,12 @@
[*, 'PACKET_REORDER_TIME' BACnetConstructedDataPacketReorderTime
[simple BACnetApplicationTagUnsignedInteger packetReorderTime ]
]
- //[*, 'PASSBACK_MODE' BACnetConstructedDataPassbackMode [validation '1 == 2' "TODO: implement me PASSBACK_MODE BACnetConstructedDataPassbackMode"]]
- //[*, 'PASSBACK_TIMEOUT' BACnetConstructedDataPassbackTimeout [validation '1 == 2' "TODO: implement me PASSBACK_TIMEOUT BACnetConstructedDataPassbackTimeout"]]
+ [*, 'PASSBACK_MODE' BACnetConstructedDataPassbackMode
+ [simple BACnetAccessPassbackModeTagged('0', 'TagClass.APPLICATION_TAGS') passbackMode ]
+ ]
+ [*, 'PASSBACK_TIMEOUT' BACnetConstructedDataPassbackTimeout
+ [simple BACnetApplicationTagUnsignedInteger passbackTimeout ]
+ ]
//[*, 'PASSENGER_ALARM' BACnetConstructedDataPassengerAlarm [validation '1 == 2' "TODO: implement me PASSENGER_ALARM BACnetConstructedDataPassengerAlarm"]]
//[*, 'POLARITY' BACnetConstructedDataPolarity [validation '1 == 2' "TODO: implement me POLARITY BACnetConstructedDataPolarity"]]
[*, 'PORT_FILTER' BACnetConstructedDataPortFilter
diff --git a/protocols/bacnetip/src/test/java/org/apache/plc4x/protocol/bacnetip/ObjectPropertyDeDuplicationTest.java b/protocols/bacnetip/src/test/java/org/apache/plc4x/protocol/bacnetip/ObjectPropertyDeDuplicationTest.java
index b905b44458..684449a422 100644
--- a/protocols/bacnetip/src/test/java/org/apache/plc4x/protocol/bacnetip/ObjectPropertyDeDuplicationTest.java
+++ b/protocols/bacnetip/src/test/java/org/apache/plc4x/protocol/bacnetip/ObjectPropertyDeDuplicationTest.java
@@ -97,7 +97,6 @@ public class ObjectPropertyDeDuplicationTest {
return tests;
}
- @Disabled("disabled till every type is implemented")
@TestFactory
Collection<DynamicNode> testUniqueUsagesAreMappedGeneric() {
List<DynamicNode> tests = new LinkedList<>();