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/07/19 13:29:14 UTC
[plc4x] branch develop updated (218812eb5 -> f24682115)
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
from 218812eb5 feat(cbus): implemented clock and timekeeping application
new 9edc92663 feat(cbus): implemented telephony application
new d60751967 fix(cbus): fixed vstrings
new f24682115 feat(cbus): implemented air conditioning application
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
plc4go/protocols/cbus/readwrite/ParserHelper.go | 24 +
plc4go/protocols/cbus/readwrite/XmlParserHelper.go | 24 +
.../readwrite/model/AirConditioningCommandType.go | 265 +++++
.../model/AirConditioningCommandTypeContainer.go | 454 +++++++
.../cbus/readwrite/model/AirConditioningData.go | 281 +++++
.../model/AirConditioningDataHvacScheduleEntry.go | 459 ++++++++
.../readwrite/model/AirConditioningDataRefresh.go | 190 +++
...irConditioningDataSetHumidityLowerGuardLimit.go | 301 +++++
.../AirConditioningDataSetHumiditySetbackLimit.go | 301 +++++
...irConditioningDataSetHumidityUpperGuardLimit.go | 301 +++++
.../AirConditioningDataSetHvacLowerGuardLimit.go | 301 +++++
.../AirConditioningDataSetHvacSetbackLimit.go | 301 +++++
.../AirConditioningDataSetHvacUpperGuardLimit.go | 301 +++++
.../AirConditioningDataSetPlantHumidityLevel.go | 444 +++++++
.../model/AirConditioningDataSetPlantHvacLevel.go | 444 +++++++
.../model/AirConditioningDataSetZoneGroupOff.go | 190 +++
.../model/AirConditioningDataSetZoneGroupOn.go | 190 +++
.../AirConditioningDataSetZoneHumidityMode.go | 444 +++++++
.../model/AirConditioningDataSetZoneHvacMode.go | 444 +++++++
.../model/AirConditioningDataZoneHumidity.go | 301 +++++
.../AirConditioningDataZoneHumidityPlantStatus.go | 338 ++++++
.../AirConditioningDataZoneHvacPlantStatus.go | 338 ++++++
.../model/AirConditioningDataZoneTemperature.go | 301 +++++
.../cbus/readwrite/model/DialInFailureReason.go | 121 ++
.../cbus/readwrite/model/DialOutFailureReason.go | 161 +++
.../cbus/readwrite/model/HVACAuxiliaryLevel.go | 284 +++++
plc4go/protocols/cbus/readwrite/model/HVACError.go | 1233 ++++++++++++++++++++
.../protocols/cbus/readwrite/model/HVACHumidity.go | 183 +++
.../cbus/readwrite/model/HVACHumidityError.go | 1233 ++++++++++++++++++++
.../readwrite/model/HVACHumidityModeAndFlags.go | 435 +++++++
.../model/HVACHumidityModeAndFlagsMode.go | 145 +++
.../readwrite/model/HVACHumidityStatusFlags.go | 370 ++++++
.../cbus/readwrite/model/HVACHumidityType.go | 145 +++
.../cbus/readwrite/model/HVACModeAndFlags.go | 435 +++++++
.../cbus/readwrite/model/HVACModeAndFlagsMode.go | 153 +++
.../cbus/readwrite/model/HVACRawLevels.go | 183 +++
.../cbus/readwrite/model/HVACSensorStatus.go | 145 +++
.../cbus/readwrite/model/HVACStartTime.go | 251 ++++
.../cbus/readwrite/model/HVACStatusFlags.go | 370 ++++++
.../cbus/readwrite/model/HVACTemperature.go | 183 +++
plc4go/protocols/cbus/readwrite/model/HVACType.go | 209 ++++
.../protocols/cbus/readwrite/model/HVACZoneList.go | 351 ++++++
.../cbus/readwrite/model/LineOffHookReason.go | 177 +++
.../MediaTransportControlDataSelectionName.go | 6 +-
.../model/MediaTransportControlDataTrackName.go | 6 +-
.../model/SALDataTelephonyStatusAndControl.go | 54 +-
.../readwrite/model/SecurityDataDisplayMessage.go | 6 +-
.../protocols/cbus/readwrite/model/StaticHelper.go | 20 +
.../cbus/readwrite/model/TelephonyCommandType.go | 121 ++
.../model/TelephonyCommandTypeContainer.go | 678 +++++++++++
.../cbus/readwrite/model/TelephonyData.go | 291 +++++
.../readwrite/model/TelephonyDataClearDiversion.go | 155 +++
.../readwrite/model/TelephonyDataDialOutFailure.go | 202 ++++
.../cbus/readwrite/model/TelephonyDataDivert.go | 191 +++
.../TelephonyDataInternetConnectionRequestMade.go | 155 +++
.../model/TelephonyDataIsolateSecondaryOutlet.go | 234 ++++
.../readwrite/model/TelephonyDataLineOffHook.go | 228 ++++
.../readwrite/model/TelephonyDataLineOnHook.go | 155 +++
.../model/TelephonyDataRecallLastNumber.go | 260 +++++
.../model/TelephonyDataRecallLastNumberRequest.go | 234 ++++
.../model/TelephonyDataRejectIncomingCall.go | 155 +++
.../cbus/readwrite/model/TelephonyDataRinging.go | 217 ++++
.../java/cbus/readwrite/utils/StaticHelper.java | 22 +
.../org/apache/plc4x/java/cbus/ReferenceTest.java | 48 +
.../src/main/resources/protocols/cbus/c-bus.mspec | 742 +++++++++++-
65 files changed, 17865 insertions(+), 19 deletions(-)
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningCommandTypeContainer.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningData.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataHvacScheduleEntry.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataRefresh.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityLowerGuardLimit.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumiditySetbackLimit.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityUpperGuardLimit.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacLowerGuardLimit.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacSetbackLimit.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacUpperGuardLimit.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHumidityLevel.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHvacLevel.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOff.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOn.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHumidityMode.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHvacMode.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidity.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidityPlantStatus.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHvacPlantStatus.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneTemperature.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/DialInFailureReason.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/DialOutFailureReason.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACAuxiliaryLevel.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACError.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACHumidity.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACHumidityError.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACHumidityModeAndFlags.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACHumidityModeAndFlagsMode.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACHumidityStatusFlags.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACHumidityType.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACModeAndFlags.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACModeAndFlagsMode.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACRawLevels.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACSensorStatus.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACStartTime.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACStatusFlags.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACTemperature.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACType.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/HVACZoneList.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/LineOffHookReason.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyCommandTypeContainer.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyData.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyDataClearDiversion.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyDataDialOutFailure.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyDataDivert.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyDataInternetConnectionRequestMade.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyDataIsolateSecondaryOutlet.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOffHook.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOnHook.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumber.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumberRequest.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyDataRejectIncomingCall.go
create mode 100644 plc4go/protocols/cbus/readwrite/model/TelephonyDataRinging.go
[plc4x] 01/03: feat(cbus): implemented telephony application
Posted by sr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 9edc9266343bb531270ede7dd33390cca70f2902
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Jul 19 13:25:16 2022 +0200
feat(cbus): implemented telephony application
---
plc4go/protocols/cbus/readwrite/ParserHelper.go | 2 +
plc4go/protocols/cbus/readwrite/XmlParserHelper.go | 2 +
.../cbus/readwrite/model/DialInFailureReason.go | 121 ++++
.../cbus/readwrite/model/DialOutFailureReason.go | 161 +++++
.../cbus/readwrite/model/LineOffHookReason.go | 177 ++++++
.../protocols/cbus/readwrite/model/StaticHelper.go | 10 +
.../cbus/readwrite/model/TelephonyCommandType.go | 121 ++++
.../model/TelephonyCommandTypeContainer.go | 678 +++++++++++++++++++++
.../cbus/readwrite/model/TelephonyData.go | 291 +++++++++
.../readwrite/model/TelephonyDataClearDiversion.go | 155 +++++
.../readwrite/model/TelephonyDataDialOutFailure.go | 202 ++++++
.../cbus/readwrite/model/TelephonyDataDivert.go | 191 ++++++
.../TelephonyDataInternetConnectionRequestMade.go | 155 +++++
.../model/TelephonyDataIsolateSecondaryOutlet.go | 234 +++++++
.../readwrite/model/TelephonyDataLineOffHook.go | 228 +++++++
.../readwrite/model/TelephonyDataLineOnHook.go | 155 +++++
.../model/TelephonyDataRecallLastNumber.go | 260 ++++++++
.../model/TelephonyDataRecallLastNumberRequest.go | 234 +++++++
.../model/TelephonyDataRejectIncomingCall.go | 155 +++++
.../cbus/readwrite/model/TelephonyDataRinging.go | 217 +++++++
.../src/main/resources/protocols/cbus/c-bus.mspec | 117 +++-
21 files changed, 3865 insertions(+), 1 deletion(-)
diff --git a/plc4go/protocols/cbus/readwrite/ParserHelper.go b/plc4go/protocols/cbus/readwrite/ParserHelper.go
index d4a8e897f..1d4a80267 100644
--- a/plc4go/protocols/cbus/readwrite/ParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/ParserHelper.go
@@ -90,6 +90,8 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
}
var requestContext model.RequestContext
return model.ReplyParse(io, cBusOptions, replyLength, requestContext)
+ case "TelephonyData":
+ return model.TelephonyDataParse(io)
case "InterfaceOptions1PowerUpSettings":
return model.InterfaceOptions1PowerUpSettingsParse(io)
case "MonitoredSAL":
diff --git a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
index f988ee002..33a8ef961 100644
--- a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
@@ -106,6 +106,8 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
// TODO: find a way to parse the sub types
var requestContext model.RequestContext
return model.ReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, replyLength, requestContext)
+ case "TelephonyData":
+ return model.TelephonyDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "InterfaceOptions1PowerUpSettings":
return model.InterfaceOptions1PowerUpSettingsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "MonitoredSAL":
diff --git a/plc4go/protocols/cbus/readwrite/model/DialInFailureReason.go b/plc4go/protocols/cbus/readwrite/model/DialInFailureReason.go
new file mode 100644
index 000000000..966e9bd27
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/DialInFailureReason.go
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// DialInFailureReason is an enum
+type DialInFailureReason uint8
+
+type IDialInFailureReason interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ DialInFailureReason_PHONE_STOPPED_RINGING DialInFailureReason = 0x01
+)
+
+var DialInFailureReasonValues []DialInFailureReason
+
+func init() {
+ _ = errors.New
+ DialInFailureReasonValues = []DialInFailureReason{
+ DialInFailureReason_PHONE_STOPPED_RINGING,
+ }
+}
+
+func DialInFailureReasonByValue(value uint8) (enum DialInFailureReason, ok bool) {
+ switch value {
+ case 0x01:
+ return DialInFailureReason_PHONE_STOPPED_RINGING, true
+ }
+ return 0, false
+}
+
+func DialInFailureReasonByName(value string) (enum DialInFailureReason, ok bool) {
+ switch value {
+ case "PHONE_STOPPED_RINGING":
+ return DialInFailureReason_PHONE_STOPPED_RINGING, true
+ }
+ return 0, false
+}
+
+func DialInFailureReasonKnows(value uint8) bool {
+ for _, typeValue := range DialInFailureReasonValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastDialInFailureReason(structType interface{}) DialInFailureReason {
+ castFunc := func(typ interface{}) DialInFailureReason {
+ if sDialInFailureReason, ok := typ.(DialInFailureReason); ok {
+ return sDialInFailureReason
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m DialInFailureReason) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m DialInFailureReason) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func DialInFailureReasonParse(readBuffer utils.ReadBuffer) (DialInFailureReason, error) {
+ val, err := readBuffer.ReadUint8("DialInFailureReason", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading DialInFailureReason")
+ }
+ if enum, ok := DialInFailureReasonByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return DialInFailureReason(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e DialInFailureReason) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("DialInFailureReason", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e DialInFailureReason) PLC4XEnumName() string {
+ switch e {
+ case DialInFailureReason_PHONE_STOPPED_RINGING:
+ return "PHONE_STOPPED_RINGING"
+ }
+ return ""
+}
+
+func (e DialInFailureReason) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/DialOutFailureReason.go b/plc4go/protocols/cbus/readwrite/model/DialOutFailureReason.go
new file mode 100644
index 000000000..e3a8cf771
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/DialOutFailureReason.go
@@ -0,0 +1,161 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// DialOutFailureReason is an enum
+type DialOutFailureReason uint8
+
+type IDialOutFailureReason interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ DialOutFailureReason_NO_DIAL_TONE DialOutFailureReason = 0x01
+ DialOutFailureReason_NO_ANSWER DialOutFailureReason = 0x02
+ DialOutFailureReason_NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS DialOutFailureReason = 0x03
+ DialOutFailureReason_NUMBER_WAS_UNOBTAINABLE_DOES_NOT_EXIST DialOutFailureReason = 0x04
+ DialOutFailureReason_NUMBER_WAS_BUSY DialOutFailureReason = 0x05
+ DialOutFailureReason_INTERNAL_FAILURE DialOutFailureReason = 0x06
+)
+
+var DialOutFailureReasonValues []DialOutFailureReason
+
+func init() {
+ _ = errors.New
+ DialOutFailureReasonValues = []DialOutFailureReason{
+ DialOutFailureReason_NO_DIAL_TONE,
+ DialOutFailureReason_NO_ANSWER,
+ DialOutFailureReason_NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS,
+ DialOutFailureReason_NUMBER_WAS_UNOBTAINABLE_DOES_NOT_EXIST,
+ DialOutFailureReason_NUMBER_WAS_BUSY,
+ DialOutFailureReason_INTERNAL_FAILURE,
+ }
+}
+
+func DialOutFailureReasonByValue(value uint8) (enum DialOutFailureReason, ok bool) {
+ switch value {
+ case 0x01:
+ return DialOutFailureReason_NO_DIAL_TONE, true
+ case 0x02:
+ return DialOutFailureReason_NO_ANSWER, true
+ case 0x03:
+ return DialOutFailureReason_NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS, true
+ case 0x04:
+ return DialOutFailureReason_NUMBER_WAS_UNOBTAINABLE_DOES_NOT_EXIST, true
+ case 0x05:
+ return DialOutFailureReason_NUMBER_WAS_BUSY, true
+ case 0x06:
+ return DialOutFailureReason_INTERNAL_FAILURE, true
+ }
+ return 0, false
+}
+
+func DialOutFailureReasonByName(value string) (enum DialOutFailureReason, ok bool) {
+ switch value {
+ case "NO_DIAL_TONE":
+ return DialOutFailureReason_NO_DIAL_TONE, true
+ case "NO_ANSWER":
+ return DialOutFailureReason_NO_ANSWER, true
+ case "NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS":
+ return DialOutFailureReason_NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS, true
+ case "NUMBER_WAS_UNOBTAINABLE_DOES_NOT_EXIST":
+ return DialOutFailureReason_NUMBER_WAS_UNOBTAINABLE_DOES_NOT_EXIST, true
+ case "NUMBER_WAS_BUSY":
+ return DialOutFailureReason_NUMBER_WAS_BUSY, true
+ case "INTERNAL_FAILURE":
+ return DialOutFailureReason_INTERNAL_FAILURE, true
+ }
+ return 0, false
+}
+
+func DialOutFailureReasonKnows(value uint8) bool {
+ for _, typeValue := range DialOutFailureReasonValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastDialOutFailureReason(structType interface{}) DialOutFailureReason {
+ castFunc := func(typ interface{}) DialOutFailureReason {
+ if sDialOutFailureReason, ok := typ.(DialOutFailureReason); ok {
+ return sDialOutFailureReason
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m DialOutFailureReason) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m DialOutFailureReason) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func DialOutFailureReasonParse(readBuffer utils.ReadBuffer) (DialOutFailureReason, error) {
+ val, err := readBuffer.ReadUint8("DialOutFailureReason", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading DialOutFailureReason")
+ }
+ if enum, ok := DialOutFailureReasonByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return DialOutFailureReason(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e DialOutFailureReason) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("DialOutFailureReason", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e DialOutFailureReason) PLC4XEnumName() string {
+ switch e {
+ case DialOutFailureReason_NO_DIAL_TONE:
+ return "NO_DIAL_TONE"
+ case DialOutFailureReason_NO_ANSWER:
+ return "NO_ANSWER"
+ case DialOutFailureReason_NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS:
+ return "NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS"
+ case DialOutFailureReason_NUMBER_WAS_UNOBTAINABLE_DOES_NOT_EXIST:
+ return "NUMBER_WAS_UNOBTAINABLE_DOES_NOT_EXIST"
+ case DialOutFailureReason_NUMBER_WAS_BUSY:
+ return "NUMBER_WAS_BUSY"
+ case DialOutFailureReason_INTERNAL_FAILURE:
+ return "INTERNAL_FAILURE"
+ }
+ return ""
+}
+
+func (e DialOutFailureReason) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/LineOffHookReason.go b/plc4go/protocols/cbus/readwrite/model/LineOffHookReason.go
new file mode 100644
index 000000000..da5259102
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/LineOffHookReason.go
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// LineOffHookReason is an enum
+type LineOffHookReason uint8
+
+type ILineOffHookReason interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ LineOffHookReason_INCOMING_VOICE_CALL LineOffHookReason = 0x01
+ LineOffHookReason_INCOMING_DATA_CALL LineOffHookReason = 0x02
+ LineOffHookReason_INCOMING_CALL LineOffHookReason = 0x03
+ LineOffHookReason_OUTGOING_VOICE_CALL LineOffHookReason = 0x10
+ LineOffHookReason_OUTGOING_DATA_CALL LineOffHookReason = 0x20
+ LineOffHookReason_OUTGOING_CALL LineOffHookReason = 0x30
+ LineOffHookReason_CBTI_IS_SETTING LineOffHookReason = 0x40
+ LineOffHookReason_CBTI_IS_CLEARING LineOffHookReason = 0x50
+)
+
+var LineOffHookReasonValues []LineOffHookReason
+
+func init() {
+ _ = errors.New
+ LineOffHookReasonValues = []LineOffHookReason{
+ LineOffHookReason_INCOMING_VOICE_CALL,
+ LineOffHookReason_INCOMING_DATA_CALL,
+ LineOffHookReason_INCOMING_CALL,
+ LineOffHookReason_OUTGOING_VOICE_CALL,
+ LineOffHookReason_OUTGOING_DATA_CALL,
+ LineOffHookReason_OUTGOING_CALL,
+ LineOffHookReason_CBTI_IS_SETTING,
+ LineOffHookReason_CBTI_IS_CLEARING,
+ }
+}
+
+func LineOffHookReasonByValue(value uint8) (enum LineOffHookReason, ok bool) {
+ switch value {
+ case 0x01:
+ return LineOffHookReason_INCOMING_VOICE_CALL, true
+ case 0x02:
+ return LineOffHookReason_INCOMING_DATA_CALL, true
+ case 0x03:
+ return LineOffHookReason_INCOMING_CALL, true
+ case 0x10:
+ return LineOffHookReason_OUTGOING_VOICE_CALL, true
+ case 0x20:
+ return LineOffHookReason_OUTGOING_DATA_CALL, true
+ case 0x30:
+ return LineOffHookReason_OUTGOING_CALL, true
+ case 0x40:
+ return LineOffHookReason_CBTI_IS_SETTING, true
+ case 0x50:
+ return LineOffHookReason_CBTI_IS_CLEARING, true
+ }
+ return 0, false
+}
+
+func LineOffHookReasonByName(value string) (enum LineOffHookReason, ok bool) {
+ switch value {
+ case "INCOMING_VOICE_CALL":
+ return LineOffHookReason_INCOMING_VOICE_CALL, true
+ case "INCOMING_DATA_CALL":
+ return LineOffHookReason_INCOMING_DATA_CALL, true
+ case "INCOMING_CALL":
+ return LineOffHookReason_INCOMING_CALL, true
+ case "OUTGOING_VOICE_CALL":
+ return LineOffHookReason_OUTGOING_VOICE_CALL, true
+ case "OUTGOING_DATA_CALL":
+ return LineOffHookReason_OUTGOING_DATA_CALL, true
+ case "OUTGOING_CALL":
+ return LineOffHookReason_OUTGOING_CALL, true
+ case "CBTI_IS_SETTING":
+ return LineOffHookReason_CBTI_IS_SETTING, true
+ case "CBTI_IS_CLEARING":
+ return LineOffHookReason_CBTI_IS_CLEARING, true
+ }
+ return 0, false
+}
+
+func LineOffHookReasonKnows(value uint8) bool {
+ for _, typeValue := range LineOffHookReasonValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastLineOffHookReason(structType interface{}) LineOffHookReason {
+ castFunc := func(typ interface{}) LineOffHookReason {
+ if sLineOffHookReason, ok := typ.(LineOffHookReason); ok {
+ return sLineOffHookReason
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m LineOffHookReason) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m LineOffHookReason) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func LineOffHookReasonParse(readBuffer utils.ReadBuffer) (LineOffHookReason, error) {
+ val, err := readBuffer.ReadUint8("LineOffHookReason", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading LineOffHookReason")
+ }
+ if enum, ok := LineOffHookReasonByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return LineOffHookReason(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e LineOffHookReason) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("LineOffHookReason", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e LineOffHookReason) PLC4XEnumName() string {
+ switch e {
+ case LineOffHookReason_INCOMING_VOICE_CALL:
+ return "INCOMING_VOICE_CALL"
+ case LineOffHookReason_INCOMING_DATA_CALL:
+ return "INCOMING_DATA_CALL"
+ case LineOffHookReason_INCOMING_CALL:
+ return "INCOMING_CALL"
+ case LineOffHookReason_OUTGOING_VOICE_CALL:
+ return "OUTGOING_VOICE_CALL"
+ case LineOffHookReason_OUTGOING_DATA_CALL:
+ return "OUTGOING_DATA_CALL"
+ case LineOffHookReason_OUTGOING_CALL:
+ return "OUTGOING_CALL"
+ case LineOffHookReason_CBTI_IS_SETTING:
+ return "CBTI_IS_SETTING"
+ case LineOffHookReason_CBTI_IS_CLEARING:
+ return "CBTI_IS_CLEARING"
+ }
+ return ""
+}
+
+func (e LineOffHookReason) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/StaticHelper.go b/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
index a1ada5075..203fe6ac5 100644
--- a/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
+++ b/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
@@ -211,3 +211,13 @@ func KnowsClockAndTimekeepingCommandTypeContainer(readBuffer utils.ReadBuffer) b
}
return ClockAndTimekeepingCommandTypeContainerKnows(readUint8)
}
+
+func KnowsTelephonyCommandTypeContainer(readBuffer utils.ReadBuffer) bool {
+ oldPos := readBuffer.GetPos()
+ defer readBuffer.Reset(oldPos)
+ readUint8, err := readBuffer.ReadUint8("", 8)
+ if err != nil {
+ return false
+ }
+ return TelephonyCommandTypeContainerKnows(readUint8)
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go b/plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go
new file mode 100644
index 000000000..244030a59
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyCommandType is an enum
+type TelephonyCommandType uint8
+
+type ITelephonyCommandType interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ TelephonyCommandType_EVENT TelephonyCommandType = 0x00
+)
+
+var TelephonyCommandTypeValues []TelephonyCommandType
+
+func init() {
+ _ = errors.New
+ TelephonyCommandTypeValues = []TelephonyCommandType{
+ TelephonyCommandType_EVENT,
+ }
+}
+
+func TelephonyCommandTypeByValue(value uint8) (enum TelephonyCommandType, ok bool) {
+ switch value {
+ case 0x00:
+ return TelephonyCommandType_EVENT, true
+ }
+ return 0, false
+}
+
+func TelephonyCommandTypeByName(value string) (enum TelephonyCommandType, ok bool) {
+ switch value {
+ case "EVENT":
+ return TelephonyCommandType_EVENT, true
+ }
+ return 0, false
+}
+
+func TelephonyCommandTypeKnows(value uint8) bool {
+ for _, typeValue := range TelephonyCommandTypeValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastTelephonyCommandType(structType interface{}) TelephonyCommandType {
+ castFunc := func(typ interface{}) TelephonyCommandType {
+ if sTelephonyCommandType, ok := typ.(TelephonyCommandType); ok {
+ return sTelephonyCommandType
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m TelephonyCommandType) GetLengthInBits() uint16 {
+ return 4
+}
+
+func (m TelephonyCommandType) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyCommandTypeParse(readBuffer utils.ReadBuffer) (TelephonyCommandType, error) {
+ val, err := readBuffer.ReadUint8("TelephonyCommandType", 4)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading TelephonyCommandType")
+ }
+ if enum, ok := TelephonyCommandTypeByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return TelephonyCommandType(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e TelephonyCommandType) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("TelephonyCommandType", 4, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e TelephonyCommandType) PLC4XEnumName() string {
+ switch e {
+ case TelephonyCommandType_EVENT:
+ return "EVENT"
+ }
+ return ""
+}
+
+func (e TelephonyCommandType) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/TelephonyCommandTypeContainer.go
new file mode 100644
index 000000000..d162e2769
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyCommandTypeContainer.go
@@ -0,0 +1,678 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyCommandTypeContainer is an enum
+type TelephonyCommandTypeContainer uint8
+
+type ITelephonyCommandTypeContainer interface {
+ NumBytes() uint8
+ CommandType() TelephonyCommandType
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ TelephonyCommandTypeContainer_TelephonyCommandLineOnHook TelephonyCommandTypeContainer = 0x09
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_0Bytes TelephonyCommandTypeContainer = 0xA0
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_1Bytes TelephonyCommandTypeContainer = 0xA1
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_2Bytes TelephonyCommandTypeContainer = 0xA2
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_3Bytes TelephonyCommandTypeContainer = 0xA3
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_4Bytes TelephonyCommandTypeContainer = 0xA4
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_5Bytes TelephonyCommandTypeContainer = 0xA5
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_6Bytes TelephonyCommandTypeContainer = 0xA6
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_7Bytes TelephonyCommandTypeContainer = 0xA7
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_8Bytes TelephonyCommandTypeContainer = 0xA8
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_9Bytes TelephonyCommandTypeContainer = 0xA9
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_10Bytes TelephonyCommandTypeContainer = 0xAA
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_11Bytes TelephonyCommandTypeContainer = 0xAB
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_12Bytes TelephonyCommandTypeContainer = 0xAC
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_13Bytes TelephonyCommandTypeContainer = 0xAD
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_14Bytes TelephonyCommandTypeContainer = 0xAE
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_15Bytes TelephonyCommandTypeContainer = 0xAF
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_16Bytes TelephonyCommandTypeContainer = 0xB0
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_17Bytes TelephonyCommandTypeContainer = 0xB1
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_18Bytes TelephonyCommandTypeContainer = 0xB2
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_19Bytes TelephonyCommandTypeContainer = 0xB3
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_20Bytes TelephonyCommandTypeContainer = 0xB4
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_21Bytes TelephonyCommandTypeContainer = 0xB5
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_22Bytes TelephonyCommandTypeContainer = 0xB6
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_23Bytes TelephonyCommandTypeContainer = 0xB7
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_24Bytes TelephonyCommandTypeContainer = 0xB8
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_25Bytes TelephonyCommandTypeContainer = 0xB9
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_26Bytes TelephonyCommandTypeContainer = 0xBA
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_27Bytes TelephonyCommandTypeContainer = 0xBB
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_28Bytes TelephonyCommandTypeContainer = 0xBC
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_29Bytes TelephonyCommandTypeContainer = 0xBD
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_30Bytes TelephonyCommandTypeContainer = 0xBE
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_31Bytes TelephonyCommandTypeContainer = 0xBF
+)
+
+var TelephonyCommandTypeContainerValues []TelephonyCommandTypeContainer
+
+func init() {
+ _ = errors.New
+ TelephonyCommandTypeContainerValues = []TelephonyCommandTypeContainer{
+ TelephonyCommandTypeContainer_TelephonyCommandLineOnHook,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_0Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_1Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_2Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_3Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_4Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_5Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_6Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_7Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_8Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_9Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_10Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_11Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_12Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_13Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_14Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_15Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_16Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_17Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_18Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_19Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_20Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_21Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_22Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_23Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_24Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_25Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_26Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_27Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_28Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_29Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_30Bytes,
+ TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_31Bytes,
+ }
+}
+
+func (e TelephonyCommandTypeContainer) NumBytes() uint8 {
+ switch e {
+ case 0x09:
+ { /* '0x09' */
+ return 1
+ }
+ case 0xA0:
+ { /* '0xA0' */
+ return 0
+ }
+ case 0xA1:
+ { /* '0xA1' */
+ return 1
+ }
+ case 0xA2:
+ { /* '0xA2' */
+ return 2
+ }
+ case 0xA3:
+ { /* '0xA3' */
+ return 3
+ }
+ case 0xA4:
+ { /* '0xA4' */
+ return 4
+ }
+ case 0xA5:
+ { /* '0xA5' */
+ return 5
+ }
+ case 0xA6:
+ { /* '0xA6' */
+ return 6
+ }
+ case 0xA7:
+ { /* '0xA7' */
+ return 7
+ }
+ case 0xA8:
+ { /* '0xA8' */
+ return 8
+ }
+ case 0xA9:
+ { /* '0xA9' */
+ return 9
+ }
+ case 0xAA:
+ { /* '0xAA' */
+ return 10
+ }
+ case 0xAB:
+ { /* '0xAB' */
+ return 11
+ }
+ case 0xAC:
+ { /* '0xAC' */
+ return 12
+ }
+ case 0xAD:
+ { /* '0xAD' */
+ return 13
+ }
+ case 0xAE:
+ { /* '0xAE' */
+ return 14
+ }
+ case 0xAF:
+ { /* '0xAF' */
+ return 15
+ }
+ case 0xB0:
+ { /* '0xB0' */
+ return 16
+ }
+ case 0xB1:
+ { /* '0xB1' */
+ return 17
+ }
+ case 0xB2:
+ { /* '0xB2' */
+ return 18
+ }
+ case 0xB3:
+ { /* '0xB3' */
+ return 19
+ }
+ case 0xB4:
+ { /* '0xB4' */
+ return 20
+ }
+ case 0xB5:
+ { /* '0xB5' */
+ return 21
+ }
+ case 0xB6:
+ { /* '0xB6' */
+ return 22
+ }
+ case 0xB7:
+ { /* '0xB7' */
+ return 23
+ }
+ case 0xB8:
+ { /* '0xB8' */
+ return 24
+ }
+ case 0xB9:
+ { /* '0xB9' */
+ return 25
+ }
+ case 0xBA:
+ { /* '0xBA' */
+ return 26
+ }
+ case 0xBB:
+ { /* '0xBB' */
+ return 27
+ }
+ case 0xBC:
+ { /* '0xBC' */
+ return 28
+ }
+ case 0xBD:
+ { /* '0xBD' */
+ return 29
+ }
+ case 0xBE:
+ { /* '0xBE' */
+ return 30
+ }
+ case 0xBF:
+ { /* '0xBF' */
+ return 31
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func TelephonyCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (TelephonyCommandTypeContainer, error) {
+ for _, sizeValue := range TelephonyCommandTypeContainerValues {
+ if sizeValue.NumBytes() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing NumBytes not found", value)
+}
+
+func (e TelephonyCommandTypeContainer) CommandType() TelephonyCommandType {
+ switch e {
+ case 0x09:
+ { /* '0x09' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xA0:
+ { /* '0xA0' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xA1:
+ { /* '0xA1' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xA2:
+ { /* '0xA2' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xA3:
+ { /* '0xA3' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xA4:
+ { /* '0xA4' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xA5:
+ { /* '0xA5' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xA6:
+ { /* '0xA6' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xA7:
+ { /* '0xA7' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xA8:
+ { /* '0xA8' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xA9:
+ { /* '0xA9' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xAA:
+ { /* '0xAA' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xAB:
+ { /* '0xAB' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xAC:
+ { /* '0xAC' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xAD:
+ { /* '0xAD' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xAE:
+ { /* '0xAE' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xAF:
+ { /* '0xAF' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xB0:
+ { /* '0xB0' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xB1:
+ { /* '0xB1' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xB2:
+ { /* '0xB2' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xB3:
+ { /* '0xB3' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xB4:
+ { /* '0xB4' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xB5:
+ { /* '0xB5' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xB6:
+ { /* '0xB6' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xB7:
+ { /* '0xB7' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xB8:
+ { /* '0xB8' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xB9:
+ { /* '0xB9' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xBA:
+ { /* '0xBA' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xBB:
+ { /* '0xBB' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xBC:
+ { /* '0xBC' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xBD:
+ { /* '0xBD' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xBE:
+ { /* '0xBE' */
+ return TelephonyCommandType_EVENT
+ }
+ case 0xBF:
+ { /* '0xBF' */
+ return TelephonyCommandType_EVENT
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func TelephonyCommandTypeContainerFirstEnumForFieldCommandType(value TelephonyCommandType) (TelephonyCommandTypeContainer, error) {
+ for _, sizeValue := range TelephonyCommandTypeContainerValues {
+ if sizeValue.CommandType() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing CommandType not found", value)
+}
+func TelephonyCommandTypeContainerByValue(value uint8) (enum TelephonyCommandTypeContainer, ok bool) {
+ switch value {
+ case 0x09:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOnHook, true
+ case 0xA0:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_0Bytes, true
+ case 0xA1:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_1Bytes, true
+ case 0xA2:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_2Bytes, true
+ case 0xA3:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_3Bytes, true
+ case 0xA4:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_4Bytes, true
+ case 0xA5:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_5Bytes, true
+ case 0xA6:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_6Bytes, true
+ case 0xA7:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_7Bytes, true
+ case 0xA8:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_8Bytes, true
+ case 0xA9:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_9Bytes, true
+ case 0xAA:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_10Bytes, true
+ case 0xAB:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_11Bytes, true
+ case 0xAC:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_12Bytes, true
+ case 0xAD:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_13Bytes, true
+ case 0xAE:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_14Bytes, true
+ case 0xAF:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_15Bytes, true
+ case 0xB0:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_16Bytes, true
+ case 0xB1:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_17Bytes, true
+ case 0xB2:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_18Bytes, true
+ case 0xB3:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_19Bytes, true
+ case 0xB4:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_20Bytes, true
+ case 0xB5:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_21Bytes, true
+ case 0xB6:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_22Bytes, true
+ case 0xB7:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_23Bytes, true
+ case 0xB8:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_24Bytes, true
+ case 0xB9:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_25Bytes, true
+ case 0xBA:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_26Bytes, true
+ case 0xBB:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_27Bytes, true
+ case 0xBC:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_28Bytes, true
+ case 0xBD:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_29Bytes, true
+ case 0xBE:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_30Bytes, true
+ case 0xBF:
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_31Bytes, true
+ }
+ return 0, false
+}
+
+func TelephonyCommandTypeContainerByName(value string) (enum TelephonyCommandTypeContainer, ok bool) {
+ switch value {
+ case "TelephonyCommandLineOnHook":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOnHook, true
+ case "TelephonyCommandLineOffHook_0Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_0Bytes, true
+ case "TelephonyCommandLineOffHook_1Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_1Bytes, true
+ case "TelephonyCommandLineOffHook_2Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_2Bytes, true
+ case "TelephonyCommandLineOffHook_3Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_3Bytes, true
+ case "TelephonyCommandLineOffHook_4Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_4Bytes, true
+ case "TelephonyCommandLineOffHook_5Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_5Bytes, true
+ case "TelephonyCommandLineOffHook_6Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_6Bytes, true
+ case "TelephonyCommandLineOffHook_7Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_7Bytes, true
+ case "TelephonyCommandLineOffHook_8Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_8Bytes, true
+ case "TelephonyCommandLineOffHook_9Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_9Bytes, true
+ case "TelephonyCommandLineOffHook_10Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_10Bytes, true
+ case "TelephonyCommandLineOffHook_11Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_11Bytes, true
+ case "TelephonyCommandLineOffHook_12Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_12Bytes, true
+ case "TelephonyCommandLineOffHook_13Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_13Bytes, true
+ case "TelephonyCommandLineOffHook_14Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_14Bytes, true
+ case "TelephonyCommandLineOffHook_15Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_15Bytes, true
+ case "TelephonyCommandLineOffHook_16Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_16Bytes, true
+ case "TelephonyCommandLineOffHook_17Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_17Bytes, true
+ case "TelephonyCommandLineOffHook_18Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_18Bytes, true
+ case "TelephonyCommandLineOffHook_19Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_19Bytes, true
+ case "TelephonyCommandLineOffHook_20Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_20Bytes, true
+ case "TelephonyCommandLineOffHook_21Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_21Bytes, true
+ case "TelephonyCommandLineOffHook_22Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_22Bytes, true
+ case "TelephonyCommandLineOffHook_23Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_23Bytes, true
+ case "TelephonyCommandLineOffHook_24Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_24Bytes, true
+ case "TelephonyCommandLineOffHook_25Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_25Bytes, true
+ case "TelephonyCommandLineOffHook_26Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_26Bytes, true
+ case "TelephonyCommandLineOffHook_27Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_27Bytes, true
+ case "TelephonyCommandLineOffHook_28Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_28Bytes, true
+ case "TelephonyCommandLineOffHook_29Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_29Bytes, true
+ case "TelephonyCommandLineOffHook_30Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_30Bytes, true
+ case "TelephonyCommandLineOffHook_31Bytes":
+ return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_31Bytes, true
+ }
+ return 0, false
+}
+
+func TelephonyCommandTypeContainerKnows(value uint8) bool {
+ for _, typeValue := range TelephonyCommandTypeContainerValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastTelephonyCommandTypeContainer(structType interface{}) TelephonyCommandTypeContainer {
+ castFunc := func(typ interface{}) TelephonyCommandTypeContainer {
+ if sTelephonyCommandTypeContainer, ok := typ.(TelephonyCommandTypeContainer); ok {
+ return sTelephonyCommandTypeContainer
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m TelephonyCommandTypeContainer) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m TelephonyCommandTypeContainer) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyCommandTypeContainerParse(readBuffer utils.ReadBuffer) (TelephonyCommandTypeContainer, error) {
+ val, err := readBuffer.ReadUint8("TelephonyCommandTypeContainer", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading TelephonyCommandTypeContainer")
+ }
+ if enum, ok := TelephonyCommandTypeContainerByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return TelephonyCommandTypeContainer(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e TelephonyCommandTypeContainer) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("TelephonyCommandTypeContainer", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e TelephonyCommandTypeContainer) PLC4XEnumName() string {
+ switch e {
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOnHook:
+ return "TelephonyCommandLineOnHook"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_0Bytes:
+ return "TelephonyCommandLineOffHook_0Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_1Bytes:
+ return "TelephonyCommandLineOffHook_1Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_2Bytes:
+ return "TelephonyCommandLineOffHook_2Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_3Bytes:
+ return "TelephonyCommandLineOffHook_3Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_4Bytes:
+ return "TelephonyCommandLineOffHook_4Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_5Bytes:
+ return "TelephonyCommandLineOffHook_5Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_6Bytes:
+ return "TelephonyCommandLineOffHook_6Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_7Bytes:
+ return "TelephonyCommandLineOffHook_7Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_8Bytes:
+ return "TelephonyCommandLineOffHook_8Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_9Bytes:
+ return "TelephonyCommandLineOffHook_9Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_10Bytes:
+ return "TelephonyCommandLineOffHook_10Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_11Bytes:
+ return "TelephonyCommandLineOffHook_11Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_12Bytes:
+ return "TelephonyCommandLineOffHook_12Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_13Bytes:
+ return "TelephonyCommandLineOffHook_13Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_14Bytes:
+ return "TelephonyCommandLineOffHook_14Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_15Bytes:
+ return "TelephonyCommandLineOffHook_15Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_16Bytes:
+ return "TelephonyCommandLineOffHook_16Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_17Bytes:
+ return "TelephonyCommandLineOffHook_17Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_18Bytes:
+ return "TelephonyCommandLineOffHook_18Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_19Bytes:
+ return "TelephonyCommandLineOffHook_19Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_20Bytes:
+ return "TelephonyCommandLineOffHook_20Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_21Bytes:
+ return "TelephonyCommandLineOffHook_21Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_22Bytes:
+ return "TelephonyCommandLineOffHook_22Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_23Bytes:
+ return "TelephonyCommandLineOffHook_23Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_24Bytes:
+ return "TelephonyCommandLineOffHook_24Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_25Bytes:
+ return "TelephonyCommandLineOffHook_25Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_26Bytes:
+ return "TelephonyCommandLineOffHook_26Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_27Bytes:
+ return "TelephonyCommandLineOffHook_27Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_28Bytes:
+ return "TelephonyCommandLineOffHook_28Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_29Bytes:
+ return "TelephonyCommandLineOffHook_29Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_30Bytes:
+ return "TelephonyCommandLineOffHook_30Bytes"
+ case TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_31Bytes:
+ return "TelephonyCommandLineOffHook_31Bytes"
+ }
+ return ""
+}
+
+func (e TelephonyCommandTypeContainer) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyData.go b/plc4go/protocols/cbus/readwrite/model/TelephonyData.go
new file mode 100644
index 000000000..9a8dc1df4
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyData.go
@@ -0,0 +1,291 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyData is the corresponding interface of TelephonyData
+type TelephonyData interface {
+ utils.LengthAware
+ utils.Serializable
+ // GetCommandTypeContainer returns CommandTypeContainer (property field)
+ GetCommandTypeContainer() TelephonyCommandTypeContainer
+ // GetArgument returns Argument (property field)
+ GetArgument() byte
+ // GetCommandType returns CommandType (virtual field)
+ GetCommandType() TelephonyCommandType
+}
+
+// TelephonyDataExactly can be used when we want exactly this type and not a type which fulfills TelephonyData.
+// This is useful for switch cases.
+type TelephonyDataExactly interface {
+ TelephonyData
+ isTelephonyData() bool
+}
+
+// _TelephonyData is the data-structure of this message
+type _TelephonyData struct {
+ _TelephonyDataChildRequirements
+ CommandTypeContainer TelephonyCommandTypeContainer
+ Argument byte
+}
+
+type _TelephonyDataChildRequirements interface {
+ utils.Serializable
+ GetLengthInBits() uint16
+ GetLengthInBitsConditional(lastItem bool) uint16
+}
+
+type TelephonyDataParent interface {
+ SerializeParent(writeBuffer utils.WriteBuffer, child TelephonyData, serializeChildFunction func() error) error
+ GetTypeName() string
+}
+
+type TelephonyDataChild interface {
+ utils.Serializable
+ InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte)
+ GetParent() *TelephonyData
+
+ GetTypeName() string
+ TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_TelephonyData) GetCommandTypeContainer() TelephonyCommandTypeContainer {
+ return m.CommandTypeContainer
+}
+
+func (m *_TelephonyData) GetArgument() byte {
+ return m.Argument
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_TelephonyData) GetCommandType() TelephonyCommandType {
+ return CastTelephonyCommandType(m.GetCommandTypeContainer().CommandType())
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewTelephonyData factory function for _TelephonyData
+func NewTelephonyData(commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyData {
+ return &_TelephonyData{CommandTypeContainer: commandTypeContainer, Argument: argument}
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyData(structType interface{}) TelephonyData {
+ if casted, ok := structType.(TelephonyData); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyData); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyData) GetTypeName() string {
+ return "TelephonyData"
+}
+
+func (m *_TelephonyData) GetParentLengthInBits() uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (commandTypeContainer)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // Simple field (argument)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_TelephonyData) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataParse(readBuffer utils.ReadBuffer) (TelephonyData, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyData"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyData")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Validation
+ if !(KnowsTelephonyCommandTypeContainer(readBuffer)) {
+ return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"})
+ }
+
+ // Simple Field (commandTypeContainer)
+ if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer")
+ }
+ _commandTypeContainer, _commandTypeContainerErr := TelephonyCommandTypeContainerParse(readBuffer)
+ if _commandTypeContainerErr != nil {
+ return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of TelephonyData")
+ }
+ commandTypeContainer := _commandTypeContainer
+ if closeErr := readBuffer.CloseContext("commandTypeContainer"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for commandTypeContainer")
+ }
+
+ // Virtual field
+ _commandType := commandTypeContainer.CommandType()
+ commandType := TelephonyCommandType(_commandType)
+ _ = commandType
+
+ // Simple Field (argument)
+ _argument, _argumentErr := readBuffer.ReadByte("argument")
+ if _argumentErr != nil {
+ return nil, errors.Wrap(_argumentErr, "Error parsing 'argument' field of TelephonyData")
+ }
+ argument := _argument
+
+ // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
+ type TelephonyDataChildSerializeRequirement interface {
+ TelephonyData
+ InitializeParent(TelephonyData, TelephonyCommandTypeContainer, byte)
+ GetParent() TelephonyData
+ }
+ var _childTemp interface{}
+ var _child TelephonyDataChildSerializeRequirement
+ var typeSwitchError error
+ switch {
+ case commandType == TelephonyCommandType_EVENT && argument == 0x01: // TelephonyDataLineOnHook
+ _childTemp, typeSwitchError = TelephonyDataLineOnHookParse(readBuffer)
+ case commandType == TelephonyCommandType_EVENT && argument == 0x02: // TelephonyDataLineOffHook
+ _childTemp, typeSwitchError = TelephonyDataLineOffHookParse(readBuffer, commandTypeContainer)
+ case commandType == TelephonyCommandType_EVENT && argument == 0x03: // TelephonyDataDialOutFailure
+ _childTemp, typeSwitchError = TelephonyDataDialOutFailureParse(readBuffer)
+ case commandType == TelephonyCommandType_EVENT && argument == 0x04: // TelephonyDataDialOutFailure
+ _childTemp, typeSwitchError = TelephonyDataDialOutFailureParse(readBuffer)
+ case commandType == TelephonyCommandType_EVENT && argument == 0x05: // TelephonyDataRinging
+ _childTemp, typeSwitchError = TelephonyDataRingingParse(readBuffer, commandTypeContainer)
+ case commandType == TelephonyCommandType_EVENT && argument == 0x06: // TelephonyDataRecallLastNumber
+ _childTemp, typeSwitchError = TelephonyDataRecallLastNumberParse(readBuffer, commandTypeContainer)
+ case commandType == TelephonyCommandType_EVENT && argument == 0x07: // TelephonyDataInternetConnectionRequestMade
+ _childTemp, typeSwitchError = TelephonyDataInternetConnectionRequestMadeParse(readBuffer)
+ case commandType == TelephonyCommandType_EVENT && argument == 0x80: // TelephonyDataIsolateSecondaryOutlet
+ _childTemp, typeSwitchError = TelephonyDataIsolateSecondaryOutletParse(readBuffer)
+ case commandType == TelephonyCommandType_EVENT && argument == 0x81: // TelephonyDataRecallLastNumberRequest
+ _childTemp, typeSwitchError = TelephonyDataRecallLastNumberRequestParse(readBuffer)
+ case commandType == TelephonyCommandType_EVENT && argument == 0x82: // TelephonyDataRejectIncomingCall
+ _childTemp, typeSwitchError = TelephonyDataRejectIncomingCallParse(readBuffer)
+ case commandType == TelephonyCommandType_EVENT && argument == 0x83: // TelephonyDataDivert
+ _childTemp, typeSwitchError = TelephonyDataDivertParse(readBuffer, commandTypeContainer)
+ case commandType == TelephonyCommandType_EVENT && argument == 0x84: // TelephonyDataClearDiversion
+ _childTemp, typeSwitchError = TelephonyDataClearDiversionParse(readBuffer)
+ default:
+ typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v, argument=%v]", commandType, argument)
+ }
+ if typeSwitchError != nil {
+ return nil, errors.Wrap(typeSwitchError, "Error parsing sub-type for type-switch of TelephonyData")
+ }
+ _child = _childTemp.(TelephonyDataChildSerializeRequirement)
+
+ if closeErr := readBuffer.CloseContext("TelephonyData"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyData")
+ }
+
+ // Finish initializing
+ _child.InitializeParent(_child, commandTypeContainer, argument)
+ return _child, nil
+}
+
+func (pm *_TelephonyData) SerializeParent(writeBuffer utils.WriteBuffer, child TelephonyData, serializeChildFunction func() error) error {
+ // We redirect all calls through client as some methods are only implemented there
+ m := child
+ _ = m
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("TelephonyData"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyData")
+ }
+
+ // Simple Field (commandTypeContainer)
+ if pushErr := writeBuffer.PushContext("commandTypeContainer"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for commandTypeContainer")
+ }
+ _commandTypeContainerErr := writeBuffer.WriteSerializable(m.GetCommandTypeContainer())
+ if popErr := writeBuffer.PopContext("commandTypeContainer"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for commandTypeContainer")
+ }
+ if _commandTypeContainerErr != nil {
+ return errors.Wrap(_commandTypeContainerErr, "Error serializing 'commandTypeContainer' field")
+ }
+ // Virtual field
+ if _commandTypeErr := writeBuffer.WriteVirtual("commandType", m.GetCommandType()); _commandTypeErr != nil {
+ return errors.Wrap(_commandTypeErr, "Error serializing 'commandType' field")
+ }
+
+ // Simple Field (argument)
+ argument := byte(m.GetArgument())
+ _argumentErr := writeBuffer.WriteByte("argument", (argument))
+ if _argumentErr != nil {
+ return errors.Wrap(_argumentErr, "Error serializing 'argument' field")
+ }
+
+ // Switch field (Depending on the discriminator values, passes the serialization to a sub-type)
+ if _typeSwitchErr := serializeChildFunction(); _typeSwitchErr != nil {
+ return errors.Wrap(_typeSwitchErr, "Error serializing sub-type field")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyData"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyData")
+ }
+ return nil
+}
+
+func (m *_TelephonyData) isTelephonyData() bool {
+ return true
+}
+
+func (m *_TelephonyData) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataClearDiversion.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataClearDiversion.go
new file mode 100644
index 000000000..895dccc8f
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataClearDiversion.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyDataClearDiversion is the corresponding interface of TelephonyDataClearDiversion
+type TelephonyDataClearDiversion interface {
+ utils.LengthAware
+ utils.Serializable
+ TelephonyData
+}
+
+// TelephonyDataClearDiversionExactly can be used when we want exactly this type and not a type which fulfills TelephonyDataClearDiversion.
+// This is useful for switch cases.
+type TelephonyDataClearDiversionExactly interface {
+ TelephonyDataClearDiversion
+ isTelephonyDataClearDiversion() bool
+}
+
+// _TelephonyDataClearDiversion is the data-structure of this message
+type _TelephonyDataClearDiversion struct {
+ *_TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_TelephonyDataClearDiversion) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_TelephonyDataClearDiversion) GetParent() TelephonyData {
+ return m._TelephonyData
+}
+
+// NewTelephonyDataClearDiversion factory function for _TelephonyDataClearDiversion
+func NewTelephonyDataClearDiversion(commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataClearDiversion {
+ _result := &_TelephonyDataClearDiversion{
+ _TelephonyData: NewTelephonyData(commandTypeContainer, argument),
+ }
+ _result._TelephonyData._TelephonyDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyDataClearDiversion(structType interface{}) TelephonyDataClearDiversion {
+ if casted, ok := structType.(TelephonyDataClearDiversion); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyDataClearDiversion); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyDataClearDiversion) GetTypeName() string {
+ return "TelephonyDataClearDiversion"
+}
+
+func (m *_TelephonyDataClearDiversion) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_TelephonyDataClearDiversion) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_TelephonyDataClearDiversion) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataClearDiversionParse(readBuffer utils.ReadBuffer) (TelephonyDataClearDiversion, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyDataClearDiversion"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyDataClearDiversion")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("TelephonyDataClearDiversion"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyDataClearDiversion")
+ }
+
+ // Create a partially initialized instance
+ _child := &_TelephonyDataClearDiversion{
+ _TelephonyData: &_TelephonyData{},
+ }
+ _child._TelephonyData._TelephonyDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_TelephonyDataClearDiversion) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("TelephonyDataClearDiversion"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyDataClearDiversion")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyDataClearDiversion"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyDataClearDiversion")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_TelephonyDataClearDiversion) isTelephonyDataClearDiversion() bool {
+ return true
+}
+
+func (m *_TelephonyDataClearDiversion) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataDialOutFailure.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataDialOutFailure.go
new file mode 100644
index 000000000..e2c9739a7
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataDialOutFailure.go
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyDataDialOutFailure is the corresponding interface of TelephonyDataDialOutFailure
+type TelephonyDataDialOutFailure interface {
+ utils.LengthAware
+ utils.Serializable
+ TelephonyData
+ // GetReason returns Reason (property field)
+ GetReason() DialInFailureReason
+}
+
+// TelephonyDataDialOutFailureExactly can be used when we want exactly this type and not a type which fulfills TelephonyDataDialOutFailure.
+// This is useful for switch cases.
+type TelephonyDataDialOutFailureExactly interface {
+ TelephonyDataDialOutFailure
+ isTelephonyDataDialOutFailure() bool
+}
+
+// _TelephonyDataDialOutFailure is the data-structure of this message
+type _TelephonyDataDialOutFailure struct {
+ *_TelephonyData
+ Reason DialInFailureReason
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_TelephonyDataDialOutFailure) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_TelephonyDataDialOutFailure) GetParent() TelephonyData {
+ return m._TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_TelephonyDataDialOutFailure) GetReason() DialInFailureReason {
+ return m.Reason
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewTelephonyDataDialOutFailure factory function for _TelephonyDataDialOutFailure
+func NewTelephonyDataDialOutFailure(reason DialInFailureReason, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataDialOutFailure {
+ _result := &_TelephonyDataDialOutFailure{
+ Reason: reason,
+ _TelephonyData: NewTelephonyData(commandTypeContainer, argument),
+ }
+ _result._TelephonyData._TelephonyDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyDataDialOutFailure(structType interface{}) TelephonyDataDialOutFailure {
+ if casted, ok := structType.(TelephonyDataDialOutFailure); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyDataDialOutFailure); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyDataDialOutFailure) GetTypeName() string {
+ return "TelephonyDataDialOutFailure"
+}
+
+func (m *_TelephonyDataDialOutFailure) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_TelephonyDataDialOutFailure) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (reason)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_TelephonyDataDialOutFailure) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataDialOutFailureParse(readBuffer utils.ReadBuffer) (TelephonyDataDialOutFailure, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyDataDialOutFailure"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyDataDialOutFailure")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (reason)
+ if pullErr := readBuffer.PullContext("reason"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for reason")
+ }
+ _reason, _reasonErr := DialInFailureReasonParse(readBuffer)
+ if _reasonErr != nil {
+ return nil, errors.Wrap(_reasonErr, "Error parsing 'reason' field of TelephonyDataDialOutFailure")
+ }
+ reason := _reason
+ if closeErr := readBuffer.CloseContext("reason"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for reason")
+ }
+
+ if closeErr := readBuffer.CloseContext("TelephonyDataDialOutFailure"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyDataDialOutFailure")
+ }
+
+ // Create a partially initialized instance
+ _child := &_TelephonyDataDialOutFailure{
+ Reason: reason,
+ _TelephonyData: &_TelephonyData{},
+ }
+ _child._TelephonyData._TelephonyDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_TelephonyDataDialOutFailure) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("TelephonyDataDialOutFailure"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyDataDialOutFailure")
+ }
+
+ // Simple Field (reason)
+ if pushErr := writeBuffer.PushContext("reason"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for reason")
+ }
+ _reasonErr := writeBuffer.WriteSerializable(m.GetReason())
+ if popErr := writeBuffer.PopContext("reason"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for reason")
+ }
+ if _reasonErr != nil {
+ return errors.Wrap(_reasonErr, "Error serializing 'reason' field")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyDataDialOutFailure"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyDataDialOutFailure")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_TelephonyDataDialOutFailure) isTelephonyDataDialOutFailure() bool {
+ return true
+}
+
+func (m *_TelephonyDataDialOutFailure) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataDivert.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataDivert.go
new file mode 100644
index 000000000..b6284c337
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataDivert.go
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyDataDivert is the corresponding interface of TelephonyDataDivert
+type TelephonyDataDivert interface {
+ utils.LengthAware
+ utils.Serializable
+ TelephonyData
+ // GetNumber returns Number (property field)
+ GetNumber() string
+}
+
+// TelephonyDataDivertExactly can be used when we want exactly this type and not a type which fulfills TelephonyDataDivert.
+// This is useful for switch cases.
+type TelephonyDataDivertExactly interface {
+ TelephonyDataDivert
+ isTelephonyDataDivert() bool
+}
+
+// _TelephonyDataDivert is the data-structure of this message
+type _TelephonyDataDivert struct {
+ *_TelephonyData
+ Number string
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_TelephonyDataDivert) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_TelephonyDataDivert) GetParent() TelephonyData {
+ return m._TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_TelephonyDataDivert) GetNumber() string {
+ return m.Number
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewTelephonyDataDivert factory function for _TelephonyDataDivert
+func NewTelephonyDataDivert(number string, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataDivert {
+ _result := &_TelephonyDataDivert{
+ Number: number,
+ _TelephonyData: NewTelephonyData(commandTypeContainer, argument),
+ }
+ _result._TelephonyData._TelephonyDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyDataDivert(structType interface{}) TelephonyDataDivert {
+ if casted, ok := structType.(TelephonyDataDivert); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyDataDivert); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyDataDivert) GetTypeName() string {
+ return "TelephonyDataDivert"
+}
+
+func (m *_TelephonyDataDivert) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_TelephonyDataDivert) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (number)
+ lengthInBits += uint16(int32(int32(int32(m.GetCommandTypeContainer().NumBytes())-int32(int32(1)))) * int32(int32(8)))
+
+ return lengthInBits
+}
+
+func (m *_TelephonyDataDivert) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataDivertParse(readBuffer utils.ReadBuffer, commandTypeContainer TelephonyCommandTypeContainer) (TelephonyDataDivert, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyDataDivert"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyDataDivert")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (number)
+ _number, _numberErr := readBuffer.ReadString("number", uint32(((commandTypeContainer.NumBytes())-(1))*(8)))
+ if _numberErr != nil {
+ return nil, errors.Wrap(_numberErr, "Error parsing 'number' field of TelephonyDataDivert")
+ }
+ number := _number
+
+ if closeErr := readBuffer.CloseContext("TelephonyDataDivert"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyDataDivert")
+ }
+
+ // Create a partially initialized instance
+ _child := &_TelephonyDataDivert{
+ Number: number,
+ _TelephonyData: &_TelephonyData{},
+ }
+ _child._TelephonyData._TelephonyDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_TelephonyDataDivert) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("TelephonyDataDivert"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyDataDivert")
+ }
+
+ // Simple Field (number)
+ number := string(m.GetNumber())
+ _numberErr := writeBuffer.WriteString("number", uint32(((m.GetCommandTypeContainer().NumBytes())-(1))*(8)), "UTF-8", (number))
+ if _numberErr != nil {
+ return errors.Wrap(_numberErr, "Error serializing 'number' field")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyDataDivert"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyDataDivert")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_TelephonyDataDivert) isTelephonyDataDivert() bool {
+ return true
+}
+
+func (m *_TelephonyDataDivert) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataInternetConnectionRequestMade.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataInternetConnectionRequestMade.go
new file mode 100644
index 000000000..ccf67a334
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataInternetConnectionRequestMade.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyDataInternetConnectionRequestMade is the corresponding interface of TelephonyDataInternetConnectionRequestMade
+type TelephonyDataInternetConnectionRequestMade interface {
+ utils.LengthAware
+ utils.Serializable
+ TelephonyData
+}
+
+// TelephonyDataInternetConnectionRequestMadeExactly can be used when we want exactly this type and not a type which fulfills TelephonyDataInternetConnectionRequestMade.
+// This is useful for switch cases.
+type TelephonyDataInternetConnectionRequestMadeExactly interface {
+ TelephonyDataInternetConnectionRequestMade
+ isTelephonyDataInternetConnectionRequestMade() bool
+}
+
+// _TelephonyDataInternetConnectionRequestMade is the data-structure of this message
+type _TelephonyDataInternetConnectionRequestMade struct {
+ *_TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_TelephonyDataInternetConnectionRequestMade) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_TelephonyDataInternetConnectionRequestMade) GetParent() TelephonyData {
+ return m._TelephonyData
+}
+
+// NewTelephonyDataInternetConnectionRequestMade factory function for _TelephonyDataInternetConnectionRequestMade
+func NewTelephonyDataInternetConnectionRequestMade(commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataInternetConnectionRequestMade {
+ _result := &_TelephonyDataInternetConnectionRequestMade{
+ _TelephonyData: NewTelephonyData(commandTypeContainer, argument),
+ }
+ _result._TelephonyData._TelephonyDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyDataInternetConnectionRequestMade(structType interface{}) TelephonyDataInternetConnectionRequestMade {
+ if casted, ok := structType.(TelephonyDataInternetConnectionRequestMade); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyDataInternetConnectionRequestMade); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyDataInternetConnectionRequestMade) GetTypeName() string {
+ return "TelephonyDataInternetConnectionRequestMade"
+}
+
+func (m *_TelephonyDataInternetConnectionRequestMade) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_TelephonyDataInternetConnectionRequestMade) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_TelephonyDataInternetConnectionRequestMade) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataInternetConnectionRequestMadeParse(readBuffer utils.ReadBuffer) (TelephonyDataInternetConnectionRequestMade, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyDataInternetConnectionRequestMade"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyDataInternetConnectionRequestMade")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("TelephonyDataInternetConnectionRequestMade"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyDataInternetConnectionRequestMade")
+ }
+
+ // Create a partially initialized instance
+ _child := &_TelephonyDataInternetConnectionRequestMade{
+ _TelephonyData: &_TelephonyData{},
+ }
+ _child._TelephonyData._TelephonyDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_TelephonyDataInternetConnectionRequestMade) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("TelephonyDataInternetConnectionRequestMade"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyDataInternetConnectionRequestMade")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyDataInternetConnectionRequestMade"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyDataInternetConnectionRequestMade")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_TelephonyDataInternetConnectionRequestMade) isTelephonyDataInternetConnectionRequestMade() bool {
+ return true
+}
+
+func (m *_TelephonyDataInternetConnectionRequestMade) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataIsolateSecondaryOutlet.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataIsolateSecondaryOutlet.go
new file mode 100644
index 000000000..31c6ff825
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataIsolateSecondaryOutlet.go
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyDataIsolateSecondaryOutlet is the corresponding interface of TelephonyDataIsolateSecondaryOutlet
+type TelephonyDataIsolateSecondaryOutlet interface {
+ utils.LengthAware
+ utils.Serializable
+ TelephonyData
+ // GetIsolateStatus returns IsolateStatus (property field)
+ GetIsolateStatus() byte
+ // GetIsBehaveNormal returns IsBehaveNormal (virtual field)
+ GetIsBehaveNormal() bool
+ // GetIsToBeIsolated returns IsToBeIsolated (virtual field)
+ GetIsToBeIsolated() bool
+}
+
+// TelephonyDataIsolateSecondaryOutletExactly can be used when we want exactly this type and not a type which fulfills TelephonyDataIsolateSecondaryOutlet.
+// This is useful for switch cases.
+type TelephonyDataIsolateSecondaryOutletExactly interface {
+ TelephonyDataIsolateSecondaryOutlet
+ isTelephonyDataIsolateSecondaryOutlet() bool
+}
+
+// _TelephonyDataIsolateSecondaryOutlet is the data-structure of this message
+type _TelephonyDataIsolateSecondaryOutlet struct {
+ *_TelephonyData
+ IsolateStatus byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) GetParent() TelephonyData {
+ return m._TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) GetIsolateStatus() byte {
+ return m.IsolateStatus
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) GetIsBehaveNormal() bool {
+ return bool(bool((m.GetIsolateStatus()) == (0x00)))
+}
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) GetIsToBeIsolated() bool {
+ return bool(bool((m.GetIsolateStatus()) == (0x01)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewTelephonyDataIsolateSecondaryOutlet factory function for _TelephonyDataIsolateSecondaryOutlet
+func NewTelephonyDataIsolateSecondaryOutlet(isolateStatus byte, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataIsolateSecondaryOutlet {
+ _result := &_TelephonyDataIsolateSecondaryOutlet{
+ IsolateStatus: isolateStatus,
+ _TelephonyData: NewTelephonyData(commandTypeContainer, argument),
+ }
+ _result._TelephonyData._TelephonyDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyDataIsolateSecondaryOutlet(structType interface{}) TelephonyDataIsolateSecondaryOutlet {
+ if casted, ok := structType.(TelephonyDataIsolateSecondaryOutlet); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyDataIsolateSecondaryOutlet); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) GetTypeName() string {
+ return "TelephonyDataIsolateSecondaryOutlet"
+}
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (isolateStatus)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataIsolateSecondaryOutletParse(readBuffer utils.ReadBuffer) (TelephonyDataIsolateSecondaryOutlet, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyDataIsolateSecondaryOutlet"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyDataIsolateSecondaryOutlet")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (isolateStatus)
+ _isolateStatus, _isolateStatusErr := readBuffer.ReadByte("isolateStatus")
+ if _isolateStatusErr != nil {
+ return nil, errors.Wrap(_isolateStatusErr, "Error parsing 'isolateStatus' field of TelephonyDataIsolateSecondaryOutlet")
+ }
+ isolateStatus := _isolateStatus
+
+ // Virtual field
+ _isBehaveNormal := bool((isolateStatus) == (0x00))
+ isBehaveNormal := bool(_isBehaveNormal)
+ _ = isBehaveNormal
+
+ // Virtual field
+ _isToBeIsolated := bool((isolateStatus) == (0x01))
+ isToBeIsolated := bool(_isToBeIsolated)
+ _ = isToBeIsolated
+
+ if closeErr := readBuffer.CloseContext("TelephonyDataIsolateSecondaryOutlet"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyDataIsolateSecondaryOutlet")
+ }
+
+ // Create a partially initialized instance
+ _child := &_TelephonyDataIsolateSecondaryOutlet{
+ IsolateStatus: isolateStatus,
+ _TelephonyData: &_TelephonyData{},
+ }
+ _child._TelephonyData._TelephonyDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("TelephonyDataIsolateSecondaryOutlet"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyDataIsolateSecondaryOutlet")
+ }
+
+ // Simple Field (isolateStatus)
+ isolateStatus := byte(m.GetIsolateStatus())
+ _isolateStatusErr := writeBuffer.WriteByte("isolateStatus", (isolateStatus))
+ if _isolateStatusErr != nil {
+ return errors.Wrap(_isolateStatusErr, "Error serializing 'isolateStatus' field")
+ }
+ // Virtual field
+ if _isBehaveNormalErr := writeBuffer.WriteVirtual("isBehaveNormal", m.GetIsBehaveNormal()); _isBehaveNormalErr != nil {
+ return errors.Wrap(_isBehaveNormalErr, "Error serializing 'isBehaveNormal' field")
+ }
+ // Virtual field
+ if _isToBeIsolatedErr := writeBuffer.WriteVirtual("isToBeIsolated", m.GetIsToBeIsolated()); _isToBeIsolatedErr != nil {
+ return errors.Wrap(_isToBeIsolatedErr, "Error serializing 'isToBeIsolated' field")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyDataIsolateSecondaryOutlet"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyDataIsolateSecondaryOutlet")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) isTelephonyDataIsolateSecondaryOutlet() bool {
+ return true
+}
+
+func (m *_TelephonyDataIsolateSecondaryOutlet) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOffHook.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOffHook.go
new file mode 100644
index 000000000..dfa34560a
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOffHook.go
@@ -0,0 +1,228 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyDataLineOffHook is the corresponding interface of TelephonyDataLineOffHook
+type TelephonyDataLineOffHook interface {
+ utils.LengthAware
+ utils.Serializable
+ TelephonyData
+ // GetReason returns Reason (property field)
+ GetReason() LineOffHookReason
+ // GetNumber returns Number (property field)
+ GetNumber() string
+}
+
+// TelephonyDataLineOffHookExactly can be used when we want exactly this type and not a type which fulfills TelephonyDataLineOffHook.
+// This is useful for switch cases.
+type TelephonyDataLineOffHookExactly interface {
+ TelephonyDataLineOffHook
+ isTelephonyDataLineOffHook() bool
+}
+
+// _TelephonyDataLineOffHook is the data-structure of this message
+type _TelephonyDataLineOffHook struct {
+ *_TelephonyData
+ Reason LineOffHookReason
+ Number string
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_TelephonyDataLineOffHook) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_TelephonyDataLineOffHook) GetParent() TelephonyData {
+ return m._TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_TelephonyDataLineOffHook) GetReason() LineOffHookReason {
+ return m.Reason
+}
+
+func (m *_TelephonyDataLineOffHook) GetNumber() string {
+ return m.Number
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewTelephonyDataLineOffHook factory function for _TelephonyDataLineOffHook
+func NewTelephonyDataLineOffHook(reason LineOffHookReason, number string, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataLineOffHook {
+ _result := &_TelephonyDataLineOffHook{
+ Reason: reason,
+ Number: number,
+ _TelephonyData: NewTelephonyData(commandTypeContainer, argument),
+ }
+ _result._TelephonyData._TelephonyDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyDataLineOffHook(structType interface{}) TelephonyDataLineOffHook {
+ if casted, ok := structType.(TelephonyDataLineOffHook); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyDataLineOffHook); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyDataLineOffHook) GetTypeName() string {
+ return "TelephonyDataLineOffHook"
+}
+
+func (m *_TelephonyDataLineOffHook) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_TelephonyDataLineOffHook) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (reason)
+ lengthInBits += 8
+
+ // Simple field (number)
+ lengthInBits += uint16(int32(int32(int32(m.GetCommandTypeContainer().NumBytes())-int32(int32(2)))) * int32(int32(8)))
+
+ return lengthInBits
+}
+
+func (m *_TelephonyDataLineOffHook) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataLineOffHookParse(readBuffer utils.ReadBuffer, commandTypeContainer TelephonyCommandTypeContainer) (TelephonyDataLineOffHook, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyDataLineOffHook"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyDataLineOffHook")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (reason)
+ if pullErr := readBuffer.PullContext("reason"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for reason")
+ }
+ _reason, _reasonErr := LineOffHookReasonParse(readBuffer)
+ if _reasonErr != nil {
+ return nil, errors.Wrap(_reasonErr, "Error parsing 'reason' field of TelephonyDataLineOffHook")
+ }
+ reason := _reason
+ if closeErr := readBuffer.CloseContext("reason"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for reason")
+ }
+
+ // Simple Field (number)
+ _number, _numberErr := readBuffer.ReadString("number", uint32(((commandTypeContainer.NumBytes())-(2))*(8)))
+ if _numberErr != nil {
+ return nil, errors.Wrap(_numberErr, "Error parsing 'number' field of TelephonyDataLineOffHook")
+ }
+ number := _number
+
+ if closeErr := readBuffer.CloseContext("TelephonyDataLineOffHook"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyDataLineOffHook")
+ }
+
+ // Create a partially initialized instance
+ _child := &_TelephonyDataLineOffHook{
+ Reason: reason,
+ Number: number,
+ _TelephonyData: &_TelephonyData{},
+ }
+ _child._TelephonyData._TelephonyDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_TelephonyDataLineOffHook) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("TelephonyDataLineOffHook"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyDataLineOffHook")
+ }
+
+ // Simple Field (reason)
+ if pushErr := writeBuffer.PushContext("reason"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for reason")
+ }
+ _reasonErr := writeBuffer.WriteSerializable(m.GetReason())
+ if popErr := writeBuffer.PopContext("reason"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for reason")
+ }
+ if _reasonErr != nil {
+ return errors.Wrap(_reasonErr, "Error serializing 'reason' field")
+ }
+
+ // Simple Field (number)
+ number := string(m.GetNumber())
+ _numberErr := writeBuffer.WriteString("number", uint32(((m.GetCommandTypeContainer().NumBytes())-(2))*(8)), "UTF-8", (number))
+ if _numberErr != nil {
+ return errors.Wrap(_numberErr, "Error serializing 'number' field")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyDataLineOffHook"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyDataLineOffHook")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_TelephonyDataLineOffHook) isTelephonyDataLineOffHook() bool {
+ return true
+}
+
+func (m *_TelephonyDataLineOffHook) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOnHook.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOnHook.go
new file mode 100644
index 000000000..b6887a83d
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOnHook.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyDataLineOnHook is the corresponding interface of TelephonyDataLineOnHook
+type TelephonyDataLineOnHook interface {
+ utils.LengthAware
+ utils.Serializable
+ TelephonyData
+}
+
+// TelephonyDataLineOnHookExactly can be used when we want exactly this type and not a type which fulfills TelephonyDataLineOnHook.
+// This is useful for switch cases.
+type TelephonyDataLineOnHookExactly interface {
+ TelephonyDataLineOnHook
+ isTelephonyDataLineOnHook() bool
+}
+
+// _TelephonyDataLineOnHook is the data-structure of this message
+type _TelephonyDataLineOnHook struct {
+ *_TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_TelephonyDataLineOnHook) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_TelephonyDataLineOnHook) GetParent() TelephonyData {
+ return m._TelephonyData
+}
+
+// NewTelephonyDataLineOnHook factory function for _TelephonyDataLineOnHook
+func NewTelephonyDataLineOnHook(commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataLineOnHook {
+ _result := &_TelephonyDataLineOnHook{
+ _TelephonyData: NewTelephonyData(commandTypeContainer, argument),
+ }
+ _result._TelephonyData._TelephonyDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyDataLineOnHook(structType interface{}) TelephonyDataLineOnHook {
+ if casted, ok := structType.(TelephonyDataLineOnHook); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyDataLineOnHook); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyDataLineOnHook) GetTypeName() string {
+ return "TelephonyDataLineOnHook"
+}
+
+func (m *_TelephonyDataLineOnHook) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_TelephonyDataLineOnHook) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_TelephonyDataLineOnHook) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataLineOnHookParse(readBuffer utils.ReadBuffer) (TelephonyDataLineOnHook, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyDataLineOnHook"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyDataLineOnHook")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("TelephonyDataLineOnHook"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyDataLineOnHook")
+ }
+
+ // Create a partially initialized instance
+ _child := &_TelephonyDataLineOnHook{
+ _TelephonyData: &_TelephonyData{},
+ }
+ _child._TelephonyData._TelephonyDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_TelephonyDataLineOnHook) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("TelephonyDataLineOnHook"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyDataLineOnHook")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyDataLineOnHook"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyDataLineOnHook")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_TelephonyDataLineOnHook) isTelephonyDataLineOnHook() bool {
+ return true
+}
+
+func (m *_TelephonyDataLineOnHook) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumber.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumber.go
new file mode 100644
index 000000000..598849142
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumber.go
@@ -0,0 +1,260 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyDataRecallLastNumber is the corresponding interface of TelephonyDataRecallLastNumber
+type TelephonyDataRecallLastNumber interface {
+ utils.LengthAware
+ utils.Serializable
+ TelephonyData
+ // GetRecallLastNumberType returns RecallLastNumberType (property field)
+ GetRecallLastNumberType() byte
+ // GetNumber returns Number (property field)
+ GetNumber() string
+ // GetIsNumberOfLastOutgoingCall returns IsNumberOfLastOutgoingCall (virtual field)
+ GetIsNumberOfLastOutgoingCall() bool
+ // GetIsNumberOfLastIncomingCall returns IsNumberOfLastIncomingCall (virtual field)
+ GetIsNumberOfLastIncomingCall() bool
+}
+
+// TelephonyDataRecallLastNumberExactly can be used when we want exactly this type and not a type which fulfills TelephonyDataRecallLastNumber.
+// This is useful for switch cases.
+type TelephonyDataRecallLastNumberExactly interface {
+ TelephonyDataRecallLastNumber
+ isTelephonyDataRecallLastNumber() bool
+}
+
+// _TelephonyDataRecallLastNumber is the data-structure of this message
+type _TelephonyDataRecallLastNumber struct {
+ *_TelephonyData
+ RecallLastNumberType byte
+ Number string
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_TelephonyDataRecallLastNumber) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_TelephonyDataRecallLastNumber) GetParent() TelephonyData {
+ return m._TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_TelephonyDataRecallLastNumber) GetRecallLastNumberType() byte {
+ return m.RecallLastNumberType
+}
+
+func (m *_TelephonyDataRecallLastNumber) GetNumber() string {
+ return m.Number
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_TelephonyDataRecallLastNumber) GetIsNumberOfLastOutgoingCall() bool {
+ return bool(bool((m.GetRecallLastNumberType()) == (0x01)))
+}
+
+func (m *_TelephonyDataRecallLastNumber) GetIsNumberOfLastIncomingCall() bool {
+ return bool(bool((m.GetRecallLastNumberType()) == (0x02)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewTelephonyDataRecallLastNumber factory function for _TelephonyDataRecallLastNumber
+func NewTelephonyDataRecallLastNumber(recallLastNumberType byte, number string, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataRecallLastNumber {
+ _result := &_TelephonyDataRecallLastNumber{
+ RecallLastNumberType: recallLastNumberType,
+ Number: number,
+ _TelephonyData: NewTelephonyData(commandTypeContainer, argument),
+ }
+ _result._TelephonyData._TelephonyDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyDataRecallLastNumber(structType interface{}) TelephonyDataRecallLastNumber {
+ if casted, ok := structType.(TelephonyDataRecallLastNumber); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyDataRecallLastNumber); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyDataRecallLastNumber) GetTypeName() string {
+ return "TelephonyDataRecallLastNumber"
+}
+
+func (m *_TelephonyDataRecallLastNumber) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_TelephonyDataRecallLastNumber) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (recallLastNumberType)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // Simple field (number)
+ lengthInBits += uint16(int32(int32(int32(m.GetCommandTypeContainer().NumBytes())-int32(int32(2)))) * int32(int32(8)))
+
+ return lengthInBits
+}
+
+func (m *_TelephonyDataRecallLastNumber) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataRecallLastNumberParse(readBuffer utils.ReadBuffer, commandTypeContainer TelephonyCommandTypeContainer) (TelephonyDataRecallLastNumber, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyDataRecallLastNumber"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyDataRecallLastNumber")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (recallLastNumberType)
+ _recallLastNumberType, _recallLastNumberTypeErr := readBuffer.ReadByte("recallLastNumberType")
+ if _recallLastNumberTypeErr != nil {
+ return nil, errors.Wrap(_recallLastNumberTypeErr, "Error parsing 'recallLastNumberType' field of TelephonyDataRecallLastNumber")
+ }
+ recallLastNumberType := _recallLastNumberType
+
+ // Virtual field
+ _isNumberOfLastOutgoingCall := bool((recallLastNumberType) == (0x01))
+ isNumberOfLastOutgoingCall := bool(_isNumberOfLastOutgoingCall)
+ _ = isNumberOfLastOutgoingCall
+
+ // Virtual field
+ _isNumberOfLastIncomingCall := bool((recallLastNumberType) == (0x02))
+ isNumberOfLastIncomingCall := bool(_isNumberOfLastIncomingCall)
+ _ = isNumberOfLastIncomingCall
+
+ // Simple Field (number)
+ _number, _numberErr := readBuffer.ReadString("number", uint32(((commandTypeContainer.NumBytes())-(2))*(8)))
+ if _numberErr != nil {
+ return nil, errors.Wrap(_numberErr, "Error parsing 'number' field of TelephonyDataRecallLastNumber")
+ }
+ number := _number
+
+ if closeErr := readBuffer.CloseContext("TelephonyDataRecallLastNumber"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyDataRecallLastNumber")
+ }
+
+ // Create a partially initialized instance
+ _child := &_TelephonyDataRecallLastNumber{
+ RecallLastNumberType: recallLastNumberType,
+ Number: number,
+ _TelephonyData: &_TelephonyData{},
+ }
+ _child._TelephonyData._TelephonyDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_TelephonyDataRecallLastNumber) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("TelephonyDataRecallLastNumber"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyDataRecallLastNumber")
+ }
+
+ // Simple Field (recallLastNumberType)
+ recallLastNumberType := byte(m.GetRecallLastNumberType())
+ _recallLastNumberTypeErr := writeBuffer.WriteByte("recallLastNumberType", (recallLastNumberType))
+ if _recallLastNumberTypeErr != nil {
+ return errors.Wrap(_recallLastNumberTypeErr, "Error serializing 'recallLastNumberType' field")
+ }
+ // Virtual field
+ if _isNumberOfLastOutgoingCallErr := writeBuffer.WriteVirtual("isNumberOfLastOutgoingCall", m.GetIsNumberOfLastOutgoingCall()); _isNumberOfLastOutgoingCallErr != nil {
+ return errors.Wrap(_isNumberOfLastOutgoingCallErr, "Error serializing 'isNumberOfLastOutgoingCall' field")
+ }
+ // Virtual field
+ if _isNumberOfLastIncomingCallErr := writeBuffer.WriteVirtual("isNumberOfLastIncomingCall", m.GetIsNumberOfLastIncomingCall()); _isNumberOfLastIncomingCallErr != nil {
+ return errors.Wrap(_isNumberOfLastIncomingCallErr, "Error serializing 'isNumberOfLastIncomingCall' field")
+ }
+
+ // Simple Field (number)
+ number := string(m.GetNumber())
+ _numberErr := writeBuffer.WriteString("number", uint32(((m.GetCommandTypeContainer().NumBytes())-(2))*(8)), "UTF-8", (number))
+ if _numberErr != nil {
+ return errors.Wrap(_numberErr, "Error serializing 'number' field")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyDataRecallLastNumber"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyDataRecallLastNumber")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_TelephonyDataRecallLastNumber) isTelephonyDataRecallLastNumber() bool {
+ return true
+}
+
+func (m *_TelephonyDataRecallLastNumber) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumberRequest.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumberRequest.go
new file mode 100644
index 000000000..85dd984eb
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumberRequest.go
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyDataRecallLastNumberRequest is the corresponding interface of TelephonyDataRecallLastNumberRequest
+type TelephonyDataRecallLastNumberRequest interface {
+ utils.LengthAware
+ utils.Serializable
+ TelephonyData
+ // GetRecallLastNumberType returns RecallLastNumberType (property field)
+ GetRecallLastNumberType() byte
+ // GetIsNumberOfLastOutgoingCall returns IsNumberOfLastOutgoingCall (virtual field)
+ GetIsNumberOfLastOutgoingCall() bool
+ // GetIsNumberOfLastIncomingCall returns IsNumberOfLastIncomingCall (virtual field)
+ GetIsNumberOfLastIncomingCall() bool
+}
+
+// TelephonyDataRecallLastNumberRequestExactly can be used when we want exactly this type and not a type which fulfills TelephonyDataRecallLastNumberRequest.
+// This is useful for switch cases.
+type TelephonyDataRecallLastNumberRequestExactly interface {
+ TelephonyDataRecallLastNumberRequest
+ isTelephonyDataRecallLastNumberRequest() bool
+}
+
+// _TelephonyDataRecallLastNumberRequest is the data-structure of this message
+type _TelephonyDataRecallLastNumberRequest struct {
+ *_TelephonyData
+ RecallLastNumberType byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_TelephonyDataRecallLastNumberRequest) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_TelephonyDataRecallLastNumberRequest) GetParent() TelephonyData {
+ return m._TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_TelephonyDataRecallLastNumberRequest) GetRecallLastNumberType() byte {
+ return m.RecallLastNumberType
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_TelephonyDataRecallLastNumberRequest) GetIsNumberOfLastOutgoingCall() bool {
+ return bool(bool((m.GetRecallLastNumberType()) == (0x01)))
+}
+
+func (m *_TelephonyDataRecallLastNumberRequest) GetIsNumberOfLastIncomingCall() bool {
+ return bool(bool((m.GetRecallLastNumberType()) == (0x02)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewTelephonyDataRecallLastNumberRequest factory function for _TelephonyDataRecallLastNumberRequest
+func NewTelephonyDataRecallLastNumberRequest(recallLastNumberType byte, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataRecallLastNumberRequest {
+ _result := &_TelephonyDataRecallLastNumberRequest{
+ RecallLastNumberType: recallLastNumberType,
+ _TelephonyData: NewTelephonyData(commandTypeContainer, argument),
+ }
+ _result._TelephonyData._TelephonyDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyDataRecallLastNumberRequest(structType interface{}) TelephonyDataRecallLastNumberRequest {
+ if casted, ok := structType.(TelephonyDataRecallLastNumberRequest); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyDataRecallLastNumberRequest); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyDataRecallLastNumberRequest) GetTypeName() string {
+ return "TelephonyDataRecallLastNumberRequest"
+}
+
+func (m *_TelephonyDataRecallLastNumberRequest) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_TelephonyDataRecallLastNumberRequest) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (recallLastNumberType)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_TelephonyDataRecallLastNumberRequest) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataRecallLastNumberRequestParse(readBuffer utils.ReadBuffer) (TelephonyDataRecallLastNumberRequest, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyDataRecallLastNumberRequest"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyDataRecallLastNumberRequest")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (recallLastNumberType)
+ _recallLastNumberType, _recallLastNumberTypeErr := readBuffer.ReadByte("recallLastNumberType")
+ if _recallLastNumberTypeErr != nil {
+ return nil, errors.Wrap(_recallLastNumberTypeErr, "Error parsing 'recallLastNumberType' field of TelephonyDataRecallLastNumberRequest")
+ }
+ recallLastNumberType := _recallLastNumberType
+
+ // Virtual field
+ _isNumberOfLastOutgoingCall := bool((recallLastNumberType) == (0x01))
+ isNumberOfLastOutgoingCall := bool(_isNumberOfLastOutgoingCall)
+ _ = isNumberOfLastOutgoingCall
+
+ // Virtual field
+ _isNumberOfLastIncomingCall := bool((recallLastNumberType) == (0x02))
+ isNumberOfLastIncomingCall := bool(_isNumberOfLastIncomingCall)
+ _ = isNumberOfLastIncomingCall
+
+ if closeErr := readBuffer.CloseContext("TelephonyDataRecallLastNumberRequest"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyDataRecallLastNumberRequest")
+ }
+
+ // Create a partially initialized instance
+ _child := &_TelephonyDataRecallLastNumberRequest{
+ RecallLastNumberType: recallLastNumberType,
+ _TelephonyData: &_TelephonyData{},
+ }
+ _child._TelephonyData._TelephonyDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_TelephonyDataRecallLastNumberRequest) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("TelephonyDataRecallLastNumberRequest"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyDataRecallLastNumberRequest")
+ }
+
+ // Simple Field (recallLastNumberType)
+ recallLastNumberType := byte(m.GetRecallLastNumberType())
+ _recallLastNumberTypeErr := writeBuffer.WriteByte("recallLastNumberType", (recallLastNumberType))
+ if _recallLastNumberTypeErr != nil {
+ return errors.Wrap(_recallLastNumberTypeErr, "Error serializing 'recallLastNumberType' field")
+ }
+ // Virtual field
+ if _isNumberOfLastOutgoingCallErr := writeBuffer.WriteVirtual("isNumberOfLastOutgoingCall", m.GetIsNumberOfLastOutgoingCall()); _isNumberOfLastOutgoingCallErr != nil {
+ return errors.Wrap(_isNumberOfLastOutgoingCallErr, "Error serializing 'isNumberOfLastOutgoingCall' field")
+ }
+ // Virtual field
+ if _isNumberOfLastIncomingCallErr := writeBuffer.WriteVirtual("isNumberOfLastIncomingCall", m.GetIsNumberOfLastIncomingCall()); _isNumberOfLastIncomingCallErr != nil {
+ return errors.Wrap(_isNumberOfLastIncomingCallErr, "Error serializing 'isNumberOfLastIncomingCall' field")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyDataRecallLastNumberRequest"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyDataRecallLastNumberRequest")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_TelephonyDataRecallLastNumberRequest) isTelephonyDataRecallLastNumberRequest() bool {
+ return true
+}
+
+func (m *_TelephonyDataRecallLastNumberRequest) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRejectIncomingCall.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRejectIncomingCall.go
new file mode 100644
index 000000000..519b4a23e
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRejectIncomingCall.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyDataRejectIncomingCall is the corresponding interface of TelephonyDataRejectIncomingCall
+type TelephonyDataRejectIncomingCall interface {
+ utils.LengthAware
+ utils.Serializable
+ TelephonyData
+}
+
+// TelephonyDataRejectIncomingCallExactly can be used when we want exactly this type and not a type which fulfills TelephonyDataRejectIncomingCall.
+// This is useful for switch cases.
+type TelephonyDataRejectIncomingCallExactly interface {
+ TelephonyDataRejectIncomingCall
+ isTelephonyDataRejectIncomingCall() bool
+}
+
+// _TelephonyDataRejectIncomingCall is the data-structure of this message
+type _TelephonyDataRejectIncomingCall struct {
+ *_TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_TelephonyDataRejectIncomingCall) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_TelephonyDataRejectIncomingCall) GetParent() TelephonyData {
+ return m._TelephonyData
+}
+
+// NewTelephonyDataRejectIncomingCall factory function for _TelephonyDataRejectIncomingCall
+func NewTelephonyDataRejectIncomingCall(commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataRejectIncomingCall {
+ _result := &_TelephonyDataRejectIncomingCall{
+ _TelephonyData: NewTelephonyData(commandTypeContainer, argument),
+ }
+ _result._TelephonyData._TelephonyDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyDataRejectIncomingCall(structType interface{}) TelephonyDataRejectIncomingCall {
+ if casted, ok := structType.(TelephonyDataRejectIncomingCall); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyDataRejectIncomingCall); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyDataRejectIncomingCall) GetTypeName() string {
+ return "TelephonyDataRejectIncomingCall"
+}
+
+func (m *_TelephonyDataRejectIncomingCall) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_TelephonyDataRejectIncomingCall) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_TelephonyDataRejectIncomingCall) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataRejectIncomingCallParse(readBuffer utils.ReadBuffer) (TelephonyDataRejectIncomingCall, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyDataRejectIncomingCall"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyDataRejectIncomingCall")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("TelephonyDataRejectIncomingCall"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyDataRejectIncomingCall")
+ }
+
+ // Create a partially initialized instance
+ _child := &_TelephonyDataRejectIncomingCall{
+ _TelephonyData: &_TelephonyData{},
+ }
+ _child._TelephonyData._TelephonyDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_TelephonyDataRejectIncomingCall) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("TelephonyDataRejectIncomingCall"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyDataRejectIncomingCall")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyDataRejectIncomingCall"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyDataRejectIncomingCall")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_TelephonyDataRejectIncomingCall) isTelephonyDataRejectIncomingCall() bool {
+ return true
+}
+
+func (m *_TelephonyDataRejectIncomingCall) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRinging.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRinging.go
new file mode 100644
index 000000000..037b1af1c
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRinging.go
@@ -0,0 +1,217 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// TelephonyDataRinging is the corresponding interface of TelephonyDataRinging
+type TelephonyDataRinging interface {
+ utils.LengthAware
+ utils.Serializable
+ TelephonyData
+ // GetNumber returns Number (property field)
+ GetNumber() string
+}
+
+// TelephonyDataRingingExactly can be used when we want exactly this type and not a type which fulfills TelephonyDataRinging.
+// This is useful for switch cases.
+type TelephonyDataRingingExactly interface {
+ TelephonyDataRinging
+ isTelephonyDataRinging() bool
+}
+
+// _TelephonyDataRinging is the data-structure of this message
+type _TelephonyDataRinging struct {
+ *_TelephonyData
+ Number string
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_TelephonyDataRinging) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.Argument = argument
+}
+
+func (m *_TelephonyDataRinging) GetParent() TelephonyData {
+ return m._TelephonyData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_TelephonyDataRinging) GetNumber() string {
+ return m.Number
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewTelephonyDataRinging factory function for _TelephonyDataRinging
+func NewTelephonyDataRinging(number string, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataRinging {
+ _result := &_TelephonyDataRinging{
+ Number: number,
+ _TelephonyData: NewTelephonyData(commandTypeContainer, argument),
+ }
+ _result._TelephonyData._TelephonyDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastTelephonyDataRinging(structType interface{}) TelephonyDataRinging {
+ if casted, ok := structType.(TelephonyDataRinging); ok {
+ return casted
+ }
+ if casted, ok := structType.(*TelephonyDataRinging); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_TelephonyDataRinging) GetTypeName() string {
+ return "TelephonyDataRinging"
+}
+
+func (m *_TelephonyDataRinging) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_TelephonyDataRinging) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Reserved Field (reserved)
+ lengthInBits += 8
+
+ // Simple field (number)
+ lengthInBits += uint16(int32(int32(int32(m.GetCommandTypeContainer().NumBytes())-int32(int32(2)))) * int32(int32(8)))
+
+ return lengthInBits
+}
+
+func (m *_TelephonyDataRinging) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func TelephonyDataRingingParse(readBuffer utils.ReadBuffer, commandTypeContainer TelephonyCommandTypeContainer) (TelephonyDataRinging, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("TelephonyDataRinging"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for TelephonyDataRinging")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Reserved Field (Compartmentalized so the "reserved" variable can't leak)
+ {
+ reserved, _err := readBuffer.ReadByte("reserved")
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'reserved' field of TelephonyDataRinging")
+ }
+ if reserved != byte(0x01) {
+ log.Info().Fields(map[string]interface{}{
+ "expected value": byte(0x01),
+ "got value": reserved,
+ }).Msg("Got unexpected response for reserved field.")
+ }
+ }
+
+ // Simple Field (number)
+ _number, _numberErr := readBuffer.ReadString("number", uint32(((commandTypeContainer.NumBytes())-(2))*(8)))
+ if _numberErr != nil {
+ return nil, errors.Wrap(_numberErr, "Error parsing 'number' field of TelephonyDataRinging")
+ }
+ number := _number
+
+ if closeErr := readBuffer.CloseContext("TelephonyDataRinging"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for TelephonyDataRinging")
+ }
+
+ // Create a partially initialized instance
+ _child := &_TelephonyDataRinging{
+ Number: number,
+ _TelephonyData: &_TelephonyData{},
+ }
+ _child._TelephonyData._TelephonyDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_TelephonyDataRinging) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("TelephonyDataRinging"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for TelephonyDataRinging")
+ }
+
+ // Reserved Field (reserved)
+ {
+ _err := writeBuffer.WriteByte("reserved", byte(0x01))
+ if _err != nil {
+ return errors.Wrap(_err, "Error serializing 'reserved' field")
+ }
+ }
+
+ // Simple Field (number)
+ number := string(m.GetNumber())
+ _numberErr := writeBuffer.WriteString("number", uint32(((m.GetCommandTypeContainer().NumBytes())-(2))*(8)), "UTF-8", (number))
+ if _numberErr != nil {
+ return errors.Wrap(_numberErr, "Error serializing 'number' field")
+ }
+
+ if popErr := writeBuffer.PopContext("TelephonyDataRinging"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for TelephonyDataRinging")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_TelephonyDataRinging) isTelephonyDataRinging() bool {
+ return true
+}
+
+func (m *_TelephonyDataRinging) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
index cb0ad9d23..fa1533fac 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
@@ -1352,7 +1352,7 @@
[simple ClockAndTimekeepingData clockAndTimekeepingData]
]
['TELEPHONY_STATUS_AND_CONTROL' *TelephonyStatusAndControl
- [validation '1==2' "TELEPHONY_STATUS_AND_CONTROL Not yet implemented"] // TODO: implement me
+ [simple TelephonyData telephonyData]
]
['MEASUREMENT' *Measurement
[validation '1==2' "MEASUREMENT Not yet implemented"] // TODO: implement me
@@ -2527,6 +2527,121 @@
['0x01' REQUEST_REFRESH ]
]
+[type TelephonyData
+ //TODO: golang doesn't like checking for null so we use that static call to check that the enum is known
+ [validation 'STATIC_CALL("knowsTelephonyCommandTypeContainer", readBuffer)' "no command type could be found" shouldFail=false]
+ [simple TelephonyCommandTypeContainer commandTypeContainer ]
+ [virtual TelephonyCommandType commandType 'commandTypeContainer.commandType']
+ [simple byte argument]
+ [typeSwitch commandType, argument
+ ['EVENT', '0x01' *LineOnHook
+ ]
+ ['EVENT', '0x02' *LineOffHook(TelephonyCommandTypeContainer commandTypeContainer)
+ [simple LineOffHookReason reason]
+ [simple vstring '(commandTypeContainer.numBytes-2)*8' number ]
+ ]
+ ['EVENT', '0x03' *DialOutFailure
+ [simple DialOutFailureReason reason]
+ ]
+ ['EVENT', '0x04' *DialOutFailure
+ [simple DialInFailureReason reason]
+ ]
+ ['EVENT', '0x05' *Ringing(TelephonyCommandTypeContainer commandTypeContainer)
+ [reserved byte '0x01' ]
+ [simple vstring '(commandTypeContainer.numBytes-2)*8' number ]
+ ]
+ ['EVENT', '0x06' *RecallLastNumber(TelephonyCommandTypeContainer commandTypeContainer)
+ [simple byte recallLastNumberType ]
+ [virtual bit isNumberOfLastOutgoingCall 'recallLastNumberType == 0x01' ]
+ [virtual bit isNumberOfLastIncomingCall 'recallLastNumberType == 0x02' ]
+ [simple vstring '(commandTypeContainer.numBytes-2)*8' number ]
+ ]
+ ['EVENT', '0x07' *InternetConnectionRequestMade
+ ]
+ ['EVENT', '0x80' *IsolateSecondaryOutlet
+ [simple byte isolateStatus]
+ [virtual bit isBehaveNormal 'isolateStatus == 0x00']
+ [virtual bit isToBeIsolated 'isolateStatus == 0x01']
+ ]
+ ['EVENT', '0x81' *RecallLastNumberRequest
+ [simple byte recallLastNumberType ]
+ [virtual bit isNumberOfLastOutgoingCall 'recallLastNumberType == 0x01' ]
+ [virtual bit isNumberOfLastIncomingCall 'recallLastNumberType == 0x02' ]
+ ]
+ ['EVENT', '0x82' *RejectIncomingCall
+ ]
+ ['EVENT', '0x83' *Divert(TelephonyCommandTypeContainer commandTypeContainer)
+ [simple vstring '(commandTypeContainer.numBytes-1)*8' number ]
+ ]
+ ['EVENT', '0x84' *ClearDiversion
+ ]
+ ]
+]
+
+[enum uint 8 TelephonyCommandTypeContainer(TelephonyCommandType commandType, uint 5 numBytes)
+ ['0x09' TelephonyCommandLineOnHook ['EVENT', '1']]
+ ['0xA0' TelephonyCommandLineOffHook_0Bytes ['EVENT', '0']]
+ ['0xA1' TelephonyCommandLineOffHook_1Bytes ['EVENT', '1']]
+ ['0xA2' TelephonyCommandLineOffHook_2Bytes ['EVENT', '2']]
+ ['0xA3' TelephonyCommandLineOffHook_3Bytes ['EVENT', '3']]
+ ['0xA4' TelephonyCommandLineOffHook_4Bytes ['EVENT', '4']]
+ ['0xA5' TelephonyCommandLineOffHook_5Bytes ['EVENT', '5']]
+ ['0xA6' TelephonyCommandLineOffHook_6Bytes ['EVENT', '6']]
+ ['0xA7' TelephonyCommandLineOffHook_7Bytes ['EVENT', '7']]
+ ['0xA8' TelephonyCommandLineOffHook_8Bytes ['EVENT', '8']]
+ ['0xA9' TelephonyCommandLineOffHook_9Bytes ['EVENT', '9']]
+ ['0xAA' TelephonyCommandLineOffHook_10Bytes ['EVENT', '10']]
+ ['0xAB' TelephonyCommandLineOffHook_11Bytes ['EVENT', '11']]
+ ['0xAC' TelephonyCommandLineOffHook_12Bytes ['EVENT', '12']]
+ ['0xAD' TelephonyCommandLineOffHook_13Bytes ['EVENT', '13']]
+ ['0xAE' TelephonyCommandLineOffHook_14Bytes ['EVENT', '14']]
+ ['0xAF' TelephonyCommandLineOffHook_15Bytes ['EVENT', '15']]
+ ['0xB0' TelephonyCommandLineOffHook_16Bytes ['EVENT', '16']]
+ ['0xB1' TelephonyCommandLineOffHook_17Bytes ['EVENT', '17']]
+ ['0xB2' TelephonyCommandLineOffHook_18Bytes ['EVENT', '18']]
+ ['0xB3' TelephonyCommandLineOffHook_19Bytes ['EVENT', '19']]
+ ['0xB4' TelephonyCommandLineOffHook_20Bytes ['EVENT', '20']]
+ ['0xB5' TelephonyCommandLineOffHook_21Bytes ['EVENT', '21']]
+ ['0xB6' TelephonyCommandLineOffHook_22Bytes ['EVENT', '22']]
+ ['0xB7' TelephonyCommandLineOffHook_23Bytes ['EVENT', '23']]
+ ['0xB8' TelephonyCommandLineOffHook_24Bytes ['EVENT', '24']]
+ ['0xB9' TelephonyCommandLineOffHook_25Bytes ['EVENT', '25']]
+ ['0xBA' TelephonyCommandLineOffHook_26Bytes ['EVENT', '26']]
+ ['0xBB' TelephonyCommandLineOffHook_27Bytes ['EVENT', '27']]
+ ['0xBC' TelephonyCommandLineOffHook_28Bytes ['EVENT', '28']]
+ ['0xBD' TelephonyCommandLineOffHook_29Bytes ['EVENT', '29']]
+ ['0xBE' TelephonyCommandLineOffHook_30Bytes ['EVENT', '30']]
+ ['0xBF' TelephonyCommandLineOffHook_31Bytes ['EVENT', '31']]
+]
+
+[enum uint 4 TelephonyCommandType
+ ['0x00' EVENT ]
+]
+
+[enum uint 8 LineOffHookReason
+ ['0x01' INCOMING_VOICE_CALL ]
+ ['0x02' INCOMING_DATA_CALL ]
+ ['0x03' INCOMING_CALL ]
+ ['0x10' OUTGOING_VOICE_CALL ]
+ ['0x20' OUTGOING_DATA_CALL ]
+ ['0x30' OUTGOING_CALL ]
+ ['0x40' CBTI_IS_SETTING ]
+ ['0x50' CBTI_IS_CLEARING ]
+]
+
+[enum uint 8 DialOutFailureReason
+ ['0x01' NO_DIAL_TONE ]
+ ['0x02' NO_ANSWER ]
+ ['0x03' NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS ]
+ ['0x04' NUMBER_WAS_UNOBTAINABLE_DOES_NOT_EXIST ]
+ ['0x05' NUMBER_WAS_BUSY ]
+ ['0x06' INTERNAL_FAILURE ]
+]
+
+[enum uint 8 DialInFailureReason
+ ['0x01' PHONE_STOPPED_RINGING ]
+]
+
[type ReplyOrConfirmation(CBusOptions cBusOptions, uint 16 messageLength, RequestContext requestContext)
[peek byte peekedByte ]
[virtual bit isAlpha '(peekedByte >= 0x67) && (peekedByte <= 0x7A)' ]
[plc4x] 02/03: fix(cbus): fixed vstrings
Posted by sr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit d607519675397a97e1d68747ce74eeb2514946e9
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Jul 19 13:25:28 2022 +0200
fix(cbus): fixed vstrings
---
.../MediaTransportControlDataSelectionName.go | 6 +--
.../model/MediaTransportControlDataTrackName.go | 6 +--
.../model/SALDataTelephonyStatusAndControl.go | 54 +++++++++++++++++++---
.../readwrite/model/SecurityDataDisplayMessage.go | 6 +--
.../java/cbus/readwrite/utils/StaticHelper.java | 11 +++++
.../org/apache/plc4x/java/cbus/ReferenceTest.java | 48 +++++++++++++++++++
.../src/main/resources/protocols/cbus/c-bus.mspec | 6 +--
7 files changed, 119 insertions(+), 18 deletions(-)
diff --git a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSelectionName.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSelectionName.go
index acd89ec13..2d0487e36 100644
--- a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSelectionName.go
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSelectionName.go
@@ -114,7 +114,7 @@ func (m *_MediaTransportControlDataSelectionName) GetLengthInBitsConditional(las
lengthInBits := uint16(m.GetParentLengthInBits())
// Simple field (selectionName)
- lengthInBits += uint16(int32(m.GetCommandTypeContainer().NumBytes()) - int32(int32(1)))
+ lengthInBits += uint16(int32(int32(int32(m.GetCommandTypeContainer().NumBytes())-int32(int32(1)))) * int32(int32(8)))
return lengthInBits
}
@@ -133,7 +133,7 @@ func MediaTransportControlDataSelectionNameParse(readBuffer utils.ReadBuffer, co
_ = currentPos
// Simple Field (selectionName)
- _selectionName, _selectionNameErr := readBuffer.ReadString("selectionName", uint32((commandTypeContainer.NumBytes())-(1)))
+ _selectionName, _selectionNameErr := readBuffer.ReadString("selectionName", uint32(((commandTypeContainer.NumBytes())-(1))*(8)))
if _selectionNameErr != nil {
return nil, errors.Wrap(_selectionNameErr, "Error parsing 'selectionName' field of MediaTransportControlDataSelectionName")
}
@@ -162,7 +162,7 @@ func (m *_MediaTransportControlDataSelectionName) Serialize(writeBuffer utils.Wr
// Simple Field (selectionName)
selectionName := string(m.GetSelectionName())
- _selectionNameErr := writeBuffer.WriteString("selectionName", uint32((m.GetCommandTypeContainer().NumBytes())-(1)), "UTF-8", (selectionName))
+ _selectionNameErr := writeBuffer.WriteString("selectionName", uint32(((m.GetCommandTypeContainer().NumBytes())-(1))*(8)), "UTF-8", (selectionName))
if _selectionNameErr != nil {
return errors.Wrap(_selectionNameErr, "Error serializing 'selectionName' field")
}
diff --git a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataTrackName.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataTrackName.go
index b9b204d23..c3213186c 100644
--- a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataTrackName.go
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataTrackName.go
@@ -114,7 +114,7 @@ func (m *_MediaTransportControlDataTrackName) GetLengthInBitsConditional(lastIte
lengthInBits := uint16(m.GetParentLengthInBits())
// Simple field (trackName)
- lengthInBits += uint16(int32(m.GetCommandTypeContainer().NumBytes()) - int32(int32(1)))
+ lengthInBits += uint16(int32(int32(int32(m.GetCommandTypeContainer().NumBytes())-int32(int32(1)))) * int32(int32(8)))
return lengthInBits
}
@@ -133,7 +133,7 @@ func MediaTransportControlDataTrackNameParse(readBuffer utils.ReadBuffer, comman
_ = currentPos
// Simple Field (trackName)
- _trackName, _trackNameErr := readBuffer.ReadString("trackName", uint32((commandTypeContainer.NumBytes())-(1)))
+ _trackName, _trackNameErr := readBuffer.ReadString("trackName", uint32(((commandTypeContainer.NumBytes())-(1))*(8)))
if _trackNameErr != nil {
return nil, errors.Wrap(_trackNameErr, "Error parsing 'trackName' field of MediaTransportControlDataTrackName")
}
@@ -162,7 +162,7 @@ func (m *_MediaTransportControlDataTrackName) Serialize(writeBuffer utils.WriteB
// Simple Field (trackName)
trackName := string(m.GetTrackName())
- _trackNameErr := writeBuffer.WriteString("trackName", uint32((m.GetCommandTypeContainer().NumBytes())-(1)), "UTF-8", (trackName))
+ _trackNameErr := writeBuffer.WriteString("trackName", uint32(((m.GetCommandTypeContainer().NumBytes())-(1))*(8)), "UTF-8", (trackName))
if _trackNameErr != nil {
return errors.Wrap(_trackNameErr, "Error serializing 'trackName' field")
}
diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataTelephonyStatusAndControl.go b/plc4go/protocols/cbus/readwrite/model/SALDataTelephonyStatusAndControl.go
index 12c84e581..42acad0b5 100644
--- a/plc4go/protocols/cbus/readwrite/model/SALDataTelephonyStatusAndControl.go
+++ b/plc4go/protocols/cbus/readwrite/model/SALDataTelephonyStatusAndControl.go
@@ -31,6 +31,8 @@ type SALDataTelephonyStatusAndControl interface {
utils.LengthAware
utils.Serializable
SALData
+ // GetTelephonyData returns TelephonyData (property field)
+ GetTelephonyData() TelephonyData
}
// SALDataTelephonyStatusAndControlExactly can be used when we want exactly this type and not a type which fulfills SALDataTelephonyStatusAndControl.
@@ -43,6 +45,7 @@ type SALDataTelephonyStatusAndControlExactly interface {
// _SALDataTelephonyStatusAndControl is the data-structure of this message
type _SALDataTelephonyStatusAndControl struct {
*_SALData
+ TelephonyData TelephonyData
}
///////////////////////////////////////////////////////////
@@ -67,10 +70,25 @@ func (m *_SALDataTelephonyStatusAndControl) GetParent() SALData {
return m._SALData
}
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SALDataTelephonyStatusAndControl) GetTelephonyData() TelephonyData {
+ return m.TelephonyData
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
// NewSALDataTelephonyStatusAndControl factory function for _SALDataTelephonyStatusAndControl
-func NewSALDataTelephonyStatusAndControl(salData SALData) *_SALDataTelephonyStatusAndControl {
+func NewSALDataTelephonyStatusAndControl(telephonyData TelephonyData, salData SALData) *_SALDataTelephonyStatusAndControl {
_result := &_SALDataTelephonyStatusAndControl{
- _SALData: NewSALData(salData),
+ TelephonyData: telephonyData,
+ _SALData: NewSALData(salData),
}
_result._SALData._SALDataChildRequirements = _result
return _result
@@ -98,6 +116,9 @@ func (m *_SALDataTelephonyStatusAndControl) GetLengthInBits() uint16 {
func (m *_SALDataTelephonyStatusAndControl) GetLengthInBitsConditional(lastItem bool) uint16 {
lengthInBits := uint16(m.GetParentLengthInBits())
+ // Simple field (telephonyData)
+ lengthInBits += m.TelephonyData.GetLengthInBits()
+
return lengthInBits
}
@@ -114,9 +135,17 @@ func SALDataTelephonyStatusAndControlParse(readBuffer utils.ReadBuffer, applicat
currentPos := positionAware.GetPos()
_ = currentPos
- // Validation
- if !(bool((1) == (2))) {
- return nil, errors.WithStack(utils.ParseValidationError{"TELEPHONY_STATUS_AND_CONTROL Not yet implemented"})
+ // Simple Field (telephonyData)
+ if pullErr := readBuffer.PullContext("telephonyData"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for telephonyData")
+ }
+ _telephonyData, _telephonyDataErr := TelephonyDataParse(readBuffer)
+ if _telephonyDataErr != nil {
+ return nil, errors.Wrap(_telephonyDataErr, "Error parsing 'telephonyData' field of SALDataTelephonyStatusAndControl")
+ }
+ telephonyData := _telephonyData.(TelephonyData)
+ if closeErr := readBuffer.CloseContext("telephonyData"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for telephonyData")
}
if closeErr := readBuffer.CloseContext("SALDataTelephonyStatusAndControl"); closeErr != nil {
@@ -125,7 +154,8 @@ func SALDataTelephonyStatusAndControlParse(readBuffer utils.ReadBuffer, applicat
// Create a partially initialized instance
_child := &_SALDataTelephonyStatusAndControl{
- _SALData: &_SALData{},
+ TelephonyData: telephonyData,
+ _SALData: &_SALData{},
}
_child._SALData._SALDataChildRequirements = _child
return _child, nil
@@ -139,6 +169,18 @@ func (m *_SALDataTelephonyStatusAndControl) Serialize(writeBuffer utils.WriteBuf
return errors.Wrap(pushErr, "Error pushing for SALDataTelephonyStatusAndControl")
}
+ // Simple Field (telephonyData)
+ if pushErr := writeBuffer.PushContext("telephonyData"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for telephonyData")
+ }
+ _telephonyDataErr := writeBuffer.WriteSerializable(m.GetTelephonyData())
+ if popErr := writeBuffer.PopContext("telephonyData"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for telephonyData")
+ }
+ if _telephonyDataErr != nil {
+ return errors.Wrap(_telephonyDataErr, "Error serializing 'telephonyData' field")
+ }
+
if popErr := writeBuffer.PopContext("SALDataTelephonyStatusAndControl"); popErr != nil {
return errors.Wrap(popErr, "Error popping for SALDataTelephonyStatusAndControl")
}
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataDisplayMessage.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataDisplayMessage.go
index ae0766f7b..6790084d9 100644
--- a/plc4go/protocols/cbus/readwrite/model/SecurityDataDisplayMessage.go
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataDisplayMessage.go
@@ -114,7 +114,7 @@ func (m *_SecurityDataDisplayMessage) GetLengthInBitsConditional(lastItem bool)
lengthInBits := uint16(m.GetParentLengthInBits())
// Simple field (message)
- lengthInBits += uint16(int32(m.GetCommandTypeContainer().NumBytes()) - int32(int32(1)))
+ lengthInBits += uint16(int32(int32(int32(m.GetCommandTypeContainer().NumBytes())-int32(int32(1)))) * int32(int32(8)))
return lengthInBits
}
@@ -133,7 +133,7 @@ func SecurityDataDisplayMessageParse(readBuffer utils.ReadBuffer, commandTypeCon
_ = currentPos
// Simple Field (message)
- _message, _messageErr := readBuffer.ReadString("message", uint32((commandTypeContainer.NumBytes())-(1)))
+ _message, _messageErr := readBuffer.ReadString("message", uint32(((commandTypeContainer.NumBytes())-(1))*(8)))
if _messageErr != nil {
return nil, errors.Wrap(_messageErr, "Error parsing 'message' field of SecurityDataDisplayMessage")
}
@@ -162,7 +162,7 @@ func (m *_SecurityDataDisplayMessage) Serialize(writeBuffer utils.WriteBuffer) e
// Simple Field (message)
message := string(m.GetMessage())
- _messageErr := writeBuffer.WriteString("message", uint32((m.GetCommandTypeContainer().NumBytes())-(1)), "UTF-8", (message))
+ _messageErr := writeBuffer.WriteString("message", uint32(((m.GetCommandTypeContainer().NumBytes())-(1))*(8)), "UTF-8", (message))
if _messageErr != nil {
return errors.Wrap(_messageErr, "Error serializing 'message' field")
}
diff --git a/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java b/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java
index 3148f675b..a8dd4b447 100644
--- a/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java
+++ b/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java
@@ -194,4 +194,15 @@ public class StaticHelper {
}
}
+ public static boolean knowsTelephonyCommandTypeContainer(ReadBuffer readBuffer) {
+ int oldPos = readBuffer.getPos();
+ try {
+ return TelephonyCommandTypeContainer.isDefined(readBuffer.readUnsignedShort(8));
+ } catch (ParseException ignore) {
+ return false;
+ } finally {
+ readBuffer.reset(oldPos);
+ }
+ }
+
}
diff --git a/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java b/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java
index ca3504545..7df8fa4ff 100644
--- a/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java
+++ b/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java
@@ -1153,4 +1153,52 @@ public class ReferenceTest {
}
}
}
+
+ // from: https://updates.clipsal.com/ClipsalSoftwareDownload/DL/downloads/OpenCBus/Chapter%2024%20-%20C-Bus%20Telephony%20Application.pdf
+ @Nested
+ class Telephony{
+
+ //24.11
+ @Nested
+ class Examples{
+
+ @Test
+ void LineOnHook() throws Exception {
+ byte[] bytes = "\\05E000090111\r".getBytes(StandardCharsets.UTF_8);
+ ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
+ cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
+ CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, false, requestContext, cBusOptions, bytes.length);
+ assertThat(msg).isNotNull();
+ System.out.println(msg);
+ System.out.println(((RequestCommand) ((CBusMessageToServer) msg).getRequest()).getCbusCommand());
+ assertMessageMatches(bytes, msg);
+ }
+
+ @Disabled("Again it seems as this command is just wrong... there is no command definition for 2C")
+ @Test
+ void LineOffHook() throws Exception {
+ byte[] bytes = "\\05E0002C020230333935323734333231FD\r".getBytes(StandardCharsets.UTF_8);
+ ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
+ cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
+ CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, false, requestContext, cBusOptions, bytes.length);
+ assertThat(msg).isNotNull();
+ System.out.println(msg);
+ System.out.println(((RequestCommand) ((CBusMessageToServer) msg).getRequest()).getCbusCommand());
+ assertMessageMatches(bytes, msg);
+ }
+
+ @Test
+ void LineOffHookFixedQuestionMark() throws Exception {
+ byte[] bytes = "\\05E000AC020130333935323734333231FD\r".getBytes(StandardCharsets.UTF_8);
+ ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
+ cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
+ CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, false, requestContext, cBusOptions, bytes.length);
+ assertThat(msg).isNotNull();
+ System.out.println(msg);
+ System.out.println(((RequestCommand) ((CBusMessageToServer) msg).getRequest()).getCbusCommand());
+ assertMessageMatches(bytes, msg);
+ }
+
+ }
+ }
}
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
index fa1533fac..ddd616e87 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
@@ -1689,7 +1689,7 @@
[virtual bit isVacation 'key == 0x87' ]
]
['ON', '0xA6' *DisplayMessage(SecurityCommandTypeContainer commandTypeContainer)
- [simple vstring 'commandTypeContainer.numBytes-1' message ]
+ [simple vstring '(commandTypeContainer.numBytes-1)*8' message ]
]
['EVENT', '0xA7' *RequestZoneName
[simple uint 8 zoneNumber ]
@@ -2332,10 +2332,10 @@
[simple uint 8 size ]
]
['TRACK_NAME' *TrackName(MediaTransportControlCommandTypeContainer commandTypeContainer)
- [simple vstring 'commandTypeContainer.numBytes-1' trackName ]
+ [simple vstring '(commandTypeContainer.numBytes-1)*8' trackName ]
]
['SELECTION_NAME' *SelectionName(MediaTransportControlCommandTypeContainer commandTypeContainer)
- [simple vstring 'commandTypeContainer.numBytes-1' selectionName ]
+ [simple vstring '(commandTypeContainer.numBytes-1)*8' selectionName ]
]
]
]
[plc4x] 03/03: feat(cbus): implemented air conditioning application
Posted by sr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit f24682115334e55339d33731cee8bd50201369e9
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Jul 19 15:29:06 2022 +0200
feat(cbus): implemented air conditioning application
---
plc4go/protocols/cbus/readwrite/ParserHelper.go | 22 +
plc4go/protocols/cbus/readwrite/XmlParserHelper.go | 22 +
.../readwrite/model/AirConditioningCommandType.go | 265 +++++
.../model/AirConditioningCommandTypeContainer.go | 454 +++++++
.../cbus/readwrite/model/AirConditioningData.go | 281 +++++
.../model/AirConditioningDataHvacScheduleEntry.go | 459 ++++++++
.../readwrite/model/AirConditioningDataRefresh.go | 190 +++
...irConditioningDataSetHumidityLowerGuardLimit.go | 301 +++++
.../AirConditioningDataSetHumiditySetbackLimit.go | 301 +++++
...irConditioningDataSetHumidityUpperGuardLimit.go | 301 +++++
.../AirConditioningDataSetHvacLowerGuardLimit.go | 301 +++++
.../AirConditioningDataSetHvacSetbackLimit.go | 301 +++++
.../AirConditioningDataSetHvacUpperGuardLimit.go | 301 +++++
.../AirConditioningDataSetPlantHumidityLevel.go | 444 +++++++
.../model/AirConditioningDataSetPlantHvacLevel.go | 444 +++++++
.../model/AirConditioningDataSetZoneGroupOff.go | 190 +++
.../model/AirConditioningDataSetZoneGroupOn.go | 190 +++
.../AirConditioningDataSetZoneHumidityMode.go | 444 +++++++
.../model/AirConditioningDataSetZoneHvacMode.go | 444 +++++++
.../model/AirConditioningDataZoneHumidity.go | 301 +++++
.../AirConditioningDataZoneHumidityPlantStatus.go | 338 ++++++
.../AirConditioningDataZoneHvacPlantStatus.go | 338 ++++++
.../model/AirConditioningDataZoneTemperature.go | 301 +++++
.../cbus/readwrite/model/HVACAuxiliaryLevel.go | 284 +++++
plc4go/protocols/cbus/readwrite/model/HVACError.go | 1233 ++++++++++++++++++++
.../protocols/cbus/readwrite/model/HVACHumidity.go | 183 +++
.../cbus/readwrite/model/HVACHumidityError.go | 1233 ++++++++++++++++++++
.../readwrite/model/HVACHumidityModeAndFlags.go | 435 +++++++
.../model/HVACHumidityModeAndFlagsMode.go | 145 +++
.../readwrite/model/HVACHumidityStatusFlags.go | 370 ++++++
.../cbus/readwrite/model/HVACHumidityType.go | 145 +++
.../cbus/readwrite/model/HVACModeAndFlags.go | 435 +++++++
.../cbus/readwrite/model/HVACModeAndFlagsMode.go | 153 +++
.../cbus/readwrite/model/HVACRawLevels.go | 183 +++
.../cbus/readwrite/model/HVACSensorStatus.go | 145 +++
.../cbus/readwrite/model/HVACStartTime.go | 251 ++++
.../cbus/readwrite/model/HVACStatusFlags.go | 370 ++++++
.../cbus/readwrite/model/HVACTemperature.go | 183 +++
plc4go/protocols/cbus/readwrite/model/HVACType.go | 209 ++++
.../protocols/cbus/readwrite/model/HVACZoneList.go | 351 ++++++
.../protocols/cbus/readwrite/model/StaticHelper.go | 10 +
.../java/cbus/readwrite/utils/StaticHelper.java | 11 +
.../src/main/resources/protocols/cbus/c-bus.mspec | 619 ++++++++++
43 files changed, 13881 insertions(+)
diff --git a/plc4go/protocols/cbus/readwrite/ParserHelper.go b/plc4go/protocols/cbus/readwrite/ParserHelper.go
index 1d4a80267..5588d7768 100644
--- a/plc4go/protocols/cbus/readwrite/ParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/ParserHelper.go
@@ -32,6 +32,8 @@ type CbusParserHelper struct {
func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.ReadBuffer) (interface{}, error) {
switch typeName {
+ case "HVACStatusFlags":
+ return model.HVACStatusFlagsParse(io)
case "MeteringData":
return model.MeteringDataParse(io)
case "EnableControlData":
@@ -44,6 +46,10 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
return model.RequestContextParse(io)
case "TriggerControlData":
return model.TriggerControlDataParse(io)
+ case "HVACStartTime":
+ return model.HVACStartTimeParse(io)
+ case "HVACTemperature":
+ return model.HVACTemperatureParse(io)
case "NetworkNumber":
return model.NetworkNumberParse(io)
case "RequestTermination":
@@ -92,6 +98,8 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
return model.ReplyParse(io, cBusOptions, replyLength, requestContext)
case "TelephonyData":
return model.TelephonyDataParse(io)
+ case "HVACHumidityStatusFlags":
+ return model.HVACHumidityStatusFlagsParse(io)
case "InterfaceOptions1PowerUpSettings":
return model.InterfaceOptions1PowerUpSettingsParse(io)
case "MonitoredSAL":
@@ -129,6 +137,8 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
return nil, errors.Wrap(err, "Error parsing")
}
return model.RequestParse(io, cBusOptions, messageLength)
+ case "HVACModeAndFlags":
+ return model.HVACModeAndFlagsParse(io)
case "Alpha":
return model.AlphaParse(io)
case "CALData":
@@ -169,10 +179,18 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
return nil, errors.Wrap(err, "Error parsing")
}
return model.IdentifyReplyCommandParse(io, attribute, numBytes)
+ case "HVACHumidity":
+ return model.HVACHumidityParse(io)
+ case "HVACHumidityModeAndFlags":
+ return model.HVACHumidityModeAndFlagsParse(io)
+ case "HVACRawLevels":
+ return model.HVACRawLevelsParse(io)
case "CBusConstants":
return model.CBusConstantsParse(io)
case "SerialInterfaceAddress":
return model.SerialInterfaceAddressParse(io)
+ case "HVACZoneList":
+ return model.HVACZoneListParse(io)
case "ZoneStatus":
return model.ZoneStatusParse(io)
case "BridgeAddress":
@@ -189,6 +207,8 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
return model.CustomTypesParse(io)
case "TriggerControlLabelOptions":
return model.TriggerControlLabelOptionsParse(io)
+ case "HVACAuxiliaryLevel":
+ return model.HVACAuxiliaryLevelParse(io)
case "StatusHeader":
return model.StatusHeaderParse(io)
case "EncodedReply":
@@ -207,6 +227,8 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
case "CBusPointToPointToMultipointCommand":
var cBusOptions model.CBusOptions
return model.CBusPointToPointToMultipointCommandParse(io, cBusOptions)
+ case "AirConditioningData":
+ return model.AirConditioningDataParse(io)
case "LogicAssignment":
return model.LogicAssignmentParse(io)
}
diff --git a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
index 33a8ef961..ff9c5bad5 100644
--- a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
@@ -42,6 +42,8 @@ func init() {
func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) {
switch typeName {
+ case "HVACStatusFlags":
+ return model.HVACStatusFlagsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "MeteringData":
return model.MeteringDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "EnableControlData":
@@ -54,6 +56,10 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
return model.RequestContextParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "TriggerControlData":
return model.TriggerControlDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "HVACStartTime":
+ return model.HVACStartTimeParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "HVACTemperature":
+ return model.HVACTemperatureParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "NetworkNumber":
return model.NetworkNumberParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "RequestTermination":
@@ -108,6 +114,8 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
return model.ReplyParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, replyLength, requestContext)
case "TelephonyData":
return model.TelephonyDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "HVACHumidityStatusFlags":
+ return model.HVACHumidityStatusFlagsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "InterfaceOptions1PowerUpSettings":
return model.InterfaceOptions1PowerUpSettingsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "MonitoredSAL":
@@ -149,6 +157,8 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
}
messageLength := uint16(parsedUint1)
return model.RequestParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, messageLength)
+ case "HVACModeAndFlags":
+ return model.HVACModeAndFlagsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "Alpha":
return model.AlphaParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "CALData":
@@ -194,10 +204,18 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
}
numBytes := uint8(parsedUint1)
return model.IdentifyReplyCommandParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), attribute, numBytes)
+ case "HVACHumidity":
+ return model.HVACHumidityParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "HVACHumidityModeAndFlags":
+ return model.HVACHumidityModeAndFlagsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "HVACRawLevels":
+ return model.HVACRawLevelsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "CBusConstants":
return model.CBusConstantsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "SerialInterfaceAddress":
return model.SerialInterfaceAddressParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "HVACZoneList":
+ return model.HVACZoneListParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "ZoneStatus":
return model.ZoneStatusParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BridgeAddress":
@@ -214,6 +232,8 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
return model.CustomTypesParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "TriggerControlLabelOptions":
return model.TriggerControlLabelOptionsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "HVACAuxiliaryLevel":
+ return model.HVACAuxiliaryLevelParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "StatusHeader":
return model.StatusHeaderParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "EncodedReply":
@@ -236,6 +256,8 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
// TODO: find a way to parse the sub types
var cBusOptions model.CBusOptions
return model.CBusPointToPointToMultipointCommandParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions)
+ case "AirConditioningData":
+ return model.AirConditioningDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "LogicAssignment":
return model.LogicAssignmentParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go
new file mode 100644
index 000000000..3108b8bff
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go
@@ -0,0 +1,265 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningCommandType is an enum
+type AirConditioningCommandType uint8
+
+type IAirConditioningCommandType interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ AirConditioningCommandType_SET_ZONE_GROUP_OFF AirConditioningCommandType = 0x00
+ AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS AirConditioningCommandType = 0x01
+ AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS AirConditioningCommandType = 0x02
+ AirConditioningCommandType_ZONE_TEMPERATURE AirConditioningCommandType = 0x03
+ AirConditioningCommandType_ZONE_HUMIDITY AirConditioningCommandType = 0x04
+ AirConditioningCommandType_REFRESH AirConditioningCommandType = 0x05
+ AirConditioningCommandType_SET_ZONE_HVAC_MODE AirConditioningCommandType = 0x06
+ AirConditioningCommandType_SET_PLANT_HVAC_LEVEL AirConditioningCommandType = 0x07
+ AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE AirConditioningCommandType = 0x08
+ AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL AirConditioningCommandType = 0x09
+ AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT AirConditioningCommandType = 0x0A
+ AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT AirConditioningCommandType = 0x0B
+ AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT AirConditioningCommandType = 0x0C
+ AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT AirConditioningCommandType = 0x0D
+ AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT AirConditioningCommandType = 0x0E
+ AirConditioningCommandType_SET_ZONE_GROUP_ON AirConditioningCommandType = 0x0F
+ AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT AirConditioningCommandType = 0x10
+ AirConditioningCommandType_HVAC_SCHEDULE_ENTRY AirConditioningCommandType = 0x11
+ AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY AirConditioningCommandType = 0x12
+)
+
+var AirConditioningCommandTypeValues []AirConditioningCommandType
+
+func init() {
+ _ = errors.New
+ AirConditioningCommandTypeValues = []AirConditioningCommandType{
+ AirConditioningCommandType_SET_ZONE_GROUP_OFF,
+ AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS,
+ AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS,
+ AirConditioningCommandType_ZONE_TEMPERATURE,
+ AirConditioningCommandType_ZONE_HUMIDITY,
+ AirConditioningCommandType_REFRESH,
+ AirConditioningCommandType_SET_ZONE_HVAC_MODE,
+ AirConditioningCommandType_SET_PLANT_HVAC_LEVEL,
+ AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE,
+ AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL,
+ AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT,
+ AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT,
+ AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT,
+ AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT,
+ AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT,
+ AirConditioningCommandType_SET_ZONE_GROUP_ON,
+ AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT,
+ AirConditioningCommandType_HVAC_SCHEDULE_ENTRY,
+ AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY,
+ }
+}
+
+func AirConditioningCommandTypeByValue(value uint8) (enum AirConditioningCommandType, ok bool) {
+ switch value {
+ case 0x00:
+ return AirConditioningCommandType_SET_ZONE_GROUP_OFF, true
+ case 0x01:
+ return AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS, true
+ case 0x02:
+ return AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS, true
+ case 0x03:
+ return AirConditioningCommandType_ZONE_TEMPERATURE, true
+ case 0x04:
+ return AirConditioningCommandType_ZONE_HUMIDITY, true
+ case 0x05:
+ return AirConditioningCommandType_REFRESH, true
+ case 0x06:
+ return AirConditioningCommandType_SET_ZONE_HVAC_MODE, true
+ case 0x07:
+ return AirConditioningCommandType_SET_PLANT_HVAC_LEVEL, true
+ case 0x08:
+ return AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE, true
+ case 0x09:
+ return AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL, true
+ case 0x0A:
+ return AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT, true
+ case 0x0B:
+ return AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT, true
+ case 0x0C:
+ return AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT, true
+ case 0x0D:
+ return AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT, true
+ case 0x0E:
+ return AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT, true
+ case 0x0F:
+ return AirConditioningCommandType_SET_ZONE_GROUP_ON, true
+ case 0x10:
+ return AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT, true
+ case 0x11:
+ return AirConditioningCommandType_HVAC_SCHEDULE_ENTRY, true
+ case 0x12:
+ return AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY, true
+ }
+ return 0, false
+}
+
+func AirConditioningCommandTypeByName(value string) (enum AirConditioningCommandType, ok bool) {
+ switch value {
+ case "SET_ZONE_GROUP_OFF":
+ return AirConditioningCommandType_SET_ZONE_GROUP_OFF, true
+ case "ZONE_HVAC_PLANT_STATUS":
+ return AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS, true
+ case "ZONE_HUMIDITY_PLANT_STATUS":
+ return AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS, true
+ case "ZONE_TEMPERATURE":
+ return AirConditioningCommandType_ZONE_TEMPERATURE, true
+ case "ZONE_HUMIDITY":
+ return AirConditioningCommandType_ZONE_HUMIDITY, true
+ case "REFRESH":
+ return AirConditioningCommandType_REFRESH, true
+ case "SET_ZONE_HVAC_MODE":
+ return AirConditioningCommandType_SET_ZONE_HVAC_MODE, true
+ case "SET_PLANT_HVAC_LEVEL":
+ return AirConditioningCommandType_SET_PLANT_HVAC_LEVEL, true
+ case "SET_ZONE_HUMIDITY_MODE":
+ return AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE, true
+ case "SET_PLANT_HUMIDITY_LEVEL":
+ return AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL, true
+ case "SET_HVAC_UPPER_GUARD_LIMIT":
+ return AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT, true
+ case "SET_HVAC_LOWER_GUARD_LIMIT":
+ return AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT, true
+ case "SET_HVAC_SETBACK_LIMIT":
+ return AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT, true
+ case "SET_HUMIDITY_UPPER_GUARD_LIMIT":
+ return AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT, true
+ case "SET_HUMIDITY_LOWER_GUARD_LIMIT":
+ return AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT, true
+ case "SET_ZONE_GROUP_ON":
+ return AirConditioningCommandType_SET_ZONE_GROUP_ON, true
+ case "SET_HUMIDITY_SETBACK_LIMIT":
+ return AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT, true
+ case "HVAC_SCHEDULE_ENTRY":
+ return AirConditioningCommandType_HVAC_SCHEDULE_ENTRY, true
+ case "HUMIDITY_SCHEDULE_ENTRY":
+ return AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY, true
+ }
+ return 0, false
+}
+
+func AirConditioningCommandTypeKnows(value uint8) bool {
+ for _, typeValue := range AirConditioningCommandTypeValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastAirConditioningCommandType(structType interface{}) AirConditioningCommandType {
+ castFunc := func(typ interface{}) AirConditioningCommandType {
+ if sAirConditioningCommandType, ok := typ.(AirConditioningCommandType); ok {
+ return sAirConditioningCommandType
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m AirConditioningCommandType) GetLengthInBits() uint16 {
+ return 4
+}
+
+func (m AirConditioningCommandType) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningCommandTypeParse(readBuffer utils.ReadBuffer) (AirConditioningCommandType, error) {
+ val, err := readBuffer.ReadUint8("AirConditioningCommandType", 4)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading AirConditioningCommandType")
+ }
+ if enum, ok := AirConditioningCommandTypeByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return AirConditioningCommandType(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e AirConditioningCommandType) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("AirConditioningCommandType", 4, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e AirConditioningCommandType) PLC4XEnumName() string {
+ switch e {
+ case AirConditioningCommandType_SET_ZONE_GROUP_OFF:
+ return "SET_ZONE_GROUP_OFF"
+ case AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS:
+ return "ZONE_HVAC_PLANT_STATUS"
+ case AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS:
+ return "ZONE_HUMIDITY_PLANT_STATUS"
+ case AirConditioningCommandType_ZONE_TEMPERATURE:
+ return "ZONE_TEMPERATURE"
+ case AirConditioningCommandType_ZONE_HUMIDITY:
+ return "ZONE_HUMIDITY"
+ case AirConditioningCommandType_REFRESH:
+ return "REFRESH"
+ case AirConditioningCommandType_SET_ZONE_HVAC_MODE:
+ return "SET_ZONE_HVAC_MODE"
+ case AirConditioningCommandType_SET_PLANT_HVAC_LEVEL:
+ return "SET_PLANT_HVAC_LEVEL"
+ case AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE:
+ return "SET_ZONE_HUMIDITY_MODE"
+ case AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL:
+ return "SET_PLANT_HUMIDITY_LEVEL"
+ case AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT:
+ return "SET_HVAC_UPPER_GUARD_LIMIT"
+ case AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT:
+ return "SET_HVAC_LOWER_GUARD_LIMIT"
+ case AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT:
+ return "SET_HVAC_SETBACK_LIMIT"
+ case AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT:
+ return "SET_HUMIDITY_UPPER_GUARD_LIMIT"
+ case AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT:
+ return "SET_HUMIDITY_LOWER_GUARD_LIMIT"
+ case AirConditioningCommandType_SET_ZONE_GROUP_ON:
+ return "SET_ZONE_GROUP_ON"
+ case AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT:
+ return "SET_HUMIDITY_SETBACK_LIMIT"
+ case AirConditioningCommandType_HVAC_SCHEDULE_ENTRY:
+ return "HVAC_SCHEDULE_ENTRY"
+ case AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY:
+ return "HUMIDITY_SCHEDULE_ENTRY"
+ }
+ return ""
+}
+
+func (e AirConditioningCommandType) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandTypeContainer.go
new file mode 100644
index 000000000..2a3161e5c
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandTypeContainer.go
@@ -0,0 +1,454 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningCommandTypeContainer is an enum
+type AirConditioningCommandTypeContainer uint8
+
+type IAirConditioningCommandTypeContainer interface {
+ NumBytes() uint8
+ CommandType() AirConditioningCommandType
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOff AirConditioningCommandTypeContainer = 0x01
+ AirConditioningCommandTypeContainer_AirConditioningCommandZoneHvacPlantStatus AirConditioningCommandTypeContainer = 0x05
+ AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidityPlantStatus AirConditioningCommandTypeContainer = 0x0D
+ AirConditioningCommandTypeContainer_AirConditioningCommandZoneTemperature AirConditioningCommandTypeContainer = 0x15
+ AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidity AirConditioningCommandTypeContainer = 0x1D
+ AirConditioningCommandTypeContainer_AirConditioningCommandRefresh AirConditioningCommandTypeContainer = 0x21
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHvacMode AirConditioningCommandTypeContainer = 0x2F
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHvacLevel AirConditioningCommandTypeContainer = 0x36
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHumidityMode AirConditioningCommandTypeContainer = 0x47
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHumidityLevel AirConditioningCommandTypeContainer = 0x4E
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacUpperGuardLimit AirConditioningCommandTypeContainer = 0x55
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacLowerGuardLimit AirConditioningCommandTypeContainer = 0x5D
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacSetbackLimit AirConditioningCommandTypeContainer = 0x65
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityUpperGuardLimit AirConditioningCommandTypeContainer = 0x6D
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityLowerGuardLimit AirConditioningCommandTypeContainer = 0x75
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOn AirConditioningCommandTypeContainer = 0x79
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHumiditySetbackLimit AirConditioningCommandTypeContainer = 0x7D
+ AirConditioningCommandTypeContainer_AirConditioningCommandHvacScheduleEntry AirConditioningCommandTypeContainer = 0x89
+ AirConditioningCommandTypeContainer_AirConditioningCommandHumidityScheduleEntry AirConditioningCommandTypeContainer = 0xA9
+)
+
+var AirConditioningCommandTypeContainerValues []AirConditioningCommandTypeContainer
+
+func init() {
+ _ = errors.New
+ AirConditioningCommandTypeContainerValues = []AirConditioningCommandTypeContainer{
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOff,
+ AirConditioningCommandTypeContainer_AirConditioningCommandZoneHvacPlantStatus,
+ AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidityPlantStatus,
+ AirConditioningCommandTypeContainer_AirConditioningCommandZoneTemperature,
+ AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidity,
+ AirConditioningCommandTypeContainer_AirConditioningCommandRefresh,
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHvacMode,
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHvacLevel,
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHumidityMode,
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHumidityLevel,
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacUpperGuardLimit,
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacLowerGuardLimit,
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacSetbackLimit,
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityUpperGuardLimit,
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityLowerGuardLimit,
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOn,
+ AirConditioningCommandTypeContainer_AirConditioningCommandSetHumiditySetbackLimit,
+ AirConditioningCommandTypeContainer_AirConditioningCommandHvacScheduleEntry,
+ AirConditioningCommandTypeContainer_AirConditioningCommandHumidityScheduleEntry,
+ }
+}
+
+func (e AirConditioningCommandTypeContainer) NumBytes() uint8 {
+ switch e {
+ case 0x01:
+ { /* '0x01' */
+ return 1
+ }
+ case 0x05:
+ { /* '0x05' */
+ return 5
+ }
+ case 0x0D:
+ { /* '0x0D' */
+ return 5
+ }
+ case 0x15:
+ { /* '0x15' */
+ return 5
+ }
+ case 0x1D:
+ { /* '0x1D' */
+ return 5
+ }
+ case 0x21:
+ { /* '0x21' */
+ return 1
+ }
+ case 0x2F:
+ { /* '0x2F' */
+ return 7
+ }
+ case 0x36:
+ { /* '0x36' */
+ return 6
+ }
+ case 0x47:
+ { /* '0x47' */
+ return 7
+ }
+ case 0x4E:
+ { /* '0x4E' */
+ return 6
+ }
+ case 0x55:
+ { /* '0x55' */
+ return 5
+ }
+ case 0x5D:
+ { /* '0x5D' */
+ return 5
+ }
+ case 0x65:
+ { /* '0x65' */
+ return 5
+ }
+ case 0x6D:
+ { /* '0x6D' */
+ return 5
+ }
+ case 0x75:
+ { /* '0x75' */
+ return 5
+ }
+ case 0x79:
+ { /* '0x79' */
+ return 1
+ }
+ case 0x7D:
+ { /* '0x7D' */
+ return 5
+ }
+ case 0x89:
+ { /* '0x89' */
+ return 9
+ }
+ case 0xA9:
+ { /* '0xA9' */
+ return 9
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func AirConditioningCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (AirConditioningCommandTypeContainer, error) {
+ for _, sizeValue := range AirConditioningCommandTypeContainerValues {
+ if sizeValue.NumBytes() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing NumBytes not found", value)
+}
+
+func (e AirConditioningCommandTypeContainer) CommandType() AirConditioningCommandType {
+ switch e {
+ case 0x01:
+ { /* '0x01' */
+ return AirConditioningCommandType_SET_ZONE_GROUP_OFF
+ }
+ case 0x05:
+ { /* '0x05' */
+ return AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS
+ }
+ case 0x0D:
+ { /* '0x0D' */
+ return AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS
+ }
+ case 0x15:
+ { /* '0x15' */
+ return AirConditioningCommandType_ZONE_TEMPERATURE
+ }
+ case 0x1D:
+ { /* '0x1D' */
+ return AirConditioningCommandType_ZONE_HUMIDITY
+ }
+ case 0x21:
+ { /* '0x21' */
+ return AirConditioningCommandType_REFRESH
+ }
+ case 0x2F:
+ { /* '0x2F' */
+ return AirConditioningCommandType_SET_ZONE_HVAC_MODE
+ }
+ case 0x36:
+ { /* '0x36' */
+ return AirConditioningCommandType_SET_PLANT_HVAC_LEVEL
+ }
+ case 0x47:
+ { /* '0x47' */
+ return AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE
+ }
+ case 0x4E:
+ { /* '0x4E' */
+ return AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL
+ }
+ case 0x55:
+ { /* '0x55' */
+ return AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT
+ }
+ case 0x5D:
+ { /* '0x5D' */
+ return AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT
+ }
+ case 0x65:
+ { /* '0x65' */
+ return AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT
+ }
+ case 0x6D:
+ { /* '0x6D' */
+ return AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT
+ }
+ case 0x75:
+ { /* '0x75' */
+ return AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT
+ }
+ case 0x79:
+ { /* '0x79' */
+ return AirConditioningCommandType_SET_ZONE_GROUP_ON
+ }
+ case 0x7D:
+ { /* '0x7D' */
+ return AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT
+ }
+ case 0x89:
+ { /* '0x89' */
+ return AirConditioningCommandType_HVAC_SCHEDULE_ENTRY
+ }
+ case 0xA9:
+ { /* '0xA9' */
+ return AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func AirConditioningCommandTypeContainerFirstEnumForFieldCommandType(value AirConditioningCommandType) (AirConditioningCommandTypeContainer, error) {
+ for _, sizeValue := range AirConditioningCommandTypeContainerValues {
+ if sizeValue.CommandType() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing CommandType not found", value)
+}
+func AirConditioningCommandTypeContainerByValue(value uint8) (enum AirConditioningCommandTypeContainer, ok bool) {
+ switch value {
+ case 0x01:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOff, true
+ case 0x05:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHvacPlantStatus, true
+ case 0x0D:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidityPlantStatus, true
+ case 0x15:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandZoneTemperature, true
+ case 0x1D:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidity, true
+ case 0x21:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandRefresh, true
+ case 0x2F:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHvacMode, true
+ case 0x36:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHvacLevel, true
+ case 0x47:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHumidityMode, true
+ case 0x4E:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHumidityLevel, true
+ case 0x55:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacUpperGuardLimit, true
+ case 0x5D:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacLowerGuardLimit, true
+ case 0x65:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacSetbackLimit, true
+ case 0x6D:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityUpperGuardLimit, true
+ case 0x75:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityLowerGuardLimit, true
+ case 0x79:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOn, true
+ case 0x7D:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumiditySetbackLimit, true
+ case 0x89:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandHvacScheduleEntry, true
+ case 0xA9:
+ return AirConditioningCommandTypeContainer_AirConditioningCommandHumidityScheduleEntry, true
+ }
+ return 0, false
+}
+
+func AirConditioningCommandTypeContainerByName(value string) (enum AirConditioningCommandTypeContainer, ok bool) {
+ switch value {
+ case "AirConditioningCommandSetZoneGroupOff":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOff, true
+ case "AirConditioningCommandZoneHvacPlantStatus":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHvacPlantStatus, true
+ case "AirConditioningCommandZoneHumidityPlantStatus":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidityPlantStatus, true
+ case "AirConditioningCommandZoneTemperature":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandZoneTemperature, true
+ case "AirConditioningCommandZoneHumidity":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidity, true
+ case "AirConditioningCommandRefresh":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandRefresh, true
+ case "AirConditioningCommandSetZoneHvacMode":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHvacMode, true
+ case "AirConditioningCommandSetPlantHvacLevel":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHvacLevel, true
+ case "AirConditioningCommandSetZoneHumidityMode":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHumidityMode, true
+ case "AirConditioningCommandSetPlantHumidityLevel":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHumidityLevel, true
+ case "AirConditioningCommandSetHvacUpperGuardLimit":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacUpperGuardLimit, true
+ case "AirConditioningCommandSetHvacLowerGuardLimit":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacLowerGuardLimit, true
+ case "AirConditioningCommandSetHvacSetbackLimit":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacSetbackLimit, true
+ case "AirConditioningCommandSetHumidityUpperGuardLimit":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityUpperGuardLimit, true
+ case "AirConditioningCommandSetHumidityLowerGuardLimit":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityLowerGuardLimit, true
+ case "AirConditioningCommandSetZoneGroupOn":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOn, true
+ case "AirConditioningCommandSetHumiditySetbackLimit":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumiditySetbackLimit, true
+ case "AirConditioningCommandHvacScheduleEntry":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandHvacScheduleEntry, true
+ case "AirConditioningCommandHumidityScheduleEntry":
+ return AirConditioningCommandTypeContainer_AirConditioningCommandHumidityScheduleEntry, true
+ }
+ return 0, false
+}
+
+func AirConditioningCommandTypeContainerKnows(value uint8) bool {
+ for _, typeValue := range AirConditioningCommandTypeContainerValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastAirConditioningCommandTypeContainer(structType interface{}) AirConditioningCommandTypeContainer {
+ castFunc := func(typ interface{}) AirConditioningCommandTypeContainer {
+ if sAirConditioningCommandTypeContainer, ok := typ.(AirConditioningCommandTypeContainer); ok {
+ return sAirConditioningCommandTypeContainer
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m AirConditioningCommandTypeContainer) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m AirConditioningCommandTypeContainer) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningCommandTypeContainerParse(readBuffer utils.ReadBuffer) (AirConditioningCommandTypeContainer, error) {
+ val, err := readBuffer.ReadUint8("AirConditioningCommandTypeContainer", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading AirConditioningCommandTypeContainer")
+ }
+ if enum, ok := AirConditioningCommandTypeContainerByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return AirConditioningCommandTypeContainer(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e AirConditioningCommandTypeContainer) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("AirConditioningCommandTypeContainer", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e AirConditioningCommandTypeContainer) PLC4XEnumName() string {
+ switch e {
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOff:
+ return "AirConditioningCommandSetZoneGroupOff"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandZoneHvacPlantStatus:
+ return "AirConditioningCommandZoneHvacPlantStatus"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidityPlantStatus:
+ return "AirConditioningCommandZoneHumidityPlantStatus"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandZoneTemperature:
+ return "AirConditioningCommandZoneTemperature"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidity:
+ return "AirConditioningCommandZoneHumidity"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandRefresh:
+ return "AirConditioningCommandRefresh"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHvacMode:
+ return "AirConditioningCommandSetZoneHvacMode"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHvacLevel:
+ return "AirConditioningCommandSetPlantHvacLevel"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHumidityMode:
+ return "AirConditioningCommandSetZoneHumidityMode"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHumidityLevel:
+ return "AirConditioningCommandSetPlantHumidityLevel"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacUpperGuardLimit:
+ return "AirConditioningCommandSetHvacUpperGuardLimit"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacLowerGuardLimit:
+ return "AirConditioningCommandSetHvacLowerGuardLimit"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacSetbackLimit:
+ return "AirConditioningCommandSetHvacSetbackLimit"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityUpperGuardLimit:
+ return "AirConditioningCommandSetHumidityUpperGuardLimit"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityLowerGuardLimit:
+ return "AirConditioningCommandSetHumidityLowerGuardLimit"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOn:
+ return "AirConditioningCommandSetZoneGroupOn"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandSetHumiditySetbackLimit:
+ return "AirConditioningCommandSetHumiditySetbackLimit"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandHvacScheduleEntry:
+ return "AirConditioningCommandHvacScheduleEntry"
+ case AirConditioningCommandTypeContainer_AirConditioningCommandHumidityScheduleEntry:
+ return "AirConditioningCommandHumidityScheduleEntry"
+ }
+ return ""
+}
+
+func (e AirConditioningCommandTypeContainer) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningData.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningData.go
new file mode 100644
index 000000000..78f5f0401
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningData.go
@@ -0,0 +1,281 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningData is the corresponding interface of AirConditioningData
+type AirConditioningData interface {
+ utils.LengthAware
+ utils.Serializable
+ // GetCommandTypeContainer returns CommandTypeContainer (property field)
+ GetCommandTypeContainer() AirConditioningCommandTypeContainer
+ // GetCommandType returns CommandType (virtual field)
+ GetCommandType() AirConditioningCommandType
+}
+
+// AirConditioningDataExactly can be used when we want exactly this type and not a type which fulfills AirConditioningData.
+// This is useful for switch cases.
+type AirConditioningDataExactly interface {
+ AirConditioningData
+ isAirConditioningData() bool
+}
+
+// _AirConditioningData is the data-structure of this message
+type _AirConditioningData struct {
+ _AirConditioningDataChildRequirements
+ CommandTypeContainer AirConditioningCommandTypeContainer
+}
+
+type _AirConditioningDataChildRequirements interface {
+ utils.Serializable
+ GetLengthInBits() uint16
+ GetLengthInBitsConditional(lastItem bool) uint16
+}
+
+type AirConditioningDataParent interface {
+ SerializeParent(writeBuffer utils.WriteBuffer, child AirConditioningData, serializeChildFunction func() error) error
+ GetTypeName() string
+}
+
+type AirConditioningDataChild interface {
+ utils.Serializable
+ InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer)
+ GetParent() *AirConditioningData
+
+ GetTypeName() string
+ AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningData) GetCommandTypeContainer() AirConditioningCommandTypeContainer {
+ return m.CommandTypeContainer
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_AirConditioningData) GetCommandType() AirConditioningCommandType {
+ return CastAirConditioningCommandType(m.GetCommandTypeContainer().CommandType())
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningData factory function for _AirConditioningData
+func NewAirConditioningData(commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningData {
+ return &_AirConditioningData{CommandTypeContainer: commandTypeContainer}
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningData(structType interface{}) AirConditioningData {
+ if casted, ok := structType.(AirConditioningData); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningData); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningData) GetTypeName() string {
+ return "AirConditioningData"
+}
+
+func (m *_AirConditioningData) GetParentLengthInBits() uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (commandTypeContainer)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningData) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataParse(readBuffer utils.ReadBuffer) (AirConditioningData, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningData"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningData")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Validation
+ if !(KnowsAirConditioningCommandTypeContainer(readBuffer)) {
+ return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"})
+ }
+
+ // Simple Field (commandTypeContainer)
+ if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer")
+ }
+ _commandTypeContainer, _commandTypeContainerErr := AirConditioningCommandTypeContainerParse(readBuffer)
+ if _commandTypeContainerErr != nil {
+ return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of AirConditioningData")
+ }
+ commandTypeContainer := _commandTypeContainer
+ if closeErr := readBuffer.CloseContext("commandTypeContainer"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for commandTypeContainer")
+ }
+
+ // Virtual field
+ _commandType := commandTypeContainer.CommandType()
+ commandType := AirConditioningCommandType(_commandType)
+ _ = commandType
+
+ // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
+ type AirConditioningDataChildSerializeRequirement interface {
+ AirConditioningData
+ InitializeParent(AirConditioningData, AirConditioningCommandTypeContainer)
+ GetParent() AirConditioningData
+ }
+ var _childTemp interface{}
+ var _child AirConditioningDataChildSerializeRequirement
+ var typeSwitchError error
+ switch {
+ case commandType == AirConditioningCommandType_HVAC_SCHEDULE_ENTRY: // AirConditioningDataHvacScheduleEntry
+ _childTemp, typeSwitchError = AirConditioningDataHvacScheduleEntryParse(readBuffer)
+ case commandType == AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY: // AirConditioningDataHvacScheduleEntry
+ _childTemp, typeSwitchError = AirConditioningDataHvacScheduleEntryParse(readBuffer)
+ case commandType == AirConditioningCommandType_REFRESH: // AirConditioningDataRefresh
+ _childTemp, typeSwitchError = AirConditioningDataRefreshParse(readBuffer)
+ case commandType == AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS: // AirConditioningDataZoneHvacPlantStatus
+ _childTemp, typeSwitchError = AirConditioningDataZoneHvacPlantStatusParse(readBuffer)
+ case commandType == AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS: // AirConditioningDataZoneHumidityPlantStatus
+ _childTemp, typeSwitchError = AirConditioningDataZoneHumidityPlantStatusParse(readBuffer)
+ case commandType == AirConditioningCommandType_ZONE_TEMPERATURE: // AirConditioningDataZoneTemperature
+ _childTemp, typeSwitchError = AirConditioningDataZoneTemperatureParse(readBuffer)
+ case commandType == AirConditioningCommandType_ZONE_HUMIDITY: // AirConditioningDataZoneHumidity
+ _childTemp, typeSwitchError = AirConditioningDataZoneHumidityParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_ZONE_GROUP_OFF: // AirConditioningDataSetZoneGroupOff
+ _childTemp, typeSwitchError = AirConditioningDataSetZoneGroupOffParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_ZONE_GROUP_ON: // AirConditioningDataSetZoneGroupOn
+ _childTemp, typeSwitchError = AirConditioningDataSetZoneGroupOnParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_ZONE_HVAC_MODE: // AirConditioningDataSetZoneHvacMode
+ _childTemp, typeSwitchError = AirConditioningDataSetZoneHvacModeParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_PLANT_HVAC_LEVEL: // AirConditioningDataSetPlantHvacLevel
+ _childTemp, typeSwitchError = AirConditioningDataSetPlantHvacLevelParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE: // AirConditioningDataSetZoneHumidityMode
+ _childTemp, typeSwitchError = AirConditioningDataSetZoneHumidityModeParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL: // AirConditioningDataSetPlantHumidityLevel
+ _childTemp, typeSwitchError = AirConditioningDataSetPlantHumidityLevelParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT: // AirConditioningDataSetHvacUpperGuardLimit
+ _childTemp, typeSwitchError = AirConditioningDataSetHvacUpperGuardLimitParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT: // AirConditioningDataSetHvacLowerGuardLimit
+ _childTemp, typeSwitchError = AirConditioningDataSetHvacLowerGuardLimitParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT: // AirConditioningDataSetHvacSetbackLimit
+ _childTemp, typeSwitchError = AirConditioningDataSetHvacSetbackLimitParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT: // AirConditioningDataSetHumidityUpperGuardLimit
+ _childTemp, typeSwitchError = AirConditioningDataSetHumidityUpperGuardLimitParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT: // AirConditioningDataSetHumidityLowerGuardLimit
+ _childTemp, typeSwitchError = AirConditioningDataSetHumidityLowerGuardLimitParse(readBuffer)
+ case commandType == AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT: // AirConditioningDataSetHumiditySetbackLimit
+ _childTemp, typeSwitchError = AirConditioningDataSetHumiditySetbackLimitParse(readBuffer)
+ default:
+ typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v]", commandType)
+ }
+ if typeSwitchError != nil {
+ return nil, errors.Wrap(typeSwitchError, "Error parsing sub-type for type-switch of AirConditioningData")
+ }
+ _child = _childTemp.(AirConditioningDataChildSerializeRequirement)
+
+ if closeErr := readBuffer.CloseContext("AirConditioningData"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningData")
+ }
+
+ // Finish initializing
+ _child.InitializeParent(_child, commandTypeContainer)
+ return _child, nil
+}
+
+func (pm *_AirConditioningData) SerializeParent(writeBuffer utils.WriteBuffer, child AirConditioningData, serializeChildFunction func() error) error {
+ // We redirect all calls through client as some methods are only implemented there
+ m := child
+ _ = m
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("AirConditioningData"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningData")
+ }
+
+ // Simple Field (commandTypeContainer)
+ if pushErr := writeBuffer.PushContext("commandTypeContainer"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for commandTypeContainer")
+ }
+ _commandTypeContainerErr := writeBuffer.WriteSerializable(m.GetCommandTypeContainer())
+ if popErr := writeBuffer.PopContext("commandTypeContainer"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for commandTypeContainer")
+ }
+ if _commandTypeContainerErr != nil {
+ return errors.Wrap(_commandTypeContainerErr, "Error serializing 'commandTypeContainer' field")
+ }
+ // Virtual field
+ if _commandTypeErr := writeBuffer.WriteVirtual("commandType", m.GetCommandType()); _commandTypeErr != nil {
+ return errors.Wrap(_commandTypeErr, "Error serializing 'commandType' field")
+ }
+
+ // Switch field (Depending on the discriminator values, passes the serialization to a sub-type)
+ if _typeSwitchErr := serializeChildFunction(); _typeSwitchErr != nil {
+ return errors.Wrap(_typeSwitchErr, "Error serializing sub-type field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningData"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningData")
+ }
+ return nil
+}
+
+func (m *_AirConditioningData) isAirConditioningData() bool {
+ return true
+}
+
+func (m *_AirConditioningData) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataHvacScheduleEntry.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataHvacScheduleEntry.go
new file mode 100644
index 000000000..0a756fbbf
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataHvacScheduleEntry.go
@@ -0,0 +1,459 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+ "io"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataHvacScheduleEntry is the corresponding interface of AirConditioningDataHvacScheduleEntry
+type AirConditioningDataHvacScheduleEntry interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetEntry returns Entry (property field)
+ GetEntry() uint8
+ // GetFormat returns Format (property field)
+ GetFormat() byte
+ // GetHumidityModeAndFlags returns HumidityModeAndFlags (property field)
+ GetHumidityModeAndFlags() HVACHumidityModeAndFlags
+ // GetStartTime returns StartTime (property field)
+ GetStartTime() HVACStartTime
+ // GetLevel returns Level (property field)
+ GetLevel() HVACHumidity
+ // GetRawLevel returns RawLevel (property field)
+ GetRawLevel() HVACRawLevels
+}
+
+// AirConditioningDataHvacScheduleEntryExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataHvacScheduleEntry.
+// This is useful for switch cases.
+type AirConditioningDataHvacScheduleEntryExactly interface {
+ AirConditioningDataHvacScheduleEntry
+ isAirConditioningDataHvacScheduleEntry() bool
+}
+
+// _AirConditioningDataHvacScheduleEntry is the data-structure of this message
+type _AirConditioningDataHvacScheduleEntry struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ Entry uint8
+ Format byte
+ HumidityModeAndFlags HVACHumidityModeAndFlags
+ StartTime HVACStartTime
+ Level HVACHumidity
+ RawLevel HVACRawLevels
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataHvacScheduleEntry) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetEntry() uint8 {
+ return m.Entry
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetFormat() byte {
+ return m.Format
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetHumidityModeAndFlags() HVACHumidityModeAndFlags {
+ return m.HumidityModeAndFlags
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetStartTime() HVACStartTime {
+ return m.StartTime
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetLevel() HVACHumidity {
+ return m.Level
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetRawLevel() HVACRawLevels {
+ return m.RawLevel
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataHvacScheduleEntry factory function for _AirConditioningDataHvacScheduleEntry
+func NewAirConditioningDataHvacScheduleEntry(zoneGroup byte, zoneList HVACZoneList, entry uint8, format byte, humidityModeAndFlags HVACHumidityModeAndFlags, startTime HVACStartTime, level HVACHumidity, rawLevel HVACRawLevels, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataHvacScheduleEntry {
+ _result := &_AirConditioningDataHvacScheduleEntry{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Entry: entry,
+ Format: format,
+ HumidityModeAndFlags: humidityModeAndFlags,
+ StartTime: startTime,
+ Level: level,
+ RawLevel: rawLevel,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataHvacScheduleEntry(structType interface{}) AirConditioningDataHvacScheduleEntry {
+ if casted, ok := structType.(AirConditioningDataHvacScheduleEntry); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataHvacScheduleEntry); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetTypeName() string {
+ return "AirConditioningDataHvacScheduleEntry"
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (entry)
+ lengthInBits += 8
+
+ // Simple field (format)
+ lengthInBits += 8
+
+ // Simple field (humidityModeAndFlags)
+ lengthInBits += m.HumidityModeAndFlags.GetLengthInBits()
+
+ // Simple field (startTime)
+ lengthInBits += m.StartTime.GetLengthInBits()
+
+ // Optional Field (level)
+ if m.Level != nil {
+ lengthInBits += m.Level.GetLengthInBits()
+ }
+
+ // Optional Field (rawLevel)
+ if m.RawLevel != nil {
+ lengthInBits += m.RawLevel.GetLengthInBits()
+ }
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataHvacScheduleEntryParse(readBuffer utils.ReadBuffer) (AirConditioningDataHvacScheduleEntry, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataHvacScheduleEntry"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataHvacScheduleEntry")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataHvacScheduleEntry")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataHvacScheduleEntry")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (entry)
+ _entry, _entryErr := readBuffer.ReadUint8("entry", 8)
+ if _entryErr != nil {
+ return nil, errors.Wrap(_entryErr, "Error parsing 'entry' field of AirConditioningDataHvacScheduleEntry")
+ }
+ entry := _entry
+
+ // Simple Field (format)
+ _format, _formatErr := readBuffer.ReadByte("format")
+ if _formatErr != nil {
+ return nil, errors.Wrap(_formatErr, "Error parsing 'format' field of AirConditioningDataHvacScheduleEntry")
+ }
+ format := _format
+
+ // Simple Field (humidityModeAndFlags)
+ if pullErr := readBuffer.PullContext("humidityModeAndFlags"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for humidityModeAndFlags")
+ }
+ _humidityModeAndFlags, _humidityModeAndFlagsErr := HVACHumidityModeAndFlagsParse(readBuffer)
+ if _humidityModeAndFlagsErr != nil {
+ return nil, errors.Wrap(_humidityModeAndFlagsErr, "Error parsing 'humidityModeAndFlags' field of AirConditioningDataHvacScheduleEntry")
+ }
+ humidityModeAndFlags := _humidityModeAndFlags.(HVACHumidityModeAndFlags)
+ if closeErr := readBuffer.CloseContext("humidityModeAndFlags"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for humidityModeAndFlags")
+ }
+
+ // Simple Field (startTime)
+ if pullErr := readBuffer.PullContext("startTime"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for startTime")
+ }
+ _startTime, _startTimeErr := HVACStartTimeParse(readBuffer)
+ if _startTimeErr != nil {
+ return nil, errors.Wrap(_startTimeErr, "Error parsing 'startTime' field of AirConditioningDataHvacScheduleEntry")
+ }
+ startTime := _startTime.(HVACStartTime)
+ if closeErr := readBuffer.CloseContext("startTime"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for startTime")
+ }
+
+ // Optional Field (level) (Can be skipped, if a given expression evaluates to false)
+ var level HVACHumidity = nil
+ if humidityModeAndFlags.GetIsLevelHumidity() {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("level"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for level")
+ }
+ _val, _err := HVACHumidityParse(readBuffer)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ log.Debug().Err(_err).Msg("Resetting position because optional threw an error")
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'level' field of AirConditioningDataHvacScheduleEntry")
+ default:
+ level = _val.(HVACHumidity)
+ if closeErr := readBuffer.CloseContext("level"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for level")
+ }
+ }
+ }
+
+ // Optional Field (rawLevel) (Can be skipped, if a given expression evaluates to false)
+ var rawLevel HVACRawLevels = nil
+ if humidityModeAndFlags.GetIsLevelRaw() {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("rawLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for rawLevel")
+ }
+ _val, _err := HVACRawLevelsParse(readBuffer)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ log.Debug().Err(_err).Msg("Resetting position because optional threw an error")
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'rawLevel' field of AirConditioningDataHvacScheduleEntry")
+ default:
+ rawLevel = _val.(HVACRawLevels)
+ if closeErr := readBuffer.CloseContext("rawLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for rawLevel")
+ }
+ }
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataHvacScheduleEntry"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataHvacScheduleEntry")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataHvacScheduleEntry{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Entry: entry,
+ Format: format,
+ HumidityModeAndFlags: humidityModeAndFlags,
+ StartTime: startTime,
+ Level: level,
+ RawLevel: rawLevel,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataHvacScheduleEntry"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataHvacScheduleEntry")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (entry)
+ entry := uint8(m.GetEntry())
+ _entryErr := writeBuffer.WriteUint8("entry", 8, (entry))
+ if _entryErr != nil {
+ return errors.Wrap(_entryErr, "Error serializing 'entry' field")
+ }
+
+ // Simple Field (format)
+ format := byte(m.GetFormat())
+ _formatErr := writeBuffer.WriteByte("format", (format))
+ if _formatErr != nil {
+ return errors.Wrap(_formatErr, "Error serializing 'format' field")
+ }
+
+ // Simple Field (humidityModeAndFlags)
+ if pushErr := writeBuffer.PushContext("humidityModeAndFlags"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for humidityModeAndFlags")
+ }
+ _humidityModeAndFlagsErr := writeBuffer.WriteSerializable(m.GetHumidityModeAndFlags())
+ if popErr := writeBuffer.PopContext("humidityModeAndFlags"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for humidityModeAndFlags")
+ }
+ if _humidityModeAndFlagsErr != nil {
+ return errors.Wrap(_humidityModeAndFlagsErr, "Error serializing 'humidityModeAndFlags' field")
+ }
+
+ // Simple Field (startTime)
+ if pushErr := writeBuffer.PushContext("startTime"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for startTime")
+ }
+ _startTimeErr := writeBuffer.WriteSerializable(m.GetStartTime())
+ if popErr := writeBuffer.PopContext("startTime"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for startTime")
+ }
+ if _startTimeErr != nil {
+ return errors.Wrap(_startTimeErr, "Error serializing 'startTime' field")
+ }
+
+ // Optional Field (level) (Can be skipped, if the value is null)
+ var level HVACHumidity = nil
+ if m.GetLevel() != nil {
+ if pushErr := writeBuffer.PushContext("level"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for level")
+ }
+ level = m.GetLevel()
+ _levelErr := writeBuffer.WriteSerializable(level)
+ if popErr := writeBuffer.PopContext("level"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for level")
+ }
+ if _levelErr != nil {
+ return errors.Wrap(_levelErr, "Error serializing 'level' field")
+ }
+ }
+
+ // Optional Field (rawLevel) (Can be skipped, if the value is null)
+ var rawLevel HVACRawLevels = nil
+ if m.GetRawLevel() != nil {
+ if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for rawLevel")
+ }
+ rawLevel = m.GetRawLevel()
+ _rawLevelErr := writeBuffer.WriteSerializable(rawLevel)
+ if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for rawLevel")
+ }
+ if _rawLevelErr != nil {
+ return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field")
+ }
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataHvacScheduleEntry"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataHvacScheduleEntry")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) isAirConditioningDataHvacScheduleEntry() bool {
+ return true
+}
+
+func (m *_AirConditioningDataHvacScheduleEntry) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataRefresh.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataRefresh.go
new file mode 100644
index 000000000..0410c42e2
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataRefresh.go
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataRefresh is the corresponding interface of AirConditioningDataRefresh
+type AirConditioningDataRefresh interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+}
+
+// AirConditioningDataRefreshExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataRefresh.
+// This is useful for switch cases.
+type AirConditioningDataRefreshExactly interface {
+ AirConditioningDataRefresh
+ isAirConditioningDataRefresh() bool
+}
+
+// _AirConditioningDataRefresh is the data-structure of this message
+type _AirConditioningDataRefresh struct {
+ *_AirConditioningData
+ ZoneGroup byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataRefresh) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataRefresh) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataRefresh) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataRefresh factory function for _AirConditioningDataRefresh
+func NewAirConditioningDataRefresh(zoneGroup byte, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataRefresh {
+ _result := &_AirConditioningDataRefresh{
+ ZoneGroup: zoneGroup,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataRefresh(structType interface{}) AirConditioningDataRefresh {
+ if casted, ok := structType.(AirConditioningDataRefresh); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataRefresh); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataRefresh) GetTypeName() string {
+ return "AirConditioningDataRefresh"
+}
+
+func (m *_AirConditioningDataRefresh) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataRefresh) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataRefresh) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataRefreshParse(readBuffer utils.ReadBuffer) (AirConditioningDataRefresh, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataRefresh"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataRefresh")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataRefresh")
+ }
+ zoneGroup := _zoneGroup
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataRefresh"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataRefresh")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataRefresh{
+ ZoneGroup: zoneGroup,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataRefresh) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataRefresh"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataRefresh")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataRefresh"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataRefresh")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataRefresh) isAirConditioningDataRefresh() bool {
+ return true
+}
+
+func (m *_AirConditioningDataRefresh) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityLowerGuardLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityLowerGuardLimit.go
new file mode 100644
index 000000000..69e521348
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityLowerGuardLimit.go
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetHumidityLowerGuardLimit is the corresponding interface of AirConditioningDataSetHumidityLowerGuardLimit
+type AirConditioningDataSetHumidityLowerGuardLimit interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetLimit returns Limit (property field)
+ GetLimit() HVACHumidity
+ // GetHvacModeAndFlags returns HvacModeAndFlags (property field)
+ GetHvacModeAndFlags() HVACHumidityModeAndFlags
+}
+
+// AirConditioningDataSetHumidityLowerGuardLimitExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetHumidityLowerGuardLimit.
+// This is useful for switch cases.
+type AirConditioningDataSetHumidityLowerGuardLimitExactly interface {
+ AirConditioningDataSetHumidityLowerGuardLimit
+ isAirConditioningDataSetHumidityLowerGuardLimit() bool
+}
+
+// _AirConditioningDataSetHumidityLowerGuardLimit is the data-structure of this message
+type _AirConditioningDataSetHumidityLowerGuardLimit struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ Limit HVACHumidity
+ HvacModeAndFlags HVACHumidityModeAndFlags
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetLimit() HVACHumidity {
+ return m.Limit
+}
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetHvacModeAndFlags() HVACHumidityModeAndFlags {
+ return m.HvacModeAndFlags
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetHumidityLowerGuardLimit factory function for _AirConditioningDataSetHumidityLowerGuardLimit
+func NewAirConditioningDataSetHumidityLowerGuardLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACHumidity, hvacModeAndFlags HVACHumidityModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHumidityLowerGuardLimit {
+ _result := &_AirConditioningDataSetHumidityLowerGuardLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetHumidityLowerGuardLimit(structType interface{}) AirConditioningDataSetHumidityLowerGuardLimit {
+ if casted, ok := structType.(AirConditioningDataSetHumidityLowerGuardLimit); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetHumidityLowerGuardLimit); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetTypeName() string {
+ return "AirConditioningDataSetHumidityLowerGuardLimit"
+}
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (limit)
+ lengthInBits += m.Limit.GetLengthInBits()
+
+ // Simple field (hvacModeAndFlags)
+ lengthInBits += m.HvacModeAndFlags.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetHumidityLowerGuardLimitParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetHumidityLowerGuardLimit, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetHumidityLowerGuardLimit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetHumidityLowerGuardLimit")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHumidityLowerGuardLimit")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHumidityLowerGuardLimit")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (limit)
+ if pullErr := readBuffer.PullContext("limit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for limit")
+ }
+ _limit, _limitErr := HVACHumidityParse(readBuffer)
+ if _limitErr != nil {
+ return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHumidityLowerGuardLimit")
+ }
+ limit := _limit.(HVACHumidity)
+ if closeErr := readBuffer.CloseContext("limit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for limit")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags")
+ }
+ _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACHumidityModeAndFlagsParse(readBuffer)
+ if _hvacModeAndFlagsErr != nil {
+ return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHumidityLowerGuardLimit")
+ }
+ hvacModeAndFlags := _hvacModeAndFlags.(HVACHumidityModeAndFlags)
+ if closeErr := readBuffer.CloseContext("hvacModeAndFlags"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacModeAndFlags")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetHumidityLowerGuardLimit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetHumidityLowerGuardLimit")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetHumidityLowerGuardLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetHumidityLowerGuardLimit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHumidityLowerGuardLimit")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (limit)
+ if pushErr := writeBuffer.PushContext("limit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for limit")
+ }
+ _limitErr := writeBuffer.WriteSerializable(m.GetLimit())
+ if popErr := writeBuffer.PopContext("limit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for limit")
+ }
+ if _limitErr != nil {
+ return errors.Wrap(_limitErr, "Error serializing 'limit' field")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags")
+ }
+ _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(m.GetHvacModeAndFlags())
+ if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacModeAndFlags")
+ }
+ if _hvacModeAndFlagsErr != nil {
+ return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetHumidityLowerGuardLimit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHumidityLowerGuardLimit")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) isAirConditioningDataSetHumidityLowerGuardLimit() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetHumidityLowerGuardLimit) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumiditySetbackLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumiditySetbackLimit.go
new file mode 100644
index 000000000..aaa932618
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumiditySetbackLimit.go
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetHumiditySetbackLimit is the corresponding interface of AirConditioningDataSetHumiditySetbackLimit
+type AirConditioningDataSetHumiditySetbackLimit interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetLimit returns Limit (property field)
+ GetLimit() HVACHumidity
+ // GetHvacModeAndFlags returns HvacModeAndFlags (property field)
+ GetHvacModeAndFlags() HVACHumidityModeAndFlags
+}
+
+// AirConditioningDataSetHumiditySetbackLimitExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetHumiditySetbackLimit.
+// This is useful for switch cases.
+type AirConditioningDataSetHumiditySetbackLimitExactly interface {
+ AirConditioningDataSetHumiditySetbackLimit
+ isAirConditioningDataSetHumiditySetbackLimit() bool
+}
+
+// _AirConditioningDataSetHumiditySetbackLimit is the data-structure of this message
+type _AirConditioningDataSetHumiditySetbackLimit struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ Limit HVACHumidity
+ HvacModeAndFlags HVACHumidityModeAndFlags
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) GetLimit() HVACHumidity {
+ return m.Limit
+}
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) GetHvacModeAndFlags() HVACHumidityModeAndFlags {
+ return m.HvacModeAndFlags
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetHumiditySetbackLimit factory function for _AirConditioningDataSetHumiditySetbackLimit
+func NewAirConditioningDataSetHumiditySetbackLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACHumidity, hvacModeAndFlags HVACHumidityModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHumiditySetbackLimit {
+ _result := &_AirConditioningDataSetHumiditySetbackLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetHumiditySetbackLimit(structType interface{}) AirConditioningDataSetHumiditySetbackLimit {
+ if casted, ok := structType.(AirConditioningDataSetHumiditySetbackLimit); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetHumiditySetbackLimit); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) GetTypeName() string {
+ return "AirConditioningDataSetHumiditySetbackLimit"
+}
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (limit)
+ lengthInBits += m.Limit.GetLengthInBits()
+
+ // Simple field (hvacModeAndFlags)
+ lengthInBits += m.HvacModeAndFlags.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetHumiditySetbackLimitParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetHumiditySetbackLimit, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetHumiditySetbackLimit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetHumiditySetbackLimit")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHumiditySetbackLimit")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHumiditySetbackLimit")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (limit)
+ if pullErr := readBuffer.PullContext("limit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for limit")
+ }
+ _limit, _limitErr := HVACHumidityParse(readBuffer)
+ if _limitErr != nil {
+ return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHumiditySetbackLimit")
+ }
+ limit := _limit.(HVACHumidity)
+ if closeErr := readBuffer.CloseContext("limit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for limit")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags")
+ }
+ _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACHumidityModeAndFlagsParse(readBuffer)
+ if _hvacModeAndFlagsErr != nil {
+ return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHumiditySetbackLimit")
+ }
+ hvacModeAndFlags := _hvacModeAndFlags.(HVACHumidityModeAndFlags)
+ if closeErr := readBuffer.CloseContext("hvacModeAndFlags"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacModeAndFlags")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetHumiditySetbackLimit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetHumiditySetbackLimit")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetHumiditySetbackLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetHumiditySetbackLimit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHumiditySetbackLimit")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (limit)
+ if pushErr := writeBuffer.PushContext("limit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for limit")
+ }
+ _limitErr := writeBuffer.WriteSerializable(m.GetLimit())
+ if popErr := writeBuffer.PopContext("limit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for limit")
+ }
+ if _limitErr != nil {
+ return errors.Wrap(_limitErr, "Error serializing 'limit' field")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags")
+ }
+ _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(m.GetHvacModeAndFlags())
+ if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacModeAndFlags")
+ }
+ if _hvacModeAndFlagsErr != nil {
+ return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetHumiditySetbackLimit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHumiditySetbackLimit")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) isAirConditioningDataSetHumiditySetbackLimit() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetHumiditySetbackLimit) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityUpperGuardLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityUpperGuardLimit.go
new file mode 100644
index 000000000..31cee564b
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityUpperGuardLimit.go
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetHumidityUpperGuardLimit is the corresponding interface of AirConditioningDataSetHumidityUpperGuardLimit
+type AirConditioningDataSetHumidityUpperGuardLimit interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetLimit returns Limit (property field)
+ GetLimit() HVACHumidity
+ // GetHvacModeAndFlags returns HvacModeAndFlags (property field)
+ GetHvacModeAndFlags() HVACHumidityModeAndFlags
+}
+
+// AirConditioningDataSetHumidityUpperGuardLimitExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetHumidityUpperGuardLimit.
+// This is useful for switch cases.
+type AirConditioningDataSetHumidityUpperGuardLimitExactly interface {
+ AirConditioningDataSetHumidityUpperGuardLimit
+ isAirConditioningDataSetHumidityUpperGuardLimit() bool
+}
+
+// _AirConditioningDataSetHumidityUpperGuardLimit is the data-structure of this message
+type _AirConditioningDataSetHumidityUpperGuardLimit struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ Limit HVACHumidity
+ HvacModeAndFlags HVACHumidityModeAndFlags
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetLimit() HVACHumidity {
+ return m.Limit
+}
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetHvacModeAndFlags() HVACHumidityModeAndFlags {
+ return m.HvacModeAndFlags
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetHumidityUpperGuardLimit factory function for _AirConditioningDataSetHumidityUpperGuardLimit
+func NewAirConditioningDataSetHumidityUpperGuardLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACHumidity, hvacModeAndFlags HVACHumidityModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHumidityUpperGuardLimit {
+ _result := &_AirConditioningDataSetHumidityUpperGuardLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetHumidityUpperGuardLimit(structType interface{}) AirConditioningDataSetHumidityUpperGuardLimit {
+ if casted, ok := structType.(AirConditioningDataSetHumidityUpperGuardLimit); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetHumidityUpperGuardLimit); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetTypeName() string {
+ return "AirConditioningDataSetHumidityUpperGuardLimit"
+}
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (limit)
+ lengthInBits += m.Limit.GetLengthInBits()
+
+ // Simple field (hvacModeAndFlags)
+ lengthInBits += m.HvacModeAndFlags.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetHumidityUpperGuardLimitParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetHumidityUpperGuardLimit, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetHumidityUpperGuardLimit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetHumidityUpperGuardLimit")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHumidityUpperGuardLimit")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHumidityUpperGuardLimit")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (limit)
+ if pullErr := readBuffer.PullContext("limit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for limit")
+ }
+ _limit, _limitErr := HVACHumidityParse(readBuffer)
+ if _limitErr != nil {
+ return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHumidityUpperGuardLimit")
+ }
+ limit := _limit.(HVACHumidity)
+ if closeErr := readBuffer.CloseContext("limit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for limit")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags")
+ }
+ _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACHumidityModeAndFlagsParse(readBuffer)
+ if _hvacModeAndFlagsErr != nil {
+ return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHumidityUpperGuardLimit")
+ }
+ hvacModeAndFlags := _hvacModeAndFlags.(HVACHumidityModeAndFlags)
+ if closeErr := readBuffer.CloseContext("hvacModeAndFlags"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacModeAndFlags")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetHumidityUpperGuardLimit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetHumidityUpperGuardLimit")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetHumidityUpperGuardLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetHumidityUpperGuardLimit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHumidityUpperGuardLimit")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (limit)
+ if pushErr := writeBuffer.PushContext("limit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for limit")
+ }
+ _limitErr := writeBuffer.WriteSerializable(m.GetLimit())
+ if popErr := writeBuffer.PopContext("limit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for limit")
+ }
+ if _limitErr != nil {
+ return errors.Wrap(_limitErr, "Error serializing 'limit' field")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags")
+ }
+ _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(m.GetHvacModeAndFlags())
+ if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacModeAndFlags")
+ }
+ if _hvacModeAndFlagsErr != nil {
+ return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetHumidityUpperGuardLimit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHumidityUpperGuardLimit")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) isAirConditioningDataSetHumidityUpperGuardLimit() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetHumidityUpperGuardLimit) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacLowerGuardLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacLowerGuardLimit.go
new file mode 100644
index 000000000..29cbe17b4
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacLowerGuardLimit.go
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetHvacLowerGuardLimit is the corresponding interface of AirConditioningDataSetHvacLowerGuardLimit
+type AirConditioningDataSetHvacLowerGuardLimit interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetLimit returns Limit (property field)
+ GetLimit() HVACTemperature
+ // GetHvacModeAndFlags returns HvacModeAndFlags (property field)
+ GetHvacModeAndFlags() HVACModeAndFlags
+}
+
+// AirConditioningDataSetHvacLowerGuardLimitExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetHvacLowerGuardLimit.
+// This is useful for switch cases.
+type AirConditioningDataSetHvacLowerGuardLimitExactly interface {
+ AirConditioningDataSetHvacLowerGuardLimit
+ isAirConditioningDataSetHvacLowerGuardLimit() bool
+}
+
+// _AirConditioningDataSetHvacLowerGuardLimit is the data-structure of this message
+type _AirConditioningDataSetHvacLowerGuardLimit struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ Limit HVACTemperature
+ HvacModeAndFlags HVACModeAndFlags
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetLimit() HVACTemperature {
+ return m.Limit
+}
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetHvacModeAndFlags() HVACModeAndFlags {
+ return m.HvacModeAndFlags
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetHvacLowerGuardLimit factory function for _AirConditioningDataSetHvacLowerGuardLimit
+func NewAirConditioningDataSetHvacLowerGuardLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACTemperature, hvacModeAndFlags HVACModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHvacLowerGuardLimit {
+ _result := &_AirConditioningDataSetHvacLowerGuardLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetHvacLowerGuardLimit(structType interface{}) AirConditioningDataSetHvacLowerGuardLimit {
+ if casted, ok := structType.(AirConditioningDataSetHvacLowerGuardLimit); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetHvacLowerGuardLimit); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetTypeName() string {
+ return "AirConditioningDataSetHvacLowerGuardLimit"
+}
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (limit)
+ lengthInBits += m.Limit.GetLengthInBits()
+
+ // Simple field (hvacModeAndFlags)
+ lengthInBits += m.HvacModeAndFlags.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetHvacLowerGuardLimitParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetHvacLowerGuardLimit, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetHvacLowerGuardLimit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetHvacLowerGuardLimit")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHvacLowerGuardLimit")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHvacLowerGuardLimit")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (limit)
+ if pullErr := readBuffer.PullContext("limit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for limit")
+ }
+ _limit, _limitErr := HVACTemperatureParse(readBuffer)
+ if _limitErr != nil {
+ return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHvacLowerGuardLimit")
+ }
+ limit := _limit.(HVACTemperature)
+ if closeErr := readBuffer.CloseContext("limit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for limit")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags")
+ }
+ _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParse(readBuffer)
+ if _hvacModeAndFlagsErr != nil {
+ return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHvacLowerGuardLimit")
+ }
+ hvacModeAndFlags := _hvacModeAndFlags.(HVACModeAndFlags)
+ if closeErr := readBuffer.CloseContext("hvacModeAndFlags"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacModeAndFlags")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetHvacLowerGuardLimit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetHvacLowerGuardLimit")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetHvacLowerGuardLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetHvacLowerGuardLimit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHvacLowerGuardLimit")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (limit)
+ if pushErr := writeBuffer.PushContext("limit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for limit")
+ }
+ _limitErr := writeBuffer.WriteSerializable(m.GetLimit())
+ if popErr := writeBuffer.PopContext("limit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for limit")
+ }
+ if _limitErr != nil {
+ return errors.Wrap(_limitErr, "Error serializing 'limit' field")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags")
+ }
+ _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(m.GetHvacModeAndFlags())
+ if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacModeAndFlags")
+ }
+ if _hvacModeAndFlagsErr != nil {
+ return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetHvacLowerGuardLimit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHvacLowerGuardLimit")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) isAirConditioningDataSetHvacLowerGuardLimit() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetHvacLowerGuardLimit) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacSetbackLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacSetbackLimit.go
new file mode 100644
index 000000000..9958d7ccb
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacSetbackLimit.go
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetHvacSetbackLimit is the corresponding interface of AirConditioningDataSetHvacSetbackLimit
+type AirConditioningDataSetHvacSetbackLimit interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetLimit returns Limit (property field)
+ GetLimit() HVACTemperature
+ // GetHvacModeAndFlags returns HvacModeAndFlags (property field)
+ GetHvacModeAndFlags() HVACModeAndFlags
+}
+
+// AirConditioningDataSetHvacSetbackLimitExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetHvacSetbackLimit.
+// This is useful for switch cases.
+type AirConditioningDataSetHvacSetbackLimitExactly interface {
+ AirConditioningDataSetHvacSetbackLimit
+ isAirConditioningDataSetHvacSetbackLimit() bool
+}
+
+// _AirConditioningDataSetHvacSetbackLimit is the data-structure of this message
+type _AirConditioningDataSetHvacSetbackLimit struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ Limit HVACTemperature
+ HvacModeAndFlags HVACModeAndFlags
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) GetLimit() HVACTemperature {
+ return m.Limit
+}
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) GetHvacModeAndFlags() HVACModeAndFlags {
+ return m.HvacModeAndFlags
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetHvacSetbackLimit factory function for _AirConditioningDataSetHvacSetbackLimit
+func NewAirConditioningDataSetHvacSetbackLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACTemperature, hvacModeAndFlags HVACModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHvacSetbackLimit {
+ _result := &_AirConditioningDataSetHvacSetbackLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetHvacSetbackLimit(structType interface{}) AirConditioningDataSetHvacSetbackLimit {
+ if casted, ok := structType.(AirConditioningDataSetHvacSetbackLimit); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetHvacSetbackLimit); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) GetTypeName() string {
+ return "AirConditioningDataSetHvacSetbackLimit"
+}
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (limit)
+ lengthInBits += m.Limit.GetLengthInBits()
+
+ // Simple field (hvacModeAndFlags)
+ lengthInBits += m.HvacModeAndFlags.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetHvacSetbackLimitParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetHvacSetbackLimit, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetHvacSetbackLimit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetHvacSetbackLimit")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHvacSetbackLimit")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHvacSetbackLimit")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (limit)
+ if pullErr := readBuffer.PullContext("limit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for limit")
+ }
+ _limit, _limitErr := HVACTemperatureParse(readBuffer)
+ if _limitErr != nil {
+ return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHvacSetbackLimit")
+ }
+ limit := _limit.(HVACTemperature)
+ if closeErr := readBuffer.CloseContext("limit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for limit")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags")
+ }
+ _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParse(readBuffer)
+ if _hvacModeAndFlagsErr != nil {
+ return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHvacSetbackLimit")
+ }
+ hvacModeAndFlags := _hvacModeAndFlags.(HVACModeAndFlags)
+ if closeErr := readBuffer.CloseContext("hvacModeAndFlags"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacModeAndFlags")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetHvacSetbackLimit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetHvacSetbackLimit")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetHvacSetbackLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetHvacSetbackLimit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHvacSetbackLimit")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (limit)
+ if pushErr := writeBuffer.PushContext("limit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for limit")
+ }
+ _limitErr := writeBuffer.WriteSerializable(m.GetLimit())
+ if popErr := writeBuffer.PopContext("limit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for limit")
+ }
+ if _limitErr != nil {
+ return errors.Wrap(_limitErr, "Error serializing 'limit' field")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags")
+ }
+ _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(m.GetHvacModeAndFlags())
+ if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacModeAndFlags")
+ }
+ if _hvacModeAndFlagsErr != nil {
+ return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetHvacSetbackLimit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHvacSetbackLimit")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) isAirConditioningDataSetHvacSetbackLimit() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetHvacSetbackLimit) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacUpperGuardLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacUpperGuardLimit.go
new file mode 100644
index 000000000..92cd86cc6
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacUpperGuardLimit.go
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetHvacUpperGuardLimit is the corresponding interface of AirConditioningDataSetHvacUpperGuardLimit
+type AirConditioningDataSetHvacUpperGuardLimit interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetLimit returns Limit (property field)
+ GetLimit() HVACTemperature
+ // GetHvacModeAndFlags returns HvacModeAndFlags (property field)
+ GetHvacModeAndFlags() HVACModeAndFlags
+}
+
+// AirConditioningDataSetHvacUpperGuardLimitExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetHvacUpperGuardLimit.
+// This is useful for switch cases.
+type AirConditioningDataSetHvacUpperGuardLimitExactly interface {
+ AirConditioningDataSetHvacUpperGuardLimit
+ isAirConditioningDataSetHvacUpperGuardLimit() bool
+}
+
+// _AirConditioningDataSetHvacUpperGuardLimit is the data-structure of this message
+type _AirConditioningDataSetHvacUpperGuardLimit struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ Limit HVACTemperature
+ HvacModeAndFlags HVACModeAndFlags
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetLimit() HVACTemperature {
+ return m.Limit
+}
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetHvacModeAndFlags() HVACModeAndFlags {
+ return m.HvacModeAndFlags
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetHvacUpperGuardLimit factory function for _AirConditioningDataSetHvacUpperGuardLimit
+func NewAirConditioningDataSetHvacUpperGuardLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACTemperature, hvacModeAndFlags HVACModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHvacUpperGuardLimit {
+ _result := &_AirConditioningDataSetHvacUpperGuardLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetHvacUpperGuardLimit(structType interface{}) AirConditioningDataSetHvacUpperGuardLimit {
+ if casted, ok := structType.(AirConditioningDataSetHvacUpperGuardLimit); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetHvacUpperGuardLimit); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetTypeName() string {
+ return "AirConditioningDataSetHvacUpperGuardLimit"
+}
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (limit)
+ lengthInBits += m.Limit.GetLengthInBits()
+
+ // Simple field (hvacModeAndFlags)
+ lengthInBits += m.HvacModeAndFlags.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetHvacUpperGuardLimitParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetHvacUpperGuardLimit, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetHvacUpperGuardLimit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetHvacUpperGuardLimit")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHvacUpperGuardLimit")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHvacUpperGuardLimit")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (limit)
+ if pullErr := readBuffer.PullContext("limit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for limit")
+ }
+ _limit, _limitErr := HVACTemperatureParse(readBuffer)
+ if _limitErr != nil {
+ return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHvacUpperGuardLimit")
+ }
+ limit := _limit.(HVACTemperature)
+ if closeErr := readBuffer.CloseContext("limit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for limit")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags")
+ }
+ _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParse(readBuffer)
+ if _hvacModeAndFlagsErr != nil {
+ return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHvacUpperGuardLimit")
+ }
+ hvacModeAndFlags := _hvacModeAndFlags.(HVACModeAndFlags)
+ if closeErr := readBuffer.CloseContext("hvacModeAndFlags"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacModeAndFlags")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetHvacUpperGuardLimit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetHvacUpperGuardLimit")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetHvacUpperGuardLimit{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Limit: limit,
+ HvacModeAndFlags: hvacModeAndFlags,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetHvacUpperGuardLimit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHvacUpperGuardLimit")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (limit)
+ if pushErr := writeBuffer.PushContext("limit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for limit")
+ }
+ _limitErr := writeBuffer.WriteSerializable(m.GetLimit())
+ if popErr := writeBuffer.PopContext("limit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for limit")
+ }
+ if _limitErr != nil {
+ return errors.Wrap(_limitErr, "Error serializing 'limit' field")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags")
+ }
+ _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(m.GetHvacModeAndFlags())
+ if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacModeAndFlags")
+ }
+ if _hvacModeAndFlagsErr != nil {
+ return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetHvacUpperGuardLimit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHvacUpperGuardLimit")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) isAirConditioningDataSetHvacUpperGuardLimit() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetHvacUpperGuardLimit) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHumidityLevel.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHumidityLevel.go
new file mode 100644
index 000000000..4ee3a7dba
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHumidityLevel.go
@@ -0,0 +1,444 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+ "io"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetPlantHumidityLevel is the corresponding interface of AirConditioningDataSetPlantHumidityLevel
+type AirConditioningDataSetPlantHumidityLevel interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetHumidityModeAndFlags returns HumidityModeAndFlags (property field)
+ GetHumidityModeAndFlags() HVACHumidityModeAndFlags
+ // GetHumidityType returns HumidityType (property field)
+ GetHumidityType() HVACHumidityType
+ // GetLevel returns Level (property field)
+ GetLevel() HVACHumidity
+ // GetRawLevel returns RawLevel (property field)
+ GetRawLevel() HVACRawLevels
+ // GetAuxLevel returns AuxLevel (property field)
+ GetAuxLevel() HVACAuxiliaryLevel
+}
+
+// AirConditioningDataSetPlantHumidityLevelExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetPlantHumidityLevel.
+// This is useful for switch cases.
+type AirConditioningDataSetPlantHumidityLevelExactly interface {
+ AirConditioningDataSetPlantHumidityLevel
+ isAirConditioningDataSetPlantHumidityLevel() bool
+}
+
+// _AirConditioningDataSetPlantHumidityLevel is the data-structure of this message
+type _AirConditioningDataSetPlantHumidityLevel struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ HumidityModeAndFlags HVACHumidityModeAndFlags
+ HumidityType HVACHumidityType
+ Level HVACHumidity
+ RawLevel HVACRawLevels
+ AuxLevel HVACAuxiliaryLevel
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetHumidityModeAndFlags() HVACHumidityModeAndFlags {
+ return m.HumidityModeAndFlags
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetHumidityType() HVACHumidityType {
+ return m.HumidityType
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetLevel() HVACHumidity {
+ return m.Level
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetRawLevel() HVACRawLevels {
+ return m.RawLevel
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetAuxLevel() HVACAuxiliaryLevel {
+ return m.AuxLevel
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetPlantHumidityLevel factory function for _AirConditioningDataSetPlantHumidityLevel
+func NewAirConditioningDataSetPlantHumidityLevel(zoneGroup byte, zoneList HVACZoneList, humidityModeAndFlags HVACHumidityModeAndFlags, humidityType HVACHumidityType, level HVACHumidity, rawLevel HVACRawLevels, auxLevel HVACAuxiliaryLevel, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetPlantHumidityLevel {
+ _result := &_AirConditioningDataSetPlantHumidityLevel{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HumidityModeAndFlags: humidityModeAndFlags,
+ HumidityType: humidityType,
+ Level: level,
+ RawLevel: rawLevel,
+ AuxLevel: auxLevel,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetPlantHumidityLevel(structType interface{}) AirConditioningDataSetPlantHumidityLevel {
+ if casted, ok := structType.(AirConditioningDataSetPlantHumidityLevel); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetPlantHumidityLevel); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetTypeName() string {
+ return "AirConditioningDataSetPlantHumidityLevel"
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (humidityModeAndFlags)
+ lengthInBits += m.HumidityModeAndFlags.GetLengthInBits()
+
+ // Simple field (humidityType)
+ lengthInBits += 8
+
+ // Optional Field (level)
+ if m.Level != nil {
+ lengthInBits += m.Level.GetLengthInBits()
+ }
+
+ // Optional Field (rawLevel)
+ if m.RawLevel != nil {
+ lengthInBits += m.RawLevel.GetLengthInBits()
+ }
+
+ // Simple field (auxLevel)
+ lengthInBits += m.AuxLevel.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetPlantHumidityLevelParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetPlantHumidityLevel, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetPlantHumidityLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetPlantHumidityLevel")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetPlantHumidityLevel")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetPlantHumidityLevel")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (humidityModeAndFlags)
+ if pullErr := readBuffer.PullContext("humidityModeAndFlags"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for humidityModeAndFlags")
+ }
+ _humidityModeAndFlags, _humidityModeAndFlagsErr := HVACHumidityModeAndFlagsParse(readBuffer)
+ if _humidityModeAndFlagsErr != nil {
+ return nil, errors.Wrap(_humidityModeAndFlagsErr, "Error parsing 'humidityModeAndFlags' field of AirConditioningDataSetPlantHumidityLevel")
+ }
+ humidityModeAndFlags := _humidityModeAndFlags.(HVACHumidityModeAndFlags)
+ if closeErr := readBuffer.CloseContext("humidityModeAndFlags"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for humidityModeAndFlags")
+ }
+
+ // Simple Field (humidityType)
+ if pullErr := readBuffer.PullContext("humidityType"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for humidityType")
+ }
+ _humidityType, _humidityTypeErr := HVACHumidityTypeParse(readBuffer)
+ if _humidityTypeErr != nil {
+ return nil, errors.Wrap(_humidityTypeErr, "Error parsing 'humidityType' field of AirConditioningDataSetPlantHumidityLevel")
+ }
+ humidityType := _humidityType
+ if closeErr := readBuffer.CloseContext("humidityType"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for humidityType")
+ }
+
+ // Optional Field (level) (Can be skipped, if a given expression evaluates to false)
+ var level HVACHumidity = nil
+ if humidityModeAndFlags.GetIsLevelHumidity() {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("level"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for level")
+ }
+ _val, _err := HVACHumidityParse(readBuffer)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ log.Debug().Err(_err).Msg("Resetting position because optional threw an error")
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'level' field of AirConditioningDataSetPlantHumidityLevel")
+ default:
+ level = _val.(HVACHumidity)
+ if closeErr := readBuffer.CloseContext("level"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for level")
+ }
+ }
+ }
+
+ // Optional Field (rawLevel) (Can be skipped, if a given expression evaluates to false)
+ var rawLevel HVACRawLevels = nil
+ if humidityModeAndFlags.GetIsLevelRaw() {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("rawLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for rawLevel")
+ }
+ _val, _err := HVACRawLevelsParse(readBuffer)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ log.Debug().Err(_err).Msg("Resetting position because optional threw an error")
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'rawLevel' field of AirConditioningDataSetPlantHumidityLevel")
+ default:
+ rawLevel = _val.(HVACRawLevels)
+ if closeErr := readBuffer.CloseContext("rawLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for rawLevel")
+ }
+ }
+ }
+
+ // Simple Field (auxLevel)
+ if pullErr := readBuffer.PullContext("auxLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for auxLevel")
+ }
+ _auxLevel, _auxLevelErr := HVACAuxiliaryLevelParse(readBuffer)
+ if _auxLevelErr != nil {
+ return nil, errors.Wrap(_auxLevelErr, "Error parsing 'auxLevel' field of AirConditioningDataSetPlantHumidityLevel")
+ }
+ auxLevel := _auxLevel.(HVACAuxiliaryLevel)
+ if closeErr := readBuffer.CloseContext("auxLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for auxLevel")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetPlantHumidityLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetPlantHumidityLevel")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetPlantHumidityLevel{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HumidityModeAndFlags: humidityModeAndFlags,
+ HumidityType: humidityType,
+ Level: level,
+ RawLevel: rawLevel,
+ AuxLevel: auxLevel,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetPlantHumidityLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetPlantHumidityLevel")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (humidityModeAndFlags)
+ if pushErr := writeBuffer.PushContext("humidityModeAndFlags"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for humidityModeAndFlags")
+ }
+ _humidityModeAndFlagsErr := writeBuffer.WriteSerializable(m.GetHumidityModeAndFlags())
+ if popErr := writeBuffer.PopContext("humidityModeAndFlags"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for humidityModeAndFlags")
+ }
+ if _humidityModeAndFlagsErr != nil {
+ return errors.Wrap(_humidityModeAndFlagsErr, "Error serializing 'humidityModeAndFlags' field")
+ }
+
+ // Simple Field (humidityType)
+ if pushErr := writeBuffer.PushContext("humidityType"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for humidityType")
+ }
+ _humidityTypeErr := writeBuffer.WriteSerializable(m.GetHumidityType())
+ if popErr := writeBuffer.PopContext("humidityType"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for humidityType")
+ }
+ if _humidityTypeErr != nil {
+ return errors.Wrap(_humidityTypeErr, "Error serializing 'humidityType' field")
+ }
+
+ // Optional Field (level) (Can be skipped, if the value is null)
+ var level HVACHumidity = nil
+ if m.GetLevel() != nil {
+ if pushErr := writeBuffer.PushContext("level"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for level")
+ }
+ level = m.GetLevel()
+ _levelErr := writeBuffer.WriteSerializable(level)
+ if popErr := writeBuffer.PopContext("level"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for level")
+ }
+ if _levelErr != nil {
+ return errors.Wrap(_levelErr, "Error serializing 'level' field")
+ }
+ }
+
+ // Optional Field (rawLevel) (Can be skipped, if the value is null)
+ var rawLevel HVACRawLevels = nil
+ if m.GetRawLevel() != nil {
+ if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for rawLevel")
+ }
+ rawLevel = m.GetRawLevel()
+ _rawLevelErr := writeBuffer.WriteSerializable(rawLevel)
+ if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for rawLevel")
+ }
+ if _rawLevelErr != nil {
+ return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field")
+ }
+ }
+
+ // Simple Field (auxLevel)
+ if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for auxLevel")
+ }
+ _auxLevelErr := writeBuffer.WriteSerializable(m.GetAuxLevel())
+ if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for auxLevel")
+ }
+ if _auxLevelErr != nil {
+ return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetPlantHumidityLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetPlantHumidityLevel")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) isAirConditioningDataSetPlantHumidityLevel() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetPlantHumidityLevel) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHvacLevel.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHvacLevel.go
new file mode 100644
index 000000000..18e3555e3
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHvacLevel.go
@@ -0,0 +1,444 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+ "io"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetPlantHvacLevel is the corresponding interface of AirConditioningDataSetPlantHvacLevel
+type AirConditioningDataSetPlantHvacLevel interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetHvacModeAndFlags returns HvacModeAndFlags (property field)
+ GetHvacModeAndFlags() HVACModeAndFlags
+ // GetHvacType returns HvacType (property field)
+ GetHvacType() HVACType
+ // GetLevel returns Level (property field)
+ GetLevel() HVACTemperature
+ // GetRawLevel returns RawLevel (property field)
+ GetRawLevel() HVACRawLevels
+ // GetAuxLevel returns AuxLevel (property field)
+ GetAuxLevel() HVACAuxiliaryLevel
+}
+
+// AirConditioningDataSetPlantHvacLevelExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetPlantHvacLevel.
+// This is useful for switch cases.
+type AirConditioningDataSetPlantHvacLevelExactly interface {
+ AirConditioningDataSetPlantHvacLevel
+ isAirConditioningDataSetPlantHvacLevel() bool
+}
+
+// _AirConditioningDataSetPlantHvacLevel is the data-structure of this message
+type _AirConditioningDataSetPlantHvacLevel struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ HvacModeAndFlags HVACModeAndFlags
+ HvacType HVACType
+ Level HVACTemperature
+ RawLevel HVACRawLevels
+ AuxLevel HVACAuxiliaryLevel
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetPlantHvacLevel) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetHvacModeAndFlags() HVACModeAndFlags {
+ return m.HvacModeAndFlags
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetHvacType() HVACType {
+ return m.HvacType
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetLevel() HVACTemperature {
+ return m.Level
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetRawLevel() HVACRawLevels {
+ return m.RawLevel
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetAuxLevel() HVACAuxiliaryLevel {
+ return m.AuxLevel
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetPlantHvacLevel factory function for _AirConditioningDataSetPlantHvacLevel
+func NewAirConditioningDataSetPlantHvacLevel(zoneGroup byte, zoneList HVACZoneList, hvacModeAndFlags HVACModeAndFlags, hvacType HVACType, level HVACTemperature, rawLevel HVACRawLevels, auxLevel HVACAuxiliaryLevel, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetPlantHvacLevel {
+ _result := &_AirConditioningDataSetPlantHvacLevel{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HvacModeAndFlags: hvacModeAndFlags,
+ HvacType: hvacType,
+ Level: level,
+ RawLevel: rawLevel,
+ AuxLevel: auxLevel,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetPlantHvacLevel(structType interface{}) AirConditioningDataSetPlantHvacLevel {
+ if casted, ok := structType.(AirConditioningDataSetPlantHvacLevel); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetPlantHvacLevel); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetTypeName() string {
+ return "AirConditioningDataSetPlantHvacLevel"
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (hvacModeAndFlags)
+ lengthInBits += m.HvacModeAndFlags.GetLengthInBits()
+
+ // Simple field (hvacType)
+ lengthInBits += 8
+
+ // Optional Field (level)
+ if m.Level != nil {
+ lengthInBits += m.Level.GetLengthInBits()
+ }
+
+ // Optional Field (rawLevel)
+ if m.RawLevel != nil {
+ lengthInBits += m.RawLevel.GetLengthInBits()
+ }
+
+ // Simple field (auxLevel)
+ lengthInBits += m.AuxLevel.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetPlantHvacLevelParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetPlantHvacLevel, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetPlantHvacLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetPlantHvacLevel")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetPlantHvacLevel")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetPlantHvacLevel")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags")
+ }
+ _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParse(readBuffer)
+ if _hvacModeAndFlagsErr != nil {
+ return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetPlantHvacLevel")
+ }
+ hvacModeAndFlags := _hvacModeAndFlags.(HVACModeAndFlags)
+ if closeErr := readBuffer.CloseContext("hvacModeAndFlags"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacModeAndFlags")
+ }
+
+ // Simple Field (hvacType)
+ if pullErr := readBuffer.PullContext("hvacType"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacType")
+ }
+ _hvacType, _hvacTypeErr := HVACTypeParse(readBuffer)
+ if _hvacTypeErr != nil {
+ return nil, errors.Wrap(_hvacTypeErr, "Error parsing 'hvacType' field of AirConditioningDataSetPlantHvacLevel")
+ }
+ hvacType := _hvacType
+ if closeErr := readBuffer.CloseContext("hvacType"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacType")
+ }
+
+ // Optional Field (level) (Can be skipped, if a given expression evaluates to false)
+ var level HVACTemperature = nil
+ if hvacModeAndFlags.GetIsLevelTemperature() {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("level"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for level")
+ }
+ _val, _err := HVACTemperatureParse(readBuffer)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ log.Debug().Err(_err).Msg("Resetting position because optional threw an error")
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'level' field of AirConditioningDataSetPlantHvacLevel")
+ default:
+ level = _val.(HVACTemperature)
+ if closeErr := readBuffer.CloseContext("level"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for level")
+ }
+ }
+ }
+
+ // Optional Field (rawLevel) (Can be skipped, if a given expression evaluates to false)
+ var rawLevel HVACRawLevels = nil
+ if hvacModeAndFlags.GetIsLevelRaw() {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("rawLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for rawLevel")
+ }
+ _val, _err := HVACRawLevelsParse(readBuffer)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ log.Debug().Err(_err).Msg("Resetting position because optional threw an error")
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'rawLevel' field of AirConditioningDataSetPlantHvacLevel")
+ default:
+ rawLevel = _val.(HVACRawLevels)
+ if closeErr := readBuffer.CloseContext("rawLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for rawLevel")
+ }
+ }
+ }
+
+ // Simple Field (auxLevel)
+ if pullErr := readBuffer.PullContext("auxLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for auxLevel")
+ }
+ _auxLevel, _auxLevelErr := HVACAuxiliaryLevelParse(readBuffer)
+ if _auxLevelErr != nil {
+ return nil, errors.Wrap(_auxLevelErr, "Error parsing 'auxLevel' field of AirConditioningDataSetPlantHvacLevel")
+ }
+ auxLevel := _auxLevel.(HVACAuxiliaryLevel)
+ if closeErr := readBuffer.CloseContext("auxLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for auxLevel")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetPlantHvacLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetPlantHvacLevel")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetPlantHvacLevel{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HvacModeAndFlags: hvacModeAndFlags,
+ HvacType: hvacType,
+ Level: level,
+ RawLevel: rawLevel,
+ AuxLevel: auxLevel,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetPlantHvacLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetPlantHvacLevel")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags")
+ }
+ _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(m.GetHvacModeAndFlags())
+ if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacModeAndFlags")
+ }
+ if _hvacModeAndFlagsErr != nil {
+ return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field")
+ }
+
+ // Simple Field (hvacType)
+ if pushErr := writeBuffer.PushContext("hvacType"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacType")
+ }
+ _hvacTypeErr := writeBuffer.WriteSerializable(m.GetHvacType())
+ if popErr := writeBuffer.PopContext("hvacType"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacType")
+ }
+ if _hvacTypeErr != nil {
+ return errors.Wrap(_hvacTypeErr, "Error serializing 'hvacType' field")
+ }
+
+ // Optional Field (level) (Can be skipped, if the value is null)
+ var level HVACTemperature = nil
+ if m.GetLevel() != nil {
+ if pushErr := writeBuffer.PushContext("level"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for level")
+ }
+ level = m.GetLevel()
+ _levelErr := writeBuffer.WriteSerializable(level)
+ if popErr := writeBuffer.PopContext("level"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for level")
+ }
+ if _levelErr != nil {
+ return errors.Wrap(_levelErr, "Error serializing 'level' field")
+ }
+ }
+
+ // Optional Field (rawLevel) (Can be skipped, if the value is null)
+ var rawLevel HVACRawLevels = nil
+ if m.GetRawLevel() != nil {
+ if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for rawLevel")
+ }
+ rawLevel = m.GetRawLevel()
+ _rawLevelErr := writeBuffer.WriteSerializable(rawLevel)
+ if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for rawLevel")
+ }
+ if _rawLevelErr != nil {
+ return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field")
+ }
+ }
+
+ // Simple Field (auxLevel)
+ if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for auxLevel")
+ }
+ _auxLevelErr := writeBuffer.WriteSerializable(m.GetAuxLevel())
+ if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for auxLevel")
+ }
+ if _auxLevelErr != nil {
+ return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetPlantHvacLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetPlantHvacLevel")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) isAirConditioningDataSetPlantHvacLevel() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetPlantHvacLevel) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOff.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOff.go
new file mode 100644
index 000000000..ad9eab1ed
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOff.go
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetZoneGroupOff is the corresponding interface of AirConditioningDataSetZoneGroupOff
+type AirConditioningDataSetZoneGroupOff interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+}
+
+// AirConditioningDataSetZoneGroupOffExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetZoneGroupOff.
+// This is useful for switch cases.
+type AirConditioningDataSetZoneGroupOffExactly interface {
+ AirConditioningDataSetZoneGroupOff
+ isAirConditioningDataSetZoneGroupOff() bool
+}
+
+// _AirConditioningDataSetZoneGroupOff is the data-structure of this message
+type _AirConditioningDataSetZoneGroupOff struct {
+ *_AirConditioningData
+ ZoneGroup byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetZoneGroupOff) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetZoneGroupOff) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetZoneGroupOff) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetZoneGroupOff factory function for _AirConditioningDataSetZoneGroupOff
+func NewAirConditioningDataSetZoneGroupOff(zoneGroup byte, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetZoneGroupOff {
+ _result := &_AirConditioningDataSetZoneGroupOff{
+ ZoneGroup: zoneGroup,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetZoneGroupOff(structType interface{}) AirConditioningDataSetZoneGroupOff {
+ if casted, ok := structType.(AirConditioningDataSetZoneGroupOff); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetZoneGroupOff); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetZoneGroupOff) GetTypeName() string {
+ return "AirConditioningDataSetZoneGroupOff"
+}
+
+func (m *_AirConditioningDataSetZoneGroupOff) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetZoneGroupOff) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetZoneGroupOff) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetZoneGroupOffParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetZoneGroupOff, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetZoneGroupOff"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetZoneGroupOff")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetZoneGroupOff")
+ }
+ zoneGroup := _zoneGroup
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetZoneGroupOff"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetZoneGroupOff")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetZoneGroupOff{
+ ZoneGroup: zoneGroup,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetZoneGroupOff) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetZoneGroupOff"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetZoneGroupOff")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetZoneGroupOff"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetZoneGroupOff")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetZoneGroupOff) isAirConditioningDataSetZoneGroupOff() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetZoneGroupOff) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOn.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOn.go
new file mode 100644
index 000000000..63e66e0b1
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOn.go
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetZoneGroupOn is the corresponding interface of AirConditioningDataSetZoneGroupOn
+type AirConditioningDataSetZoneGroupOn interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+}
+
+// AirConditioningDataSetZoneGroupOnExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetZoneGroupOn.
+// This is useful for switch cases.
+type AirConditioningDataSetZoneGroupOnExactly interface {
+ AirConditioningDataSetZoneGroupOn
+ isAirConditioningDataSetZoneGroupOn() bool
+}
+
+// _AirConditioningDataSetZoneGroupOn is the data-structure of this message
+type _AirConditioningDataSetZoneGroupOn struct {
+ *_AirConditioningData
+ ZoneGroup byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetZoneGroupOn) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetZoneGroupOn) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetZoneGroupOn) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetZoneGroupOn factory function for _AirConditioningDataSetZoneGroupOn
+func NewAirConditioningDataSetZoneGroupOn(zoneGroup byte, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetZoneGroupOn {
+ _result := &_AirConditioningDataSetZoneGroupOn{
+ ZoneGroup: zoneGroup,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetZoneGroupOn(structType interface{}) AirConditioningDataSetZoneGroupOn {
+ if casted, ok := structType.(AirConditioningDataSetZoneGroupOn); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetZoneGroupOn); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetZoneGroupOn) GetTypeName() string {
+ return "AirConditioningDataSetZoneGroupOn"
+}
+
+func (m *_AirConditioningDataSetZoneGroupOn) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetZoneGroupOn) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetZoneGroupOn) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetZoneGroupOnParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetZoneGroupOn, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetZoneGroupOn"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetZoneGroupOn")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetZoneGroupOn")
+ }
+ zoneGroup := _zoneGroup
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetZoneGroupOn"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetZoneGroupOn")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetZoneGroupOn{
+ ZoneGroup: zoneGroup,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetZoneGroupOn) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetZoneGroupOn"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetZoneGroupOn")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetZoneGroupOn"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetZoneGroupOn")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetZoneGroupOn) isAirConditioningDataSetZoneGroupOn() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetZoneGroupOn) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHumidityMode.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHumidityMode.go
new file mode 100644
index 000000000..ff5b2ebb8
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHumidityMode.go
@@ -0,0 +1,444 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+ "io"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetZoneHumidityMode is the corresponding interface of AirConditioningDataSetZoneHumidityMode
+type AirConditioningDataSetZoneHumidityMode interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetHumidityModeAndFlags returns HumidityModeAndFlags (property field)
+ GetHumidityModeAndFlags() HVACHumidityModeAndFlags
+ // GetHumidityType returns HumidityType (property field)
+ GetHumidityType() HVACHumidityType
+ // GetLevel returns Level (property field)
+ GetLevel() HVACHumidity
+ // GetRawLevel returns RawLevel (property field)
+ GetRawLevel() HVACRawLevels
+ // GetAuxLevel returns AuxLevel (property field)
+ GetAuxLevel() HVACAuxiliaryLevel
+}
+
+// AirConditioningDataSetZoneHumidityModeExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetZoneHumidityMode.
+// This is useful for switch cases.
+type AirConditioningDataSetZoneHumidityModeExactly interface {
+ AirConditioningDataSetZoneHumidityMode
+ isAirConditioningDataSetZoneHumidityMode() bool
+}
+
+// _AirConditioningDataSetZoneHumidityMode is the data-structure of this message
+type _AirConditioningDataSetZoneHumidityMode struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ HumidityModeAndFlags HVACHumidityModeAndFlags
+ HumidityType HVACHumidityType
+ Level HVACHumidity
+ RawLevel HVACRawLevels
+ AuxLevel HVACAuxiliaryLevel
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetZoneHumidityMode) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetHumidityModeAndFlags() HVACHumidityModeAndFlags {
+ return m.HumidityModeAndFlags
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetHumidityType() HVACHumidityType {
+ return m.HumidityType
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetLevel() HVACHumidity {
+ return m.Level
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetRawLevel() HVACRawLevels {
+ return m.RawLevel
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetAuxLevel() HVACAuxiliaryLevel {
+ return m.AuxLevel
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetZoneHumidityMode factory function for _AirConditioningDataSetZoneHumidityMode
+func NewAirConditioningDataSetZoneHumidityMode(zoneGroup byte, zoneList HVACZoneList, humidityModeAndFlags HVACHumidityModeAndFlags, humidityType HVACHumidityType, level HVACHumidity, rawLevel HVACRawLevels, auxLevel HVACAuxiliaryLevel, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetZoneHumidityMode {
+ _result := &_AirConditioningDataSetZoneHumidityMode{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HumidityModeAndFlags: humidityModeAndFlags,
+ HumidityType: humidityType,
+ Level: level,
+ RawLevel: rawLevel,
+ AuxLevel: auxLevel,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetZoneHumidityMode(structType interface{}) AirConditioningDataSetZoneHumidityMode {
+ if casted, ok := structType.(AirConditioningDataSetZoneHumidityMode); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetZoneHumidityMode); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetTypeName() string {
+ return "AirConditioningDataSetZoneHumidityMode"
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (humidityModeAndFlags)
+ lengthInBits += m.HumidityModeAndFlags.GetLengthInBits()
+
+ // Simple field (humidityType)
+ lengthInBits += 8
+
+ // Optional Field (level)
+ if m.Level != nil {
+ lengthInBits += m.Level.GetLengthInBits()
+ }
+
+ // Optional Field (rawLevel)
+ if m.RawLevel != nil {
+ lengthInBits += m.RawLevel.GetLengthInBits()
+ }
+
+ // Simple field (auxLevel)
+ lengthInBits += m.AuxLevel.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetZoneHumidityModeParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetZoneHumidityMode, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetZoneHumidityMode"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetZoneHumidityMode")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetZoneHumidityMode")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetZoneHumidityMode")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (humidityModeAndFlags)
+ if pullErr := readBuffer.PullContext("humidityModeAndFlags"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for humidityModeAndFlags")
+ }
+ _humidityModeAndFlags, _humidityModeAndFlagsErr := HVACHumidityModeAndFlagsParse(readBuffer)
+ if _humidityModeAndFlagsErr != nil {
+ return nil, errors.Wrap(_humidityModeAndFlagsErr, "Error parsing 'humidityModeAndFlags' field of AirConditioningDataSetZoneHumidityMode")
+ }
+ humidityModeAndFlags := _humidityModeAndFlags.(HVACHumidityModeAndFlags)
+ if closeErr := readBuffer.CloseContext("humidityModeAndFlags"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for humidityModeAndFlags")
+ }
+
+ // Simple Field (humidityType)
+ if pullErr := readBuffer.PullContext("humidityType"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for humidityType")
+ }
+ _humidityType, _humidityTypeErr := HVACHumidityTypeParse(readBuffer)
+ if _humidityTypeErr != nil {
+ return nil, errors.Wrap(_humidityTypeErr, "Error parsing 'humidityType' field of AirConditioningDataSetZoneHumidityMode")
+ }
+ humidityType := _humidityType
+ if closeErr := readBuffer.CloseContext("humidityType"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for humidityType")
+ }
+
+ // Optional Field (level) (Can be skipped, if a given expression evaluates to false)
+ var level HVACHumidity = nil
+ if humidityModeAndFlags.GetIsLevelHumidity() {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("level"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for level")
+ }
+ _val, _err := HVACHumidityParse(readBuffer)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ log.Debug().Err(_err).Msg("Resetting position because optional threw an error")
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'level' field of AirConditioningDataSetZoneHumidityMode")
+ default:
+ level = _val.(HVACHumidity)
+ if closeErr := readBuffer.CloseContext("level"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for level")
+ }
+ }
+ }
+
+ // Optional Field (rawLevel) (Can be skipped, if a given expression evaluates to false)
+ var rawLevel HVACRawLevels = nil
+ if humidityModeAndFlags.GetIsLevelRaw() {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("rawLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for rawLevel")
+ }
+ _val, _err := HVACRawLevelsParse(readBuffer)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ log.Debug().Err(_err).Msg("Resetting position because optional threw an error")
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'rawLevel' field of AirConditioningDataSetZoneHumidityMode")
+ default:
+ rawLevel = _val.(HVACRawLevels)
+ if closeErr := readBuffer.CloseContext("rawLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for rawLevel")
+ }
+ }
+ }
+
+ // Simple Field (auxLevel)
+ if pullErr := readBuffer.PullContext("auxLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for auxLevel")
+ }
+ _auxLevel, _auxLevelErr := HVACAuxiliaryLevelParse(readBuffer)
+ if _auxLevelErr != nil {
+ return nil, errors.Wrap(_auxLevelErr, "Error parsing 'auxLevel' field of AirConditioningDataSetZoneHumidityMode")
+ }
+ auxLevel := _auxLevel.(HVACAuxiliaryLevel)
+ if closeErr := readBuffer.CloseContext("auxLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for auxLevel")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetZoneHumidityMode"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetZoneHumidityMode")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetZoneHumidityMode{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HumidityModeAndFlags: humidityModeAndFlags,
+ HumidityType: humidityType,
+ Level: level,
+ RawLevel: rawLevel,
+ AuxLevel: auxLevel,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetZoneHumidityMode"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetZoneHumidityMode")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (humidityModeAndFlags)
+ if pushErr := writeBuffer.PushContext("humidityModeAndFlags"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for humidityModeAndFlags")
+ }
+ _humidityModeAndFlagsErr := writeBuffer.WriteSerializable(m.GetHumidityModeAndFlags())
+ if popErr := writeBuffer.PopContext("humidityModeAndFlags"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for humidityModeAndFlags")
+ }
+ if _humidityModeAndFlagsErr != nil {
+ return errors.Wrap(_humidityModeAndFlagsErr, "Error serializing 'humidityModeAndFlags' field")
+ }
+
+ // Simple Field (humidityType)
+ if pushErr := writeBuffer.PushContext("humidityType"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for humidityType")
+ }
+ _humidityTypeErr := writeBuffer.WriteSerializable(m.GetHumidityType())
+ if popErr := writeBuffer.PopContext("humidityType"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for humidityType")
+ }
+ if _humidityTypeErr != nil {
+ return errors.Wrap(_humidityTypeErr, "Error serializing 'humidityType' field")
+ }
+
+ // Optional Field (level) (Can be skipped, if the value is null)
+ var level HVACHumidity = nil
+ if m.GetLevel() != nil {
+ if pushErr := writeBuffer.PushContext("level"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for level")
+ }
+ level = m.GetLevel()
+ _levelErr := writeBuffer.WriteSerializable(level)
+ if popErr := writeBuffer.PopContext("level"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for level")
+ }
+ if _levelErr != nil {
+ return errors.Wrap(_levelErr, "Error serializing 'level' field")
+ }
+ }
+
+ // Optional Field (rawLevel) (Can be skipped, if the value is null)
+ var rawLevel HVACRawLevels = nil
+ if m.GetRawLevel() != nil {
+ if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for rawLevel")
+ }
+ rawLevel = m.GetRawLevel()
+ _rawLevelErr := writeBuffer.WriteSerializable(rawLevel)
+ if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for rawLevel")
+ }
+ if _rawLevelErr != nil {
+ return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field")
+ }
+ }
+
+ // Simple Field (auxLevel)
+ if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for auxLevel")
+ }
+ _auxLevelErr := writeBuffer.WriteSerializable(m.GetAuxLevel())
+ if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for auxLevel")
+ }
+ if _auxLevelErr != nil {
+ return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetZoneHumidityMode"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetZoneHumidityMode")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) isAirConditioningDataSetZoneHumidityMode() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetZoneHumidityMode) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHvacMode.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHvacMode.go
new file mode 100644
index 000000000..11061ae4c
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHvacMode.go
@@ -0,0 +1,444 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+ "io"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataSetZoneHvacMode is the corresponding interface of AirConditioningDataSetZoneHvacMode
+type AirConditioningDataSetZoneHvacMode interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetHvacModeAndFlags returns HvacModeAndFlags (property field)
+ GetHvacModeAndFlags() HVACModeAndFlags
+ // GetHvacType returns HvacType (property field)
+ GetHvacType() HVACType
+ // GetLevel returns Level (property field)
+ GetLevel() HVACTemperature
+ // GetRawLevel returns RawLevel (property field)
+ GetRawLevel() HVACRawLevels
+ // GetAuxLevel returns AuxLevel (property field)
+ GetAuxLevel() HVACAuxiliaryLevel
+}
+
+// AirConditioningDataSetZoneHvacModeExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataSetZoneHvacMode.
+// This is useful for switch cases.
+type AirConditioningDataSetZoneHvacModeExactly interface {
+ AirConditioningDataSetZoneHvacMode
+ isAirConditioningDataSetZoneHvacMode() bool
+}
+
+// _AirConditioningDataSetZoneHvacMode is the data-structure of this message
+type _AirConditioningDataSetZoneHvacMode struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ HvacModeAndFlags HVACModeAndFlags
+ HvacType HVACType
+ Level HVACTemperature
+ RawLevel HVACRawLevels
+ AuxLevel HVACAuxiliaryLevel
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataSetZoneHvacMode) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetHvacModeAndFlags() HVACModeAndFlags {
+ return m.HvacModeAndFlags
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetHvacType() HVACType {
+ return m.HvacType
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetLevel() HVACTemperature {
+ return m.Level
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetRawLevel() HVACRawLevels {
+ return m.RawLevel
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetAuxLevel() HVACAuxiliaryLevel {
+ return m.AuxLevel
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataSetZoneHvacMode factory function for _AirConditioningDataSetZoneHvacMode
+func NewAirConditioningDataSetZoneHvacMode(zoneGroup byte, zoneList HVACZoneList, hvacModeAndFlags HVACModeAndFlags, hvacType HVACType, level HVACTemperature, rawLevel HVACRawLevels, auxLevel HVACAuxiliaryLevel, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetZoneHvacMode {
+ _result := &_AirConditioningDataSetZoneHvacMode{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HvacModeAndFlags: hvacModeAndFlags,
+ HvacType: hvacType,
+ Level: level,
+ RawLevel: rawLevel,
+ AuxLevel: auxLevel,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataSetZoneHvacMode(structType interface{}) AirConditioningDataSetZoneHvacMode {
+ if casted, ok := structType.(AirConditioningDataSetZoneHvacMode); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataSetZoneHvacMode); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetTypeName() string {
+ return "AirConditioningDataSetZoneHvacMode"
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (hvacModeAndFlags)
+ lengthInBits += m.HvacModeAndFlags.GetLengthInBits()
+
+ // Simple field (hvacType)
+ lengthInBits += 8
+
+ // Optional Field (level)
+ if m.Level != nil {
+ lengthInBits += m.Level.GetLengthInBits()
+ }
+
+ // Optional Field (rawLevel)
+ if m.RawLevel != nil {
+ lengthInBits += m.RawLevel.GetLengthInBits()
+ }
+
+ // Simple field (auxLevel)
+ lengthInBits += m.AuxLevel.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataSetZoneHvacModeParse(readBuffer utils.ReadBuffer) (AirConditioningDataSetZoneHvacMode, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataSetZoneHvacMode"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataSetZoneHvacMode")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetZoneHvacMode")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetZoneHvacMode")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags")
+ }
+ _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParse(readBuffer)
+ if _hvacModeAndFlagsErr != nil {
+ return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetZoneHvacMode")
+ }
+ hvacModeAndFlags := _hvacModeAndFlags.(HVACModeAndFlags)
+ if closeErr := readBuffer.CloseContext("hvacModeAndFlags"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacModeAndFlags")
+ }
+
+ // Simple Field (hvacType)
+ if pullErr := readBuffer.PullContext("hvacType"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacType")
+ }
+ _hvacType, _hvacTypeErr := HVACTypeParse(readBuffer)
+ if _hvacTypeErr != nil {
+ return nil, errors.Wrap(_hvacTypeErr, "Error parsing 'hvacType' field of AirConditioningDataSetZoneHvacMode")
+ }
+ hvacType := _hvacType
+ if closeErr := readBuffer.CloseContext("hvacType"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacType")
+ }
+
+ // Optional Field (level) (Can be skipped, if a given expression evaluates to false)
+ var level HVACTemperature = nil
+ if hvacModeAndFlags.GetIsLevelTemperature() {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("level"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for level")
+ }
+ _val, _err := HVACTemperatureParse(readBuffer)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ log.Debug().Err(_err).Msg("Resetting position because optional threw an error")
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'level' field of AirConditioningDataSetZoneHvacMode")
+ default:
+ level = _val.(HVACTemperature)
+ if closeErr := readBuffer.CloseContext("level"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for level")
+ }
+ }
+ }
+
+ // Optional Field (rawLevel) (Can be skipped, if a given expression evaluates to false)
+ var rawLevel HVACRawLevels = nil
+ if hvacModeAndFlags.GetIsLevelRaw() {
+ currentPos = positionAware.GetPos()
+ if pullErr := readBuffer.PullContext("rawLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for rawLevel")
+ }
+ _val, _err := HVACRawLevelsParse(readBuffer)
+ switch {
+ case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
+ log.Debug().Err(_err).Msg("Resetting position because optional threw an error")
+ readBuffer.Reset(currentPos)
+ case _err != nil:
+ return nil, errors.Wrap(_err, "Error parsing 'rawLevel' field of AirConditioningDataSetZoneHvacMode")
+ default:
+ rawLevel = _val.(HVACRawLevels)
+ if closeErr := readBuffer.CloseContext("rawLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for rawLevel")
+ }
+ }
+ }
+
+ // Simple Field (auxLevel)
+ if pullErr := readBuffer.PullContext("auxLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for auxLevel")
+ }
+ _auxLevel, _auxLevelErr := HVACAuxiliaryLevelParse(readBuffer)
+ if _auxLevelErr != nil {
+ return nil, errors.Wrap(_auxLevelErr, "Error parsing 'auxLevel' field of AirConditioningDataSetZoneHvacMode")
+ }
+ auxLevel := _auxLevel.(HVACAuxiliaryLevel)
+ if closeErr := readBuffer.CloseContext("auxLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for auxLevel")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataSetZoneHvacMode"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataSetZoneHvacMode")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataSetZoneHvacMode{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HvacModeAndFlags: hvacModeAndFlags,
+ HvacType: hvacType,
+ Level: level,
+ RawLevel: rawLevel,
+ AuxLevel: auxLevel,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataSetZoneHvacMode"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetZoneHvacMode")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (hvacModeAndFlags)
+ if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags")
+ }
+ _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(m.GetHvacModeAndFlags())
+ if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacModeAndFlags")
+ }
+ if _hvacModeAndFlagsErr != nil {
+ return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field")
+ }
+
+ // Simple Field (hvacType)
+ if pushErr := writeBuffer.PushContext("hvacType"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacType")
+ }
+ _hvacTypeErr := writeBuffer.WriteSerializable(m.GetHvacType())
+ if popErr := writeBuffer.PopContext("hvacType"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacType")
+ }
+ if _hvacTypeErr != nil {
+ return errors.Wrap(_hvacTypeErr, "Error serializing 'hvacType' field")
+ }
+
+ // Optional Field (level) (Can be skipped, if the value is null)
+ var level HVACTemperature = nil
+ if m.GetLevel() != nil {
+ if pushErr := writeBuffer.PushContext("level"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for level")
+ }
+ level = m.GetLevel()
+ _levelErr := writeBuffer.WriteSerializable(level)
+ if popErr := writeBuffer.PopContext("level"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for level")
+ }
+ if _levelErr != nil {
+ return errors.Wrap(_levelErr, "Error serializing 'level' field")
+ }
+ }
+
+ // Optional Field (rawLevel) (Can be skipped, if the value is null)
+ var rawLevel HVACRawLevels = nil
+ if m.GetRawLevel() != nil {
+ if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for rawLevel")
+ }
+ rawLevel = m.GetRawLevel()
+ _rawLevelErr := writeBuffer.WriteSerializable(rawLevel)
+ if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for rawLevel")
+ }
+ if _rawLevelErr != nil {
+ return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field")
+ }
+ }
+
+ // Simple Field (auxLevel)
+ if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for auxLevel")
+ }
+ _auxLevelErr := writeBuffer.WriteSerializable(m.GetAuxLevel())
+ if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for auxLevel")
+ }
+ if _auxLevelErr != nil {
+ return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataSetZoneHvacMode"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataSetZoneHvacMode")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) isAirConditioningDataSetZoneHvacMode() bool {
+ return true
+}
+
+func (m *_AirConditioningDataSetZoneHvacMode) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidity.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidity.go
new file mode 100644
index 000000000..923ea39e2
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidity.go
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataZoneHumidity is the corresponding interface of AirConditioningDataZoneHumidity
+type AirConditioningDataZoneHumidity interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetHumidity returns Humidity (property field)
+ GetHumidity() HVACHumidity
+ // GetSensorStatus returns SensorStatus (property field)
+ GetSensorStatus() HVACSensorStatus
+}
+
+// AirConditioningDataZoneHumidityExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataZoneHumidity.
+// This is useful for switch cases.
+type AirConditioningDataZoneHumidityExactly interface {
+ AirConditioningDataZoneHumidity
+ isAirConditioningDataZoneHumidity() bool
+}
+
+// _AirConditioningDataZoneHumidity is the data-structure of this message
+type _AirConditioningDataZoneHumidity struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ Humidity HVACHumidity
+ SensorStatus HVACSensorStatus
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataZoneHumidity) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataZoneHumidity) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataZoneHumidity) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataZoneHumidity) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataZoneHumidity) GetHumidity() HVACHumidity {
+ return m.Humidity
+}
+
+func (m *_AirConditioningDataZoneHumidity) GetSensorStatus() HVACSensorStatus {
+ return m.SensorStatus
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataZoneHumidity factory function for _AirConditioningDataZoneHumidity
+func NewAirConditioningDataZoneHumidity(zoneGroup byte, zoneList HVACZoneList, humidity HVACHumidity, sensorStatus HVACSensorStatus, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataZoneHumidity {
+ _result := &_AirConditioningDataZoneHumidity{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Humidity: humidity,
+ SensorStatus: sensorStatus,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataZoneHumidity(structType interface{}) AirConditioningDataZoneHumidity {
+ if casted, ok := structType.(AirConditioningDataZoneHumidity); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataZoneHumidity); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataZoneHumidity) GetTypeName() string {
+ return "AirConditioningDataZoneHumidity"
+}
+
+func (m *_AirConditioningDataZoneHumidity) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataZoneHumidity) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (humidity)
+ lengthInBits += m.Humidity.GetLengthInBits()
+
+ // Simple field (sensorStatus)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataZoneHumidity) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataZoneHumidityParse(readBuffer utils.ReadBuffer) (AirConditioningDataZoneHumidity, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataZoneHumidity"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataZoneHumidity")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataZoneHumidity")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataZoneHumidity")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (humidity)
+ if pullErr := readBuffer.PullContext("humidity"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for humidity")
+ }
+ _humidity, _humidityErr := HVACHumidityParse(readBuffer)
+ if _humidityErr != nil {
+ return nil, errors.Wrap(_humidityErr, "Error parsing 'humidity' field of AirConditioningDataZoneHumidity")
+ }
+ humidity := _humidity.(HVACHumidity)
+ if closeErr := readBuffer.CloseContext("humidity"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for humidity")
+ }
+
+ // Simple Field (sensorStatus)
+ if pullErr := readBuffer.PullContext("sensorStatus"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for sensorStatus")
+ }
+ _sensorStatus, _sensorStatusErr := HVACSensorStatusParse(readBuffer)
+ if _sensorStatusErr != nil {
+ return nil, errors.Wrap(_sensorStatusErr, "Error parsing 'sensorStatus' field of AirConditioningDataZoneHumidity")
+ }
+ sensorStatus := _sensorStatus
+ if closeErr := readBuffer.CloseContext("sensorStatus"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for sensorStatus")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataZoneHumidity"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataZoneHumidity")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataZoneHumidity{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Humidity: humidity,
+ SensorStatus: sensorStatus,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataZoneHumidity) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataZoneHumidity"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataZoneHumidity")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (humidity)
+ if pushErr := writeBuffer.PushContext("humidity"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for humidity")
+ }
+ _humidityErr := writeBuffer.WriteSerializable(m.GetHumidity())
+ if popErr := writeBuffer.PopContext("humidity"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for humidity")
+ }
+ if _humidityErr != nil {
+ return errors.Wrap(_humidityErr, "Error serializing 'humidity' field")
+ }
+
+ // Simple Field (sensorStatus)
+ if pushErr := writeBuffer.PushContext("sensorStatus"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for sensorStatus")
+ }
+ _sensorStatusErr := writeBuffer.WriteSerializable(m.GetSensorStatus())
+ if popErr := writeBuffer.PopContext("sensorStatus"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for sensorStatus")
+ }
+ if _sensorStatusErr != nil {
+ return errors.Wrap(_sensorStatusErr, "Error serializing 'sensorStatus' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataZoneHumidity"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataZoneHumidity")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataZoneHumidity) isAirConditioningDataZoneHumidity() bool {
+ return true
+}
+
+func (m *_AirConditioningDataZoneHumidity) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidityPlantStatus.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidityPlantStatus.go
new file mode 100644
index 000000000..77b0278d5
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidityPlantStatus.go
@@ -0,0 +1,338 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataZoneHumidityPlantStatus is the corresponding interface of AirConditioningDataZoneHumidityPlantStatus
+type AirConditioningDataZoneHumidityPlantStatus interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetHumidityType returns HumidityType (property field)
+ GetHumidityType() HVACHumidityType
+ // GetHumidityStatus returns HumidityStatus (property field)
+ GetHumidityStatus() HVACHumidityStatusFlags
+ // GetHumidityErrorCode returns HumidityErrorCode (property field)
+ GetHumidityErrorCode() HVACHumidityError
+}
+
+// AirConditioningDataZoneHumidityPlantStatusExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataZoneHumidityPlantStatus.
+// This is useful for switch cases.
+type AirConditioningDataZoneHumidityPlantStatusExactly interface {
+ AirConditioningDataZoneHumidityPlantStatus
+ isAirConditioningDataZoneHumidityPlantStatus() bool
+}
+
+// _AirConditioningDataZoneHumidityPlantStatus is the data-structure of this message
+type _AirConditioningDataZoneHumidityPlantStatus struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ HumidityType HVACHumidityType
+ HumidityStatus HVACHumidityStatusFlags
+ HumidityErrorCode HVACHumidityError
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) GetHumidityType() HVACHumidityType {
+ return m.HumidityType
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) GetHumidityStatus() HVACHumidityStatusFlags {
+ return m.HumidityStatus
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) GetHumidityErrorCode() HVACHumidityError {
+ return m.HumidityErrorCode
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataZoneHumidityPlantStatus factory function for _AirConditioningDataZoneHumidityPlantStatus
+func NewAirConditioningDataZoneHumidityPlantStatus(zoneGroup byte, zoneList HVACZoneList, humidityType HVACHumidityType, humidityStatus HVACHumidityStatusFlags, humidityErrorCode HVACHumidityError, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataZoneHumidityPlantStatus {
+ _result := &_AirConditioningDataZoneHumidityPlantStatus{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HumidityType: humidityType,
+ HumidityStatus: humidityStatus,
+ HumidityErrorCode: humidityErrorCode,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataZoneHumidityPlantStatus(structType interface{}) AirConditioningDataZoneHumidityPlantStatus {
+ if casted, ok := structType.(AirConditioningDataZoneHumidityPlantStatus); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataZoneHumidityPlantStatus); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) GetTypeName() string {
+ return "AirConditioningDataZoneHumidityPlantStatus"
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (humidityType)
+ lengthInBits += 8
+
+ // Simple field (humidityStatus)
+ lengthInBits += m.HumidityStatus.GetLengthInBits()
+
+ // Simple field (humidityErrorCode)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataZoneHumidityPlantStatusParse(readBuffer utils.ReadBuffer) (AirConditioningDataZoneHumidityPlantStatus, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataZoneHumidityPlantStatus"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataZoneHumidityPlantStatus")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataZoneHumidityPlantStatus")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataZoneHumidityPlantStatus")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (humidityType)
+ if pullErr := readBuffer.PullContext("humidityType"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for humidityType")
+ }
+ _humidityType, _humidityTypeErr := HVACHumidityTypeParse(readBuffer)
+ if _humidityTypeErr != nil {
+ return nil, errors.Wrap(_humidityTypeErr, "Error parsing 'humidityType' field of AirConditioningDataZoneHumidityPlantStatus")
+ }
+ humidityType := _humidityType
+ if closeErr := readBuffer.CloseContext("humidityType"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for humidityType")
+ }
+
+ // Simple Field (humidityStatus)
+ if pullErr := readBuffer.PullContext("humidityStatus"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for humidityStatus")
+ }
+ _humidityStatus, _humidityStatusErr := HVACHumidityStatusFlagsParse(readBuffer)
+ if _humidityStatusErr != nil {
+ return nil, errors.Wrap(_humidityStatusErr, "Error parsing 'humidityStatus' field of AirConditioningDataZoneHumidityPlantStatus")
+ }
+ humidityStatus := _humidityStatus.(HVACHumidityStatusFlags)
+ if closeErr := readBuffer.CloseContext("humidityStatus"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for humidityStatus")
+ }
+
+ // Simple Field (humidityErrorCode)
+ if pullErr := readBuffer.PullContext("humidityErrorCode"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for humidityErrorCode")
+ }
+ _humidityErrorCode, _humidityErrorCodeErr := HVACHumidityErrorParse(readBuffer)
+ if _humidityErrorCodeErr != nil {
+ return nil, errors.Wrap(_humidityErrorCodeErr, "Error parsing 'humidityErrorCode' field of AirConditioningDataZoneHumidityPlantStatus")
+ }
+ humidityErrorCode := _humidityErrorCode
+ if closeErr := readBuffer.CloseContext("humidityErrorCode"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for humidityErrorCode")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataZoneHumidityPlantStatus"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataZoneHumidityPlantStatus")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataZoneHumidityPlantStatus{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HumidityType: humidityType,
+ HumidityStatus: humidityStatus,
+ HumidityErrorCode: humidityErrorCode,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataZoneHumidityPlantStatus"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataZoneHumidityPlantStatus")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (humidityType)
+ if pushErr := writeBuffer.PushContext("humidityType"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for humidityType")
+ }
+ _humidityTypeErr := writeBuffer.WriteSerializable(m.GetHumidityType())
+ if popErr := writeBuffer.PopContext("humidityType"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for humidityType")
+ }
+ if _humidityTypeErr != nil {
+ return errors.Wrap(_humidityTypeErr, "Error serializing 'humidityType' field")
+ }
+
+ // Simple Field (humidityStatus)
+ if pushErr := writeBuffer.PushContext("humidityStatus"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for humidityStatus")
+ }
+ _humidityStatusErr := writeBuffer.WriteSerializable(m.GetHumidityStatus())
+ if popErr := writeBuffer.PopContext("humidityStatus"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for humidityStatus")
+ }
+ if _humidityStatusErr != nil {
+ return errors.Wrap(_humidityStatusErr, "Error serializing 'humidityStatus' field")
+ }
+
+ // Simple Field (humidityErrorCode)
+ if pushErr := writeBuffer.PushContext("humidityErrorCode"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for humidityErrorCode")
+ }
+ _humidityErrorCodeErr := writeBuffer.WriteSerializable(m.GetHumidityErrorCode())
+ if popErr := writeBuffer.PopContext("humidityErrorCode"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for humidityErrorCode")
+ }
+ if _humidityErrorCodeErr != nil {
+ return errors.Wrap(_humidityErrorCodeErr, "Error serializing 'humidityErrorCode' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataZoneHumidityPlantStatus"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataZoneHumidityPlantStatus")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) isAirConditioningDataZoneHumidityPlantStatus() bool {
+ return true
+}
+
+func (m *_AirConditioningDataZoneHumidityPlantStatus) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHvacPlantStatus.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHvacPlantStatus.go
new file mode 100644
index 000000000..e3e1bb02b
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHvacPlantStatus.go
@@ -0,0 +1,338 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataZoneHvacPlantStatus is the corresponding interface of AirConditioningDataZoneHvacPlantStatus
+type AirConditioningDataZoneHvacPlantStatus interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetHvacType returns HvacType (property field)
+ GetHvacType() HVACType
+ // GetHvacStatus returns HvacStatus (property field)
+ GetHvacStatus() HVACStatusFlags
+ // GetHvacErrorCode returns HvacErrorCode (property field)
+ GetHvacErrorCode() HVACError
+}
+
+// AirConditioningDataZoneHvacPlantStatusExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataZoneHvacPlantStatus.
+// This is useful for switch cases.
+type AirConditioningDataZoneHvacPlantStatusExactly interface {
+ AirConditioningDataZoneHvacPlantStatus
+ isAirConditioningDataZoneHvacPlantStatus() bool
+}
+
+// _AirConditioningDataZoneHvacPlantStatus is the data-structure of this message
+type _AirConditioningDataZoneHvacPlantStatus struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ HvacType HVACType
+ HvacStatus HVACStatusFlags
+ HvacErrorCode HVACError
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) GetHvacType() HVACType {
+ return m.HvacType
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) GetHvacStatus() HVACStatusFlags {
+ return m.HvacStatus
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) GetHvacErrorCode() HVACError {
+ return m.HvacErrorCode
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataZoneHvacPlantStatus factory function for _AirConditioningDataZoneHvacPlantStatus
+func NewAirConditioningDataZoneHvacPlantStatus(zoneGroup byte, zoneList HVACZoneList, hvacType HVACType, hvacStatus HVACStatusFlags, hvacErrorCode HVACError, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataZoneHvacPlantStatus {
+ _result := &_AirConditioningDataZoneHvacPlantStatus{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HvacType: hvacType,
+ HvacStatus: hvacStatus,
+ HvacErrorCode: hvacErrorCode,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataZoneHvacPlantStatus(structType interface{}) AirConditioningDataZoneHvacPlantStatus {
+ if casted, ok := structType.(AirConditioningDataZoneHvacPlantStatus); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataZoneHvacPlantStatus); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) GetTypeName() string {
+ return "AirConditioningDataZoneHvacPlantStatus"
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (hvacType)
+ lengthInBits += 8
+
+ // Simple field (hvacStatus)
+ lengthInBits += m.HvacStatus.GetLengthInBits()
+
+ // Simple field (hvacErrorCode)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataZoneHvacPlantStatusParse(readBuffer utils.ReadBuffer) (AirConditioningDataZoneHvacPlantStatus, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataZoneHvacPlantStatus"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataZoneHvacPlantStatus")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataZoneHvacPlantStatus")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataZoneHvacPlantStatus")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (hvacType)
+ if pullErr := readBuffer.PullContext("hvacType"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacType")
+ }
+ _hvacType, _hvacTypeErr := HVACTypeParse(readBuffer)
+ if _hvacTypeErr != nil {
+ return nil, errors.Wrap(_hvacTypeErr, "Error parsing 'hvacType' field of AirConditioningDataZoneHvacPlantStatus")
+ }
+ hvacType := _hvacType
+ if closeErr := readBuffer.CloseContext("hvacType"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacType")
+ }
+
+ // Simple Field (hvacStatus)
+ if pullErr := readBuffer.PullContext("hvacStatus"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacStatus")
+ }
+ _hvacStatus, _hvacStatusErr := HVACStatusFlagsParse(readBuffer)
+ if _hvacStatusErr != nil {
+ return nil, errors.Wrap(_hvacStatusErr, "Error parsing 'hvacStatus' field of AirConditioningDataZoneHvacPlantStatus")
+ }
+ hvacStatus := _hvacStatus.(HVACStatusFlags)
+ if closeErr := readBuffer.CloseContext("hvacStatus"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacStatus")
+ }
+
+ // Simple Field (hvacErrorCode)
+ if pullErr := readBuffer.PullContext("hvacErrorCode"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for hvacErrorCode")
+ }
+ _hvacErrorCode, _hvacErrorCodeErr := HVACErrorParse(readBuffer)
+ if _hvacErrorCodeErr != nil {
+ return nil, errors.Wrap(_hvacErrorCodeErr, "Error parsing 'hvacErrorCode' field of AirConditioningDataZoneHvacPlantStatus")
+ }
+ hvacErrorCode := _hvacErrorCode
+ if closeErr := readBuffer.CloseContext("hvacErrorCode"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for hvacErrorCode")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataZoneHvacPlantStatus"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataZoneHvacPlantStatus")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataZoneHvacPlantStatus{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ HvacType: hvacType,
+ HvacStatus: hvacStatus,
+ HvacErrorCode: hvacErrorCode,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataZoneHvacPlantStatus"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataZoneHvacPlantStatus")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (hvacType)
+ if pushErr := writeBuffer.PushContext("hvacType"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacType")
+ }
+ _hvacTypeErr := writeBuffer.WriteSerializable(m.GetHvacType())
+ if popErr := writeBuffer.PopContext("hvacType"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacType")
+ }
+ if _hvacTypeErr != nil {
+ return errors.Wrap(_hvacTypeErr, "Error serializing 'hvacType' field")
+ }
+
+ // Simple Field (hvacStatus)
+ if pushErr := writeBuffer.PushContext("hvacStatus"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacStatus")
+ }
+ _hvacStatusErr := writeBuffer.WriteSerializable(m.GetHvacStatus())
+ if popErr := writeBuffer.PopContext("hvacStatus"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacStatus")
+ }
+ if _hvacStatusErr != nil {
+ return errors.Wrap(_hvacStatusErr, "Error serializing 'hvacStatus' field")
+ }
+
+ // Simple Field (hvacErrorCode)
+ if pushErr := writeBuffer.PushContext("hvacErrorCode"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for hvacErrorCode")
+ }
+ _hvacErrorCodeErr := writeBuffer.WriteSerializable(m.GetHvacErrorCode())
+ if popErr := writeBuffer.PopContext("hvacErrorCode"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for hvacErrorCode")
+ }
+ if _hvacErrorCodeErr != nil {
+ return errors.Wrap(_hvacErrorCodeErr, "Error serializing 'hvacErrorCode' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataZoneHvacPlantStatus"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataZoneHvacPlantStatus")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) isAirConditioningDataZoneHvacPlantStatus() bool {
+ return true
+}
+
+func (m *_AirConditioningDataZoneHvacPlantStatus) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneTemperature.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneTemperature.go
new file mode 100644
index 000000000..11a7c874b
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneTemperature.go
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AirConditioningDataZoneTemperature is the corresponding interface of AirConditioningDataZoneTemperature
+type AirConditioningDataZoneTemperature interface {
+ utils.LengthAware
+ utils.Serializable
+ AirConditioningData
+ // GetZoneGroup returns ZoneGroup (property field)
+ GetZoneGroup() byte
+ // GetZoneList returns ZoneList (property field)
+ GetZoneList() HVACZoneList
+ // GetTemperature returns Temperature (property field)
+ GetTemperature() HVACTemperature
+ // GetSensorStatus returns SensorStatus (property field)
+ GetSensorStatus() HVACSensorStatus
+}
+
+// AirConditioningDataZoneTemperatureExactly can be used when we want exactly this type and not a type which fulfills AirConditioningDataZoneTemperature.
+// This is useful for switch cases.
+type AirConditioningDataZoneTemperatureExactly interface {
+ AirConditioningDataZoneTemperature
+ isAirConditioningDataZoneTemperature() bool
+}
+
+// _AirConditioningDataZoneTemperature is the data-structure of this message
+type _AirConditioningDataZoneTemperature struct {
+ *_AirConditioningData
+ ZoneGroup byte
+ ZoneList HVACZoneList
+ Temperature HVACTemperature
+ SensorStatus HVACSensorStatus
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AirConditioningDataZoneTemperature) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) {
+ m.CommandTypeContainer = commandTypeContainer
+}
+
+func (m *_AirConditioningDataZoneTemperature) GetParent() AirConditioningData {
+ return m._AirConditioningData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AirConditioningDataZoneTemperature) GetZoneGroup() byte {
+ return m.ZoneGroup
+}
+
+func (m *_AirConditioningDataZoneTemperature) GetZoneList() HVACZoneList {
+ return m.ZoneList
+}
+
+func (m *_AirConditioningDataZoneTemperature) GetTemperature() HVACTemperature {
+ return m.Temperature
+}
+
+func (m *_AirConditioningDataZoneTemperature) GetSensorStatus() HVACSensorStatus {
+ return m.SensorStatus
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAirConditioningDataZoneTemperature factory function for _AirConditioningDataZoneTemperature
+func NewAirConditioningDataZoneTemperature(zoneGroup byte, zoneList HVACZoneList, temperature HVACTemperature, sensorStatus HVACSensorStatus, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataZoneTemperature {
+ _result := &_AirConditioningDataZoneTemperature{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Temperature: temperature,
+ SensorStatus: sensorStatus,
+ _AirConditioningData: NewAirConditioningData(commandTypeContainer),
+ }
+ _result._AirConditioningData._AirConditioningDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAirConditioningDataZoneTemperature(structType interface{}) AirConditioningDataZoneTemperature {
+ if casted, ok := structType.(AirConditioningDataZoneTemperature); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AirConditioningDataZoneTemperature); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AirConditioningDataZoneTemperature) GetTypeName() string {
+ return "AirConditioningDataZoneTemperature"
+}
+
+func (m *_AirConditioningDataZoneTemperature) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AirConditioningDataZoneTemperature) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (zoneGroup)
+ lengthInBits += 8
+
+ // Simple field (zoneList)
+ lengthInBits += m.ZoneList.GetLengthInBits()
+
+ // Simple field (temperature)
+ lengthInBits += m.Temperature.GetLengthInBits()
+
+ // Simple field (sensorStatus)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_AirConditioningDataZoneTemperature) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AirConditioningDataZoneTemperatureParse(readBuffer utils.ReadBuffer) (AirConditioningDataZoneTemperature, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AirConditioningDataZoneTemperature"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AirConditioningDataZoneTemperature")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (zoneGroup)
+ _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup")
+ if _zoneGroupErr != nil {
+ return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataZoneTemperature")
+ }
+ zoneGroup := _zoneGroup
+
+ // Simple Field (zoneList)
+ if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for zoneList")
+ }
+ _zoneList, _zoneListErr := HVACZoneListParse(readBuffer)
+ if _zoneListErr != nil {
+ return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataZoneTemperature")
+ }
+ zoneList := _zoneList.(HVACZoneList)
+ if closeErr := readBuffer.CloseContext("zoneList"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for zoneList")
+ }
+
+ // Simple Field (temperature)
+ if pullErr := readBuffer.PullContext("temperature"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for temperature")
+ }
+ _temperature, _temperatureErr := HVACTemperatureParse(readBuffer)
+ if _temperatureErr != nil {
+ return nil, errors.Wrap(_temperatureErr, "Error parsing 'temperature' field of AirConditioningDataZoneTemperature")
+ }
+ temperature := _temperature.(HVACTemperature)
+ if closeErr := readBuffer.CloseContext("temperature"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for temperature")
+ }
+
+ // Simple Field (sensorStatus)
+ if pullErr := readBuffer.PullContext("sensorStatus"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for sensorStatus")
+ }
+ _sensorStatus, _sensorStatusErr := HVACSensorStatusParse(readBuffer)
+ if _sensorStatusErr != nil {
+ return nil, errors.Wrap(_sensorStatusErr, "Error parsing 'sensorStatus' field of AirConditioningDataZoneTemperature")
+ }
+ sensorStatus := _sensorStatus
+ if closeErr := readBuffer.CloseContext("sensorStatus"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for sensorStatus")
+ }
+
+ if closeErr := readBuffer.CloseContext("AirConditioningDataZoneTemperature"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AirConditioningDataZoneTemperature")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AirConditioningDataZoneTemperature{
+ ZoneGroup: zoneGroup,
+ ZoneList: zoneList,
+ Temperature: temperature,
+ SensorStatus: sensorStatus,
+ _AirConditioningData: &_AirConditioningData{},
+ }
+ _child._AirConditioningData._AirConditioningDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AirConditioningDataZoneTemperature) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AirConditioningDataZoneTemperature"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AirConditioningDataZoneTemperature")
+ }
+
+ // Simple Field (zoneGroup)
+ zoneGroup := byte(m.GetZoneGroup())
+ _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup))
+ if _zoneGroupErr != nil {
+ return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field")
+ }
+
+ // Simple Field (zoneList)
+ if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for zoneList")
+ }
+ _zoneListErr := writeBuffer.WriteSerializable(m.GetZoneList())
+ if popErr := writeBuffer.PopContext("zoneList"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for zoneList")
+ }
+ if _zoneListErr != nil {
+ return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field")
+ }
+
+ // Simple Field (temperature)
+ if pushErr := writeBuffer.PushContext("temperature"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for temperature")
+ }
+ _temperatureErr := writeBuffer.WriteSerializable(m.GetTemperature())
+ if popErr := writeBuffer.PopContext("temperature"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for temperature")
+ }
+ if _temperatureErr != nil {
+ return errors.Wrap(_temperatureErr, "Error serializing 'temperature' field")
+ }
+
+ // Simple Field (sensorStatus)
+ if pushErr := writeBuffer.PushContext("sensorStatus"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for sensorStatus")
+ }
+ _sensorStatusErr := writeBuffer.WriteSerializable(m.GetSensorStatus())
+ if popErr := writeBuffer.PopContext("sensorStatus"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for sensorStatus")
+ }
+ if _sensorStatusErr != nil {
+ return errors.Wrap(_sensorStatusErr, "Error serializing 'sensorStatus' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AirConditioningDataZoneTemperature"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AirConditioningDataZoneTemperature")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AirConditioningDataZoneTemperature) isAirConditioningDataZoneTemperature() bool {
+ return true
+}
+
+func (m *_AirConditioningDataZoneTemperature) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/HVACAuxiliaryLevel.go b/plc4go/protocols/cbus/readwrite/model/HVACAuxiliaryLevel.go
new file mode 100644
index 000000000..f6501efaa
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/HVACAuxiliaryLevel.go
@@ -0,0 +1,284 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// HVACAuxiliaryLevel is the corresponding interface of HVACAuxiliaryLevel
+type HVACAuxiliaryLevel interface {
+ utils.LengthAware
+ utils.Serializable
+ // GetFanMode returns FanMode (property field)
+ GetFanMode() bool
+ // GetMode returns Mode (property field)
+ GetMode() uint8
+ // GetIsFanModeAutomatic returns IsFanModeAutomatic (virtual field)
+ GetIsFanModeAutomatic() bool
+ // GetIsFanModeContinuous returns IsFanModeContinuous (virtual field)
+ GetIsFanModeContinuous() bool
+ // GetIsFanSpeedAtDefaultSpeed returns IsFanSpeedAtDefaultSpeed (virtual field)
+ GetIsFanSpeedAtDefaultSpeed() bool
+ // GetSpeedSettings returns SpeedSettings (virtual field)
+ GetSpeedSettings() uint8
+}
+
+// HVACAuxiliaryLevelExactly can be used when we want exactly this type and not a type which fulfills HVACAuxiliaryLevel.
+// This is useful for switch cases.
+type HVACAuxiliaryLevelExactly interface {
+ HVACAuxiliaryLevel
+ isHVACAuxiliaryLevel() bool
+}
+
+// _HVACAuxiliaryLevel is the data-structure of this message
+type _HVACAuxiliaryLevel struct {
+ FanMode bool
+ Mode uint8
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_HVACAuxiliaryLevel) GetFanMode() bool {
+ return m.FanMode
+}
+
+func (m *_HVACAuxiliaryLevel) GetMode() uint8 {
+ return m.Mode
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_HVACAuxiliaryLevel) GetIsFanModeAutomatic() bool {
+ return bool(!(m.GetFanMode()))
+}
+
+func (m *_HVACAuxiliaryLevel) GetIsFanModeContinuous() bool {
+ return bool(m.GetFanMode())
+}
+
+func (m *_HVACAuxiliaryLevel) GetIsFanSpeedAtDefaultSpeed() bool {
+ return bool(bool((m.GetMode()) == (0x00)))
+}
+
+func (m *_HVACAuxiliaryLevel) GetSpeedSettings() uint8 {
+ return uint8(m.GetMode())
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewHVACAuxiliaryLevel factory function for _HVACAuxiliaryLevel
+func NewHVACAuxiliaryLevel(fanMode bool, mode uint8) *_HVACAuxiliaryLevel {
+ return &_HVACAuxiliaryLevel{FanMode: fanMode, Mode: mode}
+}
+
+// Deprecated: use the interface for direct cast
+func CastHVACAuxiliaryLevel(structType interface{}) HVACAuxiliaryLevel {
+ if casted, ok := structType.(HVACAuxiliaryLevel); ok {
+ return casted
+ }
+ if casted, ok := structType.(*HVACAuxiliaryLevel); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_HVACAuxiliaryLevel) GetTypeName() string {
+ return "HVACAuxiliaryLevel"
+}
+
+func (m *_HVACAuxiliaryLevel) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_HVACAuxiliaryLevel) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Reserved Field (reserved)
+ lengthInBits += 1
+
+ // Simple field (fanMode)
+ lengthInBits += 1
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // Simple field (mode)
+ lengthInBits += 6
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_HVACAuxiliaryLevel) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func HVACAuxiliaryLevelParse(readBuffer utils.ReadBuffer) (HVACAuxiliaryLevel, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("HVACAuxiliaryLevel"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for HVACAuxiliaryLevel")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Reserved Field (Compartmentalized so the "reserved" variable can't leak)
+ {
+ reserved, _err := readBuffer.ReadBit("reserved")
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'reserved' field of HVACAuxiliaryLevel")
+ }
+ if reserved != bool(false) {
+ log.Info().Fields(map[string]interface{}{
+ "expected value": bool(false),
+ "got value": reserved,
+ }).Msg("Got unexpected response for reserved field.")
+ }
+ }
+
+ // Simple Field (fanMode)
+ _fanMode, _fanModeErr := readBuffer.ReadBit("fanMode")
+ if _fanModeErr != nil {
+ return nil, errors.Wrap(_fanModeErr, "Error parsing 'fanMode' field of HVACAuxiliaryLevel")
+ }
+ fanMode := _fanMode
+
+ // Virtual field
+ _isFanModeAutomatic := !(fanMode)
+ isFanModeAutomatic := bool(_isFanModeAutomatic)
+ _ = isFanModeAutomatic
+
+ // Virtual field
+ _isFanModeContinuous := fanMode
+ isFanModeContinuous := bool(_isFanModeContinuous)
+ _ = isFanModeContinuous
+
+ // Simple Field (mode)
+ _mode, _modeErr := readBuffer.ReadUint8("mode", 6)
+ if _modeErr != nil {
+ return nil, errors.Wrap(_modeErr, "Error parsing 'mode' field of HVACAuxiliaryLevel")
+ }
+ mode := _mode
+
+ // Virtual field
+ _isFanSpeedAtDefaultSpeed := bool((mode) == (0x00))
+ isFanSpeedAtDefaultSpeed := bool(_isFanSpeedAtDefaultSpeed)
+ _ = isFanSpeedAtDefaultSpeed
+
+ // Virtual field
+ _speedSettings := mode
+ speedSettings := uint8(_speedSettings)
+ _ = speedSettings
+
+ if closeErr := readBuffer.CloseContext("HVACAuxiliaryLevel"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for HVACAuxiliaryLevel")
+ }
+
+ // Create the instance
+ return NewHVACAuxiliaryLevel(fanMode, mode), nil
+}
+
+func (m *_HVACAuxiliaryLevel) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("HVACAuxiliaryLevel"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for HVACAuxiliaryLevel")
+ }
+
+ // Reserved Field (reserved)
+ {
+ _err := writeBuffer.WriteBit("reserved", bool(false))
+ if _err != nil {
+ return errors.Wrap(_err, "Error serializing 'reserved' field")
+ }
+ }
+
+ // Simple Field (fanMode)
+ fanMode := bool(m.GetFanMode())
+ _fanModeErr := writeBuffer.WriteBit("fanMode", (fanMode))
+ if _fanModeErr != nil {
+ return errors.Wrap(_fanModeErr, "Error serializing 'fanMode' field")
+ }
+ // Virtual field
+ if _isFanModeAutomaticErr := writeBuffer.WriteVirtual("isFanModeAutomatic", m.GetIsFanModeAutomatic()); _isFanModeAutomaticErr != nil {
+ return errors.Wrap(_isFanModeAutomaticErr, "Error serializing 'isFanModeAutomatic' field")
+ }
+ // Virtual field
+ if _isFanModeContinuousErr := writeBuffer.WriteVirtual("isFanModeContinuous", m.GetIsFanModeContinuous()); _isFanModeContinuousErr != nil {
+ return errors.Wrap(_isFanModeContinuousErr, "Error serializing 'isFanModeContinuous' field")
+ }
+
+ // Simple Field (mode)
+ mode := uint8(m.GetMode())
+ _modeErr := writeBuffer.WriteUint8("mode", 6, (mode))
+ if _modeErr != nil {
+ return errors.Wrap(_modeErr, "Error serializing 'mode' field")
+ }
+ // Virtual field
+ if _isFanSpeedAtDefaultSpeedErr := writeBuffer.WriteVirtual("isFanSpeedAtDefaultSpeed", m.GetIsFanSpeedAtDefaultSpeed()); _isFanSpeedAtDefaultSpeedErr != nil {
+ return errors.Wrap(_isFanSpeedAtDefaultSpeedErr, "Error serializing 'isFanSpeedAtDefaultSpeed' field")
+ }
+ // Virtual field
+ if _speedSettingsErr := writeBuffer.WriteVirtual("speedSettings", m.GetSpeedSettings()); _speedSettingsErr != nil {
+ return errors.Wrap(_speedSettingsErr, "Error serializing 'speedSettings' field")
+ }
+
+ if popErr := writeBuffer.PopContext("HVACAuxiliaryLevel"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for HVACAuxiliaryLevel")
+ }
+ return nil
+}
+
+func (m *_HVACAuxiliaryLevel) isHVACAuxiliaryLevel() bool {
+ return true
+}
+
+func (m *_HVACAuxiliaryLevel) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/HVACError.go b/plc4go/protocols/cbus/readwrite/model/HVACError.go
new file mode 100644
index 000000000..71a1c676d
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/HVACError.go
@@ -0,0 +1,1233 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// HVACError is an enum
+type HVACError uint8
+
+type IHVACError interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ HVACError_NO_ERROR HVACError = 0x00
+ HVACError_HEATER_TOTAL_FAILURE HVACError = 0x01
+ HVACError_COOLER_TOTAL_FAILURE HVACError = 0x02
+ HVACError_FAN_TOTAL_FAILURE HVACError = 0x03
+ HVACError_TEMPERATURE_SENSOR_FAILURE HVACError = 0x04
+ HVACError_HEATER_TEMPORARY_PROBLEM HVACError = 0x05
+ HVACError_COOLER_TEMPORARY_PROBLEM HVACError = 0x06
+ HVACError_FAN_TEMPORARY_PROBLEM HVACError = 0x07
+ HVACError_HEATER_SERVICE_REQUIRED HVACError = 0x08
+ HVACError_COOLER_SERVICE_REQUIRED HVACError = 0x09
+ HVACError_FAN_SERVICE_REQUIRED HVACError = 0x0A
+ HVACError_FILTER_REPLACEMENT_REQUIRED HVACError = 0x0B
+ HVACError_CUSTOM_ERROR_0 HVACError = 0x80
+ HVACError_CUSTOM_ERROR_1 HVACError = 0x81
+ HVACError_CUSTOM_ERROR_2 HVACError = 0x82
+ HVACError_CUSTOM_ERROR_3 HVACError = 0x83
+ HVACError_CUSTOM_ERROR_4 HVACError = 0x84
+ HVACError_CUSTOM_ERROR_5 HVACError = 0x85
+ HVACError_CUSTOM_ERROR_6 HVACError = 0x86
+ HVACError_CUSTOM_ERROR_7 HVACError = 0x87
+ HVACError_CUSTOM_ERROR_8 HVACError = 0x88
+ HVACError_CUSTOM_ERROR_9 HVACError = 0x89
+ HVACError_CUSTOM_ERROR_10 HVACError = 0x8A
+ HVACError_CUSTOM_ERROR_11 HVACError = 0x8B
+ HVACError_CUSTOM_ERROR_12 HVACError = 0x8C
+ HVACError_CUSTOM_ERROR_13 HVACError = 0x8D
+ HVACError_CUSTOM_ERROR_14 HVACError = 0x8E
+ HVACError_CUSTOM_ERROR_15 HVACError = 0x8F
+ HVACError_CUSTOM_ERROR_16 HVACError = 0x90
+ HVACError_CUSTOM_ERROR_17 HVACError = 0x91
+ HVACError_CUSTOM_ERROR_18 HVACError = 0x92
+ HVACError_CUSTOM_ERROR_19 HVACError = 0x93
+ HVACError_CUSTOM_ERROR_20 HVACError = 0x94
+ HVACError_CUSTOM_ERROR_21 HVACError = 0x95
+ HVACError_CUSTOM_ERROR_22 HVACError = 0x96
+ HVACError_CUSTOM_ERROR_23 HVACError = 0x97
+ HVACError_CUSTOM_ERROR_24 HVACError = 0x98
+ HVACError_CUSTOM_ERROR_25 HVACError = 0x99
+ HVACError_CUSTOM_ERROR_26 HVACError = 0x9A
+ HVACError_CUSTOM_ERROR_27 HVACError = 0x9B
+ HVACError_CUSTOM_ERROR_28 HVACError = 0x9C
+ HVACError_CUSTOM_ERROR_29 HVACError = 0x9D
+ HVACError_CUSTOM_ERROR_30 HVACError = 0x9E
+ HVACError_CUSTOM_ERROR_31 HVACError = 0x9F
+ HVACError_CUSTOM_ERROR_32 HVACError = 0xA0
+ HVACError_CUSTOM_ERROR_33 HVACError = 0xA1
+ HVACError_CUSTOM_ERROR_34 HVACError = 0xA2
+ HVACError_CUSTOM_ERROR_35 HVACError = 0xA3
+ HVACError_CUSTOM_ERROR_36 HVACError = 0xA4
+ HVACError_CUSTOM_ERROR_37 HVACError = 0xA5
+ HVACError_CUSTOM_ERROR_38 HVACError = 0xA6
+ HVACError_CUSTOM_ERROR_39 HVACError = 0xA7
+ HVACError_CUSTOM_ERROR_40 HVACError = 0xA8
+ HVACError_CUSTOM_ERROR_41 HVACError = 0xA9
+ HVACError_CUSTOM_ERROR_42 HVACError = 0xAA
+ HVACError_CUSTOM_ERROR_43 HVACError = 0xAB
+ HVACError_CUSTOM_ERROR_44 HVACError = 0xAC
+ HVACError_CUSTOM_ERROR_45 HVACError = 0xAD
+ HVACError_CUSTOM_ERROR_46 HVACError = 0xAE
+ HVACError_CUSTOM_ERROR_47 HVACError = 0xAF
+ HVACError_CUSTOM_ERROR_48 HVACError = 0xB0
+ HVACError_CUSTOM_ERROR_49 HVACError = 0xB1
+ HVACError_CUSTOM_ERROR_50 HVACError = 0xB2
+ HVACError_CUSTOM_ERROR_51 HVACError = 0xB3
+ HVACError_CUSTOM_ERROR_52 HVACError = 0xB4
+ HVACError_CUSTOM_ERROR_53 HVACError = 0xB5
+ HVACError_CUSTOM_ERROR_54 HVACError = 0xB6
+ HVACError_CUSTOM_ERROR_55 HVACError = 0xB7
+ HVACError_CUSTOM_ERROR_56 HVACError = 0xB8
+ HVACError_CUSTOM_ERROR_57 HVACError = 0xB9
+ HVACError_CUSTOM_ERROR_58 HVACError = 0xBA
+ HVACError_CUSTOM_ERROR_59 HVACError = 0xBB
+ HVACError_CUSTOM_ERROR_60 HVACError = 0xBC
+ HVACError_CUSTOM_ERROR_61 HVACError = 0xBD
+ HVACError_CUSTOM_ERROR_62 HVACError = 0xBE
+ HVACError_CUSTOM_ERROR_63 HVACError = 0xBF
+ HVACError_CUSTOM_ERROR_64 HVACError = 0xC0
+ HVACError_CUSTOM_ERROR_65 HVACError = 0xC1
+ HVACError_CUSTOM_ERROR_66 HVACError = 0xC2
+ HVACError_CUSTOM_ERROR_67 HVACError = 0xC3
+ HVACError_CUSTOM_ERROR_68 HVACError = 0xC4
+ HVACError_CUSTOM_ERROR_69 HVACError = 0xC5
+ HVACError_CUSTOM_ERROR_70 HVACError = 0xC6
+ HVACError_CUSTOM_ERROR_71 HVACError = 0xC7
+ HVACError_CUSTOM_ERROR_72 HVACError = 0xC8
+ HVACError_CUSTOM_ERROR_73 HVACError = 0xC9
+ HVACError_CUSTOM_ERROR_74 HVACError = 0xCA
+ HVACError_CUSTOM_ERROR_75 HVACError = 0xCB
+ HVACError_CUSTOM_ERROR_76 HVACError = 0xCC
+ HVACError_CUSTOM_ERROR_77 HVACError = 0xCD
+ HVACError_CUSTOM_ERROR_78 HVACError = 0xCE
+ HVACError_CUSTOM_ERROR_79 HVACError = 0xCF
+ HVACError_CUSTOM_ERROR_80 HVACError = 0xD0
+ HVACError_CUSTOM_ERROR_81 HVACError = 0xD1
+ HVACError_CUSTOM_ERROR_82 HVACError = 0xD2
+ HVACError_CUSTOM_ERROR_83 HVACError = 0xD3
+ HVACError_CUSTOM_ERROR_84 HVACError = 0xD4
+ HVACError_CUSTOM_ERROR_85 HVACError = 0xD5
+ HVACError_CUSTOM_ERROR_86 HVACError = 0xD6
+ HVACError_CUSTOM_ERROR_87 HVACError = 0xD7
+ HVACError_CUSTOM_ERROR_88 HVACError = 0xD8
+ HVACError_CUSTOM_ERROR_89 HVACError = 0xD9
+ HVACError_CUSTOM_ERROR_90 HVACError = 0xDA
+ HVACError_CUSTOM_ERROR_91 HVACError = 0xDB
+ HVACError_CUSTOM_ERROR_92 HVACError = 0xDC
+ HVACError_CUSTOM_ERROR_93 HVACError = 0xDD
+ HVACError_CUSTOM_ERROR_94 HVACError = 0xDE
+ HVACError_CUSTOM_ERROR_95 HVACError = 0xDF
+ HVACError_CUSTOM_ERROR_96 HVACError = 0xE0
+ HVACError_CUSTOM_ERROR_97 HVACError = 0xE1
+ HVACError_CUSTOM_ERROR_98 HVACError = 0xE2
+ HVACError_CUSTOM_ERROR_99 HVACError = 0xE3
+ HVACError_CUSTOM_ERROR_100 HVACError = 0xE4
+ HVACError_CUSTOM_ERROR_101 HVACError = 0xE5
+ HVACError_CUSTOM_ERROR_102 HVACError = 0xE6
+ HVACError_CUSTOM_ERROR_103 HVACError = 0xE7
+ HVACError_CUSTOM_ERROR_104 HVACError = 0xE8
+ HVACError_CUSTOM_ERROR_105 HVACError = 0xE9
+ HVACError_CUSTOM_ERROR_106 HVACError = 0xEA
+ HVACError_CUSTOM_ERROR_107 HVACError = 0xEB
+ HVACError_CUSTOM_ERROR_108 HVACError = 0xEC
+ HVACError_CUSTOM_ERROR_109 HVACError = 0xED
+ HVACError_CUSTOM_ERROR_110 HVACError = 0xEE
+ HVACError_CUSTOM_ERROR_111 HVACError = 0xEF
+ HVACError_CUSTOM_ERROR_112 HVACError = 0xF0
+ HVACError_CUSTOM_ERROR_113 HVACError = 0xF1
+ HVACError_CUSTOM_ERROR_114 HVACError = 0xF2
+ HVACError_CUSTOM_ERROR_115 HVACError = 0xF3
+ HVACError_CUSTOM_ERROR_116 HVACError = 0xF4
+ HVACError_CUSTOM_ERROR_117 HVACError = 0xF5
+ HVACError_CUSTOM_ERROR_118 HVACError = 0xF6
+ HVACError_CUSTOM_ERROR_119 HVACError = 0xF7
+ HVACError_CUSTOM_ERROR_120 HVACError = 0xF8
+ HVACError_CUSTOM_ERROR_121 HVACError = 0xF9
+ HVACError_CUSTOM_ERROR_122 HVACError = 0xFA
+ HVACError_CUSTOM_ERROR_123 HVACError = 0xFB
+ HVACError_CUSTOM_ERROR_124 HVACError = 0xFC
+ HVACError_CUSTOM_ERROR_125 HVACError = 0xFD
+ HVACError_CUSTOM_ERROR_126 HVACError = 0xFE
+ HVACError_CUSTOM_ERROR_127 HVACError = 0xFF
+)
+
+var HVACErrorValues []HVACError
+
+func init() {
+ _ = errors.New
+ HVACErrorValues = []HVACError{
+ HVACError_NO_ERROR,
+ HVACError_HEATER_TOTAL_FAILURE,
+ HVACError_COOLER_TOTAL_FAILURE,
+ HVACError_FAN_TOTAL_FAILURE,
+ HVACError_TEMPERATURE_SENSOR_FAILURE,
+ HVACError_HEATER_TEMPORARY_PROBLEM,
+ HVACError_COOLER_TEMPORARY_PROBLEM,
+ HVACError_FAN_TEMPORARY_PROBLEM,
+ HVACError_HEATER_SERVICE_REQUIRED,
+ HVACError_COOLER_SERVICE_REQUIRED,
+ HVACError_FAN_SERVICE_REQUIRED,
+ HVACError_FILTER_REPLACEMENT_REQUIRED,
+ HVACError_CUSTOM_ERROR_0,
+ HVACError_CUSTOM_ERROR_1,
+ HVACError_CUSTOM_ERROR_2,
+ HVACError_CUSTOM_ERROR_3,
+ HVACError_CUSTOM_ERROR_4,
+ HVACError_CUSTOM_ERROR_5,
+ HVACError_CUSTOM_ERROR_6,
+ HVACError_CUSTOM_ERROR_7,
+ HVACError_CUSTOM_ERROR_8,
+ HVACError_CUSTOM_ERROR_9,
+ HVACError_CUSTOM_ERROR_10,
+ HVACError_CUSTOM_ERROR_11,
+ HVACError_CUSTOM_ERROR_12,
+ HVACError_CUSTOM_ERROR_13,
+ HVACError_CUSTOM_ERROR_14,
+ HVACError_CUSTOM_ERROR_15,
+ HVACError_CUSTOM_ERROR_16,
+ HVACError_CUSTOM_ERROR_17,
+ HVACError_CUSTOM_ERROR_18,
+ HVACError_CUSTOM_ERROR_19,
+ HVACError_CUSTOM_ERROR_20,
+ HVACError_CUSTOM_ERROR_21,
+ HVACError_CUSTOM_ERROR_22,
+ HVACError_CUSTOM_ERROR_23,
+ HVACError_CUSTOM_ERROR_24,
+ HVACError_CUSTOM_ERROR_25,
+ HVACError_CUSTOM_ERROR_26,
+ HVACError_CUSTOM_ERROR_27,
+ HVACError_CUSTOM_ERROR_28,
+ HVACError_CUSTOM_ERROR_29,
+ HVACError_CUSTOM_ERROR_30,
+ HVACError_CUSTOM_ERROR_31,
+ HVACError_CUSTOM_ERROR_32,
+ HVACError_CUSTOM_ERROR_33,
+ HVACError_CUSTOM_ERROR_34,
+ HVACError_CUSTOM_ERROR_35,
+ HVACError_CUSTOM_ERROR_36,
+ HVACError_CUSTOM_ERROR_37,
+ HVACError_CUSTOM_ERROR_38,
+ HVACError_CUSTOM_ERROR_39,
+ HVACError_CUSTOM_ERROR_40,
+ HVACError_CUSTOM_ERROR_41,
+ HVACError_CUSTOM_ERROR_42,
+ HVACError_CUSTOM_ERROR_43,
+ HVACError_CUSTOM_ERROR_44,
+ HVACError_CUSTOM_ERROR_45,
+ HVACError_CUSTOM_ERROR_46,
+ HVACError_CUSTOM_ERROR_47,
+ HVACError_CUSTOM_ERROR_48,
+ HVACError_CUSTOM_ERROR_49,
+ HVACError_CUSTOM_ERROR_50,
+ HVACError_CUSTOM_ERROR_51,
+ HVACError_CUSTOM_ERROR_52,
+ HVACError_CUSTOM_ERROR_53,
+ HVACError_CUSTOM_ERROR_54,
+ HVACError_CUSTOM_ERROR_55,
+ HVACError_CUSTOM_ERROR_56,
+ HVACError_CUSTOM_ERROR_57,
+ HVACError_CUSTOM_ERROR_58,
+ HVACError_CUSTOM_ERROR_59,
+ HVACError_CUSTOM_ERROR_60,
+ HVACError_CUSTOM_ERROR_61,
+ HVACError_CUSTOM_ERROR_62,
+ HVACError_CUSTOM_ERROR_63,
+ HVACError_CUSTOM_ERROR_64,
+ HVACError_CUSTOM_ERROR_65,
+ HVACError_CUSTOM_ERROR_66,
+ HVACError_CUSTOM_ERROR_67,
+ HVACError_CUSTOM_ERROR_68,
+ HVACError_CUSTOM_ERROR_69,
+ HVACError_CUSTOM_ERROR_70,
+ HVACError_CUSTOM_ERROR_71,
+ HVACError_CUSTOM_ERROR_72,
+ HVACError_CUSTOM_ERROR_73,
+ HVACError_CUSTOM_ERROR_74,
+ HVACError_CUSTOM_ERROR_75,
+ HVACError_CUSTOM_ERROR_76,
+ HVACError_CUSTOM_ERROR_77,
+ HVACError_CUSTOM_ERROR_78,
+ HVACError_CUSTOM_ERROR_79,
+ HVACError_CUSTOM_ERROR_80,
+ HVACError_CUSTOM_ERROR_81,
+ HVACError_CUSTOM_ERROR_82,
+ HVACError_CUSTOM_ERROR_83,
+ HVACError_CUSTOM_ERROR_84,
+ HVACError_CUSTOM_ERROR_85,
+ HVACError_CUSTOM_ERROR_86,
+ HVACError_CUSTOM_ERROR_87,
+ HVACError_CUSTOM_ERROR_88,
+ HVACError_CUSTOM_ERROR_89,
+ HVACError_CUSTOM_ERROR_90,
+ HVACError_CUSTOM_ERROR_91,
+ HVACError_CUSTOM_ERROR_92,
+ HVACError_CUSTOM_ERROR_93,
+ HVACError_CUSTOM_ERROR_94,
+ HVACError_CUSTOM_ERROR_95,
+ HVACError_CUSTOM_ERROR_96,
+ HVACError_CUSTOM_ERROR_97,
+ HVACError_CUSTOM_ERROR_98,
+ HVACError_CUSTOM_ERROR_99,
+ HVACError_CUSTOM_ERROR_100,
+ HVACError_CUSTOM_ERROR_101,
+ HVACError_CUSTOM_ERROR_102,
+ HVACError_CUSTOM_ERROR_103,
+ HVACError_CUSTOM_ERROR_104,
+ HVACError_CUSTOM_ERROR_105,
+ HVACError_CUSTOM_ERROR_106,
+ HVACError_CUSTOM_ERROR_107,
+ HVACError_CUSTOM_ERROR_108,
+ HVACError_CUSTOM_ERROR_109,
+ HVACError_CUSTOM_ERROR_110,
+ HVACError_CUSTOM_ERROR_111,
+ HVACError_CUSTOM_ERROR_112,
+ HVACError_CUSTOM_ERROR_113,
+ HVACError_CUSTOM_ERROR_114,
+ HVACError_CUSTOM_ERROR_115,
+ HVACError_CUSTOM_ERROR_116,
+ HVACError_CUSTOM_ERROR_117,
+ HVACError_CUSTOM_ERROR_118,
+ HVACError_CUSTOM_ERROR_119,
+ HVACError_CUSTOM_ERROR_120,
+ HVACError_CUSTOM_ERROR_121,
+ HVACError_CUSTOM_ERROR_122,
+ HVACError_CUSTOM_ERROR_123,
+ HVACError_CUSTOM_ERROR_124,
+ HVACError_CUSTOM_ERROR_125,
+ HVACError_CUSTOM_ERROR_126,
+ HVACError_CUSTOM_ERROR_127,
+ }
+}
+
+func HVACErrorByValue(value uint8) (enum HVACError, ok bool) {
+ switch value {
+ case 0x00:
+ return HVACError_NO_ERROR, true
+ case 0x01:
+ return HVACError_HEATER_TOTAL_FAILURE, true
+ case 0x02:
+ return HVACError_COOLER_TOTAL_FAILURE, true
+ case 0x03:
+ return HVACError_FAN_TOTAL_FAILURE, true
+ case 0x04:
+ return HVACError_TEMPERATURE_SENSOR_FAILURE, true
+ case 0x05:
+ return HVACError_HEATER_TEMPORARY_PROBLEM, true
+ case 0x06:
+ return HVACError_COOLER_TEMPORARY_PROBLEM, true
+ case 0x07:
+ return HVACError_FAN_TEMPORARY_PROBLEM, true
+ case 0x08:
+ return HVACError_HEATER_SERVICE_REQUIRED, true
+ case 0x09:
+ return HVACError_COOLER_SERVICE_REQUIRED, true
+ case 0x0A:
+ return HVACError_FAN_SERVICE_REQUIRED, true
+ case 0x0B:
+ return HVACError_FILTER_REPLACEMENT_REQUIRED, true
+ case 0x80:
+ return HVACError_CUSTOM_ERROR_0, true
+ case 0x81:
+ return HVACError_CUSTOM_ERROR_1, true
+ case 0x82:
+ return HVACError_CUSTOM_ERROR_2, true
+ case 0x83:
+ return HVACError_CUSTOM_ERROR_3, true
+ case 0x84:
+ return HVACError_CUSTOM_ERROR_4, true
+ case 0x85:
+ return HVACError_CUSTOM_ERROR_5, true
+ case 0x86:
+ return HVACError_CUSTOM_ERROR_6, true
+ case 0x87:
+ return HVACError_CUSTOM_ERROR_7, true
+ case 0x88:
+ return HVACError_CUSTOM_ERROR_8, true
+ case 0x89:
+ return HVACError_CUSTOM_ERROR_9, true
+ case 0x8A:
+ return HVACError_CUSTOM_ERROR_10, true
+ case 0x8B:
+ return HVACError_CUSTOM_ERROR_11, true
+ case 0x8C:
+ return HVACError_CUSTOM_ERROR_12, true
+ case 0x8D:
+ return HVACError_CUSTOM_ERROR_13, true
+ case 0x8E:
+ return HVACError_CUSTOM_ERROR_14, true
+ case 0x8F:
+ return HVACError_CUSTOM_ERROR_15, true
+ case 0x90:
+ return HVACError_CUSTOM_ERROR_16, true
+ case 0x91:
+ return HVACError_CUSTOM_ERROR_17, true
+ case 0x92:
+ return HVACError_CUSTOM_ERROR_18, true
+ case 0x93:
+ return HVACError_CUSTOM_ERROR_19, true
+ case 0x94:
+ return HVACError_CUSTOM_ERROR_20, true
+ case 0x95:
+ return HVACError_CUSTOM_ERROR_21, true
+ case 0x96:
+ return HVACError_CUSTOM_ERROR_22, true
+ case 0x97:
+ return HVACError_CUSTOM_ERROR_23, true
+ case 0x98:
+ return HVACError_CUSTOM_ERROR_24, true
+ case 0x99:
+ return HVACError_CUSTOM_ERROR_25, true
+ case 0x9A:
+ return HVACError_CUSTOM_ERROR_26, true
+ case 0x9B:
+ return HVACError_CUSTOM_ERROR_27, true
+ case 0x9C:
+ return HVACError_CUSTOM_ERROR_28, true
+ case 0x9D:
+ return HVACError_CUSTOM_ERROR_29, true
+ case 0x9E:
+ return HVACError_CUSTOM_ERROR_30, true
+ case 0x9F:
+ return HVACError_CUSTOM_ERROR_31, true
+ case 0xA0:
+ return HVACError_CUSTOM_ERROR_32, true
+ case 0xA1:
+ return HVACError_CUSTOM_ERROR_33, true
+ case 0xA2:
+ return HVACError_CUSTOM_ERROR_34, true
+ case 0xA3:
+ return HVACError_CUSTOM_ERROR_35, true
+ case 0xA4:
+ return HVACError_CUSTOM_ERROR_36, true
+ case 0xA5:
+ return HVACError_CUSTOM_ERROR_37, true
+ case 0xA6:
+ return HVACError_CUSTOM_ERROR_38, true
+ case 0xA7:
+ return HVACError_CUSTOM_ERROR_39, true
+ case 0xA8:
+ return HVACError_CUSTOM_ERROR_40, true
+ case 0xA9:
+ return HVACError_CUSTOM_ERROR_41, true
+ case 0xAA:
+ return HVACError_CUSTOM_ERROR_42, true
+ case 0xAB:
+ return HVACError_CUSTOM_ERROR_43, true
+ case 0xAC:
+ return HVACError_CUSTOM_ERROR_44, true
+ case 0xAD:
+ return HVACError_CUSTOM_ERROR_45, true
+ case 0xAE:
+ return HVACError_CUSTOM_ERROR_46, true
+ case 0xAF:
+ return HVACError_CUSTOM_ERROR_47, true
+ case 0xB0:
+ return HVACError_CUSTOM_ERROR_48, true
+ case 0xB1:
+ return HVACError_CUSTOM_ERROR_49, true
+ case 0xB2:
+ return HVACError_CUSTOM_ERROR_50, true
+ case 0xB3:
+ return HVACError_CUSTOM_ERROR_51, true
+ case 0xB4:
+ return HVACError_CUSTOM_ERROR_52, true
+ case 0xB5:
+ return HVACError_CUSTOM_ERROR_53, true
+ case 0xB6:
+ return HVACError_CUSTOM_ERROR_54, true
+ case 0xB7:
+ return HVACError_CUSTOM_ERROR_55, true
+ case 0xB8:
+ return HVACError_CUSTOM_ERROR_56, true
+ case 0xB9:
+ return HVACError_CUSTOM_ERROR_57, true
+ case 0xBA:
+ return HVACError_CUSTOM_ERROR_58, true
+ case 0xBB:
+ return HVACError_CUSTOM_ERROR_59, true
+ case 0xBC:
+ return HVACError_CUSTOM_ERROR_60, true
+ case 0xBD:
+ return HVACError_CUSTOM_ERROR_61, true
+ case 0xBE:
+ return HVACError_CUSTOM_ERROR_62, true
+ case 0xBF:
+ return HVACError_CUSTOM_ERROR_63, true
+ case 0xC0:
+ return HVACError_CUSTOM_ERROR_64, true
+ case 0xC1:
+ return HVACError_CUSTOM_ERROR_65, true
+ case 0xC2:
+ return HVACError_CUSTOM_ERROR_66, true
+ case 0xC3:
+ return HVACError_CUSTOM_ERROR_67, true
+ case 0xC4:
+ return HVACError_CUSTOM_ERROR_68, true
+ case 0xC5:
+ return HVACError_CUSTOM_ERROR_69, true
+ case 0xC6:
+ return HVACError_CUSTOM_ERROR_70, true
+ case 0xC7:
+ return HVACError_CUSTOM_ERROR_71, true
+ case 0xC8:
+ return HVACError_CUSTOM_ERROR_72, true
+ case 0xC9:
+ return HVACError_CUSTOM_ERROR_73, true
+ case 0xCA:
+ return HVACError_CUSTOM_ERROR_74, true
+ case 0xCB:
+ return HVACError_CUSTOM_ERROR_75, true
+ case 0xCC:
+ return HVACError_CUSTOM_ERROR_76, true
+ case 0xCD:
+ return HVACError_CUSTOM_ERROR_77, true
+ case 0xCE:
+ return HVACError_CUSTOM_ERROR_78, true
+ case 0xCF:
+ return HVACError_CUSTOM_ERROR_79, true
+ case 0xD0:
+ return HVACError_CUSTOM_ERROR_80, true
+ case 0xD1:
+ return HVACError_CUSTOM_ERROR_81, true
+ case 0xD2:
+ return HVACError_CUSTOM_ERROR_82, true
+ case 0xD3:
+ return HVACError_CUSTOM_ERROR_83, true
+ case 0xD4:
+ return HVACError_CUSTOM_ERROR_84, true
+ case 0xD5:
+ return HVACError_CUSTOM_ERROR_85, true
+ case 0xD6:
+ return HVACError_CUSTOM_ERROR_86, true
+ case 0xD7:
+ return HVACError_CUSTOM_ERROR_87, true
+ case 0xD8:
+ return HVACError_CUSTOM_ERROR_88, true
+ case 0xD9:
+ return HVACError_CUSTOM_ERROR_89, true
+ case 0xDA:
+ return HVACError_CUSTOM_ERROR_90, true
+ case 0xDB:
+ return HVACError_CUSTOM_ERROR_91, true
+ case 0xDC:
+ return HVACError_CUSTOM_ERROR_92, true
+ case 0xDD:
+ return HVACError_CUSTOM_ERROR_93, true
+ case 0xDE:
+ return HVACError_CUSTOM_ERROR_94, true
+ case 0xDF:
+ return HVACError_CUSTOM_ERROR_95, true
+ case 0xE0:
+ return HVACError_CUSTOM_ERROR_96, true
+ case 0xE1:
+ return HVACError_CUSTOM_ERROR_97, true
+ case 0xE2:
+ return HVACError_CUSTOM_ERROR_98, true
+ case 0xE3:
+ return HVACError_CUSTOM_ERROR_99, true
+ case 0xE4:
+ return HVACError_CUSTOM_ERROR_100, true
+ case 0xE5:
+ return HVACError_CUSTOM_ERROR_101, true
+ case 0xE6:
+ return HVACError_CUSTOM_ERROR_102, true
+ case 0xE7:
+ return HVACError_CUSTOM_ERROR_103, true
+ case 0xE8:
+ return HVACError_CUSTOM_ERROR_104, true
+ case 0xE9:
+ return HVACError_CUSTOM_ERROR_105, true
+ case 0xEA:
+ return HVACError_CUSTOM_ERROR_106, true
+ case 0xEB:
+ return HVACError_CUSTOM_ERROR_107, true
+ case 0xEC:
+ return HVACError_CUSTOM_ERROR_108, true
+ case 0xED:
+ return HVACError_CUSTOM_ERROR_109, true
+ case 0xEE:
+ return HVACError_CUSTOM_ERROR_110, true
+ case 0xEF:
+ return HVACError_CUSTOM_ERROR_111, true
+ case 0xF0:
+ return HVACError_CUSTOM_ERROR_112, true
+ case 0xF1:
+ return HVACError_CUSTOM_ERROR_113, true
+ case 0xF2:
+ return HVACError_CUSTOM_ERROR_114, true
+ case 0xF3:
+ return HVACError_CUSTOM_ERROR_115, true
+ case 0xF4:
+ return HVACError_CUSTOM_ERROR_116, true
+ case 0xF5:
+ return HVACError_CUSTOM_ERROR_117, true
+ case 0xF6:
+ return HVACError_CUSTOM_ERROR_118, true
+ case 0xF7:
+ return HVACError_CUSTOM_ERROR_119, true
+ case 0xF8:
+ return HVACError_CUSTOM_ERROR_120, true
+ case 0xF9:
+ return HVACError_CUSTOM_ERROR_121, true
+ case 0xFA:
+ return HVACError_CUSTOM_ERROR_122, true
+ case 0xFB:
+ return HVACError_CUSTOM_ERROR_123, true
+ case 0xFC:
+ return HVACError_CUSTOM_ERROR_124, true
+ case 0xFD:
+ return HVACError_CUSTOM_ERROR_125, true
+ case 0xFE:
+ return HVACError_CUSTOM_ERROR_126, true
+ case 0xFF:
+ return HVACError_CUSTOM_ERROR_127, true
+ }
+ return 0, false
+}
+
+func HVACErrorByName(value string) (enum HVACError, ok bool) {
+ switch value {
+ case "NO_ERROR":
+ return HVACError_NO_ERROR, true
+ case "HEATER_TOTAL_FAILURE":
+ return HVACError_HEATER_TOTAL_FAILURE, true
+ case "COOLER_TOTAL_FAILURE":
+ return HVACError_COOLER_TOTAL_FAILURE, true
+ case "FAN_TOTAL_FAILURE":
+ return HVACError_FAN_TOTAL_FAILURE, true
+ case "TEMPERATURE_SENSOR_FAILURE":
+ return HVACError_TEMPERATURE_SENSOR_FAILURE, true
+ case "HEATER_TEMPORARY_PROBLEM":
+ return HVACError_HEATER_TEMPORARY_PROBLEM, true
+ case "COOLER_TEMPORARY_PROBLEM":
+ return HVACError_COOLER_TEMPORARY_PROBLEM, true
+ case "FAN_TEMPORARY_PROBLEM":
+ return HVACError_FAN_TEMPORARY_PROBLEM, true
+ case "HEATER_SERVICE_REQUIRED":
+ return HVACError_HEATER_SERVICE_REQUIRED, true
+ case "COOLER_SERVICE_REQUIRED":
+ return HVACError_COOLER_SERVICE_REQUIRED, true
+ case "FAN_SERVICE_REQUIRED":
+ return HVACError_FAN_SERVICE_REQUIRED, true
+ case "FILTER_REPLACEMENT_REQUIRED":
+ return HVACError_FILTER_REPLACEMENT_REQUIRED, true
+ case "CUSTOM_ERROR_0":
+ return HVACError_CUSTOM_ERROR_0, true
+ case "CUSTOM_ERROR_1":
+ return HVACError_CUSTOM_ERROR_1, true
+ case "CUSTOM_ERROR_2":
+ return HVACError_CUSTOM_ERROR_2, true
+ case "CUSTOM_ERROR_3":
+ return HVACError_CUSTOM_ERROR_3, true
+ case "CUSTOM_ERROR_4":
+ return HVACError_CUSTOM_ERROR_4, true
+ case "CUSTOM_ERROR_5":
+ return HVACError_CUSTOM_ERROR_5, true
+ case "CUSTOM_ERROR_6":
+ return HVACError_CUSTOM_ERROR_6, true
+ case "CUSTOM_ERROR_7":
+ return HVACError_CUSTOM_ERROR_7, true
+ case "CUSTOM_ERROR_8":
+ return HVACError_CUSTOM_ERROR_8, true
+ case "CUSTOM_ERROR_9":
+ return HVACError_CUSTOM_ERROR_9, true
+ case "CUSTOM_ERROR_10":
+ return HVACError_CUSTOM_ERROR_10, true
+ case "CUSTOM_ERROR_11":
+ return HVACError_CUSTOM_ERROR_11, true
+ case "CUSTOM_ERROR_12":
+ return HVACError_CUSTOM_ERROR_12, true
+ case "CUSTOM_ERROR_13":
+ return HVACError_CUSTOM_ERROR_13, true
+ case "CUSTOM_ERROR_14":
+ return HVACError_CUSTOM_ERROR_14, true
+ case "CUSTOM_ERROR_15":
+ return HVACError_CUSTOM_ERROR_15, true
+ case "CUSTOM_ERROR_16":
+ return HVACError_CUSTOM_ERROR_16, true
+ case "CUSTOM_ERROR_17":
+ return HVACError_CUSTOM_ERROR_17, true
+ case "CUSTOM_ERROR_18":
+ return HVACError_CUSTOM_ERROR_18, true
+ case "CUSTOM_ERROR_19":
+ return HVACError_CUSTOM_ERROR_19, true
+ case "CUSTOM_ERROR_20":
+ return HVACError_CUSTOM_ERROR_20, true
+ case "CUSTOM_ERROR_21":
+ return HVACError_CUSTOM_ERROR_21, true
+ case "CUSTOM_ERROR_22":
+ return HVACError_CUSTOM_ERROR_22, true
+ case "CUSTOM_ERROR_23":
+ return HVACError_CUSTOM_ERROR_23, true
+ case "CUSTOM_ERROR_24":
+ return HVACError_CUSTOM_ERROR_24, true
+ case "CUSTOM_ERROR_25":
+ return HVACError_CUSTOM_ERROR_25, true
+ case "CUSTOM_ERROR_26":
+ return HVACError_CUSTOM_ERROR_26, true
+ case "CUSTOM_ERROR_27":
+ return HVACError_CUSTOM_ERROR_27, true
+ case "CUSTOM_ERROR_28":
+ return HVACError_CUSTOM_ERROR_28, true
+ case "CUSTOM_ERROR_29":
+ return HVACError_CUSTOM_ERROR_29, true
+ case "CUSTOM_ERROR_30":
+ return HVACError_CUSTOM_ERROR_30, true
+ case "CUSTOM_ERROR_31":
+ return HVACError_CUSTOM_ERROR_31, true
+ case "CUSTOM_ERROR_32":
+ return HVACError_CUSTOM_ERROR_32, true
+ case "CUSTOM_ERROR_33":
+ return HVACError_CUSTOM_ERROR_33, true
+ case "CUSTOM_ERROR_34":
+ return HVACError_CUSTOM_ERROR_34, true
+ case "CUSTOM_ERROR_35":
+ return HVACError_CUSTOM_ERROR_35, true
+ case "CUSTOM_ERROR_36":
+ return HVACError_CUSTOM_ERROR_36, true
+ case "CUSTOM_ERROR_37":
+ return HVACError_CUSTOM_ERROR_37, true
+ case "CUSTOM_ERROR_38":
+ return HVACError_CUSTOM_ERROR_38, true
+ case "CUSTOM_ERROR_39":
+ return HVACError_CUSTOM_ERROR_39, true
+ case "CUSTOM_ERROR_40":
+ return HVACError_CUSTOM_ERROR_40, true
+ case "CUSTOM_ERROR_41":
+ return HVACError_CUSTOM_ERROR_41, true
+ case "CUSTOM_ERROR_42":
+ return HVACError_CUSTOM_ERROR_42, true
+ case "CUSTOM_ERROR_43":
+ return HVACError_CUSTOM_ERROR_43, true
+ case "CUSTOM_ERROR_44":
+ return HVACError_CUSTOM_ERROR_44, true
+ case "CUSTOM_ERROR_45":
+ return HVACError_CUSTOM_ERROR_45, true
+ case "CUSTOM_ERROR_46":
+ return HVACError_CUSTOM_ERROR_46, true
+ case "CUSTOM_ERROR_47":
+ return HVACError_CUSTOM_ERROR_47, true
+ case "CUSTOM_ERROR_48":
+ return HVACError_CUSTOM_ERROR_48, true
+ case "CUSTOM_ERROR_49":
+ return HVACError_CUSTOM_ERROR_49, true
+ case "CUSTOM_ERROR_50":
+ return HVACError_CUSTOM_ERROR_50, true
+ case "CUSTOM_ERROR_51":
+ return HVACError_CUSTOM_ERROR_51, true
+ case "CUSTOM_ERROR_52":
+ return HVACError_CUSTOM_ERROR_52, true
+ case "CUSTOM_ERROR_53":
+ return HVACError_CUSTOM_ERROR_53, true
+ case "CUSTOM_ERROR_54":
+ return HVACError_CUSTOM_ERROR_54, true
+ case "CUSTOM_ERROR_55":
+ return HVACError_CUSTOM_ERROR_55, true
+ case "CUSTOM_ERROR_56":
+ return HVACError_CUSTOM_ERROR_56, true
+ case "CUSTOM_ERROR_57":
+ return HVACError_CUSTOM_ERROR_57, true
+ case "CUSTOM_ERROR_58":
+ return HVACError_CUSTOM_ERROR_58, true
+ case "CUSTOM_ERROR_59":
+ return HVACError_CUSTOM_ERROR_59, true
+ case "CUSTOM_ERROR_60":
+ return HVACError_CUSTOM_ERROR_60, true
+ case "CUSTOM_ERROR_61":
+ return HVACError_CUSTOM_ERROR_61, true
+ case "CUSTOM_ERROR_62":
+ return HVACError_CUSTOM_ERROR_62, true
+ case "CUSTOM_ERROR_63":
+ return HVACError_CUSTOM_ERROR_63, true
+ case "CUSTOM_ERROR_64":
+ return HVACError_CUSTOM_ERROR_64, true
+ case "CUSTOM_ERROR_65":
+ return HVACError_CUSTOM_ERROR_65, true
+ case "CUSTOM_ERROR_66":
+ return HVACError_CUSTOM_ERROR_66, true
+ case "CUSTOM_ERROR_67":
+ return HVACError_CUSTOM_ERROR_67, true
+ case "CUSTOM_ERROR_68":
+ return HVACError_CUSTOM_ERROR_68, true
+ case "CUSTOM_ERROR_69":
+ return HVACError_CUSTOM_ERROR_69, true
+ case "CUSTOM_ERROR_70":
+ return HVACError_CUSTOM_ERROR_70, true
+ case "CUSTOM_ERROR_71":
+ return HVACError_CUSTOM_ERROR_71, true
+ case "CUSTOM_ERROR_72":
+ return HVACError_CUSTOM_ERROR_72, true
+ case "CUSTOM_ERROR_73":
+ return HVACError_CUSTOM_ERROR_73, true
+ case "CUSTOM_ERROR_74":
+ return HVACError_CUSTOM_ERROR_74, true
+ case "CUSTOM_ERROR_75":
+ return HVACError_CUSTOM_ERROR_75, true
+ case "CUSTOM_ERROR_76":
+ return HVACError_CUSTOM_ERROR_76, true
+ case "CUSTOM_ERROR_77":
+ return HVACError_CUSTOM_ERROR_77, true
+ case "CUSTOM_ERROR_78":
+ return HVACError_CUSTOM_ERROR_78, true
+ case "CUSTOM_ERROR_79":
+ return HVACError_CUSTOM_ERROR_79, true
+ case "CUSTOM_ERROR_80":
+ return HVACError_CUSTOM_ERROR_80, true
+ case "CUSTOM_ERROR_81":
+ return HVACError_CUSTOM_ERROR_81, true
+ case "CUSTOM_ERROR_82":
+ return HVACError_CUSTOM_ERROR_82, true
+ case "CUSTOM_ERROR_83":
+ return HVACError_CUSTOM_ERROR_83, true
+ case "CUSTOM_ERROR_84":
+ return HVACError_CUSTOM_ERROR_84, true
+ case "CUSTOM_ERROR_85":
+ return HVACError_CUSTOM_ERROR_85, true
+ case "CUSTOM_ERROR_86":
+ return HVACError_CUSTOM_ERROR_86, true
+ case "CUSTOM_ERROR_87":
+ return HVACError_CUSTOM_ERROR_87, true
+ case "CUSTOM_ERROR_88":
+ return HVACError_CUSTOM_ERROR_88, true
+ case "CUSTOM_ERROR_89":
+ return HVACError_CUSTOM_ERROR_89, true
+ case "CUSTOM_ERROR_90":
+ return HVACError_CUSTOM_ERROR_90, true
+ case "CUSTOM_ERROR_91":
+ return HVACError_CUSTOM_ERROR_91, true
+ case "CUSTOM_ERROR_92":
+ return HVACError_CUSTOM_ERROR_92, true
+ case "CUSTOM_ERROR_93":
+ return HVACError_CUSTOM_ERROR_93, true
+ case "CUSTOM_ERROR_94":
+ return HVACError_CUSTOM_ERROR_94, true
+ case "CUSTOM_ERROR_95":
+ return HVACError_CUSTOM_ERROR_95, true
+ case "CUSTOM_ERROR_96":
+ return HVACError_CUSTOM_ERROR_96, true
+ case "CUSTOM_ERROR_97":
+ return HVACError_CUSTOM_ERROR_97, true
+ case "CUSTOM_ERROR_98":
+ return HVACError_CUSTOM_ERROR_98, true
+ case "CUSTOM_ERROR_99":
+ return HVACError_CUSTOM_ERROR_99, true
+ case "CUSTOM_ERROR_100":
+ return HVACError_CUSTOM_ERROR_100, true
+ case "CUSTOM_ERROR_101":
+ return HVACError_CUSTOM_ERROR_101, true
+ case "CUSTOM_ERROR_102":
+ return HVACError_CUSTOM_ERROR_102, true
+ case "CUSTOM_ERROR_103":
+ return HVACError_CUSTOM_ERROR_103, true
+ case "CUSTOM_ERROR_104":
+ return HVACError_CUSTOM_ERROR_104, true
+ case "CUSTOM_ERROR_105":
+ return HVACError_CUSTOM_ERROR_105, true
+ case "CUSTOM_ERROR_106":
+ return HVACError_CUSTOM_ERROR_106, true
+ case "CUSTOM_ERROR_107":
+ return HVACError_CUSTOM_ERROR_107, true
+ case "CUSTOM_ERROR_108":
+ return HVACError_CUSTOM_ERROR_108, true
+ case "CUSTOM_ERROR_109":
+ return HVACError_CUSTOM_ERROR_109, true
+ case "CUSTOM_ERROR_110":
+ return HVACError_CUSTOM_ERROR_110, true
+ case "CUSTOM_ERROR_111":
+ return HVACError_CUSTOM_ERROR_111, true
+ case "CUSTOM_ERROR_112":
+ return HVACError_CUSTOM_ERROR_112, true
+ case "CUSTOM_ERROR_113":
+ return HVACError_CUSTOM_ERROR_113, true
+ case "CUSTOM_ERROR_114":
+ return HVACError_CUSTOM_ERROR_114, true
+ case "CUSTOM_ERROR_115":
+ return HVACError_CUSTOM_ERROR_115, true
+ case "CUSTOM_ERROR_116":
+ return HVACError_CUSTOM_ERROR_116, true
+ case "CUSTOM_ERROR_117":
+ return HVACError_CUSTOM_ERROR_117, true
+ case "CUSTOM_ERROR_118":
+ return HVACError_CUSTOM_ERROR_118, true
+ case "CUSTOM_ERROR_119":
+ return HVACError_CUSTOM_ERROR_119, true
+ case "CUSTOM_ERROR_120":
+ return HVACError_CUSTOM_ERROR_120, true
+ case "CUSTOM_ERROR_121":
+ return HVACError_CUSTOM_ERROR_121, true
+ case "CUSTOM_ERROR_122":
+ return HVACError_CUSTOM_ERROR_122, true
+ case "CUSTOM_ERROR_123":
+ return HVACError_CUSTOM_ERROR_123, true
+ case "CUSTOM_ERROR_124":
+ return HVACError_CUSTOM_ERROR_124, true
+ case "CUSTOM_ERROR_125":
+ return HVACError_CUSTOM_ERROR_125, true
+ case "CUSTOM_ERROR_126":
+ return HVACError_CUSTOM_ERROR_126, true
+ case "CUSTOM_ERROR_127":
+ return HVACError_CUSTOM_ERROR_127, true
+ }
+ return 0, false
+}
+
+func HVACErrorKnows(value uint8) bool {
+ for _, typeValue := range HVACErrorValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastHVACError(structType interface{}) HVACError {
+ castFunc := func(typ interface{}) HVACError {
+ if sHVACError, ok := typ.(HVACError); ok {
+ return sHVACError
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m HVACError) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m HVACError) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func HVACErrorParse(readBuffer utils.ReadBuffer) (HVACError, error) {
+ val, err := readBuffer.ReadUint8("HVACError", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading HVACError")
+ }
+ if enum, ok := HVACErrorByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return HVACError(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e HVACError) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("HVACError", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e HVACError) PLC4XEnumName() string {
+ switch e {
+ case HVACError_NO_ERROR:
+ return "NO_ERROR"
+ case HVACError_HEATER_TOTAL_FAILURE:
+ return "HEATER_TOTAL_FAILURE"
+ case HVACError_COOLER_TOTAL_FAILURE:
+ return "COOLER_TOTAL_FAILURE"
+ case HVACError_FAN_TOTAL_FAILURE:
+ return "FAN_TOTAL_FAILURE"
+ case HVACError_TEMPERATURE_SENSOR_FAILURE:
+ return "TEMPERATURE_SENSOR_FAILURE"
+ case HVACError_HEATER_TEMPORARY_PROBLEM:
+ return "HEATER_TEMPORARY_PROBLEM"
+ case HVACError_COOLER_TEMPORARY_PROBLEM:
+ return "COOLER_TEMPORARY_PROBLEM"
+ case HVACError_FAN_TEMPORARY_PROBLEM:
+ return "FAN_TEMPORARY_PROBLEM"
+ case HVACError_HEATER_SERVICE_REQUIRED:
+ return "HEATER_SERVICE_REQUIRED"
+ case HVACError_COOLER_SERVICE_REQUIRED:
+ return "COOLER_SERVICE_REQUIRED"
+ case HVACError_FAN_SERVICE_REQUIRED:
+ return "FAN_SERVICE_REQUIRED"
+ case HVACError_FILTER_REPLACEMENT_REQUIRED:
+ return "FILTER_REPLACEMENT_REQUIRED"
+ case HVACError_CUSTOM_ERROR_0:
+ return "CUSTOM_ERROR_0"
+ case HVACError_CUSTOM_ERROR_1:
+ return "CUSTOM_ERROR_1"
+ case HVACError_CUSTOM_ERROR_2:
+ return "CUSTOM_ERROR_2"
+ case HVACError_CUSTOM_ERROR_3:
+ return "CUSTOM_ERROR_3"
+ case HVACError_CUSTOM_ERROR_4:
+ return "CUSTOM_ERROR_4"
+ case HVACError_CUSTOM_ERROR_5:
+ return "CUSTOM_ERROR_5"
+ case HVACError_CUSTOM_ERROR_6:
+ return "CUSTOM_ERROR_6"
+ case HVACError_CUSTOM_ERROR_7:
+ return "CUSTOM_ERROR_7"
+ case HVACError_CUSTOM_ERROR_8:
+ return "CUSTOM_ERROR_8"
+ case HVACError_CUSTOM_ERROR_9:
+ return "CUSTOM_ERROR_9"
+ case HVACError_CUSTOM_ERROR_10:
+ return "CUSTOM_ERROR_10"
+ case HVACError_CUSTOM_ERROR_11:
+ return "CUSTOM_ERROR_11"
+ case HVACError_CUSTOM_ERROR_12:
+ return "CUSTOM_ERROR_12"
+ case HVACError_CUSTOM_ERROR_13:
+ return "CUSTOM_ERROR_13"
+ case HVACError_CUSTOM_ERROR_14:
+ return "CUSTOM_ERROR_14"
+ case HVACError_CUSTOM_ERROR_15:
+ return "CUSTOM_ERROR_15"
+ case HVACError_CUSTOM_ERROR_16:
+ return "CUSTOM_ERROR_16"
+ case HVACError_CUSTOM_ERROR_17:
+ return "CUSTOM_ERROR_17"
+ case HVACError_CUSTOM_ERROR_18:
+ return "CUSTOM_ERROR_18"
+ case HVACError_CUSTOM_ERROR_19:
+ return "CUSTOM_ERROR_19"
+ case HVACError_CUSTOM_ERROR_20:
+ return "CUSTOM_ERROR_20"
+ case HVACError_CUSTOM_ERROR_21:
+ return "CUSTOM_ERROR_21"
+ case HVACError_CUSTOM_ERROR_22:
+ return "CUSTOM_ERROR_22"
+ case HVACError_CUSTOM_ERROR_23:
+ return "CUSTOM_ERROR_23"
+ case HVACError_CUSTOM_ERROR_24:
+ return "CUSTOM_ERROR_24"
+ case HVACError_CUSTOM_ERROR_25:
+ return "CUSTOM_ERROR_25"
+ case HVACError_CUSTOM_ERROR_26:
+ return "CUSTOM_ERROR_26"
+ case HVACError_CUSTOM_ERROR_27:
+ return "CUSTOM_ERROR_27"
+ case HVACError_CUSTOM_ERROR_28:
+ return "CUSTOM_ERROR_28"
+ case HVACError_CUSTOM_ERROR_29:
+ return "CUSTOM_ERROR_29"
+ case HVACError_CUSTOM_ERROR_30:
+ return "CUSTOM_ERROR_30"
+ case HVACError_CUSTOM_ERROR_31:
+ return "CUSTOM_ERROR_31"
+ case HVACError_CUSTOM_ERROR_32:
+ return "CUSTOM_ERROR_32"
+ case HVACError_CUSTOM_ERROR_33:
+ return "CUSTOM_ERROR_33"
+ case HVACError_CUSTOM_ERROR_34:
+ return "CUSTOM_ERROR_34"
+ case HVACError_CUSTOM_ERROR_35:
+ return "CUSTOM_ERROR_35"
+ case HVACError_CUSTOM_ERROR_36:
+ return "CUSTOM_ERROR_36"
+ case HVACError_CUSTOM_ERROR_37:
+ return "CUSTOM_ERROR_37"
+ case HVACError_CUSTOM_ERROR_38:
+ return "CUSTOM_ERROR_38"
+ case HVACError_CUSTOM_ERROR_39:
+ return "CUSTOM_ERROR_39"
+ case HVACError_CUSTOM_ERROR_40:
+ return "CUSTOM_ERROR_40"
+ case HVACError_CUSTOM_ERROR_41:
+ return "CUSTOM_ERROR_41"
+ case HVACError_CUSTOM_ERROR_42:
+ return "CUSTOM_ERROR_42"
+ case HVACError_CUSTOM_ERROR_43:
+ return "CUSTOM_ERROR_43"
+ case HVACError_CUSTOM_ERROR_44:
+ return "CUSTOM_ERROR_44"
+ case HVACError_CUSTOM_ERROR_45:
+ return "CUSTOM_ERROR_45"
+ case HVACError_CUSTOM_ERROR_46:
+ return "CUSTOM_ERROR_46"
+ case HVACError_CUSTOM_ERROR_47:
+ return "CUSTOM_ERROR_47"
+ case HVACError_CUSTOM_ERROR_48:
+ return "CUSTOM_ERROR_48"
+ case HVACError_CUSTOM_ERROR_49:
+ return "CUSTOM_ERROR_49"
+ case HVACError_CUSTOM_ERROR_50:
+ return "CUSTOM_ERROR_50"
+ case HVACError_CUSTOM_ERROR_51:
+ return "CUSTOM_ERROR_51"
+ case HVACError_CUSTOM_ERROR_52:
+ return "CUSTOM_ERROR_52"
+ case HVACError_CUSTOM_ERROR_53:
+ return "CUSTOM_ERROR_53"
+ case HVACError_CUSTOM_ERROR_54:
+ return "CUSTOM_ERROR_54"
+ case HVACError_CUSTOM_ERROR_55:
+ return "CUSTOM_ERROR_55"
+ case HVACError_CUSTOM_ERROR_56:
+ return "CUSTOM_ERROR_56"
+ case HVACError_CUSTOM_ERROR_57:
+ return "CUSTOM_ERROR_57"
+ case HVACError_CUSTOM_ERROR_58:
+ return "CUSTOM_ERROR_58"
+ case HVACError_CUSTOM_ERROR_59:
+ return "CUSTOM_ERROR_59"
+ case HVACError_CUSTOM_ERROR_60:
+ return "CUSTOM_ERROR_60"
+ case HVACError_CUSTOM_ERROR_61:
+ return "CUSTOM_ERROR_61"
+ case HVACError_CUSTOM_ERROR_62:
+ return "CUSTOM_ERROR_62"
+ case HVACError_CUSTOM_ERROR_63:
+ return "CUSTOM_ERROR_63"
+ case HVACError_CUSTOM_ERROR_64:
+ return "CUSTOM_ERROR_64"
+ case HVACError_CUSTOM_ERROR_65:
+ return "CUSTOM_ERROR_65"
+ case HVACError_CUSTOM_ERROR_66:
+ return "CUSTOM_ERROR_66"
+ case HVACError_CUSTOM_ERROR_67:
+ return "CUSTOM_ERROR_67"
+ case HVACError_CUSTOM_ERROR_68:
+ return "CUSTOM_ERROR_68"
+ case HVACError_CUSTOM_ERROR_69:
+ return "CUSTOM_ERROR_69"
+ case HVACError_CUSTOM_ERROR_70:
+ return "CUSTOM_ERROR_70"
+ case HVACError_CUSTOM_ERROR_71:
+ return "CUSTOM_ERROR_71"
+ case HVACError_CUSTOM_ERROR_72:
+ return "CUSTOM_ERROR_72"
+ case HVACError_CUSTOM_ERROR_73:
+ return "CUSTOM_ERROR_73"
+ case HVACError_CUSTOM_ERROR_74:
+ return "CUSTOM_ERROR_74"
+ case HVACError_CUSTOM_ERROR_75:
+ return "CUSTOM_ERROR_75"
+ case HVACError_CUSTOM_ERROR_76:
+ return "CUSTOM_ERROR_76"
+ case HVACError_CUSTOM_ERROR_77:
+ return "CUSTOM_ERROR_77"
+ case HVACError_CUSTOM_ERROR_78:
+ return "CUSTOM_ERROR_78"
+ case HVACError_CUSTOM_ERROR_79:
+ return "CUSTOM_ERROR_79"
+ case HVACError_CUSTOM_ERROR_80:
+ return "CUSTOM_ERROR_80"
+ case HVACError_CUSTOM_ERROR_81:
+ return "CUSTOM_ERROR_81"
+ case HVACError_CUSTOM_ERROR_82:
+ return "CUSTOM_ERROR_82"
+ case HVACError_CUSTOM_ERROR_83:
+ return "CUSTOM_ERROR_83"
+ case HVACError_CUSTOM_ERROR_84:
+ return "CUSTOM_ERROR_84"
+ case HVACError_CUSTOM_ERROR_85:
+ return "CUSTOM_ERROR_85"
+ case HVACError_CUSTOM_ERROR_86:
+ return "CUSTOM_ERROR_86"
+ case HVACError_CUSTOM_ERROR_87:
+ return "CUSTOM_ERROR_87"
+ case HVACError_CUSTOM_ERROR_88:
+ return "CUSTOM_ERROR_88"
+ case HVACError_CUSTOM_ERROR_89:
+ return "CUSTOM_ERROR_89"
+ case HVACError_CUSTOM_ERROR_90:
+ return "CUSTOM_ERROR_90"
+ case HVACError_CUSTOM_ERROR_91:
+ return "CUSTOM_ERROR_91"
+ case HVACError_CUSTOM_ERROR_92:
+ return "CUSTOM_ERROR_92"
+ case HVACError_CUSTOM_ERROR_93:
+ return "CUSTOM_ERROR_93"
+ case HVACError_CUSTOM_ERROR_94:
+ return "CUSTOM_ERROR_94"
+ case HVACError_CUSTOM_ERROR_95:
+ return "CUSTOM_ERROR_95"
+ case HVACError_CUSTOM_ERROR_96:
+ return "CUSTOM_ERROR_96"
+ case HVACError_CUSTOM_ERROR_97:
+ return "CUSTOM_ERROR_97"
+ case HVACError_CUSTOM_ERROR_98:
+ return "CUSTOM_ERROR_98"
+ case HVACError_CUSTOM_ERROR_99:
+ return "CUSTOM_ERROR_99"
+ case HVACError_CUSTOM_ERROR_100:
+ return "CUSTOM_ERROR_100"
+ case HVACError_CUSTOM_ERROR_101:
+ return "CUSTOM_ERROR_101"
+ case HVACError_CUSTOM_ERROR_102:
+ return "CUSTOM_ERROR_102"
+ case HVACError_CUSTOM_ERROR_103:
+ return "CUSTOM_ERROR_103"
+ case HVACError_CUSTOM_ERROR_104:
+ return "CUSTOM_ERROR_104"
+ case HVACError_CUSTOM_ERROR_105:
+ return "CUSTOM_ERROR_105"
+ case HVACError_CUSTOM_ERROR_106:
+ return "CUSTOM_ERROR_106"
+ case HVACError_CUSTOM_ERROR_107:
+ return "CUSTOM_ERROR_107"
+ case HVACError_CUSTOM_ERROR_108:
+ return "CUSTOM_ERROR_108"
+ case HVACError_CUSTOM_ERROR_109:
+ return "CUSTOM_ERROR_109"
+ case HVACError_CUSTOM_ERROR_110:
+ return "CUSTOM_ERROR_110"
+ case HVACError_CUSTOM_ERROR_111:
+ return "CUSTOM_ERROR_111"
+ case HVACError_CUSTOM_ERROR_112:
+ return "CUSTOM_ERROR_112"
+ case HVACError_CUSTOM_ERROR_113:
+ return "CUSTOM_ERROR_113"
+ case HVACError_CUSTOM_ERROR_114:
+ return "CUSTOM_ERROR_114"
+ case HVACError_CUSTOM_ERROR_115:
+ return "CUSTOM_ERROR_115"
+ case HVACError_CUSTOM_ERROR_116:
+ return "CUSTOM_ERROR_116"
+ case HVACError_CUSTOM_ERROR_117:
+ return "CUSTOM_ERROR_117"
+ case HVACError_CUSTOM_ERROR_118:
+ return "CUSTOM_ERROR_118"
+ case HVACError_CUSTOM_ERROR_119:
+ return "CUSTOM_ERROR_119"
+ case HVACError_CUSTOM_ERROR_120:
+ return "CUSTOM_ERROR_120"
+ case HVACError_CUSTOM_ERROR_121:
+ return "CUSTOM_ERROR_121"
+ case HVACError_CUSTOM_ERROR_122:
+ return "CUSTOM_ERROR_122"
+ case HVACError_CUSTOM_ERROR_123:
+ return "CUSTOM_ERROR_123"
+ case HVACError_CUSTOM_ERROR_124:
+ return "CUSTOM_ERROR_124"
+ case HVACError_CUSTOM_ERROR_125:
+ return "CUSTOM_ERROR_125"
+ case HVACError_CUSTOM_ERROR_126:
+ return "CUSTOM_ERROR_126"
+ case HVACError_CUSTOM_ERROR_127:
+ return "CUSTOM_ERROR_127"
+ }
+ return ""
+}
+
+func (e HVACError) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/HVACHumidity.go b/plc4go/protocols/cbus/readwrite/model/HVACHumidity.go
new file mode 100644
index 000000000..1fc78f2d0
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/HVACHumidity.go
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// HVACHumidity is the corresponding interface of HVACHumidity
+type HVACHumidity interface {
+ utils.LengthAware
+ utils.Serializable
+ // GetHumidityValue returns HumidityValue (property field)
+ GetHumidityValue() uint16
+ // GetHumidityInPercent returns HumidityInPercent (virtual field)
+ GetHumidityInPercent() float32
+}
+
+// HVACHumidityExactly can be used when we want exactly this type and not a type which fulfills HVACHumidity.
+// This is useful for switch cases.
+type HVACHumidityExactly interface {
+ HVACHumidity
+ isHVACHumidity() bool
+}
+
+// _HVACHumidity is the data-structure of this message
+type _HVACHumidity struct {
+ HumidityValue uint16
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_HVACHumidity) GetHumidityValue() uint16 {
+ return m.HumidityValue
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_HVACHumidity) GetHumidityInPercent() float32 {
+ return float32(float32(m.GetHumidityValue()) / float32(float32(65535)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewHVACHumidity factory function for _HVACHumidity
+func NewHVACHumidity(humidityValue uint16) *_HVACHumidity {
+ return &_HVACHumidity{HumidityValue: humidityValue}
+}
+
+// Deprecated: use the interface for direct cast
+func CastHVACHumidity(structType interface{}) HVACHumidity {
+ if casted, ok := structType.(HVACHumidity); ok {
+ return casted
+ }
+ if casted, ok := structType.(*HVACHumidity); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_HVACHumidity) GetTypeName() string {
+ return "HVACHumidity"
+}
+
+func (m *_HVACHumidity) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_HVACHumidity) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (humidityValue)
+ lengthInBits += 16
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_HVACHumidity) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func HVACHumidityParse(readBuffer utils.ReadBuffer) (HVACHumidity, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("HVACHumidity"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for HVACHumidity")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (humidityValue)
+ _humidityValue, _humidityValueErr := readBuffer.ReadUint16("humidityValue", 16)
+ if _humidityValueErr != nil {
+ return nil, errors.Wrap(_humidityValueErr, "Error parsing 'humidityValue' field of HVACHumidity")
+ }
+ humidityValue := _humidityValue
+
+ // Virtual field
+ _humidityInPercent := float32(humidityValue) / float32(float32(65535))
+ humidityInPercent := float32(_humidityInPercent)
+ _ = humidityInPercent
+
+ if closeErr := readBuffer.CloseContext("HVACHumidity"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for HVACHumidity")
+ }
+
+ // Create the instance
+ return NewHVACHumidity(humidityValue), nil
+}
+
+func (m *_HVACHumidity) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("HVACHumidity"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for HVACHumidity")
+ }
+
+ // Simple Field (humidityValue)
+ humidityValue := uint16(m.GetHumidityValue())
+ _humidityValueErr := writeBuffer.WriteUint16("humidityValue", 16, (humidityValue))
+ if _humidityValueErr != nil {
+ return errors.Wrap(_humidityValueErr, "Error serializing 'humidityValue' field")
+ }
+ // Virtual field
+ if _humidityInPercentErr := writeBuffer.WriteVirtual("humidityInPercent", m.GetHumidityInPercent()); _humidityInPercentErr != nil {
+ return errors.Wrap(_humidityInPercentErr, "Error serializing 'humidityInPercent' field")
+ }
+
+ if popErr := writeBuffer.PopContext("HVACHumidity"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for HVACHumidity")
+ }
+ return nil
+}
+
+func (m *_HVACHumidity) isHVACHumidity() bool {
+ return true
+}
+
+func (m *_HVACHumidity) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ writeBuffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := writeBuffer.WriteSerializable(m); err != nil {
+ return err.Error()
+ }
+ return writeBuffer.GetBox().String()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/HVACHumidityError.go b/plc4go/protocols/cbus/readwrite/model/HVACHumidityError.go
new file mode 100644
index 000000000..6f4134990
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/HVACHumidityError.go
@@ -0,0 +1,1233 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// HVACHumidityError is an enum
+type HVACHumidityError uint8
+
+type IHVACHumidityError interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ HVACHumidityError_NO_ERROR HVACHumidityError = 0x00
+ HVACHumidityError_HUMIDIFIER_TOTAL_FAILURE HVACHumidityError = 0x01
+ HVACHumidityError_DEHUMIDIFIER_TOTAL_FAILURE HVACHumidityError = 0x02
+ HVACHumidityError_FAN_TOTAL_FAILURE HVACHumidityError = 0x03
+ HVACHumidityError_HUMIDITY_SENSOR_FAILURE HVACHumidityError = 0x04
+ HVACHumidityError_HUMIDIFIER_TEMPORARY_PROBLEM HVACHumidityError = 0x05
+ HVACHumidityError_DEHUMIDIFIER_TEMPORARY_PROBLEM HVACHumidityError = 0x06
+ HVACHumidityError_FAN_TEMPORARY_PROBLEM HVACHumidityError = 0x07
+ HVACHumidityError_HUMIDIFIER_SERVICE_REQUIRED HVACHumidityError = 0x08
+ HVACHumidityError_DEHUMIDIFIER_SERVICE_REQUIRED HVACHumidityError = 0x09
+ HVACHumidityError_FAN_SERVICE_REQUIRED HVACHumidityError = 0x0A
+ HVACHumidityError_FILTER_REPLACEMENT_REQUIRED HVACHumidityError = 0x0B
+ HVACHumidityError_CUSTOM_ERROR_0 HVACHumidityError = 0x80
+ HVACHumidityError_CUSTOM_ERROR_1 HVACHumidityError = 0x81
+ HVACHumidityError_CUSTOM_ERROR_2 HVACHumidityError = 0x82
+ HVACHumidityError_CUSTOM_ERROR_3 HVACHumidityError = 0x83
+ HVACHumidityError_CUSTOM_ERROR_4 HVACHumidityError = 0x84
+ HVACHumidityError_CUSTOM_ERROR_5 HVACHumidityError = 0x85
+ HVACHumidityError_CUSTOM_ERROR_6 HVACHumidityError = 0x86
+ HVACHumidityError_CUSTOM_ERROR_7 HVACHumidityError = 0x87
+ HVACHumidityError_CUSTOM_ERROR_8 HVACHumidityError = 0x88
+ HVACHumidityError_CUSTOM_ERROR_9 HVACHumidityError = 0x89
+ HVACHumidityError_CUSTOM_ERROR_10 HVACHumidityError = 0x8A
+ HVACHumidityError_CUSTOM_ERROR_11 HVACHumidityError = 0x8B
+ HVACHumidityError_CUSTOM_ERROR_12 HVACHumidityError = 0x8C
+ HVACHumidityError_CUSTOM_ERROR_13 HVACHumidityError = 0x8D
+ HVACHumidityError_CUSTOM_ERROR_14 HVACHumidityError = 0x8E
+ HVACHumidityError_CUSTOM_ERROR_15 HVACHumidityError = 0x8F
+ HVACHumidityError_CUSTOM_ERROR_16 HVACHumidityError = 0x90
+ HVACHumidityError_CUSTOM_ERROR_17 HVACHumidityError = 0x91
+ HVACHumidityError_CUSTOM_ERROR_18 HVACHumidityError = 0x92
+ HVACHumidityError_CUSTOM_ERROR_19 HVACHumidityError = 0x93
+ HVACHumidityError_CUSTOM_ERROR_20 HVACHumidityError = 0x94
+ HVACHumidityError_CUSTOM_ERROR_21 HVACHumidityError = 0x95
+ HVACHumidityError_CUSTOM_ERROR_22 HVACHumidityError = 0x96
+ HVACHumidityError_CUSTOM_ERROR_23 HVACHumidityError = 0x97
+ HVACHumidityError_CUSTOM_ERROR_24 HVACHumidityError = 0x98
+ HVACHumidityError_CUSTOM_ERROR_25 HVACHumidityError = 0x99
+ HVACHumidityError_CUSTOM_ERROR_26 HVACHumidityError = 0x9A
+ HVACHumidityError_CUSTOM_ERROR_27 HVACHumidityError = 0x9B
+ HVACHumidityError_CUSTOM_ERROR_28 HVACHumidityError = 0x9C
+ HVACHumidityError_CUSTOM_ERROR_29 HVACHumidityError = 0x9D
+ HVACHumidityError_CUSTOM_ERROR_30 HVACHumidityError = 0x9E
+ HVACHumidityError_CUSTOM_ERROR_31 HVACHumidityError = 0x9F
+ HVACHumidityError_CUSTOM_ERROR_32 HVACHumidityError = 0xA0
+ HVACHumidityError_CUSTOM_ERROR_33 HVACHumidityError = 0xA1
+ HVACHumidityError_CUSTOM_ERROR_34 HVACHumidityError = 0xA2
+ HVACHumidityError_CUSTOM_ERROR_35 HVACHumidityError = 0xA3
+ HVACHumidityError_CUSTOM_ERROR_36 HVACHumidityError = 0xA4
+ HVACHumidityError_CUSTOM_ERROR_37 HVACHumidityError = 0xA5
+ HVACHumidityError_CUSTOM_ERROR_38 HVACHumidityError = 0xA6
+ HVACHumidityError_CUSTOM_ERROR_39 HVACHumidityError = 0xA7
+ HVACHumidityError_CUSTOM_ERROR_40 HVACHumidityError = 0xA8
+ HVACHumidityError_CUSTOM_ERROR_41 HVACHumidityError = 0xA9
+ HVACHumidityError_CUSTOM_ERROR_42 HVACHumidityError = 0xAA
+ HVACHumidityError_CUSTOM_ERROR_43 HVACHumidityError = 0xAB
+ HVACHumidityError_CUSTOM_ERROR_44 HVACHumidityError = 0xAC
+ HVACHumidityError_CUSTOM_ERROR_45 HVACHumidityError = 0xAD
+ HVACHumidityError_CUSTOM_ERROR_46 HVACHumidityError = 0xAE
+ HVACHumidityError_CUSTOM_ERROR_47 HVACHumidityError = 0xAF
+ HVACHumidityError_CUSTOM_ERROR_48 HVACHumidityError = 0xB0
+ HVACHumidityError_CUSTOM_ERROR_49 HVACHumidityError = 0xB1
+ HVACHumidityError_CUSTOM_ERROR_50 HVACHumidityError = 0xB2
+ HVACHumidityError_CUSTOM_ERROR_51 HVACHumidityError = 0xB3
+ HVACHumidityError_CUSTOM_ERROR_52 HVACHumidityError = 0xB4
+ HVACHumidityError_CUSTOM_ERROR_53 HVACHumidityError = 0xB5
+ HVACHumidityError_CUSTOM_ERROR_54 HVACHumidityError = 0xB6
+ HVACHumidityError_CUSTOM_ERROR_55 HVACHumidityError = 0xB7
+ HVACHumidityError_CUSTOM_ERROR_56 HVACHumidityError = 0xB8
+ HVACHumidityError_CUSTOM_ERROR_57 HVACHumidityError = 0xB9
+ HVACHumidityError_CUSTOM_ERROR_58 HVACHumidityError = 0xBA
+ HVACHumidityError_CUSTOM_ERROR_59 HVACHumidityError = 0xBB
+ HVACHumidityError_CUSTOM_ERROR_60 HVACHumidityError = 0xBC
+ HVACHumidityError_CUSTOM_ERROR_61 HVACHumidityError = 0xBD
+ HVACHumidityError_CUSTOM_ERROR_62 HVACHumidityError = 0xBE
+ HVACHumidityError_CUSTOM_ERROR_63 HVACHumidityError = 0xBF
+ HVACHumidityError_CUSTOM_ERROR_64 HVACHumidityError = 0xC0
+ HVACHumidityError_CUSTOM_ERROR_65 HVACHumidityError = 0xC1
+ HVACHumidityError_CUSTOM_ERROR_66 HVACHumidityError = 0xC2
+ HVACHumidityError_CUSTOM_ERROR_67 HVACHumidityError = 0xC3
+ HVACHumidityError_CUSTOM_ERROR_68 HVACHumidityError = 0xC4
+ HVACHumidityError_CUSTOM_ERROR_69 HVACHumidityError = 0xC5
+ HVACHumidityError_CUSTOM_ERROR_70 HVACHumidityError = 0xC6
+ HVACHumidityError_CUSTOM_ERROR_71 HVACHumidityError = 0xC7
+ HVACHumidityError_CUSTOM_ERROR_72 HVACHumidityError = 0xC8
+ HVACHumidityError_CUSTOM_ERROR_73 HVACHumidityError = 0xC9
+ HVACHumidityError_CUSTOM_ERROR_74 HVACHumidityError = 0xCA
+ HVACHumidityError_CUSTOM_ERROR_75 HVACHumidityError = 0xCB
+ HVACHumidityError_CUSTOM_ERROR_76 HVACHumidityError = 0xCC
+ HVACHumidityError_CUSTOM_ERROR_77 HVACHumidityError = 0xCD
+ HVACHumidityError_CUSTOM_ERROR_78 HVACHumidityError = 0xCE
+ HVACHumidityError_CUSTOM_ERROR_79 HVACHumidityError = 0xCF
+ HVACHumidityError_CUSTOM_ERROR_80 HVACHumidityError = 0xD0
+ HVACHumidityError_CUSTOM_ERROR_81 HVACHumidityError = 0xD1
+ HVACHumidityError_CUSTOM_ERROR_82 HVACHumidityError = 0xD2
+ HVACHumidityError_CUSTOM_ERROR_83 HVACHumidityError = 0xD3
+ HVACHumidityError_CUSTOM_ERROR_84 HVACHumidityError = 0xD4
+ HVACHumidityError_CUSTOM_ERROR_85 HVACHumidityError = 0xD5
+ HVACHumidityError_CUSTOM_ERROR_86 HVACHumidityError = 0xD6
+ HVACHumidityError_CUSTOM_ERROR_87 HVACHumidityError = 0xD7
+ HVACHumidityError_CUSTOM_ERROR_88 HVACHumidityError = 0xD8
+ HVACHumidityError_CUSTOM_ERROR_89 HVACHumidityError = 0xD9
+ HVACHumidityError_CUSTOM_ERROR_90 HVACHumidityError = 0xDA
+ HVACHumidityError_CUSTOM_ERROR_91 HVACHumidityError = 0xDB
+ HVACHumidityError_CUSTOM_ERROR_92 HVACHumidityError = 0xDC
+ HVACHumidityError_CUSTOM_ERROR_93 HVACHumidityError = 0xDD
+ HVACHumidityError_CUSTOM_ERROR_94 HVACHumidityError = 0xDE
+ HVACHumidityError_CUSTOM_ERROR_95 HVACHumidityError = 0xDF
+ HVACHumidityError_CUSTOM_ERROR_96 HVACHumidityError = 0xE0
+ HVACHumidityError_CUSTOM_ERROR_97 HVACHumidityError = 0xE1
+ HVACHumidityError_CUSTOM_ERROR_98 HVACHumidityError = 0xE2
+ HVACHumidityError_CUSTOM_ERROR_99 HVACHumidityError = 0xE3
+ HVACHumidityError_CUSTOM_ERROR_100 HVACHumidityError = 0xE4
+ HVACHumidityError_CUSTOM_ERROR_101 HVACHumidityError = 0xE5
+ HVACHumidityError_CUSTOM_ERROR_102 HVACHumidityError = 0xE6
+ HVACHumidityError_CUSTOM_ERROR_103 HVACHumidityError = 0xE7
+ HVACHumidityError_CUSTOM_ERROR_104 HVACHumidityError = 0xE8
+ HVACHumidityError_CUSTOM_ERROR_105 HVACHumidityError = 0xE9
+ HVACHumidityError_CUSTOM_ERROR_106 HVACHumidityError = 0xEA
+ HVACHumidityError_CUSTOM_ERROR_107 HVACHumidityError = 0xEB
+ HVACHumidityError_CUSTOM_ERROR_108 HVACHumidityError = 0xEC
+ HVACHumidityError_CUSTOM_ERROR_109 HVACHumidityError = 0xED
+ HVACHumidityError_CUSTOM_ERROR_110 HVACHumidityError = 0xEE
+ HVACHumidityError_CUSTOM_ERROR_111 HVACHumidityError = 0xEF
+ HVACHumidityError_CUSTOM_ERROR_112 HVACHumidityError = 0xF0
+ HVACHumidityError_CUSTOM_ERROR_113 HVACHumidityError = 0xF1
+ HVACHumidityError_CUSTOM_ERROR_114 HVACHumidityError = 0xF2
+ HVACHumidityError_CUSTOM_ERROR_115 HVACHumidityError = 0xF3
+ HVACHumidityError_CUSTOM_ERROR_116 HVACHumidityError = 0xF4
+ HVACHumidityError_CUSTOM_ERROR_117 HVACHumidityError = 0xF5
+ HVACHumidityError_CUSTOM_ERROR_118 HVACHumidityError = 0xF6
+ HVACHumidityError_CUSTOM_ERROR_119 HVACHumidityError = 0xF7
+ HVACHumidityError_CUSTOM_ERROR_120 HVACHumidityError = 0xF8
+ HVACHumidityError_CUSTOM_ERROR_121 HVACHumidityError = 0xF9
+ HVACHumidityError_CUSTOM_ERROR_122 HVACHumidityError = 0xFA
+ HVACHumidityError_CUSTOM_ERROR_123 HVACHumidityError = 0xFB
+ HVACHumidityError_CUSTOM_ERROR_124 HVACHumidityError = 0xFC
+ HVACHumidityError_CUSTOM_ERROR_125 HVACHumidityError = 0xFD
+ HVACHumidityError_CUSTOM_ERROR_126 HVACHumidityError = 0xFE
+ HVACHumidityError_CUSTOM_ERROR_127 HVACHumidityError = 0xFF
+)
+
+var HVACHumidityErrorValues []HVACHumidityError
+
+func init() {
+ _ = errors.New
+ HVACHumidityErrorValues = []HVACHumidityError{
+ HVACHumidityError_NO_ERROR,
+ HVACHumidityError_HUMIDIFIER_TOTAL_FAILURE,
+ HVACHumidityError_DEHUMIDIFIER_TOTAL_FAILURE,
+ HVACHumidityError_FAN_TOTAL_FAILURE,
+ HVACHumidityError_HUMIDITY_SENSOR_FAILURE,
+ HVACHumidityError_HUMIDIFIER_TEMPORARY_PROBLEM,
+ HVACHumidityError_DEHUMIDIFIER_TEMPORARY_PROBLEM,
+ HVACHumidityError_FAN_TEMPORARY_PROBLEM,
+ HVACHumidityError_HUMIDIFIER_SERVICE_REQUIRED,
+ HVACHumidityError_DEHUMIDIFIER_SERVICE_REQUIRED,
+ HVACHumidityError_FAN_SERVICE_REQUIRED,
+ HVACHumidityError_FILTER_REPLACEMENT_REQUIRED,
+ HVACHumidityError_CUSTOM_ERROR_0,
+ HVACHumidityError_CUSTOM_ERROR_1,
+ HVACHumidityError_CUSTOM_ERROR_2,
+ HVACHumidityError_CUSTOM_ERROR_3,
+ HVACHumidityError_CUSTOM_ERROR_4,
+ HVACHumidityError_CUSTOM_ERROR_5,
+ HVACHumidityError_CUSTOM_ERROR_6,
+ HVACHumidityError_CUSTOM_ERROR_7,
+ HVACHumidityError_CUSTOM_ERROR_8,
+ HVACHumidityError_CUSTOM_ERROR_9,
+ HVACHumidityError_CUSTOM_ERROR_10,
+ HVACHumidityError_CUSTOM_ERROR_11,
+ HVACHumidityError_CUSTOM_ERROR_12,
+ HVACHumidityError_CUSTOM_ERROR_13,
+ HVACHumidityError_CUSTOM_ERROR_14,
+ HVACHumidityError_CUSTOM_ERROR_15,
+ HVACHumidityError_CUSTOM_ERROR_16,
+ HVACHumidityError_CUSTOM_ERROR_17,
+ HVACHumidityError_CUSTOM_ERROR_18,
+ HVACHumidityError_CUSTOM_ERROR_19,
+ HVACHumidityError_CUSTOM_ERROR_20,
+ HVACHumidityError_CUSTOM_ERROR_21,
+ HVACHumidityError_CUSTOM_ERROR_22,
+ HVACHumidityError_CUSTOM_ERROR_23,
+ HVACHumidityError_CUSTOM_ERROR_24,
+ HVACHumidityError_CUSTOM_ERROR_25,
+ HVACHumidityError_CUSTOM_ERROR_26,
+ HVACHumidityError_CUSTOM_ERROR_27,
+ HVACHumidityError_CUSTOM_ERROR_28,
+ HVACHumidityError_CUSTOM_ERROR_29,
+ HVACHumidityError_CUSTOM_ERROR_30,
+ HVACHumidityError_CUSTOM_ERROR_31,
+ HVACHumidityError_CUSTOM_ERROR_32,
+ HVACHumidityError_CUSTOM_ERROR_33,
+ HVACHumidityError_CUSTOM_ERROR_34,
+ HVACHumidityError_CUSTOM_ERROR_35,
+ HVACHumidityError_CUSTOM_ERROR_36,
+ HVACHumidityError_CUSTOM_ERROR_37,
+ HVACHumidityError_CUSTOM_ERROR_38,
+ HVACHumidityError_CUSTOM_ERROR_39,
+ HVACHumidityError_CUSTOM_ERROR_40,
+ HVACHumidityError_CUSTOM_ERROR_41,
+ HVACHumidityError_CUSTOM_ERROR_42,
+ HVACHumidityError_CUSTOM_ERROR_43,
+ HVACHumidityError_CUSTOM_ERROR_44,
+ HVACHumidityError_CUSTOM_ERROR_45,
+ HVACHumidityError_CUSTOM_ERROR_46,
+ HVACHumidityError_CUSTOM_ERROR_47,
+ HVACHumidityError_CUSTOM_ERROR_48,
+ HVACHumidityError_CUSTOM_ERROR_49,
+ HVACHumidityError_CUSTOM_ERROR_50,
+ HVACHumidityError_CUSTOM_ERROR_51,
+ HVACHumidityError_CUSTOM_ERROR_52,
+ HVACHumidityError_CUSTOM_ERROR_53,
+ HVACHumidityError_CUSTOM_ERROR_54,
+ HVACHumidityError_CUSTOM_ERROR_55,
+ HVACHumidityError_CUSTOM_ERROR_56,
+ HVACHumidityError_CUSTOM_ERROR_57,
+ HVACHumidityError_CUSTOM_ERROR_58,
+ HVACHumidityError_CUSTOM_ERROR_59,
+ HVACHumidityError_CUSTOM_ERROR_60,
+ HVACHumidityError_CUSTOM_ERROR_61,
+ HVACHumidityError_CUSTOM_ERROR_62,
+ HVACHumidityError_CUSTOM_ERROR_63,
+ HVACHumidityError_CUSTOM_ERROR_64,
+ HVACHumidityError_CUSTOM_ERROR_65,
+ HVACHumidityError_CUSTOM_ERROR_66,
+ HVACHumidityError_CUSTOM_ERROR_67,
+ HVACHumidityError_CUSTOM_ERROR_68,
+ HVACHumidityError_CUSTOM_ERROR_69,
+ HVACHumidityError_CUSTOM_ERROR_70,
+ HVACHumidityError_CUSTOM_ERROR_71,
+ HVACHumidityError_CUSTOM_ERROR_72,
+ HVACHumidityError_CUSTOM_ERROR_73,
+ HVACHumidityError_CUSTOM_ERROR_74,
+ HVACHumidityError_CUSTOM_ERROR_75,
+ HVACHumidityError_CUSTOM_ERROR_76,
+ HVACHumidityError_CUSTOM_ERROR_77,
+ HVACHumidityError_CUSTOM_ERROR_78,
+ HVACHumidityError_CUSTOM_ERROR_79,
+ HVACHumidityError_CUSTOM_ERROR_80,
+ HVACHumidityError_CUSTOM_ERROR_81,
+ HVACHumidityError_CUSTOM_ERROR_82,
+ HVACHumidityError_CUSTOM_ERROR_83,
+ HVACHumidityError_CUSTOM_ERROR_84,
+ HVACHumidityError_CUSTOM_ERROR_85,
+ HVACHumidityError_CUSTOM_ERROR_86,
+ HVACHumidityError_CUSTOM_ERROR_87,
+ HVACHumidityError_CUSTOM_ERROR_88,
+ HVACHumidityError_CUSTOM_ERROR_89,
+ HVACHumidityError_CUSTOM_ERROR_90,
+ HVACHumidityError_CUSTOM_ERROR_91,
+ HVACHumidityError_CUSTOM_ERROR_92,
+ HVACHumidityError_CUSTOM_ERROR_93,
+ HVACHumidityError_CUSTOM_ERROR_94,
+ HVACHumidityError_CUSTOM_ERROR_95,
+ HVACHumidityError_CUSTOM_ERROR_96,
+ HVACHumidityError_CUSTOM_ERROR_97,
+ HVACHumidityError_CUSTOM_ERROR_98,
+ HVACHumidityError_CUSTOM_ERROR_99,
+ HVACHumidityError_CUSTOM_ERROR_100,
+ HVACHumidityError_CUSTOM_ERROR_101,
+ HVACHumidityError_CUSTOM_ERROR_102,
+ HVACHumidityError_CUSTOM_ERROR_103,
+ HVACHumidityError_CUSTOM_ERROR_104,
+ HVACHumidityError_CUSTOM_ERROR_105,
+ HVACHumidityError_CUSTOM_ERROR_106,
+ HVACHumidityError_CUSTOM_ERROR_107,
+ HVACHumidityError_CUSTOM_ERROR_108,
+ HVACHumidityError_CUSTOM_ERROR_109,
+ HVACHumidityError_CUSTOM_ERROR_110,
+ HVACHumidityError_CUSTOM_ERROR_111,
+ HVACHumidityError_CUSTOM_ERROR_112,
+ HVACHumidityError_CUSTOM_ERROR_113,
+ HVACHumidityError_CUSTOM_ERROR_114,
+ HVACHumidityError_CUSTOM_ERROR_115,
+ HVACHumidityError_CUSTOM_ERROR_116,
+ HVACHumidityError_CUSTOM_ERROR_117,
+ HVACHumidityError_CUSTOM_ERROR_118,
+ HVACHumidityError_CUSTOM_ERROR_119,
+ HVACHumidityError_CUSTOM_ERROR_120,
+ HVACHumidityError_CUSTOM_ERROR_121,
+ HVACHumidityError_CUSTOM_ERROR_122,
+ HVACHumidityError_CUSTOM_ERROR_123,
+ HVACHumidityError_CUSTOM_ERROR_124,
+ HVACHumidityError_CUSTOM_ERROR_125,
+ HVACHumidityError_CUSTOM_ERROR_126,
+ HVACHumidityError_CUSTOM_ERROR_127,
+ }
+}
+
+func HVACHumidityErrorByValue(value uint8) (enum HVACHumidityError, ok bool) {
+ switch value {
+ case 0x00:
+ return HVACHumidityError_NO_ERROR, true
+ case 0x01:
+ return HVACHumidityError_HUMIDIFIER_TOTAL_FAILURE, true
+ case 0x02:
+ return HVACHumidityError_DEHUMIDIFIER_TOTAL_FAILURE, true
+ case 0x03:
+ return HVACHumidityError_FAN_TOTAL_FAILURE, true
+ case 0x04:
+ return HVACHumidityError_HUMIDITY_SENSOR_FAILURE, true
+ case 0x05:
+ return HVACHumidityError_HUMIDIFIER_TEMPORARY_PROBLEM, true
+ case 0x06:
+ return HVACHumidityError_DEHUMIDIFIER_TEMPORARY_PROBLEM, true
+ case 0x07:
+ return HVACHumidityError_FAN_TEMPORARY_PROBLEM, true
+ case 0x08:
+ return HVACHumidityError_HUMIDIFIER_SERVICE_REQUIRED, true
+ case 0x09:
+ return HVACHumidityError_DEHUMIDIFIER_SERVICE_REQUIRED, true
+ case 0x0A:
+ return HVACHumidityError_FAN_SERVICE_REQUIRED, true
+ case 0x0B:
+ return HVACHumidityError_FILTER_REPLACEMENT_REQUIRED, true
+ case 0x80:
+ return HVACHumidityError_CUSTOM_ERROR_0, true
+ case 0x81:
+ return HVACHumidityError_CUSTOM_ERROR_1, true
+ case 0x82:
+ return HVACHumidityError_CUSTOM_ERROR_2, true
+ case 0x83:
+ return HVACHumidityError_CUSTOM_ERROR_3, true
+ case 0x84:
+ return HVACHumidityError_CUSTOM_ERROR_4, true
+ case 0x85:
+ return HVACHumidityError_CUSTOM_ERROR_5, true
+ case 0x86:
+ return HVACHumidityError_CUSTOM_ERROR_6, true
+ case 0x87:
+ return HVACHumidityError_CUSTOM_ERROR_7, true
+ case 0x88:
+ return HVACHumidityError_CUSTOM_ERROR_8, true
+ case 0x89:
+ return HVACHumidityError_CUSTOM_ERROR_9, true
+ case 0x8A:
+ return HVACHumidityError_CUSTOM_ERROR_10, true
+ case 0x8B:
+ return HVACHumidityError_CUSTOM_ERROR_11, true
+ case 0x8C:
+ return HVACHumidityError_CUSTOM_ERROR_12, true
+ case 0x8D:
+ return HVACHumidityError_CUSTOM_ERROR_13, true
+ case 0x8E:
+ return HVACHumidityError_CUSTOM_ERROR_14, true
+ case 0x8F:
+ return HVACHumidityError_CUSTOM_ERROR_15, true
+ case 0x90:
+ return HVACHumidityError_CUSTOM_ERROR_16, true
+ case 0x91:
+ return HVACHumidityError_CUSTOM_ERROR_17, true
+ case 0x92:
+ return HVACHumidityError_CUSTOM_ERROR_18, true
+ case 0x93:
+ return HVACHumidityError_CUSTOM_ERROR_19, true
+ case 0x94:
+ return HVACHumidityError_CUSTOM_ERROR_20, true
+ case 0x95:
+ return HVACHumidityError_CUSTOM_ERROR_21, true
+ case 0x96:
+ return HVACHumidityError_CUSTOM_ERROR_22, true
+ case 0x97:
+ return HVACHumidityError_CUSTOM_ERROR_23, true
+ case 0x98:
+ return HVACHumidityError_CUSTOM_ERROR_24, true
+ case 0x99:
+ return HVACHumidityError_CUSTOM_ERROR_25, true
+ case 0x9A:
+ return HVACHumidityError_CUSTOM_ERROR_26, true
+ case 0x9B:
+ return HVACHumidityError_CUSTOM_ERROR_27, true
+ case 0x9C:
+ return HVACHumidityError_CUSTOM_ERROR_28, true
+ case 0x9D:
+ return HVACHumidityError_CUSTOM_ERROR_29, true
+ case 0x9E:
+ return HVACHumidityError_CUSTOM_ERROR_30, true
+ case 0x9F:
+ return HVACHumidityError_CUSTOM_ERROR_31, true
+ case 0xA0:
+ return HVACHumidityError_CUSTOM_ERROR_32, true
+ case 0xA1:
+ return HVACHumidityError_CUSTOM_ERROR_33, true
+ case 0xA2:
+ return HVACHumidityError_CUSTOM_ERROR_34, true
+ case 0xA3:
+ return HVACHumidityError_CUSTOM_ERROR_35, true
+ case 0xA4:
+ return HVACHumidityError_CUSTOM_ERROR_36, true
+ case 0xA5:
+ return HVACHumidityError_CUSTOM_ERROR_37, true
+ case 0xA6:
+ return HVACHumidityError_CUSTOM_ERROR_38, true
+ case 0xA7:
+ return HVACHumidityError_CUSTOM_ERROR_39, true
+ case 0xA8:
+ return HVACHumidityError_CUSTOM_ERROR_40, true
+ case 0xA9:
+ return HVACHumidityError_CUSTOM_ERROR_41, true
+ case 0xAA:
+ return HVACHumidityError_CUSTOM_ERROR_42, true
+ case 0xAB:
+ return HVACHumidityError_CUSTOM_ERROR_43, true
+ case 0xAC:
+ return HVACHumidityError_CUSTOM_ERROR_44, true
+ case 0xAD:
+ return HVACHumidityError_CUSTOM_ERROR_45, true
+ case 0xAE:
+ return HVACHumidityError_CUSTOM_ERROR_46, true
+ case 0xAF:
+ return HVACHumidityError_CUSTOM_ERROR_47, true
+ case 0xB0:
+ return HVACHumidityError_CUSTOM_ERROR_48, true
+ case 0xB1:
+ return HVACHumidityError_CUSTOM_ERROR_49, true
+ case 0xB2:
+ return HVACHumidityError_CUSTOM_ERROR_50, true
+ case 0xB3:
+ return HVACHumidityError_CUSTOM_ERROR_51, true
+ case 0xB4:
+ return HVACHumidityError_CUSTOM_ERROR_52, true
+ case 0xB5:
+ return HVACHumidityError_CUSTOM_ERROR_53, true
+ case 0xB6:
+ return HVACHumidityError_CUSTOM_ERROR_54, true
+ case 0xB7:
+ return HVACHumidityError_CUSTOM_ERROR_55, true
+ case 0xB8:
+ return HVACHumidityError_CUSTOM_ERROR_56, true
+ case 0xB9:
+ return HVACHumidityError_CUSTOM_ERROR_57, true
+ case 0xBA:
+ return HVACHumidityError_CUSTOM_ERROR_58, true
+ case 0xBB:
+ return HVACHumidityError_CUSTOM_ERROR_59, true
+ case 0xBC:
+ return HVACHumidityError_CUSTOM_ERROR_60, true
+ case 0xBD:
+ return HVACHumidityError_CUSTOM_ERROR_61, true
+ case 0xBE:
+ return HVACHumidityError_CUSTOM_ERROR_62, true
+ case 0xBF:
+ return HVACHumidityError_CUSTOM_ERROR_63, true
+ case 0xC0:
+ return HVACHumidityError_CUSTOM_ERROR_64, true
+ case 0xC1:
+ return HVACHumidityError_CUSTOM_ERROR_65, true
+ case 0xC2:
+ return HVACHumidityError_CUSTOM_ERROR_66, true
+ case 0xC3:
+ return HVACHumidityError_CUSTOM_ERROR_67, true
+ case 0xC4:
+ return HVACHumidityError_CUSTOM_ERROR_68, true
+ case 0xC5:
+ return HVACHumidityError_CUSTOM_ERROR_69, true
+ case 0xC6:
+ return HVACHumidityError_CUSTOM_ERROR_70, true
+ case 0xC7:
+ return HVACHumidityError_CUSTOM_ERROR_71, true
+ case 0xC8:
+ return HVACHumidityError_CUSTOM_ERROR_72, true
+ case 0xC9:
+ return HVACHumidityError_CUSTOM_ERROR_73, true
+ case 0xCA:
+ return HVACHumidityError_CUSTOM_ERROR_74, true
+ case 0xCB:
+ return HVACHumidityError_CUSTOM_ERROR_75, true
+ case 0xCC:
+ return HVACHumidityError_CUSTOM_ERROR_76, true
+ case 0xCD:
+ return HVACHumidityError_CUSTOM_ERROR_77, true
+ case 0xCE:
+ return HVACHumidityError_CUSTOM_ERROR_78, true
+ case 0xCF:
+ return HVACHumidityError_CUSTOM_ERROR_79, true
+ case 0xD0:
+ return HVACHumidityError_CUSTOM_ERROR_80, true
+ case 0xD1:
+ return HVACHumidityError_CUSTOM_ERROR_81, true
+ case 0xD2:
+ return HVACHumidityError_CUSTOM_ERROR_82, true
+ case 0xD3:
+ return HVACHumidityError_CUSTOM_ERROR_83, true
+ case 0xD4:
+ return HVACHumidityError_CUSTOM_ERROR_84, true
+ case 0xD5:
+ return HVACHumidityError_CUSTOM_ERROR_85, true
+ case 0xD6:
+ return HVACHumidityError_CUSTOM_ERROR_86, true
+ case 0xD7:
+ return HVACHumidityError_CUSTOM_ERROR_87, true
+ case 0xD8:
+ return HVACHumidityError_CUSTOM_ERROR_88, true
+ case 0xD9:
+ return HVACHumidityError_CUSTOM_ERROR_89, true
+ case 0xDA:
+ return HVACHumidityError_CUSTOM_ERROR_90, true
+ case 0xDB:
+ return HVACHumidityError_CUSTOM_ERROR_91, true
+ case 0xDC:
+ return HVACHumidityError_CUSTOM_ERROR_92, true
+ case 0xDD:
+ return HVACHumidityError_CUSTOM_ERROR_93, true
+ case 0xDE:
+ return HVACHumidityError_CUSTOM_ERROR_94, true
+ case 0xDF:
+ return HVACHumidityError_CUSTOM_ERROR_95, true
+ case 0xE0:
+ return HVACHumidityError_CUSTOM_ERROR_96, true
+ case 0xE1:
+ return HVACHumidityError_CUSTOM_ERROR_97, true
+ case 0xE2:
+ return HVACHumidityError_CUSTOM_ERROR_98, true
+ case 0xE3:
+ return HVACHumidityError_CUSTOM_ERROR_99, true
+ case 0xE4:
+ return HVACHumidityError_CUSTOM_ERROR_100, true
+ case 0xE5:
+ return HVACHumidityError_CUSTOM_ERROR_101, true
+ case 0xE6:
+ return HVACHumidityError_CUSTOM_ERROR_102, true
+ case 0xE7:
+ return HVACHumidityError_CUSTOM_ERROR_103, true
+ case 0xE8:
+ return HVACHumidityError_CUSTOM_ERROR_104, true
+ case 0xE9:
+ return HVACHumidityError_CUSTOM_ERROR_105, true
+ case 0xEA:
+ return HVACHumidityError_CUSTOM_ERROR_106, true
+ case 0xEB:
+ return HVACHumidityError_CUSTOM_ERROR_107, true
+ case 0xEC:
+ return HVACHumidityError_CUSTOM_ERROR_108, true
+ case 0xED:
+ return HVACHumidityError_CUSTOM_ERROR_109, true
+ case 0xEE:
+ return HVACHumidityError_CUSTOM_ERROR_110, true
+ case 0xEF:
+ return HVACHumidityError_CUSTOM_ERROR_111, true
+ case 0xF0:
+ return HVACHumidityError_CUSTOM_ERROR_112, true
+ case 0xF1:
+ return HVACHumidityError_CUSTOM_ERROR_113, true
+ case 0xF2:
+ return HVACHumidityError_CUSTOM_ERROR_114, true
+ case 0xF3:
+ return HVACHumidityError_CUSTOM_ERROR_115, true
+ case 0xF4:
+ return HVACHumidityError_CUSTOM_ERROR_116, true
+ case 0xF5:
+ return HVACHumidityError_CUSTOM_ERROR_117, true
+ case 0xF6:
+ return HVACHumidityError_CUSTOM_ERROR_118, true
+ case 0xF7:
+ return HVACHumidityError_CUSTOM_ERROR_119, true
+ case 0xF8:
+ return HVACHumidityError_CUSTOM_ERROR_120, true
+ case 0xF9:
+ return HVACHumidityError_CUSTOM_ERROR_121, true
+ case 0xFA:
+ return HVACHumidityError_CUSTOM_ERROR_122, true
+ case 0xFB:
+ return HVACHumidityError_CUSTOM_ERROR_123, true
+ case 0xFC:
+ return HVACHumidityError_CUSTOM_ERROR_124, true
+ case 0xFD:
+ return HVACHumidityError_CUSTOM_ERROR_125, true
+ case 0xFE:
+ return HVACHumidityError_CUSTOM_ERROR_126, true
+ case 0xFF:
+ return HVACHumidityError_CUSTOM_ERROR_127, true
+ }
+ return 0, false
+}
+
+func HVACHumidityErrorByName(value string) (enum HVACHumidityError, ok bool) {
+ switch value {
+ case "NO_ERROR":
+ return HVACHumidityError_NO_ERROR, true
+ case "HUMIDIFIER_TOTAL_FAILURE":
+ return HVACHumidityError_HUMIDIFIER_TOTAL_FAILURE, true
+ case "DEHUMIDIFIER_TOTAL_FAILURE":
+ return HVACHumidityError_DEHUMIDIFIER_TOTAL_FAILURE, true
+ case "FAN_TOTAL_FAILURE":
+ return HVACHumidityError_FAN_TOTAL_FAILURE, true
+ case "HUMIDITY_SENSOR_FAILURE":
+ return HVACHumidityError_HUMIDITY_SENSOR_FAILURE, true
+ case "HUMIDIFIER_TEMPORARY_PROBLEM":
+ return HVACHumidityError_HUMIDIFIER_TEMPORARY_PROBLEM, true
+ case "DEHUMIDIFIER_TEMPORARY_PROBLEM":
+ return HVACHumidityError_DEHUMIDIFIER_TEMPORARY_PROBLEM, true
+ case "FAN_TEMPORARY_PROBLEM":
+ return HVACHumidityError_FAN_TEMPORARY_PROBLEM, true
+ case "HUMIDIFIER_SERVICE_REQUIRED":
+ return HVACHumidityError_HUMIDIFIER_SERVICE_REQUIRED, true
+ case "DEHUMIDIFIER_SERVICE_REQUIRED":
+ return HVACHumidityError_DEHUMIDIFIER_SERVICE_REQUIRED, true
+ case "FAN_SERVICE_REQUIRED":
+ return HVACHumidityError_FAN_SERVICE_REQUIRED, true
+ case "FILTER_REPLACEMENT_REQUIRED":
+ return HVACHumidityError_FILTER_REPLACEMENT_REQUIRED, true
+ case "CUSTOM_ERROR_0":
+ return HVACHumidityError_CUSTOM_ERROR_0, true
+ case "CUSTOM_ERROR_1":
+ return HVACHumidityError_CUSTOM_ERROR_1, true
+ case "CUSTOM_ERROR_2":
+ return HVACHumidityError_CUSTOM_ERROR_2, true
+ case "CUSTOM_ERROR_3":
+ return HVACHumidityError_CUSTOM_ERROR_3, true
+ case "CUSTOM_ERROR_4":
+ return HVACHumidityError_CUSTOM_ERROR_4, true
+ case "CUSTOM_ERROR_5":
+ return HVACHumidityError_CUSTOM_ERROR_5, true
+ case "CUSTOM_ERROR_6":
+ return HVACHumidityError_CUSTOM_ERROR_6, true
+ case "CUSTOM_ERROR_7":
+ return HVACHumidityError_CUSTOM_ERROR_7, true
+ case "CUSTOM_ERROR_8":
+ return HVACHumidityError_CUSTOM_ERROR_8, true
+ case "CUSTOM_ERROR_9":
+ return HVACHumidityError_CUSTOM_ERROR_9, true
+ case "CUSTOM_ERROR_10":
+ return HVACHumidityError_CUSTOM_ERROR_10, true
+ case "CUSTOM_ERROR_11":
+ return HVACHumidityError_CUSTOM_ERROR_11, true
+ case "CUSTOM_ERROR_12":
+ return HVACHumidityError_CUSTOM_ERROR_12, true
+ case "CUSTOM_ERROR_13":
+ return HVACHumidityError_CUSTOM_ERROR_13, true
+ case "CUSTOM_ERROR_14":
+ return HVACHumidityError_CUSTOM_ERROR_14, true
+ case "CUSTOM_ERROR_15":
+ return HVACHumidityError_CUSTOM_ERROR_15, true
+ case "CUSTOM_ERROR_16":
+ return HVACHumidityError_CUSTOM_ERROR_16, true
+ case "CUSTOM_ERROR_17":
+ return HVACHumidityError_CUSTOM_ERROR_17, true
+ case "CUSTOM_ERROR_18":
+ return HVACHumidityError_CUSTOM_ERROR_18, true
+ case "CUSTOM_ERROR_19":
+ return HVACHumidityError_CUSTOM_ERROR_19, true
+ case "CUSTOM_ERROR_20":
+ return HVACHumidityError_CUSTOM_ERROR_20, true
+ case "CUSTOM_ERROR_21":
+ return HVACHumidityError_CUSTOM_ERROR_21, true
+ case "CUSTOM_ERROR_22":
+ return HVACHumidityError_CUSTOM_ERROR_22, true
+ case "CUSTOM_ERROR_23":
+ return HVACHumidityError_CUSTOM_ERROR_23, true
+ case "CUSTOM_ERROR_24":
+ return HVACHumidityError_CUSTOM_ERROR_24, true
+ case "CUSTOM_ERROR_25":
+ return HVACHumidityError_CUSTOM_ERROR_25, true
+ case "CUSTOM_ERROR_26":
+ return HVACHumidityError_CUSTOM_ERROR_26, true
+ case "CUSTOM_ERROR_27":
+ return HVACHumidityError_CUSTOM_ERROR_27, true
+ case "CUSTOM_ERROR_28":
+ return HVACHumidityError_CUSTOM_ERROR_28, true
+ case "CUSTOM_ERROR_29":
+ return HVACHumidityError_CUSTOM_ERROR_29, true
+ case "CUSTOM_ERROR_30":
+ return HVACHumidityError_CUSTOM_ERROR_30, true
+ case "CUSTOM_ERROR_31":
+ return HVACHumidityError_CUSTOM_ERROR_31, true
+ case "CUSTOM_ERROR_32":
+ return HVACHumidityError_CUSTOM_ERROR_32, true
+ case "CUSTOM_ERROR_33":
+ return HVACHumidityError_CUSTOM_ERROR_33, true
+ case "CUSTOM_ERROR_34":
+ return HVACHumidityError_CUSTOM_ERROR_34, true
+ case "CUSTOM_ERROR_35":
+ return HVACHumidityError_CUSTOM_ERROR_35, true
+ case "CUSTOM_ERROR_36":
+ return HVACHumidityError_CUSTOM_ERROR_36, true
+ case "CUSTOM_ERROR_37":
+ return HVACHumidityError_CUSTOM_ERROR_37, true
+ case "CUSTOM_ERROR_38":
+ return HVACHumidityError_CUSTOM_ERROR_38, true
+ case "CUSTOM_ERROR_39":
+ return HVACHumidityError_CUSTOM_ERROR_39, true
+ case "CUSTOM_ERROR_40":
+ return HVACHumidityError_CUSTOM_ERROR_40, true
+ case "CUSTOM_ERROR_41":
+ return HVACHumidityError_CUSTOM_ERROR_41, true
+ case "CUSTOM_ERROR_42":
+ return HVACHumidityError_CUSTOM_ERROR_42, true
+ case "CUSTOM_ERROR_43":
+ return HVACHumidityError_CUSTOM_ERROR_43, true
+ case "CUSTOM_ERROR_44":
+ return HVACHumidityError_CUSTOM_ERROR_44, true
+ case "CUSTOM_ERROR_45":
+ return HVACHumidityError_CUSTOM_ERROR_45, true
+ case "CUSTOM_ERROR_46":
+ return HVACHumidityError_CUSTOM_ERROR_46, true
+ case "CUSTOM_ERROR_47":
+ return HVACHumidityError_CUSTOM_ERROR_47, true
+ case "CUSTOM_ERROR_48":
+ return HVACHumidityError_CUSTOM_ERROR_48, true
+ case "CUSTOM_ERROR_49":
+ return HVACHumidityError_CUSTOM_ERROR_49, true
+ case "CUSTOM_ERROR_50":
+ return HVACHumidityError_CUSTOM_ERROR_50, true
+ case "CUSTOM_ERROR_51":
+ return HVACHumidityError_CUSTOM_ERROR_51, true
+ case "CUSTOM_ERROR_52":
+ return HVACHumidityError_CUSTOM_ERROR_52, true
+ case "CUSTOM_ERROR_53":
+ return HVACHumidityError_CUSTOM_ERROR_53, true
+ case "CUSTOM_ERROR_54":
+ return HVACHumidityError_CUSTOM_ERROR_54, true
+ case "CUSTOM_ERROR_55":
+ return HVACHumidityError_CUSTOM_ERROR_55, true
+ case "CUSTOM_ERROR_56":
+ return HVACHumidityError_CUSTOM_ERROR_56, true
+ case "CUSTOM_ERROR_57":
+ return HVACHumidityError_CUSTOM_ERROR_57, true
+ case "CUSTOM_ERROR_58":
+ return HVACHumidityError_CUSTOM_ERROR_58, true
+ case "CUSTOM_ERROR_59":
+ return HVACHumidityError_CUSTOM_ERROR_59, true
+ case "CUSTOM_ERROR_60":
+ return HVACHumidityError_CUSTOM_ERROR_60, true
+ case "CUSTOM_ERROR_61":
+ return HVACHumidityError_CUSTOM_ERROR_61, true
+ case "CUSTOM_ERROR_62":
+ return HVACHumidityError_CUSTOM_ERROR_62, true
+ case "CUSTOM_ERROR_63":
+ return HVACHumidityError_CUSTOM_ERROR_63, true
+ case "CUSTOM_ERROR_64":
+ return HVACHumidityError_CUSTOM_ERROR_64, true
+ case "CUSTOM_ERROR_65":
+ return HVACHumidityError_CUSTOM_ERROR_65, true
+ case "CUSTOM_ERROR_66":
+ return HVACHumidityError_CUSTOM_ERROR_66, true
+ case "CUSTOM_ERROR_67":
+ return HVACHumidityError_CUSTOM_ERROR_67, true
+ case "CUSTOM_ERROR_68":
+ return HVACHumidityError_CUSTOM_ERROR_68, true
+ case "CUSTOM_ERROR_69":
+ return HVACHumidityError_CUSTOM_ERROR_69, true
+ case "CUSTOM_ERROR_70":
+ return HVACHumidityError_CUSTOM_ERROR_70, true
+ case "CUSTOM_ERROR_71":
+ return HVACHumidityError_CUSTOM_ERROR_71, true
+ case "CUSTOM_ERROR_72":
+ return HVACHumidityError_CUSTOM_ERROR_72, true
+ case "CUSTOM_ERROR_73":
+ return HVACHumidityError_CUSTOM_ERROR_73, true
+ case "CUSTOM_ERROR_74":
+ return HVACHumidityError_CUSTOM_ERROR_74, true
+ case "CUSTOM_ERROR_75":
+ return HVACHumidityError_CUSTOM_ERROR_75, true
+ case "CUSTOM_ERROR_76":
+ return HVACHumidityError_CUSTOM_ERROR_76, true
+ case "CUSTOM_ERROR_77":
+ return HVACHumidityError_CUSTOM_ERROR_77, true
+ case "CUSTOM_ERROR_78":
+ return HVACHumidityError_CUSTOM_ERROR_78, true
+ case "CUSTOM_ERROR_79":
+ return HVACHumidityError_CUSTOM_ERROR_79, true
+ case "CUSTOM_ERROR_80":
+ return HVACHumidityError_CUSTOM_ERROR_80, true
+ case "CUSTOM_ERROR_81":
+ return HVACHumidityError_CUSTOM_ERROR_81, true
+ case "CUSTOM_ERROR_82":
+ return HVACHumidityError_CUSTOM_ERROR_82, true
+ case "CUSTOM_ERROR_83":
+ return HVACHumidityError_CUSTOM_ERROR_83, true
+ case "CUSTOM_ERROR_84":
+ return HVACHumidityError_CUSTOM_ERROR_84, true
+ case "CUSTOM_ERROR_85":
+ return HVACHumidityError_CUSTOM_ERROR_85, true
+ case "CUSTOM_ERROR_86":
+ return HVACHumidityError_CUSTOM_ERROR_86, true
+ case "CUSTOM_ERROR_87":
+ return HVACHumidityError_CUSTOM_ERROR_87, true
+ case "CUSTOM_ERROR_88":
+ return HVACHumidityError_CUSTOM_ERROR_88, true
+ case "CUSTOM_ERROR_89":
+ return HVACHumidityError_CUSTOM_ERROR_89, true
+ case "CUSTOM_ERROR_90":
+ return HVACHumidityError_CUSTOM_ERROR_90, true
+ case "CUSTOM_ERROR_91":
+ return HVACHumidityError_CUSTOM_ERROR_91, true
+ case "CUSTOM_ERROR_92":
+ return HVACHumidityError_CUSTOM_ERROR_92, true
+ case "CUSTOM_ERROR_93":
+ return HVACHumidityError_CUSTOM_ERROR_93, true
+ case "CUSTOM_ERROR_94":
+ return HVACHumidityError_CUSTOM_ERROR_94, true
+ case "CUSTOM_ERROR_95":
+ return HVACHumidityError_CUSTOM_ERROR_95, true
+ case "CUSTOM_ERROR_96":
+ return HVACHumidityError_CUSTOM_ERROR_96, true
+ case "CUSTOM_ERROR_97":
+ return HVACHumidityError_CUSTOM_ERROR_97, true
+ case "CUSTOM_ERROR_98":
+ return HVACHumidityError_CUSTOM_ERROR_98, true
+ case "CUSTOM_ERROR_99":
+ return HVACHumidityError_CUSTOM_ERROR_99, true
+ case "CUSTOM_ERROR_100":
+ return HVACHumidityError_CUSTOM_ERROR_100, true
+ case "CUSTOM_ERROR_101":
+ return HVACHumidityError_CUSTOM_ERROR_101, true
+ case "CUSTOM_ERROR_102":
+ return HVACHumidityError_CUSTOM_ERROR_102, true
+ case "CUSTOM_ERROR_103":
+ return HVACHumidityError_CUSTOM_ERROR_103, true
+ case "CUSTOM_ERROR_104":
+ return HVACHumidityError_CUSTOM_ERROR_104, true
+ case "CUSTOM_ERROR_105":
+ return HVACHumidityError_CUSTOM_ERROR_105, true
+ case "CUSTOM_ERROR_106":
+ return HVACHumidityError_CUSTOM_ERROR_106, true
+ case "CUSTOM_ERROR_107":
+ return HVACHumidityError_CUSTOM_ERROR_107, true
+ case "CUSTOM_ERROR_108":
+ return HVACHumidityError_CUSTOM_ERROR_108, true
+ case "CUSTOM_ERROR_109":
+ return HVACHumidityError_CUSTOM_ERROR_109, true
+ case "CUSTOM_ERROR_110":
+ return HVACHumidityError_CUSTOM_ERROR_110, true
+ case "CUSTOM_ERROR_111":
+ return HVACHumidityError_CUSTOM_ERROR_111, true
+ case "CUSTOM_ERROR_112":
+ return HVACHumidityError_CUSTOM_ERROR_112, true
+ case "CUSTOM_ERROR_113":
+ return HVACHumidityError_CUSTOM_ERROR_113, true
+ case "CUSTOM_ERROR_114":
+ return HVACHumidityError_CUSTOM_ERROR_114, true
+ case "CUSTOM_ERROR_115":
+ return HVACHumidityError_CUSTOM_ERROR_115, true
+ case "CUSTOM_ERROR_116":
+ return HVACHumidityError_CUSTOM_ERROR_116, true
+ case "CUSTOM_ERROR_117":
+ return HVACHumidityError_CUSTOM_ERROR_117, true
+ case "CUSTOM_ERROR_118":
+ return HVACHumidityError_CUSTOM_ERROR_118, true
+ case "CUSTOM_ERROR_119":
+ return HVACHumidityError_CUSTOM_ERROR_119, true
+ case "CUSTOM_ERROR_120":
+ return HVACHumidityError_CUSTOM_ERROR_120, true
+ case "CUSTOM_ERROR_121":
+ return HVACHumidityError_CUSTOM_ERROR_121, true
+ case "CUSTOM_ERROR_122":
+ return HVACHumidityError_CUSTOM_ERROR_122, true
+ case "CUSTOM_ERROR_123":
+ return HVACHumidityError_CUSTOM_ERROR_123, true
+ case "CUSTOM_ERROR_124":
+ return HVACHumidityError_CUSTOM_ERROR_124, true
+ case "CUSTOM_ERROR_125":
+ return HVACHumidityError_CUSTOM_ERROR_125, true
+ case "CUSTOM_ERROR_126":
+ return HVACHumidityError_CUSTOM_ERROR_126, true
+ case "CUSTOM_ERROR_127":
+ return HVACHumidityError_CUSTOM_ERROR_127, true
+ }
+ return 0, false
+}
+
+func HVACHumidityErrorKnows(value uint8) bool {
+ for _, typeValue := range HVACHumidityErrorValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastHVACHumidityError(structType interface{}) HVACHumidityError {
+ castFunc := func(typ interface{}) HVACHumidityError {
+ if sHVACHumidityError, ok := typ.(HVACHumidityError); ok {
+ return sHVACHumidityError
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m HVACHumidityError) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m HVACHumidityError) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func HVACHumidityErrorParse(readBuffer utils.ReadBuffer) (HVACHumidityError, error) {
+ val, err := readBuffer.ReadUint8("HVACHumidityError", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading HVACHumidityError")
+ }
+ if enum, ok := HVACHumidityErrorByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return HVACHumidityError(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e HVACHumidityError) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("HVACHumidityError", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e HVACHumidityError) PLC4XEnumName() string {
+ switch e {
+ case HVACHumidityError_NO_ERROR:
+ return "NO_ERROR"
+ case HVACHumidityError_HUMIDIFIER_TOTAL_FAILURE:
+ return "HUMIDIFIER_TOTAL_FAILURE"
+ case HVACHumidityError_DEHUMIDIFIER_TOTAL_FAILURE:
+ return "DEHUMIDIFIER_TOTAL_FAILURE"
+ case HVACHumidityError_FAN_TOTAL_FAILURE:
+ return "FAN_TOTAL_FAILURE"
+ case HVACHumidityError_HUMIDITY_SENSOR_FAILURE:
+ return "HUMIDITY_SENSOR_FAILURE"
+ case HVACHumidityError_HUMIDIFIER_TEMPORARY_PROBLEM:
+ return "HUMIDIFIER_TEMPORARY_PROBLEM"
+ case HVACHumidityError_DEHUMIDIFIER_TEMPORARY_PROBLEM:
+ return "DEHUMIDIFIER_TEMPORARY_PROBLEM"
+ case HVACHumidityError_FAN_TEMPORARY_PROBLEM:
+ return "FAN_TEMPORARY_PROBLEM"
+ case HVACHumidityError_HUMIDIFIER_SERVICE_REQUIRED:
+ return "HUMIDIFIER_SERVICE_REQUIRED"
+ case HVACHumidityError_DEHUMIDIFIER_SERVICE_REQUIRED:
+ return "DEHUMIDIFIER_SERVICE_REQUIRED"
+ case HVACHumidityError_FAN_SERVICE_REQUIRED:
+ return "FAN_SERVICE_REQUIRED"
+ case HVACHumidityError_FILTER_REPLACEMENT_REQUIRED:
+ return "FILTER_REPLACEMENT_REQUIRED"
+ case HVACHumidityError_CUSTOM_ERROR_0:
+ return "CUSTOM_ERROR_0"
+ case HVACHumidityError_CUSTOM_ERROR_1:
+ return "CUSTOM_ERROR_1"
+ case HVACHumidityError_CUSTOM_ERROR_2:
+ return "CUSTOM_ERROR_2"
+ case HVACHumidityError_CUSTOM_ERROR_3:
+ return "CUSTOM_ERROR_3"
+ case HVACHumidityError_CUSTOM_ERROR_4:
+ return "CUSTOM_ERROR_4"
+ case HVACHumidityError_CUSTOM_ERROR_5:
+ return "CUSTOM_ERROR_5"
+ case HVACHumidityError_CUSTOM_ERROR_6:
+ return "CUSTOM_ERROR_6"
+ case HVACHumidityError_CUSTOM_ERROR_7:
+ return "CUSTOM_ERROR_7"
+ case HVACHumidityError_CUSTOM_ERROR_8:
+ return "CUSTOM_ERROR_8"
+ case HVACHumidityError_CUSTOM_ERROR_9:
+ return "CUSTOM_ERROR_9"
+ case HVACHumidityError_CUSTOM_ERROR_10:
+ return "CUSTOM_ERROR_10"
+ case HVACHumidityError_CUSTOM_ERROR_11:
+ return "CUSTOM_ERROR_11"
+ case HVACHumidityError_CUSTOM_ERROR_12:
+ return "CUSTOM_ERROR_12"
+ case HVACHumidityError_CUSTOM_ERROR_13:
+ return "CUSTOM_ERROR_13"
+ case HVACHumidityError_CUSTOM_ERROR_14:
+ return "CUSTOM_ERROR_14"
+ case HVACHumidityError_CUSTOM_ERROR_15:
+ return "CUSTOM_ERROR_15"
+ case HVACHumidityError_CUSTOM_ERROR_16:
+ return "CUSTOM_ERROR_16"
+ case HVACHumidityError_CUSTOM_ERROR_17:
+ return "CUSTOM_ERROR_17"
+ case HVACHumidityError_CUSTOM_ERROR_18:
+ return "CUSTOM_ERROR_18"
+ case HVACHumidityError_CUSTOM_ERROR_19:
+ return "CUSTOM_ERROR_19"
+ case HVACHumidityError_CUSTOM_ERROR_20:
+ return "CUSTOM_ERROR_20"
+ case HVACHumidityError_CUSTOM_ERROR_21:
+ return "CUSTOM_ERROR_21"
+ case HVACHumidityError_CUSTOM_ERROR_22:
+ return "CUSTOM_ERROR_22"
+ case HVACHumidityError_CUSTOM_ERROR_23:
+ return "CUSTOM_ERROR_23"
+ case HVACHumidityError_CUSTOM_ERROR_24:
+ return "CUSTOM_ERROR_24"
+ case HVACHumidityError_CUSTOM_ERROR_25:
+ return "CUSTOM_ERROR_25"
+ case HVACHumidityError_CUSTOM_ERROR_26:
+ return "CUSTOM_ERROR_26"
+ case HVACHumidityError_CUSTOM_ERROR_27:
+ return "CUSTOM_ERROR_27"
+ case HVACHumidityError_CUSTOM_ERROR_28:
+ return "CUSTOM_ERROR_28"
+ case HVACHumidityError_CUSTOM_ERROR_29:
+ return "CUSTOM_ERROR_29"
+ case HVACHumidityError_CUSTOM_ERROR_30:
+ return "CUSTOM_ERROR_30"
+ case HVACHumidityError_CUSTOM_ERROR_31:
+ return "CUSTOM_ERROR_31"
+ case HVACHumidityError_CUSTOM_ERROR_32:
+ return "CUSTOM_ERROR_32"
+ case HVACHumidityError_CUSTOM_ERROR_33:
+ return "CUSTOM_ERROR_33"
+ case HVACHumidityError_CUSTOM_ERROR_34:
+ return "CUSTOM_ERROR_34"
+ case HVACHumidityError_CUSTOM_ERROR_35:
+ return "CUSTOM_ERROR_35"
+ case HVACHumidityError_CUSTOM_ERROR_36:
+ return "CUSTOM_ERROR_36"
+ case HVACHumidityError_CUSTOM_ERROR_37:
+ return "CUSTOM_ERROR_37"
+ case HVACHumidityError_CUSTOM_ERROR_38:
+ return "CUSTOM_ERROR_38"
+ case HVACHumidityError_CUSTOM_ERROR_39:
+ return "CUSTOM_ERROR_39"
+ case HVACHumidityError_CUSTOM_ERROR_40:
+ return "CUSTOM_ERROR_40"
... 4302 lines suppressed ...