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:17 UTC
[plc4x] 03/03: feat(cbus): implemented air conditioning application
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 ...