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