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/18 14:40:05 UTC
[plc4x] branch develop updated: feat(cbus): implemented enable control 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
The following commit(s) were added to refs/heads/develop by this push:
new 79754bad4 feat(cbus): implemented enable control application
79754bad4 is described below
commit 79754bad42295480ab4388f3b778eebc34ba0c38
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Mon Jul 18 16:39:58 2022 +0200
feat(cbus): implemented enable control application
---
plc4go/protocols/cbus/readwrite/ParserHelper.go | 2 +
plc4go/protocols/cbus/readwrite/XmlParserHelper.go | 2 +
.../readwrite/model/EnableControlCommandType.go | 121 ++++++
.../model/EnableControlCommandTypeContainer.go | 406 +++++++++++++++++++++
.../cbus/readwrite/model/EnableControlData.go | 247 +++++++++++++
.../cbus/readwrite/model/SALDataEnableControl.go | 54 ++-
.../protocols/cbus/readwrite/model/StaticHelper.go | 10 +
.../java/cbus/readwrite/utils/StaticHelper.java | 11 +
.../org/apache/plc4x/java/cbus/ReferenceTest.java | 32 +-
.../src/main/resources/protocols/cbus/c-bus.mspec | 34 +-
10 files changed, 911 insertions(+), 8 deletions(-)
diff --git a/plc4go/protocols/cbus/readwrite/ParserHelper.go b/plc4go/protocols/cbus/readwrite/ParserHelper.go
index 258ca34e5..9dfb91b69 100644
--- a/plc4go/protocols/cbus/readwrite/ParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/ParserHelper.go
@@ -34,6 +34,8 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
switch typeName {
case "MeteringData":
return model.MeteringDataParse(io)
+ case "EnableControlData":
+ return model.EnableControlDataParse(io)
case "ApplicationAddress2":
return model.ApplicationAddress2Parse(io)
case "ApplicationAddress1":
diff --git a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
index 02a84b13d..1e3f44e97 100644
--- a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
@@ -44,6 +44,8 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
switch typeName {
case "MeteringData":
return model.MeteringDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "EnableControlData":
+ return model.EnableControlDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "ApplicationAddress2":
return model.ApplicationAddress2Parse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "ApplicationAddress1":
diff --git a/plc4go/protocols/cbus/readwrite/model/EnableControlCommandType.go b/plc4go/protocols/cbus/readwrite/model/EnableControlCommandType.go
new file mode 100644
index 000000000..f34d4a89a
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/EnableControlCommandType.go
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// EnableControlCommandType is an enum
+type EnableControlCommandType uint8
+
+type IEnableControlCommandType interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ EnableControlCommandType_SET_NETWORK_VARIABLE EnableControlCommandType = 0x00
+)
+
+var EnableControlCommandTypeValues []EnableControlCommandType
+
+func init() {
+ _ = errors.New
+ EnableControlCommandTypeValues = []EnableControlCommandType{
+ EnableControlCommandType_SET_NETWORK_VARIABLE,
+ }
+}
+
+func EnableControlCommandTypeByValue(value uint8) (enum EnableControlCommandType, ok bool) {
+ switch value {
+ case 0x00:
+ return EnableControlCommandType_SET_NETWORK_VARIABLE, true
+ }
+ return 0, false
+}
+
+func EnableControlCommandTypeByName(value string) (enum EnableControlCommandType, ok bool) {
+ switch value {
+ case "SET_NETWORK_VARIABLE":
+ return EnableControlCommandType_SET_NETWORK_VARIABLE, true
+ }
+ return 0, false
+}
+
+func EnableControlCommandTypeKnows(value uint8) bool {
+ for _, typeValue := range EnableControlCommandTypeValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastEnableControlCommandType(structType interface{}) EnableControlCommandType {
+ castFunc := func(typ interface{}) EnableControlCommandType {
+ if sEnableControlCommandType, ok := typ.(EnableControlCommandType); ok {
+ return sEnableControlCommandType
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m EnableControlCommandType) GetLengthInBits() uint16 {
+ return 4
+}
+
+func (m EnableControlCommandType) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func EnableControlCommandTypeParse(readBuffer utils.ReadBuffer) (EnableControlCommandType, error) {
+ val, err := readBuffer.ReadUint8("EnableControlCommandType", 4)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading EnableControlCommandType")
+ }
+ if enum, ok := EnableControlCommandTypeByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return EnableControlCommandType(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e EnableControlCommandType) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("EnableControlCommandType", 4, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e EnableControlCommandType) PLC4XEnumName() string {
+ switch e {
+ case EnableControlCommandType_SET_NETWORK_VARIABLE:
+ return "SET_NETWORK_VARIABLE"
+ }
+ return ""
+}
+
+func (e EnableControlCommandType) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/EnableControlCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/EnableControlCommandTypeContainer.go
new file mode 100644
index 000000000..e0de6791a
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/EnableControlCommandTypeContainer.go
@@ -0,0 +1,406 @@
+/*
+ * 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.
+
+// EnableControlCommandTypeContainer is an enum
+type EnableControlCommandTypeContainer uint8
+
+type IEnableControlCommandTypeContainer interface {
+ NumBytes() uint8
+ CommandType() EnableControlCommandType
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable0_2Bytes EnableControlCommandTypeContainer = 0x02
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable1_2Bytes EnableControlCommandTypeContainer = 0x0A
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable2_2Bytes EnableControlCommandTypeContainer = 0x12
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable3_2Bytes EnableControlCommandTypeContainer = 0x1A
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable4_2Bytes EnableControlCommandTypeContainer = 0x22
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable5_2Bytes EnableControlCommandTypeContainer = 0x2A
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable6_2Bytes EnableControlCommandTypeContainer = 0x32
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable7_2Bytes EnableControlCommandTypeContainer = 0x3A
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable8_2Bytes EnableControlCommandTypeContainer = 0x42
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable9_2Bytes EnableControlCommandTypeContainer = 0x4A
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable10_2Bytes EnableControlCommandTypeContainer = 0x52
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable11_2Bytes EnableControlCommandTypeContainer = 0x5A
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable12_2Bytes EnableControlCommandTypeContainer = 0x62
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable13_2Bytes EnableControlCommandTypeContainer = 0x6A
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable14_2Bytes EnableControlCommandTypeContainer = 0x72
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable15_2Bytes EnableControlCommandTypeContainer = 0x7A
+)
+
+var EnableControlCommandTypeContainerValues []EnableControlCommandTypeContainer
+
+func init() {
+ _ = errors.New
+ EnableControlCommandTypeContainerValues = []EnableControlCommandTypeContainer{
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable0_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable1_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable2_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable3_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable4_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable5_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable6_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable7_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable8_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable9_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable10_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable11_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable12_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable13_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable14_2Bytes,
+ EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable15_2Bytes,
+ }
+}
+
+func (e EnableControlCommandTypeContainer) NumBytes() uint8 {
+ switch e {
+ case 0x02:
+ { /* '0x02' */
+ return 2
+ }
+ case 0x0A:
+ { /* '0x0A' */
+ return 2
+ }
+ case 0x12:
+ { /* '0x12' */
+ return 2
+ }
+ case 0x1A:
+ { /* '0x1A' */
+ return 2
+ }
+ case 0x22:
+ { /* '0x22' */
+ return 2
+ }
+ case 0x2A:
+ { /* '0x2A' */
+ return 2
+ }
+ case 0x32:
+ { /* '0x32' */
+ return 2
+ }
+ case 0x3A:
+ { /* '0x3A' */
+ return 2
+ }
+ case 0x42:
+ { /* '0x42' */
+ return 2
+ }
+ case 0x4A:
+ { /* '0x4A' */
+ return 2
+ }
+ case 0x52:
+ { /* '0x52' */
+ return 2
+ }
+ case 0x5A:
+ { /* '0x5A' */
+ return 2
+ }
+ case 0x62:
+ { /* '0x62' */
+ return 2
+ }
+ case 0x6A:
+ { /* '0x6A' */
+ return 2
+ }
+ case 0x72:
+ { /* '0x72' */
+ return 2
+ }
+ case 0x7A:
+ { /* '0x7A' */
+ return 2
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func EnableControlCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (EnableControlCommandTypeContainer, error) {
+ for _, sizeValue := range EnableControlCommandTypeContainerValues {
+ if sizeValue.NumBytes() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing NumBytes not found", value)
+}
+
+func (e EnableControlCommandTypeContainer) CommandType() EnableControlCommandType {
+ switch e {
+ case 0x02:
+ { /* '0x02' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x0A:
+ { /* '0x0A' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x12:
+ { /* '0x12' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x1A:
+ { /* '0x1A' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x22:
+ { /* '0x22' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x2A:
+ { /* '0x2A' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x32:
+ { /* '0x32' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x3A:
+ { /* '0x3A' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x42:
+ { /* '0x42' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x4A:
+ { /* '0x4A' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x52:
+ { /* '0x52' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x5A:
+ { /* '0x5A' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x62:
+ { /* '0x62' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x6A:
+ { /* '0x6A' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x72:
+ { /* '0x72' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ case 0x7A:
+ { /* '0x7A' */
+ return EnableControlCommandType_SET_NETWORK_VARIABLE
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func EnableControlCommandTypeContainerFirstEnumForFieldCommandType(value EnableControlCommandType) (EnableControlCommandTypeContainer, error) {
+ for _, sizeValue := range EnableControlCommandTypeContainerValues {
+ if sizeValue.CommandType() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing CommandType not found", value)
+}
+func EnableControlCommandTypeContainerByValue(value uint8) (enum EnableControlCommandTypeContainer, ok bool) {
+ switch value {
+ case 0x02:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable0_2Bytes, true
+ case 0x0A:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable1_2Bytes, true
+ case 0x12:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable2_2Bytes, true
+ case 0x1A:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable3_2Bytes, true
+ case 0x22:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable4_2Bytes, true
+ case 0x2A:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable5_2Bytes, true
+ case 0x32:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable6_2Bytes, true
+ case 0x3A:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable7_2Bytes, true
+ case 0x42:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable8_2Bytes, true
+ case 0x4A:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable9_2Bytes, true
+ case 0x52:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable10_2Bytes, true
+ case 0x5A:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable11_2Bytes, true
+ case 0x62:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable12_2Bytes, true
+ case 0x6A:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable13_2Bytes, true
+ case 0x72:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable14_2Bytes, true
+ case 0x7A:
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable15_2Bytes, true
+ }
+ return 0, false
+}
+
+func EnableControlCommandTypeContainerByName(value string) (enum EnableControlCommandTypeContainer, ok bool) {
+ switch value {
+ case "EnableControlCommandSetNetworkVariable0_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable0_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable1_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable1_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable2_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable2_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable3_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable3_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable4_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable4_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable5_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable5_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable6_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable6_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable7_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable7_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable8_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable8_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable9_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable9_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable10_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable10_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable11_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable11_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable12_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable12_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable13_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable13_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable14_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable14_2Bytes, true
+ case "EnableControlCommandSetNetworkVariable15_2Bytes":
+ return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable15_2Bytes, true
+ }
+ return 0, false
+}
+
+func EnableControlCommandTypeContainerKnows(value uint8) bool {
+ for _, typeValue := range EnableControlCommandTypeContainerValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastEnableControlCommandTypeContainer(structType interface{}) EnableControlCommandTypeContainer {
+ castFunc := func(typ interface{}) EnableControlCommandTypeContainer {
+ if sEnableControlCommandTypeContainer, ok := typ.(EnableControlCommandTypeContainer); ok {
+ return sEnableControlCommandTypeContainer
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m EnableControlCommandTypeContainer) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m EnableControlCommandTypeContainer) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func EnableControlCommandTypeContainerParse(readBuffer utils.ReadBuffer) (EnableControlCommandTypeContainer, error) {
+ val, err := readBuffer.ReadUint8("EnableControlCommandTypeContainer", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading EnableControlCommandTypeContainer")
+ }
+ if enum, ok := EnableControlCommandTypeContainerByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return EnableControlCommandTypeContainer(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e EnableControlCommandTypeContainer) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("EnableControlCommandTypeContainer", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e EnableControlCommandTypeContainer) PLC4XEnumName() string {
+ switch e {
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable0_2Bytes:
+ return "EnableControlCommandSetNetworkVariable0_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable1_2Bytes:
+ return "EnableControlCommandSetNetworkVariable1_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable2_2Bytes:
+ return "EnableControlCommandSetNetworkVariable2_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable3_2Bytes:
+ return "EnableControlCommandSetNetworkVariable3_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable4_2Bytes:
+ return "EnableControlCommandSetNetworkVariable4_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable5_2Bytes:
+ return "EnableControlCommandSetNetworkVariable5_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable6_2Bytes:
+ return "EnableControlCommandSetNetworkVariable6_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable7_2Bytes:
+ return "EnableControlCommandSetNetworkVariable7_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable8_2Bytes:
+ return "EnableControlCommandSetNetworkVariable8_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable9_2Bytes:
+ return "EnableControlCommandSetNetworkVariable9_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable10_2Bytes:
+ return "EnableControlCommandSetNetworkVariable10_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable11_2Bytes:
+ return "EnableControlCommandSetNetworkVariable11_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable12_2Bytes:
+ return "EnableControlCommandSetNetworkVariable12_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable13_2Bytes:
+ return "EnableControlCommandSetNetworkVariable13_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable14_2Bytes:
+ return "EnableControlCommandSetNetworkVariable14_2Bytes"
+ case EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable15_2Bytes:
+ return "EnableControlCommandSetNetworkVariable15_2Bytes"
+ }
+ return ""
+}
+
+func (e EnableControlCommandTypeContainer) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/EnableControlData.go b/plc4go/protocols/cbus/readwrite/model/EnableControlData.go
new file mode 100644
index 000000000..0f932ea30
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/EnableControlData.go
@@ -0,0 +1,247 @@
+/*
+ * 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.
+
+// EnableControlData is the corresponding interface of EnableControlData
+type EnableControlData interface {
+ utils.LengthAware
+ utils.Serializable
+ // GetCommandTypeContainer returns CommandTypeContainer (property field)
+ GetCommandTypeContainer() EnableControlCommandTypeContainer
+ // GetEnableNetworkVariable returns EnableNetworkVariable (property field)
+ GetEnableNetworkVariable() byte
+ // GetValue returns Value (property field)
+ GetValue() byte
+ // GetCommandType returns CommandType (virtual field)
+ GetCommandType() EnableControlCommandType
+}
+
+// EnableControlDataExactly can be used when we want exactly this type and not a type which fulfills EnableControlData.
+// This is useful for switch cases.
+type EnableControlDataExactly interface {
+ EnableControlData
+ isEnableControlData() bool
+}
+
+// _EnableControlData is the data-structure of this message
+type _EnableControlData struct {
+ CommandTypeContainer EnableControlCommandTypeContainer
+ EnableNetworkVariable byte
+ Value byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_EnableControlData) GetCommandTypeContainer() EnableControlCommandTypeContainer {
+ return m.CommandTypeContainer
+}
+
+func (m *_EnableControlData) GetEnableNetworkVariable() byte {
+ return m.EnableNetworkVariable
+}
+
+func (m *_EnableControlData) GetValue() byte {
+ return m.Value
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_EnableControlData) GetCommandType() EnableControlCommandType {
+ return CastEnableControlCommandType(m.GetCommandTypeContainer().CommandType())
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewEnableControlData factory function for _EnableControlData
+func NewEnableControlData(commandTypeContainer EnableControlCommandTypeContainer, enableNetworkVariable byte, value byte) *_EnableControlData {
+ return &_EnableControlData{CommandTypeContainer: commandTypeContainer, EnableNetworkVariable: enableNetworkVariable, Value: value}
+}
+
+// Deprecated: use the interface for direct cast
+func CastEnableControlData(structType interface{}) EnableControlData {
+ if casted, ok := structType.(EnableControlData); ok {
+ return casted
+ }
+ if casted, ok := structType.(*EnableControlData); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_EnableControlData) GetTypeName() string {
+ return "EnableControlData"
+}
+
+func (m *_EnableControlData) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_EnableControlData) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (commandTypeContainer)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // Simple field (enableNetworkVariable)
+ lengthInBits += 8
+
+ // Simple field (value)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_EnableControlData) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func EnableControlDataParse(readBuffer utils.ReadBuffer) (EnableControlData, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("EnableControlData"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for EnableControlData")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Validation
+ if !(KnowsEnableControlCommandTypeContainer(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 := EnableControlCommandTypeContainerParse(readBuffer)
+ if _commandTypeContainerErr != nil {
+ return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of EnableControlData")
+ }
+ commandTypeContainer := _commandTypeContainer
+ if closeErr := readBuffer.CloseContext("commandTypeContainer"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for commandTypeContainer")
+ }
+
+ // Virtual field
+ _commandType := commandTypeContainer.CommandType()
+ commandType := EnableControlCommandType(_commandType)
+ _ = commandType
+
+ // Simple Field (enableNetworkVariable)
+ _enableNetworkVariable, _enableNetworkVariableErr := readBuffer.ReadByte("enableNetworkVariable")
+ if _enableNetworkVariableErr != nil {
+ return nil, errors.Wrap(_enableNetworkVariableErr, "Error parsing 'enableNetworkVariable' field of EnableControlData")
+ }
+ enableNetworkVariable := _enableNetworkVariable
+
+ // Simple Field (value)
+ _value, _valueErr := readBuffer.ReadByte("value")
+ if _valueErr != nil {
+ return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of EnableControlData")
+ }
+ value := _value
+
+ if closeErr := readBuffer.CloseContext("EnableControlData"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for EnableControlData")
+ }
+
+ // Create the instance
+ return NewEnableControlData(commandTypeContainer, enableNetworkVariable, value), nil
+}
+
+func (m *_EnableControlData) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("EnableControlData"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for EnableControlData")
+ }
+
+ // Simple Field (commandTypeContainer)
+ if pushErr := writeBuffer.PushContext("commandTypeContainer"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for commandTypeContainer")
+ }
+ _commandTypeContainerErr := writeBuffer.WriteSerializable(m.GetCommandTypeContainer())
+ if popErr := writeBuffer.PopContext("commandTypeContainer"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for commandTypeContainer")
+ }
+ if _commandTypeContainerErr != nil {
+ return errors.Wrap(_commandTypeContainerErr, "Error serializing 'commandTypeContainer' field")
+ }
+ // Virtual field
+ if _commandTypeErr := writeBuffer.WriteVirtual("commandType", m.GetCommandType()); _commandTypeErr != nil {
+ return errors.Wrap(_commandTypeErr, "Error serializing 'commandType' field")
+ }
+
+ // Simple Field (enableNetworkVariable)
+ enableNetworkVariable := byte(m.GetEnableNetworkVariable())
+ _enableNetworkVariableErr := writeBuffer.WriteByte("enableNetworkVariable", (enableNetworkVariable))
+ if _enableNetworkVariableErr != nil {
+ return errors.Wrap(_enableNetworkVariableErr, "Error serializing 'enableNetworkVariable' field")
+ }
+
+ // Simple Field (value)
+ value := byte(m.GetValue())
+ _valueErr := writeBuffer.WriteByte("value", (value))
+ if _valueErr != nil {
+ return errors.Wrap(_valueErr, "Error serializing 'value' field")
+ }
+
+ if popErr := writeBuffer.PopContext("EnableControlData"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for EnableControlData")
+ }
+ return nil
+}
+
+func (m *_EnableControlData) isEnableControlData() bool {
+ return true
+}
+
+func (m *_EnableControlData) 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/SALDataEnableControl.go b/plc4go/protocols/cbus/readwrite/model/SALDataEnableControl.go
index eeee6f114..5fabce512 100644
--- a/plc4go/protocols/cbus/readwrite/model/SALDataEnableControl.go
+++ b/plc4go/protocols/cbus/readwrite/model/SALDataEnableControl.go
@@ -31,6 +31,8 @@ type SALDataEnableControl interface {
utils.LengthAware
utils.Serializable
SALData
+ // GetEnableControlData returns EnableControlData (property field)
+ GetEnableControlData() EnableControlData
}
// SALDataEnableControlExactly can be used when we want exactly this type and not a type which fulfills SALDataEnableControl.
@@ -43,6 +45,7 @@ type SALDataEnableControlExactly interface {
// _SALDataEnableControl is the data-structure of this message
type _SALDataEnableControl struct {
*_SALData
+ EnableControlData EnableControlData
}
///////////////////////////////////////////////////////////
@@ -67,10 +70,25 @@ func (m *_SALDataEnableControl) GetParent() SALData {
return m._SALData
}
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SALDataEnableControl) GetEnableControlData() EnableControlData {
+ return m.EnableControlData
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
// NewSALDataEnableControl factory function for _SALDataEnableControl
-func NewSALDataEnableControl(salData SALData) *_SALDataEnableControl {
+func NewSALDataEnableControl(enableControlData EnableControlData, salData SALData) *_SALDataEnableControl {
_result := &_SALDataEnableControl{
- _SALData: NewSALData(salData),
+ EnableControlData: enableControlData,
+ _SALData: NewSALData(salData),
}
_result._SALData._SALDataChildRequirements = _result
return _result
@@ -98,6 +116,9 @@ func (m *_SALDataEnableControl) GetLengthInBits() uint16 {
func (m *_SALDataEnableControl) GetLengthInBitsConditional(lastItem bool) uint16 {
lengthInBits := uint16(m.GetParentLengthInBits())
+ // Simple field (enableControlData)
+ lengthInBits += m.EnableControlData.GetLengthInBits()
+
return lengthInBits
}
@@ -114,9 +135,17 @@ func SALDataEnableControlParse(readBuffer utils.ReadBuffer, applicationId Applic
currentPos := positionAware.GetPos()
_ = currentPos
- // Validation
- if !(bool((1) == (2))) {
- return nil, errors.WithStack(utils.ParseValidationError{"ENABLE_CONTROL Not yet implemented"})
+ // Simple Field (enableControlData)
+ if pullErr := readBuffer.PullContext("enableControlData"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for enableControlData")
+ }
+ _enableControlData, _enableControlDataErr := EnableControlDataParse(readBuffer)
+ if _enableControlDataErr != nil {
+ return nil, errors.Wrap(_enableControlDataErr, "Error parsing 'enableControlData' field of SALDataEnableControl")
+ }
+ enableControlData := _enableControlData.(EnableControlData)
+ if closeErr := readBuffer.CloseContext("enableControlData"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for enableControlData")
}
if closeErr := readBuffer.CloseContext("SALDataEnableControl"); closeErr != nil {
@@ -125,7 +154,8 @@ func SALDataEnableControlParse(readBuffer utils.ReadBuffer, applicationId Applic
// Create a partially initialized instance
_child := &_SALDataEnableControl{
- _SALData: &_SALData{},
+ EnableControlData: enableControlData,
+ _SALData: &_SALData{},
}
_child._SALData._SALDataChildRequirements = _child
return _child, nil
@@ -139,6 +169,18 @@ func (m *_SALDataEnableControl) Serialize(writeBuffer utils.WriteBuffer) error {
return errors.Wrap(pushErr, "Error pushing for SALDataEnableControl")
}
+ // Simple Field (enableControlData)
+ if pushErr := writeBuffer.PushContext("enableControlData"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for enableControlData")
+ }
+ _enableControlDataErr := writeBuffer.WriteSerializable(m.GetEnableControlData())
+ if popErr := writeBuffer.PopContext("enableControlData"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for enableControlData")
+ }
+ if _enableControlDataErr != nil {
+ return errors.Wrap(_enableControlDataErr, "Error serializing 'enableControlData' field")
+ }
+
if popErr := writeBuffer.PopContext("SALDataEnableControl"); popErr != nil {
return errors.Wrap(popErr, "Error popping for SALDataEnableControl")
}
diff --git a/plc4go/protocols/cbus/readwrite/model/StaticHelper.go b/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
index 5282914d8..d8b0e2b9f 100644
--- a/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
+++ b/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
@@ -161,3 +161,13 @@ func KnowsTriggerControlCommandTypeContainer(readBuffer utils.ReadBuffer) bool {
}
return TriggerControlCommandTypeContainerKnows(readUint8)
}
+
+func KnowsEnableControlCommandTypeContainer(readBuffer utils.ReadBuffer) bool {
+ oldPos := readBuffer.GetPos()
+ defer readBuffer.Reset(oldPos)
+ readUint8, err := readBuffer.ReadUint8("", 8)
+ if err != nil {
+ return false
+ }
+ return EnableControlCommandTypeContainerKnows(readUint8)
+}
diff --git a/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java b/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java
index a6f2d123e..b0b8874df 100644
--- a/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java
+++ b/plc4j/drivers/c-bus/src/main/java/org/apache/plc4x/java/cbus/readwrite/utils/StaticHelper.java
@@ -139,4 +139,15 @@ public class StaticHelper {
}
}
+ public static boolean knowsEnableControlCommandTypeContainer(ReadBuffer readBuffer) {
+ int oldPos = readBuffer.getPos();
+ try {
+ return EnableControlCommandTypeContainer.isDefined(readBuffer.readUnsignedShort(8));
+ } catch (ParseException ignore) {
+ return false;
+ } finally {
+ readBuffer.reset(oldPos);
+ }
+ }
+
}
diff --git a/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java b/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java
index 278afed82..05c433c83 100644
--- a/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java
+++ b/plc4j/drivers/c-bus/src/test/java/org/apache/plc4x/java/cbus/ReferenceTest.java
@@ -967,8 +967,38 @@ public class ReferenceTest {
System.out.println(((RequestCommand) ((CBusMessageToServer) msg).getRequest()).getCbusCommand());
assertMessageMatches(bytes, msg);
}
-
}
+ }
+ // from: https://updates.clipsal.com/ClipsalSoftwareDownload/DL/downloads/OpenCBus/Chapter%2008%20-%20C-Bus%20Enable%20Control%20Application.pdf
+ @Nested
+ class EnableControlApplicationsTest{
+ //8.11
+ @Nested
+ class Examples{
+ @Test
+ void LocalTrigger() throws Exception {
+ byte[] bytes = "\\05CB0002378275\r".getBytes(StandardCharsets.UTF_8);
+ ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
+ cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
+ CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, false, requestContext, cBusOptions, bytes.length);
+ assertThat(msg).isNotNull();
+ System.out.println(msg);
+ System.out.println(((RequestCommand) ((CBusMessageToServer) msg).getRequest()).getCbusCommand());
+ assertMessageMatches(bytes, msg);
+ }
+
+ @Test
+ void RemoteTrigger() throws Exception {
+ byte[] bytes = "\\035609CB02378216\r".getBytes(StandardCharsets.UTF_8);
+ ReadBufferByteBased readBufferByteBased = new ReadBufferByteBased(bytes);
+ cBusOptions = new CBusOptions(false, false, false, false, false, false, false, false, true);
+ CBusMessage msg = CBusMessage.staticParse(readBufferByteBased, false, requestContext, cBusOptions, bytes.length);
+ assertThat(msg).isNotNull();
+ System.out.println(msg);
+ System.out.println(((RequestCommand) ((CBusMessageToServer) msg).getRequest()).getCbusCommand());
+ assertMessageMatches(bytes, msg);
+ }
+ }
}
}
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
index 52167d058..faa124b1c 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
@@ -1332,7 +1332,7 @@
[simple TriggerControlData triggerControlData]
]
['ENABLE_CONTROL' *EnableControl
- [validation '1==2' "ENABLE_CONTROL Not yet implemented"] // TODO: implement me
+ [simple EnableControlData enableControlData]
]
['AUDIO_AND_VIDEO' *AudioAndVideo
[validation '1==2' "AUDIO_AND_VIDEO Not yet implemented"] // TODO: implement me
@@ -2028,6 +2028,38 @@
['3' SET_PREFERRED_LANGUAGE ]
]
+[type EnableControlData
+ //TODO: golang doesn't like checking for null so we use that static call to check that the enum is known
+ [validation 'STATIC_CALL("knowsEnableControlCommandTypeContainer", readBuffer)' "no command type could be found" shouldFail=false]
+ [simple EnableControlCommandTypeContainer commandTypeContainer ]
+ [virtual EnableControlCommandType commandType 'commandTypeContainer.commandType']
+ [simple byte enableNetworkVariable ]
+ [simple byte value ]
+]
+
+[enum uint 8 EnableControlCommandTypeContainer(EnableControlCommandType commandType, uint 5 numBytes)
+ ['0x02' EnableControlCommandSetNetworkVariable0_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x0A' EnableControlCommandSetNetworkVariable1_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x12' EnableControlCommandSetNetworkVariable2_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x1A' EnableControlCommandSetNetworkVariable3_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x22' EnableControlCommandSetNetworkVariable4_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x2A' EnableControlCommandSetNetworkVariable5_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x32' EnableControlCommandSetNetworkVariable6_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x3A' EnableControlCommandSetNetworkVariable7_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x42' EnableControlCommandSetNetworkVariable8_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x4A' EnableControlCommandSetNetworkVariable9_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x52' EnableControlCommandSetNetworkVariable10_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x5A' EnableControlCommandSetNetworkVariable11_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x62' EnableControlCommandSetNetworkVariable12_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x6A' EnableControlCommandSetNetworkVariable13_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x72' EnableControlCommandSetNetworkVariable14_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+ ['0x7A' EnableControlCommandSetNetworkVariable15_2Bytes ['SET_NETWORK_VARIABLE', '2']]
+]
+
+[enum uint 4 EnableControlCommandType
+ ['0x00' SET_NETWORK_VARIABLE ]
+]
+
[type ReplyOrConfirmation(CBusOptions cBusOptions, uint 16 messageLength, RequestContext requestContext)
[peek byte peekedByte ]
[virtual bit isAlpha '(peekedByte >= 0x67) && (peekedByte <= 0x7A)' ]