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 15:31:50 UTC
[plc4x] 02/02: feat(cbus): access 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
commit 819a6c423fdb834e08039739b701291970380e19
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Mon Jul 18 17:31:41 2022 +0200
feat(cbus): access control application
---
plc4go/protocols/cbus/readwrite/ParserHelper.go | 2 +
plc4go/protocols/cbus/readwrite/XmlParserHelper.go | 2 +
.../cbus/readwrite/model/AccessControlCategory.go | 129 ++
.../readwrite/model/AccessControlCommandType.go | 177 +++
.../model/AccessControlCommandTypeContainer.go | 1569 ++++++++++++++++++++
.../cbus/readwrite/model/AccessControlData.go | 307 ++++
.../model/AccessControlDataAccessPointClosed.go | 156 ++
.../AccessControlDataAccessPointForcedOpen.go | 156 ++
.../model/AccessControlDataAccessPointLeftOpen.go | 156 ++
.../model/AccessControlDataCloseAccessPoint.go | 156 ++
.../model/AccessControlDataInvalidAccessRequest.go | 229 +++
.../model/AccessControlDataLockAccessPoint.go | 156 ++
.../model/AccessControlDataRequestToExit.go | 156 ++
.../model/AccessControlDataValidAccessRequest.go | 229 +++
.../cbus/readwrite/model/AccessControlDirection.go | 137 ++
.../cbus/readwrite/model/SALDataAccessControl.go | 54 +-
.../protocols/cbus/readwrite/model/StaticHelper.go | 10 +
.../java/cbus/readwrite/utils/StaticHelper.java | 13 +-
.../org/apache/plc4x/java/cbus/ReferenceTest.java | 58 +
.../src/main/resources/protocols/cbus/c-bus.mspec | 128 +-
20 files changed, 3972 insertions(+), 8 deletions(-)
diff --git a/plc4go/protocols/cbus/readwrite/ParserHelper.go b/plc4go/protocols/cbus/readwrite/ParserHelper.go
index eaee293dc..7383b9cb6 100644
--- a/plc4go/protocols/cbus/readwrite/ParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/ParserHelper.go
@@ -142,6 +142,8 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
return model.CustomManufacturerParse(io)
case "LightingData":
return model.LightingDataParse(io)
+ case "AccessControlData":
+ return model.AccessControlDataParse(io)
case "NetworkRoute":
return model.NetworkRouteParse(io)
case "StandardFormatStatusReply":
diff --git a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
index 2865a3cff..f787f23c1 100644
--- a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
@@ -165,6 +165,8 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
return model.CustomManufacturerParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "LightingData":
return model.LightingDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "AccessControlData":
+ return model.AccessControlDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "NetworkRoute":
return model.NetworkRouteParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "StandardFormatStatusReply":
diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlCategory.go b/plc4go/protocols/cbus/readwrite/model/AccessControlCategory.go
new file mode 100644
index 000000000..522191e17
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlCategory.go
@@ -0,0 +1,129 @@
+/*
+ * 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.
+
+// AccessControlCategory is an enum
+type AccessControlCategory uint8
+
+type IAccessControlCategory interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ AccessControlCategory_SYSTEM_ACTIVITY AccessControlCategory = 0x00
+ AccessControlCategory_SYSTEM_REQUEST AccessControlCategory = 0x01
+)
+
+var AccessControlCategoryValues []AccessControlCategory
+
+func init() {
+ _ = errors.New
+ AccessControlCategoryValues = []AccessControlCategory{
+ AccessControlCategory_SYSTEM_ACTIVITY,
+ AccessControlCategory_SYSTEM_REQUEST,
+ }
+}
+
+func AccessControlCategoryByValue(value uint8) (enum AccessControlCategory, ok bool) {
+ switch value {
+ case 0x00:
+ return AccessControlCategory_SYSTEM_ACTIVITY, true
+ case 0x01:
+ return AccessControlCategory_SYSTEM_REQUEST, true
+ }
+ return 0, false
+}
+
+func AccessControlCategoryByName(value string) (enum AccessControlCategory, ok bool) {
+ switch value {
+ case "SYSTEM_ACTIVITY":
+ return AccessControlCategory_SYSTEM_ACTIVITY, true
+ case "SYSTEM_REQUEST":
+ return AccessControlCategory_SYSTEM_REQUEST, true
+ }
+ return 0, false
+}
+
+func AccessControlCategoryKnows(value uint8) bool {
+ for _, typeValue := range AccessControlCategoryValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastAccessControlCategory(structType interface{}) AccessControlCategory {
+ castFunc := func(typ interface{}) AccessControlCategory {
+ if sAccessControlCategory, ok := typ.(AccessControlCategory); ok {
+ return sAccessControlCategory
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m AccessControlCategory) GetLengthInBits() uint16 {
+ return 4
+}
+
+func (m AccessControlCategory) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlCategoryParse(readBuffer utils.ReadBuffer) (AccessControlCategory, error) {
+ val, err := readBuffer.ReadUint8("AccessControlCategory", 4)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading AccessControlCategory")
+ }
+ if enum, ok := AccessControlCategoryByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return AccessControlCategory(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e AccessControlCategory) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("AccessControlCategory", 4, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e AccessControlCategory) PLC4XEnumName() string {
+ switch e {
+ case AccessControlCategory_SYSTEM_ACTIVITY:
+ return "SYSTEM_ACTIVITY"
+ case AccessControlCategory_SYSTEM_REQUEST:
+ return "SYSTEM_REQUEST"
+ }
+ return ""
+}
+
+func (e AccessControlCategory) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlCommandType.go b/plc4go/protocols/cbus/readwrite/model/AccessControlCommandType.go
new file mode 100644
index 000000000..dfdc88868
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlCommandType.go
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+ "github.com/rs/zerolog/log"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// AccessControlCommandType is an enum
+type AccessControlCommandType uint8
+
+type IAccessControlCommandType interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ AccessControlCommandType_CLOSE_ACCESS_POINT AccessControlCommandType = 0x00
+ AccessControlCommandType_LOCK_ACCESS_POINT AccessControlCommandType = 0x01
+ AccessControlCommandType_ACCESS_POINT_LEFT_OPEN AccessControlCommandType = 0x02
+ AccessControlCommandType_ACCESS_POINT_FORCED_OPEN AccessControlCommandType = 0x03
+ AccessControlCommandType_ACCESS_POINT_CLOSED AccessControlCommandType = 0x04
+ AccessControlCommandType_REQUEST_TO_EXIT AccessControlCommandType = 0x05
+ AccessControlCommandType_VALID_ACCESS AccessControlCommandType = 0x06
+ AccessControlCommandType_INVALID_ACCESS AccessControlCommandType = 0x07
+)
+
+var AccessControlCommandTypeValues []AccessControlCommandType
+
+func init() {
+ _ = errors.New
+ AccessControlCommandTypeValues = []AccessControlCommandType{
+ AccessControlCommandType_CLOSE_ACCESS_POINT,
+ AccessControlCommandType_LOCK_ACCESS_POINT,
+ AccessControlCommandType_ACCESS_POINT_LEFT_OPEN,
+ AccessControlCommandType_ACCESS_POINT_FORCED_OPEN,
+ AccessControlCommandType_ACCESS_POINT_CLOSED,
+ AccessControlCommandType_REQUEST_TO_EXIT,
+ AccessControlCommandType_VALID_ACCESS,
+ AccessControlCommandType_INVALID_ACCESS,
+ }
+}
+
+func AccessControlCommandTypeByValue(value uint8) (enum AccessControlCommandType, ok bool) {
+ switch value {
+ case 0x00:
+ return AccessControlCommandType_CLOSE_ACCESS_POINT, true
+ case 0x01:
+ return AccessControlCommandType_LOCK_ACCESS_POINT, true
+ case 0x02:
+ return AccessControlCommandType_ACCESS_POINT_LEFT_OPEN, true
+ case 0x03:
+ return AccessControlCommandType_ACCESS_POINT_FORCED_OPEN, true
+ case 0x04:
+ return AccessControlCommandType_ACCESS_POINT_CLOSED, true
+ case 0x05:
+ return AccessControlCommandType_REQUEST_TO_EXIT, true
+ case 0x06:
+ return AccessControlCommandType_VALID_ACCESS, true
+ case 0x07:
+ return AccessControlCommandType_INVALID_ACCESS, true
+ }
+ return 0, false
+}
+
+func AccessControlCommandTypeByName(value string) (enum AccessControlCommandType, ok bool) {
+ switch value {
+ case "CLOSE_ACCESS_POINT":
+ return AccessControlCommandType_CLOSE_ACCESS_POINT, true
+ case "LOCK_ACCESS_POINT":
+ return AccessControlCommandType_LOCK_ACCESS_POINT, true
+ case "ACCESS_POINT_LEFT_OPEN":
+ return AccessControlCommandType_ACCESS_POINT_LEFT_OPEN, true
+ case "ACCESS_POINT_FORCED_OPEN":
+ return AccessControlCommandType_ACCESS_POINT_FORCED_OPEN, true
+ case "ACCESS_POINT_CLOSED":
+ return AccessControlCommandType_ACCESS_POINT_CLOSED, true
+ case "REQUEST_TO_EXIT":
+ return AccessControlCommandType_REQUEST_TO_EXIT, true
+ case "VALID_ACCESS":
+ return AccessControlCommandType_VALID_ACCESS, true
+ case "INVALID_ACCESS":
+ return AccessControlCommandType_INVALID_ACCESS, true
+ }
+ return 0, false
+}
+
+func AccessControlCommandTypeKnows(value uint8) bool {
+ for _, typeValue := range AccessControlCommandTypeValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastAccessControlCommandType(structType interface{}) AccessControlCommandType {
+ castFunc := func(typ interface{}) AccessControlCommandType {
+ if sAccessControlCommandType, ok := typ.(AccessControlCommandType); ok {
+ return sAccessControlCommandType
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m AccessControlCommandType) GetLengthInBits() uint16 {
+ return 4
+}
+
+func (m AccessControlCommandType) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlCommandTypeParse(readBuffer utils.ReadBuffer) (AccessControlCommandType, error) {
+ val, err := readBuffer.ReadUint8("AccessControlCommandType", 4)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading AccessControlCommandType")
+ }
+ if enum, ok := AccessControlCommandTypeByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return AccessControlCommandType(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e AccessControlCommandType) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("AccessControlCommandType", 4, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e AccessControlCommandType) PLC4XEnumName() string {
+ switch e {
+ case AccessControlCommandType_CLOSE_ACCESS_POINT:
+ return "CLOSE_ACCESS_POINT"
+ case AccessControlCommandType_LOCK_ACCESS_POINT:
+ return "LOCK_ACCESS_POINT"
+ case AccessControlCommandType_ACCESS_POINT_LEFT_OPEN:
+ return "ACCESS_POINT_LEFT_OPEN"
+ case AccessControlCommandType_ACCESS_POINT_FORCED_OPEN:
+ return "ACCESS_POINT_FORCED_OPEN"
+ case AccessControlCommandType_ACCESS_POINT_CLOSED:
+ return "ACCESS_POINT_CLOSED"
+ case AccessControlCommandType_REQUEST_TO_EXIT:
+ return "REQUEST_TO_EXIT"
+ case AccessControlCommandType_VALID_ACCESS:
+ return "VALID_ACCESS"
+ case AccessControlCommandType_INVALID_ACCESS:
+ return "INVALID_ACCESS"
+ }
+ return ""
+}
+
+func (e AccessControlCommandType) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/AccessControlCommandTypeContainer.go
new file mode 100644
index 000000000..dfe670cda
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlCommandTypeContainer.go
@@ -0,0 +1,1569 @@
+/*
+ * 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.
+
+// AccessControlCommandTypeContainer is an enum
+type AccessControlCommandTypeContainer uint8
+
+type IAccessControlCommandTypeContainer interface {
+ NumBytes() uint8
+ CommandType() AccessControlCommandType
+ Category() AccessControlCategory
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ AccessControlCommandTypeContainer_AccessControlCommandCloseAccessPoint AccessControlCommandTypeContainer = 0x02
+ AccessControlCommandTypeContainer_AccessControlCommandLockAccessPoint AccessControlCommandTypeContainer = 0x0A
+ AccessControlCommandTypeContainer_AccessControlCommandAccessPointLeftOpen AccessControlCommandTypeContainer = 0x12
+ AccessControlCommandTypeContainer_AccessControlCommandAccessPointForcedOpen AccessControlCommandTypeContainer = 0x1A
+ AccessControlCommandTypeContainer_AccessControlCommandAccessPointClosed AccessControlCommandTypeContainer = 0x22
+ AccessControlCommandTypeContainer_AccessControlCommandRequestToExit AccessControlCommandTypeContainer = 0x32
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_0Bytes AccessControlCommandTypeContainer = 0xA0
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_1Bytes AccessControlCommandTypeContainer = 0xA1
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_2Bytes AccessControlCommandTypeContainer = 0xA2
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_3Bytes AccessControlCommandTypeContainer = 0xA3
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_4Bytes AccessControlCommandTypeContainer = 0xA4
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_5Bytes AccessControlCommandTypeContainer = 0xA5
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_6Bytes AccessControlCommandTypeContainer = 0xA6
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_7Bytes AccessControlCommandTypeContainer = 0xA7
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_8Bytes AccessControlCommandTypeContainer = 0xA8
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_9Bytes AccessControlCommandTypeContainer = 0xA9
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_10Bytes AccessControlCommandTypeContainer = 0xAA
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_11Bytes AccessControlCommandTypeContainer = 0xAB
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_12Bytes AccessControlCommandTypeContainer = 0xAC
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_13Bytes AccessControlCommandTypeContainer = 0xAD
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_14Bytes AccessControlCommandTypeContainer = 0xAE
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_15Bytes AccessControlCommandTypeContainer = 0xAF
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_16Bytes AccessControlCommandTypeContainer = 0xB0
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_17Bytes AccessControlCommandTypeContainer = 0xB1
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_18Bytes AccessControlCommandTypeContainer = 0xB2
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_19Bytes AccessControlCommandTypeContainer = 0xB3
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_20Bytes AccessControlCommandTypeContainer = 0xB4
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_21Bytes AccessControlCommandTypeContainer = 0xB5
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_22Bytes AccessControlCommandTypeContainer = 0xB6
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_23Bytes AccessControlCommandTypeContainer = 0xB7
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_24Bytes AccessControlCommandTypeContainer = 0xB8
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_25Bytes AccessControlCommandTypeContainer = 0xB9
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_26Bytes AccessControlCommandTypeContainer = 0xBA
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_27Bytes AccessControlCommandTypeContainer = 0xBB
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_28Bytes AccessControlCommandTypeContainer = 0xBC
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_29Bytes AccessControlCommandTypeContainer = 0xBD
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_30Bytes AccessControlCommandTypeContainer = 0xBE
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_31Bytes AccessControlCommandTypeContainer = 0xBF
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_0Bytes AccessControlCommandTypeContainer = 0xC0
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_1Bytes AccessControlCommandTypeContainer = 0xC1
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_2Bytes AccessControlCommandTypeContainer = 0xC2
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_3Bytes AccessControlCommandTypeContainer = 0xC3
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_4Bytes AccessControlCommandTypeContainer = 0xC4
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_5Bytes AccessControlCommandTypeContainer = 0xC5
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_6Bytes AccessControlCommandTypeContainer = 0xC6
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_7Bytes AccessControlCommandTypeContainer = 0xC7
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_8Bytes AccessControlCommandTypeContainer = 0xC8
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_9Bytes AccessControlCommandTypeContainer = 0xC9
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_10Bytes AccessControlCommandTypeContainer = 0xCA
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_11Bytes AccessControlCommandTypeContainer = 0xCB
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_12Bytes AccessControlCommandTypeContainer = 0xCC
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_13Bytes AccessControlCommandTypeContainer = 0xCD
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_14Bytes AccessControlCommandTypeContainer = 0xCE
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_15Bytes AccessControlCommandTypeContainer = 0xCF
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_16Bytes AccessControlCommandTypeContainer = 0xD0
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_17Bytes AccessControlCommandTypeContainer = 0xD1
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_18Bytes AccessControlCommandTypeContainer = 0xD2
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_19Bytes AccessControlCommandTypeContainer = 0xD3
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_20Bytes AccessControlCommandTypeContainer = 0xD4
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_21Bytes AccessControlCommandTypeContainer = 0xD5
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_22Bytes AccessControlCommandTypeContainer = 0xD6
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_23Bytes AccessControlCommandTypeContainer = 0xD7
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_24Bytes AccessControlCommandTypeContainer = 0xD8
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_25Bytes AccessControlCommandTypeContainer = 0xD9
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_26Bytes AccessControlCommandTypeContainer = 0xDA
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_27Bytes AccessControlCommandTypeContainer = 0xDB
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_28Bytes AccessControlCommandTypeContainer = 0xDC
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_29Bytes AccessControlCommandTypeContainer = 0xDD
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_30Bytes AccessControlCommandTypeContainer = 0xDE
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_31Bytes AccessControlCommandTypeContainer = 0xDF
+)
+
+var AccessControlCommandTypeContainerValues []AccessControlCommandTypeContainer
+
+func init() {
+ _ = errors.New
+ AccessControlCommandTypeContainerValues = []AccessControlCommandTypeContainer{
+ AccessControlCommandTypeContainer_AccessControlCommandCloseAccessPoint,
+ AccessControlCommandTypeContainer_AccessControlCommandLockAccessPoint,
+ AccessControlCommandTypeContainer_AccessControlCommandAccessPointLeftOpen,
+ AccessControlCommandTypeContainer_AccessControlCommandAccessPointForcedOpen,
+ AccessControlCommandTypeContainer_AccessControlCommandAccessPointClosed,
+ AccessControlCommandTypeContainer_AccessControlCommandRequestToExit,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_0Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_1Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_2Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_3Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_4Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_5Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_6Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_7Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_8Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_9Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_10Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_11Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_12Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_13Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_14Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_15Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_16Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_17Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_18Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_19Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_20Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_21Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_22Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_23Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_24Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_25Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_26Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_27Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_28Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_29Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_30Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_31Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_0Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_1Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_2Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_3Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_4Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_5Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_6Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_7Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_8Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_9Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_10Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_11Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_12Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_13Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_14Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_15Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_16Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_17Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_18Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_19Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_20Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_21Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_22Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_23Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_24Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_25Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_26Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_27Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_28Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_29Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_30Bytes,
+ AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_31Bytes,
+ }
+}
+
+func (e AccessControlCommandTypeContainer) 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 0x32:
+ { /* '0x32' */
+ return 2
+ }
+ case 0xA0:
+ { /* '0xA0' */
+ return 0
+ }
+ case 0xA1:
+ { /* '0xA1' */
+ return 1
+ }
+ case 0xA2:
+ { /* '0xA2' */
+ return 2
+ }
+ case 0xA3:
+ { /* '0xA3' */
+ return 3
+ }
+ case 0xA4:
+ { /* '0xA4' */
+ return 4
+ }
+ case 0xA5:
+ { /* '0xA5' */
+ return 5
+ }
+ case 0xA6:
+ { /* '0xA6' */
+ return 6
+ }
+ case 0xA7:
+ { /* '0xA7' */
+ return 7
+ }
+ case 0xA8:
+ { /* '0xA8' */
+ return 8
+ }
+ case 0xA9:
+ { /* '0xA9' */
+ return 9
+ }
+ case 0xAA:
+ { /* '0xAA' */
+ return 10
+ }
+ case 0xAB:
+ { /* '0xAB' */
+ return 11
+ }
+ case 0xAC:
+ { /* '0xAC' */
+ return 12
+ }
+ case 0xAD:
+ { /* '0xAD' */
+ return 13
+ }
+ case 0xAE:
+ { /* '0xAE' */
+ return 14
+ }
+ case 0xAF:
+ { /* '0xAF' */
+ return 15
+ }
+ case 0xB0:
+ { /* '0xB0' */
+ return 16
+ }
+ case 0xB1:
+ { /* '0xB1' */
+ return 17
+ }
+ case 0xB2:
+ { /* '0xB2' */
+ return 18
+ }
+ case 0xB3:
+ { /* '0xB3' */
+ return 19
+ }
+ case 0xB4:
+ { /* '0xB4' */
+ return 20
+ }
+ case 0xB5:
+ { /* '0xB5' */
+ return 21
+ }
+ case 0xB6:
+ { /* '0xB6' */
+ return 22
+ }
+ case 0xB7:
+ { /* '0xB7' */
+ return 23
+ }
+ case 0xB8:
+ { /* '0xB8' */
+ return 24
+ }
+ case 0xB9:
+ { /* '0xB9' */
+ return 25
+ }
+ case 0xBA:
+ { /* '0xBA' */
+ return 26
+ }
+ case 0xBB:
+ { /* '0xBB' */
+ return 27
+ }
+ case 0xBC:
+ { /* '0xBC' */
+ return 28
+ }
+ case 0xBD:
+ { /* '0xBD' */
+ return 29
+ }
+ case 0xBE:
+ { /* '0xBE' */
+ return 30
+ }
+ case 0xBF:
+ { /* '0xBF' */
+ return 31
+ }
+ case 0xC0:
+ { /* '0xC0' */
+ return 0
+ }
+ case 0xC1:
+ { /* '0xC1' */
+ return 1
+ }
+ case 0xC2:
+ { /* '0xC2' */
+ return 2
+ }
+ case 0xC3:
+ { /* '0xC3' */
+ return 3
+ }
+ case 0xC4:
+ { /* '0xC4' */
+ return 4
+ }
+ case 0xC5:
+ { /* '0xC5' */
+ return 5
+ }
+ case 0xC6:
+ { /* '0xC6' */
+ return 6
+ }
+ case 0xC7:
+ { /* '0xC7' */
+ return 7
+ }
+ case 0xC8:
+ { /* '0xC8' */
+ return 8
+ }
+ case 0xC9:
+ { /* '0xC9' */
+ return 9
+ }
+ case 0xCA:
+ { /* '0xCA' */
+ return 10
+ }
+ case 0xCB:
+ { /* '0xCB' */
+ return 11
+ }
+ case 0xCC:
+ { /* '0xCC' */
+ return 12
+ }
+ case 0xCD:
+ { /* '0xCD' */
+ return 13
+ }
+ case 0xCE:
+ { /* '0xCE' */
+ return 14
+ }
+ case 0xCF:
+ { /* '0xCF' */
+ return 15
+ }
+ case 0xD0:
+ { /* '0xD0' */
+ return 16
+ }
+ case 0xD1:
+ { /* '0xD1' */
+ return 17
+ }
+ case 0xD2:
+ { /* '0xD2' */
+ return 18
+ }
+ case 0xD3:
+ { /* '0xD3' */
+ return 19
+ }
+ case 0xD4:
+ { /* '0xD4' */
+ return 20
+ }
+ case 0xD5:
+ { /* '0xD5' */
+ return 21
+ }
+ case 0xD6:
+ { /* '0xD6' */
+ return 22
+ }
+ case 0xD7:
+ { /* '0xD7' */
+ return 23
+ }
+ case 0xD8:
+ { /* '0xD8' */
+ return 24
+ }
+ case 0xD9:
+ { /* '0xD9' */
+ return 25
+ }
+ case 0xDA:
+ { /* '0xDA' */
+ return 26
+ }
+ case 0xDB:
+ { /* '0xDB' */
+ return 27
+ }
+ case 0xDC:
+ { /* '0xDC' */
+ return 28
+ }
+ case 0xDD:
+ { /* '0xDD' */
+ return 29
+ }
+ case 0xDE:
+ { /* '0xDE' */
+ return 30
+ }
+ case 0xDF:
+ { /* '0xDF' */
+ return 31
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func AccessControlCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (AccessControlCommandTypeContainer, error) {
+ for _, sizeValue := range AccessControlCommandTypeContainerValues {
+ if sizeValue.NumBytes() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing NumBytes not found", value)
+}
+
+func (e AccessControlCommandTypeContainer) CommandType() AccessControlCommandType {
+ switch e {
+ case 0x02:
+ { /* '0x02' */
+ return AccessControlCommandType_CLOSE_ACCESS_POINT
+ }
+ case 0x0A:
+ { /* '0x0A' */
+ return AccessControlCommandType_LOCK_ACCESS_POINT
+ }
+ case 0x12:
+ { /* '0x12' */
+ return AccessControlCommandType_ACCESS_POINT_LEFT_OPEN
+ }
+ case 0x1A:
+ { /* '0x1A' */
+ return AccessControlCommandType_ACCESS_POINT_FORCED_OPEN
+ }
+ case 0x22:
+ { /* '0x22' */
+ return AccessControlCommandType_ACCESS_POINT_CLOSED
+ }
+ case 0x32:
+ { /* '0x32' */
+ return AccessControlCommandType_REQUEST_TO_EXIT
+ }
+ case 0xA0:
+ { /* '0xA0' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xA1:
+ { /* '0xA1' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xA2:
+ { /* '0xA2' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xA3:
+ { /* '0xA3' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xA4:
+ { /* '0xA4' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xA5:
+ { /* '0xA5' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xA6:
+ { /* '0xA6' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xA7:
+ { /* '0xA7' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xA8:
+ { /* '0xA8' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xA9:
+ { /* '0xA9' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xAA:
+ { /* '0xAA' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xAB:
+ { /* '0xAB' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xAC:
+ { /* '0xAC' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xAD:
+ { /* '0xAD' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xAE:
+ { /* '0xAE' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xAF:
+ { /* '0xAF' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xB0:
+ { /* '0xB0' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xB1:
+ { /* '0xB1' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xB2:
+ { /* '0xB2' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xB3:
+ { /* '0xB3' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xB4:
+ { /* '0xB4' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xB5:
+ { /* '0xB5' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xB6:
+ { /* '0xB6' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xB7:
+ { /* '0xB7' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xB8:
+ { /* '0xB8' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xB9:
+ { /* '0xB9' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xBA:
+ { /* '0xBA' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xBB:
+ { /* '0xBB' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xBC:
+ { /* '0xBC' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xBD:
+ { /* '0xBD' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xBE:
+ { /* '0xBE' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xBF:
+ { /* '0xBF' */
+ return AccessControlCommandType_VALID_ACCESS
+ }
+ case 0xC0:
+ { /* '0xC0' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xC1:
+ { /* '0xC1' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xC2:
+ { /* '0xC2' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xC3:
+ { /* '0xC3' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xC4:
+ { /* '0xC4' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xC5:
+ { /* '0xC5' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xC6:
+ { /* '0xC6' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xC7:
+ { /* '0xC7' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xC8:
+ { /* '0xC8' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xC9:
+ { /* '0xC9' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xCA:
+ { /* '0xCA' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xCB:
+ { /* '0xCB' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xCC:
+ { /* '0xCC' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xCD:
+ { /* '0xCD' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xCE:
+ { /* '0xCE' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xCF:
+ { /* '0xCF' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xD0:
+ { /* '0xD0' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xD1:
+ { /* '0xD1' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xD2:
+ { /* '0xD2' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xD3:
+ { /* '0xD3' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xD4:
+ { /* '0xD4' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xD5:
+ { /* '0xD5' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xD6:
+ { /* '0xD6' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xD7:
+ { /* '0xD7' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xD8:
+ { /* '0xD8' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xD9:
+ { /* '0xD9' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xDA:
+ { /* '0xDA' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xDB:
+ { /* '0xDB' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xDC:
+ { /* '0xDC' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xDD:
+ { /* '0xDD' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xDE:
+ { /* '0xDE' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ case 0xDF:
+ { /* '0xDF' */
+ return AccessControlCommandType_INVALID_ACCESS
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func AccessControlCommandTypeContainerFirstEnumForFieldCommandType(value AccessControlCommandType) (AccessControlCommandTypeContainer, error) {
+ for _, sizeValue := range AccessControlCommandTypeContainerValues {
+ if sizeValue.CommandType() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing CommandType not found", value)
+}
+
+func (e AccessControlCommandTypeContainer) Category() AccessControlCategory {
+ switch e {
+ case 0x02:
+ { /* '0x02' */
+ return AccessControlCategory_SYSTEM_REQUEST
+ }
+ case 0x0A:
+ { /* '0x0A' */
+ return AccessControlCategory_SYSTEM_REQUEST
+ }
+ case 0x12:
+ { /* '0x12' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0x1A:
+ { /* '0x1A' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0x22:
+ { /* '0x22' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0x32:
+ { /* '0x32' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xA0:
+ { /* '0xA0' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xA1:
+ { /* '0xA1' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xA2:
+ { /* '0xA2' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xA3:
+ { /* '0xA3' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xA4:
+ { /* '0xA4' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xA5:
+ { /* '0xA5' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xA6:
+ { /* '0xA6' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xA7:
+ { /* '0xA7' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xA8:
+ { /* '0xA8' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xA9:
+ { /* '0xA9' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xAA:
+ { /* '0xAA' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xAB:
+ { /* '0xAB' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xAC:
+ { /* '0xAC' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xAD:
+ { /* '0xAD' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xAE:
+ { /* '0xAE' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xAF:
+ { /* '0xAF' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xB0:
+ { /* '0xB0' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xB1:
+ { /* '0xB1' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xB2:
+ { /* '0xB2' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xB3:
+ { /* '0xB3' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xB4:
+ { /* '0xB4' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xB5:
+ { /* '0xB5' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xB6:
+ { /* '0xB6' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xB7:
+ { /* '0xB7' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xB8:
+ { /* '0xB8' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xB9:
+ { /* '0xB9' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xBA:
+ { /* '0xBA' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xBB:
+ { /* '0xBB' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xBC:
+ { /* '0xBC' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xBD:
+ { /* '0xBD' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xBE:
+ { /* '0xBE' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xBF:
+ { /* '0xBF' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xC0:
+ { /* '0xC0' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xC1:
+ { /* '0xC1' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xC2:
+ { /* '0xC2' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xC3:
+ { /* '0xC3' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xC4:
+ { /* '0xC4' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xC5:
+ { /* '0xC5' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xC6:
+ { /* '0xC6' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xC7:
+ { /* '0xC7' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xC8:
+ { /* '0xC8' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xC9:
+ { /* '0xC9' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xCA:
+ { /* '0xCA' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xCB:
+ { /* '0xCB' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xCC:
+ { /* '0xCC' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xCD:
+ { /* '0xCD' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xCE:
+ { /* '0xCE' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xCF:
+ { /* '0xCF' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xD0:
+ { /* '0xD0' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xD1:
+ { /* '0xD1' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xD2:
+ { /* '0xD2' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xD3:
+ { /* '0xD3' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xD4:
+ { /* '0xD4' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xD5:
+ { /* '0xD5' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xD6:
+ { /* '0xD6' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xD7:
+ { /* '0xD7' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xD8:
+ { /* '0xD8' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xD9:
+ { /* '0xD9' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xDA:
+ { /* '0xDA' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xDB:
+ { /* '0xDB' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xDC:
+ { /* '0xDC' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xDD:
+ { /* '0xDD' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xDE:
+ { /* '0xDE' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ case 0xDF:
+ { /* '0xDF' */
+ return AccessControlCategory_SYSTEM_ACTIVITY
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func AccessControlCommandTypeContainerFirstEnumForFieldCategory(value AccessControlCategory) (AccessControlCommandTypeContainer, error) {
+ for _, sizeValue := range AccessControlCommandTypeContainerValues {
+ if sizeValue.Category() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing Category not found", value)
+}
+func AccessControlCommandTypeContainerByValue(value uint8) (enum AccessControlCommandTypeContainer, ok bool) {
+ switch value {
+ case 0x02:
+ return AccessControlCommandTypeContainer_AccessControlCommandCloseAccessPoint, true
+ case 0x0A:
+ return AccessControlCommandTypeContainer_AccessControlCommandLockAccessPoint, true
+ case 0x12:
+ return AccessControlCommandTypeContainer_AccessControlCommandAccessPointLeftOpen, true
+ case 0x1A:
+ return AccessControlCommandTypeContainer_AccessControlCommandAccessPointForcedOpen, true
+ case 0x22:
+ return AccessControlCommandTypeContainer_AccessControlCommandAccessPointClosed, true
+ case 0x32:
+ return AccessControlCommandTypeContainer_AccessControlCommandRequestToExit, true
+ case 0xA0:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_0Bytes, true
+ case 0xA1:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_1Bytes, true
+ case 0xA2:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_2Bytes, true
+ case 0xA3:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_3Bytes, true
+ case 0xA4:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_4Bytes, true
+ case 0xA5:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_5Bytes, true
+ case 0xA6:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_6Bytes, true
+ case 0xA7:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_7Bytes, true
+ case 0xA8:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_8Bytes, true
+ case 0xA9:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_9Bytes, true
+ case 0xAA:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_10Bytes, true
+ case 0xAB:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_11Bytes, true
+ case 0xAC:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_12Bytes, true
+ case 0xAD:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_13Bytes, true
+ case 0xAE:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_14Bytes, true
+ case 0xAF:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_15Bytes, true
+ case 0xB0:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_16Bytes, true
+ case 0xB1:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_17Bytes, true
+ case 0xB2:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_18Bytes, true
+ case 0xB3:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_19Bytes, true
+ case 0xB4:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_20Bytes, true
+ case 0xB5:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_21Bytes, true
+ case 0xB6:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_22Bytes, true
+ case 0xB7:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_23Bytes, true
+ case 0xB8:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_24Bytes, true
+ case 0xB9:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_25Bytes, true
+ case 0xBA:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_26Bytes, true
+ case 0xBB:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_27Bytes, true
+ case 0xBC:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_28Bytes, true
+ case 0xBD:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_29Bytes, true
+ case 0xBE:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_30Bytes, true
+ case 0xBF:
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_31Bytes, true
+ case 0xC0:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_0Bytes, true
+ case 0xC1:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_1Bytes, true
+ case 0xC2:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_2Bytes, true
+ case 0xC3:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_3Bytes, true
+ case 0xC4:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_4Bytes, true
+ case 0xC5:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_5Bytes, true
+ case 0xC6:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_6Bytes, true
+ case 0xC7:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_7Bytes, true
+ case 0xC8:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_8Bytes, true
+ case 0xC9:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_9Bytes, true
+ case 0xCA:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_10Bytes, true
+ case 0xCB:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_11Bytes, true
+ case 0xCC:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_12Bytes, true
+ case 0xCD:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_13Bytes, true
+ case 0xCE:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_14Bytes, true
+ case 0xCF:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_15Bytes, true
+ case 0xD0:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_16Bytes, true
+ case 0xD1:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_17Bytes, true
+ case 0xD2:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_18Bytes, true
+ case 0xD3:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_19Bytes, true
+ case 0xD4:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_20Bytes, true
+ case 0xD5:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_21Bytes, true
+ case 0xD6:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_22Bytes, true
+ case 0xD7:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_23Bytes, true
+ case 0xD8:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_24Bytes, true
+ case 0xD9:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_25Bytes, true
+ case 0xDA:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_26Bytes, true
+ case 0xDB:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_27Bytes, true
+ case 0xDC:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_28Bytes, true
+ case 0xDD:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_29Bytes, true
+ case 0xDE:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_30Bytes, true
+ case 0xDF:
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_31Bytes, true
+ }
+ return 0, false
+}
+
+func AccessControlCommandTypeContainerByName(value string) (enum AccessControlCommandTypeContainer, ok bool) {
+ switch value {
+ case "AccessControlCommandCloseAccessPoint":
+ return AccessControlCommandTypeContainer_AccessControlCommandCloseAccessPoint, true
+ case "AccessControlCommandLockAccessPoint":
+ return AccessControlCommandTypeContainer_AccessControlCommandLockAccessPoint, true
+ case "AccessControlCommandAccessPointLeftOpen":
+ return AccessControlCommandTypeContainer_AccessControlCommandAccessPointLeftOpen, true
+ case "AccessControlCommandAccessPointForcedOpen":
+ return AccessControlCommandTypeContainer_AccessControlCommandAccessPointForcedOpen, true
+ case "AccessControlCommandAccessPointClosed":
+ return AccessControlCommandTypeContainer_AccessControlCommandAccessPointClosed, true
+ case "AccessControlCommandRequestToExit":
+ return AccessControlCommandTypeContainer_AccessControlCommandRequestToExit, true
+ case "AccessControlCommandValidAccessRequest_0Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_0Bytes, true
+ case "AccessControlCommandValidAccessRequest_1Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_1Bytes, true
+ case "AccessControlCommandValidAccessRequest_2Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_2Bytes, true
+ case "AccessControlCommandValidAccessRequest_3Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_3Bytes, true
+ case "AccessControlCommandValidAccessRequest_4Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_4Bytes, true
+ case "AccessControlCommandValidAccessRequest_5Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_5Bytes, true
+ case "AccessControlCommandValidAccessRequest_6Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_6Bytes, true
+ case "AccessControlCommandValidAccessRequest_7Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_7Bytes, true
+ case "AccessControlCommandValidAccessRequest_8Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_8Bytes, true
+ case "AccessControlCommandValidAccessRequest_9Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_9Bytes, true
+ case "AccessControlCommandValidAccessRequest_10Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_10Bytes, true
+ case "AccessControlCommandValidAccessRequest_11Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_11Bytes, true
+ case "AccessControlCommandValidAccessRequest_12Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_12Bytes, true
+ case "AccessControlCommandValidAccessRequest_13Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_13Bytes, true
+ case "AccessControlCommandValidAccessRequest_14Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_14Bytes, true
+ case "AccessControlCommandValidAccessRequest_15Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_15Bytes, true
+ case "AccessControlCommandValidAccessRequest_16Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_16Bytes, true
+ case "AccessControlCommandValidAccessRequest_17Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_17Bytes, true
+ case "AccessControlCommandValidAccessRequest_18Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_18Bytes, true
+ case "AccessControlCommandValidAccessRequest_19Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_19Bytes, true
+ case "AccessControlCommandValidAccessRequest_20Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_20Bytes, true
+ case "AccessControlCommandValidAccessRequest_21Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_21Bytes, true
+ case "AccessControlCommandValidAccessRequest_22Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_22Bytes, true
+ case "AccessControlCommandValidAccessRequest_23Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_23Bytes, true
+ case "AccessControlCommandValidAccessRequest_24Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_24Bytes, true
+ case "AccessControlCommandValidAccessRequest_25Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_25Bytes, true
+ case "AccessControlCommandValidAccessRequest_26Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_26Bytes, true
+ case "AccessControlCommandValidAccessRequest_27Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_27Bytes, true
+ case "AccessControlCommandValidAccessRequest_28Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_28Bytes, true
+ case "AccessControlCommandValidAccessRequest_29Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_29Bytes, true
+ case "AccessControlCommandValidAccessRequest_30Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_30Bytes, true
+ case "AccessControlCommandValidAccessRequest_31Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_31Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_0Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_0Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_1Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_1Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_2Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_2Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_3Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_3Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_4Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_4Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_5Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_5Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_6Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_6Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_7Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_7Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_8Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_8Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_9Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_9Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_10Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_10Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_11Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_11Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_12Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_12Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_13Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_13Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_14Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_14Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_15Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_15Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_16Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_16Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_17Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_17Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_18Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_18Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_19Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_19Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_20Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_20Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_21Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_21Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_22Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_22Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_23Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_23Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_24Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_24Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_25Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_25Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_26Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_26Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_27Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_27Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_28Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_28Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_29Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_29Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_30Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_30Bytes, true
+ case "AccessControlCommandInvalidAccessRequest_31Bytes":
+ return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_31Bytes, true
+ }
+ return 0, false
+}
+
+func AccessControlCommandTypeContainerKnows(value uint8) bool {
+ for _, typeValue := range AccessControlCommandTypeContainerValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastAccessControlCommandTypeContainer(structType interface{}) AccessControlCommandTypeContainer {
+ castFunc := func(typ interface{}) AccessControlCommandTypeContainer {
+ if sAccessControlCommandTypeContainer, ok := typ.(AccessControlCommandTypeContainer); ok {
+ return sAccessControlCommandTypeContainer
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m AccessControlCommandTypeContainer) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m AccessControlCommandTypeContainer) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlCommandTypeContainerParse(readBuffer utils.ReadBuffer) (AccessControlCommandTypeContainer, error) {
+ val, err := readBuffer.ReadUint8("AccessControlCommandTypeContainer", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading AccessControlCommandTypeContainer")
+ }
+ if enum, ok := AccessControlCommandTypeContainerByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return AccessControlCommandTypeContainer(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e AccessControlCommandTypeContainer) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("AccessControlCommandTypeContainer", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e AccessControlCommandTypeContainer) PLC4XEnumName() string {
+ switch e {
+ case AccessControlCommandTypeContainer_AccessControlCommandCloseAccessPoint:
+ return "AccessControlCommandCloseAccessPoint"
+ case AccessControlCommandTypeContainer_AccessControlCommandLockAccessPoint:
+ return "AccessControlCommandLockAccessPoint"
+ case AccessControlCommandTypeContainer_AccessControlCommandAccessPointLeftOpen:
+ return "AccessControlCommandAccessPointLeftOpen"
+ case AccessControlCommandTypeContainer_AccessControlCommandAccessPointForcedOpen:
+ return "AccessControlCommandAccessPointForcedOpen"
+ case AccessControlCommandTypeContainer_AccessControlCommandAccessPointClosed:
+ return "AccessControlCommandAccessPointClosed"
+ case AccessControlCommandTypeContainer_AccessControlCommandRequestToExit:
+ return "AccessControlCommandRequestToExit"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_0Bytes:
+ return "AccessControlCommandValidAccessRequest_0Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_1Bytes:
+ return "AccessControlCommandValidAccessRequest_1Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_2Bytes:
+ return "AccessControlCommandValidAccessRequest_2Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_3Bytes:
+ return "AccessControlCommandValidAccessRequest_3Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_4Bytes:
+ return "AccessControlCommandValidAccessRequest_4Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_5Bytes:
+ return "AccessControlCommandValidAccessRequest_5Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_6Bytes:
+ return "AccessControlCommandValidAccessRequest_6Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_7Bytes:
+ return "AccessControlCommandValidAccessRequest_7Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_8Bytes:
+ return "AccessControlCommandValidAccessRequest_8Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_9Bytes:
+ return "AccessControlCommandValidAccessRequest_9Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_10Bytes:
+ return "AccessControlCommandValidAccessRequest_10Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_11Bytes:
+ return "AccessControlCommandValidAccessRequest_11Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_12Bytes:
+ return "AccessControlCommandValidAccessRequest_12Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_13Bytes:
+ return "AccessControlCommandValidAccessRequest_13Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_14Bytes:
+ return "AccessControlCommandValidAccessRequest_14Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_15Bytes:
+ return "AccessControlCommandValidAccessRequest_15Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_16Bytes:
+ return "AccessControlCommandValidAccessRequest_16Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_17Bytes:
+ return "AccessControlCommandValidAccessRequest_17Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_18Bytes:
+ return "AccessControlCommandValidAccessRequest_18Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_19Bytes:
+ return "AccessControlCommandValidAccessRequest_19Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_20Bytes:
+ return "AccessControlCommandValidAccessRequest_20Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_21Bytes:
+ return "AccessControlCommandValidAccessRequest_21Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_22Bytes:
+ return "AccessControlCommandValidAccessRequest_22Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_23Bytes:
+ return "AccessControlCommandValidAccessRequest_23Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_24Bytes:
+ return "AccessControlCommandValidAccessRequest_24Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_25Bytes:
+ return "AccessControlCommandValidAccessRequest_25Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_26Bytes:
+ return "AccessControlCommandValidAccessRequest_26Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_27Bytes:
+ return "AccessControlCommandValidAccessRequest_27Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_28Bytes:
+ return "AccessControlCommandValidAccessRequest_28Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_29Bytes:
+ return "AccessControlCommandValidAccessRequest_29Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_30Bytes:
+ return "AccessControlCommandValidAccessRequest_30Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_31Bytes:
+ return "AccessControlCommandValidAccessRequest_31Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_0Bytes:
+ return "AccessControlCommandInvalidAccessRequest_0Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_1Bytes:
+ return "AccessControlCommandInvalidAccessRequest_1Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_2Bytes:
+ return "AccessControlCommandInvalidAccessRequest_2Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_3Bytes:
+ return "AccessControlCommandInvalidAccessRequest_3Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_4Bytes:
+ return "AccessControlCommandInvalidAccessRequest_4Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_5Bytes:
+ return "AccessControlCommandInvalidAccessRequest_5Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_6Bytes:
+ return "AccessControlCommandInvalidAccessRequest_6Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_7Bytes:
+ return "AccessControlCommandInvalidAccessRequest_7Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_8Bytes:
+ return "AccessControlCommandInvalidAccessRequest_8Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_9Bytes:
+ return "AccessControlCommandInvalidAccessRequest_9Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_10Bytes:
+ return "AccessControlCommandInvalidAccessRequest_10Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_11Bytes:
+ return "AccessControlCommandInvalidAccessRequest_11Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_12Bytes:
+ return "AccessControlCommandInvalidAccessRequest_12Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_13Bytes:
+ return "AccessControlCommandInvalidAccessRequest_13Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_14Bytes:
+ return "AccessControlCommandInvalidAccessRequest_14Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_15Bytes:
+ return "AccessControlCommandInvalidAccessRequest_15Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_16Bytes:
+ return "AccessControlCommandInvalidAccessRequest_16Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_17Bytes:
+ return "AccessControlCommandInvalidAccessRequest_17Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_18Bytes:
+ return "AccessControlCommandInvalidAccessRequest_18Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_19Bytes:
+ return "AccessControlCommandInvalidAccessRequest_19Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_20Bytes:
+ return "AccessControlCommandInvalidAccessRequest_20Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_21Bytes:
+ return "AccessControlCommandInvalidAccessRequest_21Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_22Bytes:
+ return "AccessControlCommandInvalidAccessRequest_22Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_23Bytes:
+ return "AccessControlCommandInvalidAccessRequest_23Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_24Bytes:
+ return "AccessControlCommandInvalidAccessRequest_24Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_25Bytes:
+ return "AccessControlCommandInvalidAccessRequest_25Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_26Bytes:
+ return "AccessControlCommandInvalidAccessRequest_26Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_27Bytes:
+ return "AccessControlCommandInvalidAccessRequest_27Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_28Bytes:
+ return "AccessControlCommandInvalidAccessRequest_28Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_29Bytes:
+ return "AccessControlCommandInvalidAccessRequest_29Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_30Bytes:
+ return "AccessControlCommandInvalidAccessRequest_30Bytes"
+ case AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_31Bytes:
+ return "AccessControlCommandInvalidAccessRequest_31Bytes"
+ }
+ return ""
+}
+
+func (e AccessControlCommandTypeContainer) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlData.go b/plc4go/protocols/cbus/readwrite/model/AccessControlData.go
new file mode 100644
index 000000000..e8fef5448
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlData.go
@@ -0,0 +1,307 @@
+/*
+ * 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.
+
+// AccessControlData is the corresponding interface of AccessControlData
+type AccessControlData interface {
+ utils.LengthAware
+ utils.Serializable
+ // GetCommandTypeContainer returns CommandTypeContainer (property field)
+ GetCommandTypeContainer() AccessControlCommandTypeContainer
+ // GetNetworkId returns NetworkId (property field)
+ GetNetworkId() byte
+ // GetAccessPointId returns AccessPointId (property field)
+ GetAccessPointId() byte
+ // GetCommandType returns CommandType (virtual field)
+ GetCommandType() AccessControlCommandType
+}
+
+// AccessControlDataExactly can be used when we want exactly this type and not a type which fulfills AccessControlData.
+// This is useful for switch cases.
+type AccessControlDataExactly interface {
+ AccessControlData
+ isAccessControlData() bool
+}
+
+// _AccessControlData is the data-structure of this message
+type _AccessControlData struct {
+ _AccessControlDataChildRequirements
+ CommandTypeContainer AccessControlCommandTypeContainer
+ NetworkId byte
+ AccessPointId byte
+}
+
+type _AccessControlDataChildRequirements interface {
+ utils.Serializable
+ GetLengthInBits() uint16
+ GetLengthInBitsConditional(lastItem bool) uint16
+}
+
+type AccessControlDataParent interface {
+ SerializeParent(writeBuffer utils.WriteBuffer, child AccessControlData, serializeChildFunction func() error) error
+ GetTypeName() string
+}
+
+type AccessControlDataChild interface {
+ utils.Serializable
+ InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte)
+ GetParent() *AccessControlData
+
+ GetTypeName() string
+ AccessControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AccessControlData) GetCommandTypeContainer() AccessControlCommandTypeContainer {
+ return m.CommandTypeContainer
+}
+
+func (m *_AccessControlData) GetNetworkId() byte {
+ return m.NetworkId
+}
+
+func (m *_AccessControlData) GetAccessPointId() byte {
+ return m.AccessPointId
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_AccessControlData) GetCommandType() AccessControlCommandType {
+ return CastAccessControlCommandType(m.GetCommandTypeContainer().CommandType())
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAccessControlData factory function for _AccessControlData
+func NewAccessControlData(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlData {
+ return &_AccessControlData{CommandTypeContainer: commandTypeContainer, NetworkId: networkId, AccessPointId: accessPointId}
+}
+
+// Deprecated: use the interface for direct cast
+func CastAccessControlData(structType interface{}) AccessControlData {
+ if casted, ok := structType.(AccessControlData); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AccessControlData); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AccessControlData) GetTypeName() string {
+ return "AccessControlData"
+}
+
+func (m *_AccessControlData) GetParentLengthInBits() uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (commandTypeContainer)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // Simple field (networkId)
+ lengthInBits += 8
+
+ // Simple field (accessPointId)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_AccessControlData) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlDataParse(readBuffer utils.ReadBuffer) (AccessControlData, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AccessControlData"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AccessControlData")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Validation
+ if !(KnowsAccessControlCommandTypeContainer(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 := AccessControlCommandTypeContainerParse(readBuffer)
+ if _commandTypeContainerErr != nil {
+ return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of AccessControlData")
+ }
+ commandTypeContainer := _commandTypeContainer
+ if closeErr := readBuffer.CloseContext("commandTypeContainer"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for commandTypeContainer")
+ }
+
+ // Virtual field
+ _commandType := commandTypeContainer.CommandType()
+ commandType := AccessControlCommandType(_commandType)
+ _ = commandType
+
+ // Simple Field (networkId)
+ _networkId, _networkIdErr := readBuffer.ReadByte("networkId")
+ if _networkIdErr != nil {
+ return nil, errors.Wrap(_networkIdErr, "Error parsing 'networkId' field of AccessControlData")
+ }
+ networkId := _networkId
+
+ // Simple Field (accessPointId)
+ _accessPointId, _accessPointIdErr := readBuffer.ReadByte("accessPointId")
+ if _accessPointIdErr != nil {
+ return nil, errors.Wrap(_accessPointIdErr, "Error parsing 'accessPointId' field of AccessControlData")
+ }
+ accessPointId := _accessPointId
+
+ // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
+ type AccessControlDataChildSerializeRequirement interface {
+ AccessControlData
+ InitializeParent(AccessControlData, AccessControlCommandTypeContainer, byte, byte)
+ GetParent() AccessControlData
+ }
+ var _childTemp interface{}
+ var _child AccessControlDataChildSerializeRequirement
+ var typeSwitchError error
+ switch {
+ case commandType == AccessControlCommandType_VALID_ACCESS: // AccessControlDataValidAccessRequest
+ _childTemp, typeSwitchError = AccessControlDataValidAccessRequestParse(readBuffer, commandTypeContainer)
+ case commandType == AccessControlCommandType_INVALID_ACCESS: // AccessControlDataInvalidAccessRequest
+ _childTemp, typeSwitchError = AccessControlDataInvalidAccessRequestParse(readBuffer, commandTypeContainer)
+ case commandType == AccessControlCommandType_ACCESS_POINT_LEFT_OPEN: // AccessControlDataAccessPointLeftOpen
+ _childTemp, typeSwitchError = AccessControlDataAccessPointLeftOpenParse(readBuffer)
+ case commandType == AccessControlCommandType_ACCESS_POINT_FORCED_OPEN: // AccessControlDataAccessPointForcedOpen
+ _childTemp, typeSwitchError = AccessControlDataAccessPointForcedOpenParse(readBuffer)
+ case commandType == AccessControlCommandType_ACCESS_POINT_CLOSED: // AccessControlDataAccessPointClosed
+ _childTemp, typeSwitchError = AccessControlDataAccessPointClosedParse(readBuffer)
+ case commandType == AccessControlCommandType_REQUEST_TO_EXIT: // AccessControlDataRequestToExit
+ _childTemp, typeSwitchError = AccessControlDataRequestToExitParse(readBuffer)
+ case commandType == AccessControlCommandType_CLOSE_ACCESS_POINT: // AccessControlDataCloseAccessPoint
+ _childTemp, typeSwitchError = AccessControlDataCloseAccessPointParse(readBuffer)
+ case commandType == AccessControlCommandType_LOCK_ACCESS_POINT: // AccessControlDataLockAccessPoint
+ _childTemp, typeSwitchError = AccessControlDataLockAccessPointParse(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 AccessControlData")
+ }
+ _child = _childTemp.(AccessControlDataChildSerializeRequirement)
+
+ if closeErr := readBuffer.CloseContext("AccessControlData"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AccessControlData")
+ }
+
+ // Finish initializing
+ _child.InitializeParent(_child, commandTypeContainer, networkId, accessPointId)
+ return _child, nil
+}
+
+func (pm *_AccessControlData) SerializeParent(writeBuffer utils.WriteBuffer, child AccessControlData, 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("AccessControlData"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AccessControlData")
+ }
+
+ // 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 (networkId)
+ networkId := byte(m.GetNetworkId())
+ _networkIdErr := writeBuffer.WriteByte("networkId", (networkId))
+ if _networkIdErr != nil {
+ return errors.Wrap(_networkIdErr, "Error serializing 'networkId' field")
+ }
+
+ // Simple Field (accessPointId)
+ accessPointId := byte(m.GetAccessPointId())
+ _accessPointIdErr := writeBuffer.WriteByte("accessPointId", (accessPointId))
+ if _accessPointIdErr != nil {
+ return errors.Wrap(_accessPointIdErr, "Error serializing 'accessPointId' 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("AccessControlData"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AccessControlData")
+ }
+ return nil
+}
+
+func (m *_AccessControlData) isAccessControlData() bool {
+ return true
+}
+
+func (m *_AccessControlData) 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/AccessControlDataAccessPointClosed.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointClosed.go
new file mode 100644
index 000000000..ce3861711
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointClosed.go
@@ -0,0 +1,156 @@
+/*
+ * 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.
+
+// AccessControlDataAccessPointClosed is the corresponding interface of AccessControlDataAccessPointClosed
+type AccessControlDataAccessPointClosed interface {
+ utils.LengthAware
+ utils.Serializable
+ AccessControlData
+}
+
+// AccessControlDataAccessPointClosedExactly can be used when we want exactly this type and not a type which fulfills AccessControlDataAccessPointClosed.
+// This is useful for switch cases.
+type AccessControlDataAccessPointClosedExactly interface {
+ AccessControlDataAccessPointClosed
+ isAccessControlDataAccessPointClosed() bool
+}
+
+// _AccessControlDataAccessPointClosed is the data-structure of this message
+type _AccessControlDataAccessPointClosed struct {
+ *_AccessControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AccessControlDataAccessPointClosed) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.NetworkId = networkId
+ m.AccessPointId = accessPointId
+}
+
+func (m *_AccessControlDataAccessPointClosed) GetParent() AccessControlData {
+ return m._AccessControlData
+}
+
+// NewAccessControlDataAccessPointClosed factory function for _AccessControlDataAccessPointClosed
+func NewAccessControlDataAccessPointClosed(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataAccessPointClosed {
+ _result := &_AccessControlDataAccessPointClosed{
+ _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId),
+ }
+ _result._AccessControlData._AccessControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAccessControlDataAccessPointClosed(structType interface{}) AccessControlDataAccessPointClosed {
+ if casted, ok := structType.(AccessControlDataAccessPointClosed); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AccessControlDataAccessPointClosed); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AccessControlDataAccessPointClosed) GetTypeName() string {
+ return "AccessControlDataAccessPointClosed"
+}
+
+func (m *_AccessControlDataAccessPointClosed) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AccessControlDataAccessPointClosed) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_AccessControlDataAccessPointClosed) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlDataAccessPointClosedParse(readBuffer utils.ReadBuffer) (AccessControlDataAccessPointClosed, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AccessControlDataAccessPointClosed"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AccessControlDataAccessPointClosed")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("AccessControlDataAccessPointClosed"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AccessControlDataAccessPointClosed")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AccessControlDataAccessPointClosed{
+ _AccessControlData: &_AccessControlData{},
+ }
+ _child._AccessControlData._AccessControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AccessControlDataAccessPointClosed) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AccessControlDataAccessPointClosed"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AccessControlDataAccessPointClosed")
+ }
+
+ if popErr := writeBuffer.PopContext("AccessControlDataAccessPointClosed"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AccessControlDataAccessPointClosed")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AccessControlDataAccessPointClosed) isAccessControlDataAccessPointClosed() bool {
+ return true
+}
+
+func (m *_AccessControlDataAccessPointClosed) 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/AccessControlDataAccessPointForcedOpen.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointForcedOpen.go
new file mode 100644
index 000000000..952aa8e13
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointForcedOpen.go
@@ -0,0 +1,156 @@
+/*
+ * 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.
+
+// AccessControlDataAccessPointForcedOpen is the corresponding interface of AccessControlDataAccessPointForcedOpen
+type AccessControlDataAccessPointForcedOpen interface {
+ utils.LengthAware
+ utils.Serializable
+ AccessControlData
+}
+
+// AccessControlDataAccessPointForcedOpenExactly can be used when we want exactly this type and not a type which fulfills AccessControlDataAccessPointForcedOpen.
+// This is useful for switch cases.
+type AccessControlDataAccessPointForcedOpenExactly interface {
+ AccessControlDataAccessPointForcedOpen
+ isAccessControlDataAccessPointForcedOpen() bool
+}
+
+// _AccessControlDataAccessPointForcedOpen is the data-structure of this message
+type _AccessControlDataAccessPointForcedOpen struct {
+ *_AccessControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AccessControlDataAccessPointForcedOpen) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.NetworkId = networkId
+ m.AccessPointId = accessPointId
+}
+
+func (m *_AccessControlDataAccessPointForcedOpen) GetParent() AccessControlData {
+ return m._AccessControlData
+}
+
+// NewAccessControlDataAccessPointForcedOpen factory function for _AccessControlDataAccessPointForcedOpen
+func NewAccessControlDataAccessPointForcedOpen(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataAccessPointForcedOpen {
+ _result := &_AccessControlDataAccessPointForcedOpen{
+ _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId),
+ }
+ _result._AccessControlData._AccessControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAccessControlDataAccessPointForcedOpen(structType interface{}) AccessControlDataAccessPointForcedOpen {
+ if casted, ok := structType.(AccessControlDataAccessPointForcedOpen); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AccessControlDataAccessPointForcedOpen); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AccessControlDataAccessPointForcedOpen) GetTypeName() string {
+ return "AccessControlDataAccessPointForcedOpen"
+}
+
+func (m *_AccessControlDataAccessPointForcedOpen) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AccessControlDataAccessPointForcedOpen) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_AccessControlDataAccessPointForcedOpen) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlDataAccessPointForcedOpenParse(readBuffer utils.ReadBuffer) (AccessControlDataAccessPointForcedOpen, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AccessControlDataAccessPointForcedOpen"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AccessControlDataAccessPointForcedOpen")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("AccessControlDataAccessPointForcedOpen"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AccessControlDataAccessPointForcedOpen")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AccessControlDataAccessPointForcedOpen{
+ _AccessControlData: &_AccessControlData{},
+ }
+ _child._AccessControlData._AccessControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AccessControlDataAccessPointForcedOpen) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AccessControlDataAccessPointForcedOpen"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AccessControlDataAccessPointForcedOpen")
+ }
+
+ if popErr := writeBuffer.PopContext("AccessControlDataAccessPointForcedOpen"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AccessControlDataAccessPointForcedOpen")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AccessControlDataAccessPointForcedOpen) isAccessControlDataAccessPointForcedOpen() bool {
+ return true
+}
+
+func (m *_AccessControlDataAccessPointForcedOpen) 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/AccessControlDataAccessPointLeftOpen.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointLeftOpen.go
new file mode 100644
index 000000000..9b99b6eb9
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointLeftOpen.go
@@ -0,0 +1,156 @@
+/*
+ * 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.
+
+// AccessControlDataAccessPointLeftOpen is the corresponding interface of AccessControlDataAccessPointLeftOpen
+type AccessControlDataAccessPointLeftOpen interface {
+ utils.LengthAware
+ utils.Serializable
+ AccessControlData
+}
+
+// AccessControlDataAccessPointLeftOpenExactly can be used when we want exactly this type and not a type which fulfills AccessControlDataAccessPointLeftOpen.
+// This is useful for switch cases.
+type AccessControlDataAccessPointLeftOpenExactly interface {
+ AccessControlDataAccessPointLeftOpen
+ isAccessControlDataAccessPointLeftOpen() bool
+}
+
+// _AccessControlDataAccessPointLeftOpen is the data-structure of this message
+type _AccessControlDataAccessPointLeftOpen struct {
+ *_AccessControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AccessControlDataAccessPointLeftOpen) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.NetworkId = networkId
+ m.AccessPointId = accessPointId
+}
+
+func (m *_AccessControlDataAccessPointLeftOpen) GetParent() AccessControlData {
+ return m._AccessControlData
+}
+
+// NewAccessControlDataAccessPointLeftOpen factory function for _AccessControlDataAccessPointLeftOpen
+func NewAccessControlDataAccessPointLeftOpen(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataAccessPointLeftOpen {
+ _result := &_AccessControlDataAccessPointLeftOpen{
+ _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId),
+ }
+ _result._AccessControlData._AccessControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAccessControlDataAccessPointLeftOpen(structType interface{}) AccessControlDataAccessPointLeftOpen {
+ if casted, ok := structType.(AccessControlDataAccessPointLeftOpen); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AccessControlDataAccessPointLeftOpen); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AccessControlDataAccessPointLeftOpen) GetTypeName() string {
+ return "AccessControlDataAccessPointLeftOpen"
+}
+
+func (m *_AccessControlDataAccessPointLeftOpen) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AccessControlDataAccessPointLeftOpen) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_AccessControlDataAccessPointLeftOpen) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlDataAccessPointLeftOpenParse(readBuffer utils.ReadBuffer) (AccessControlDataAccessPointLeftOpen, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AccessControlDataAccessPointLeftOpen"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AccessControlDataAccessPointLeftOpen")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("AccessControlDataAccessPointLeftOpen"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AccessControlDataAccessPointLeftOpen")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AccessControlDataAccessPointLeftOpen{
+ _AccessControlData: &_AccessControlData{},
+ }
+ _child._AccessControlData._AccessControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AccessControlDataAccessPointLeftOpen) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AccessControlDataAccessPointLeftOpen"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AccessControlDataAccessPointLeftOpen")
+ }
+
+ if popErr := writeBuffer.PopContext("AccessControlDataAccessPointLeftOpen"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AccessControlDataAccessPointLeftOpen")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AccessControlDataAccessPointLeftOpen) isAccessControlDataAccessPointLeftOpen() bool {
+ return true
+}
+
+func (m *_AccessControlDataAccessPointLeftOpen) 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/AccessControlDataCloseAccessPoint.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataCloseAccessPoint.go
new file mode 100644
index 000000000..8c5c22e9a
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataCloseAccessPoint.go
@@ -0,0 +1,156 @@
+/*
+ * 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.
+
+// AccessControlDataCloseAccessPoint is the corresponding interface of AccessControlDataCloseAccessPoint
+type AccessControlDataCloseAccessPoint interface {
+ utils.LengthAware
+ utils.Serializable
+ AccessControlData
+}
+
+// AccessControlDataCloseAccessPointExactly can be used when we want exactly this type and not a type which fulfills AccessControlDataCloseAccessPoint.
+// This is useful for switch cases.
+type AccessControlDataCloseAccessPointExactly interface {
+ AccessControlDataCloseAccessPoint
+ isAccessControlDataCloseAccessPoint() bool
+}
+
+// _AccessControlDataCloseAccessPoint is the data-structure of this message
+type _AccessControlDataCloseAccessPoint struct {
+ *_AccessControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AccessControlDataCloseAccessPoint) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.NetworkId = networkId
+ m.AccessPointId = accessPointId
+}
+
+func (m *_AccessControlDataCloseAccessPoint) GetParent() AccessControlData {
+ return m._AccessControlData
+}
+
+// NewAccessControlDataCloseAccessPoint factory function for _AccessControlDataCloseAccessPoint
+func NewAccessControlDataCloseAccessPoint(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataCloseAccessPoint {
+ _result := &_AccessControlDataCloseAccessPoint{
+ _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId),
+ }
+ _result._AccessControlData._AccessControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAccessControlDataCloseAccessPoint(structType interface{}) AccessControlDataCloseAccessPoint {
+ if casted, ok := structType.(AccessControlDataCloseAccessPoint); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AccessControlDataCloseAccessPoint); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AccessControlDataCloseAccessPoint) GetTypeName() string {
+ return "AccessControlDataCloseAccessPoint"
+}
+
+func (m *_AccessControlDataCloseAccessPoint) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AccessControlDataCloseAccessPoint) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_AccessControlDataCloseAccessPoint) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlDataCloseAccessPointParse(readBuffer utils.ReadBuffer) (AccessControlDataCloseAccessPoint, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AccessControlDataCloseAccessPoint"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AccessControlDataCloseAccessPoint")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("AccessControlDataCloseAccessPoint"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AccessControlDataCloseAccessPoint")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AccessControlDataCloseAccessPoint{
+ _AccessControlData: &_AccessControlData{},
+ }
+ _child._AccessControlData._AccessControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AccessControlDataCloseAccessPoint) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AccessControlDataCloseAccessPoint"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AccessControlDataCloseAccessPoint")
+ }
+
+ if popErr := writeBuffer.PopContext("AccessControlDataCloseAccessPoint"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AccessControlDataCloseAccessPoint")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AccessControlDataCloseAccessPoint) isAccessControlDataCloseAccessPoint() bool {
+ return true
+}
+
+func (m *_AccessControlDataCloseAccessPoint) 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/AccessControlDataInvalidAccessRequest.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataInvalidAccessRequest.go
new file mode 100644
index 000000000..30be72e43
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataInvalidAccessRequest.go
@@ -0,0 +1,229 @@
+/*
+ * 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.
+
+// AccessControlDataInvalidAccessRequest is the corresponding interface of AccessControlDataInvalidAccessRequest
+type AccessControlDataInvalidAccessRequest interface {
+ utils.LengthAware
+ utils.Serializable
+ AccessControlData
+ // GetAccessControlDirection returns AccessControlDirection (property field)
+ GetAccessControlDirection() AccessControlDirection
+ // GetData returns Data (property field)
+ GetData() []byte
+}
+
+// AccessControlDataInvalidAccessRequestExactly can be used when we want exactly this type and not a type which fulfills AccessControlDataInvalidAccessRequest.
+// This is useful for switch cases.
+type AccessControlDataInvalidAccessRequestExactly interface {
+ AccessControlDataInvalidAccessRequest
+ isAccessControlDataInvalidAccessRequest() bool
+}
+
+// _AccessControlDataInvalidAccessRequest is the data-structure of this message
+type _AccessControlDataInvalidAccessRequest struct {
+ *_AccessControlData
+ AccessControlDirection AccessControlDirection
+ Data []byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AccessControlDataInvalidAccessRequest) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.NetworkId = networkId
+ m.AccessPointId = accessPointId
+}
+
+func (m *_AccessControlDataInvalidAccessRequest) GetParent() AccessControlData {
+ return m._AccessControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AccessControlDataInvalidAccessRequest) GetAccessControlDirection() AccessControlDirection {
+ return m.AccessControlDirection
+}
+
+func (m *_AccessControlDataInvalidAccessRequest) GetData() []byte {
+ return m.Data
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAccessControlDataInvalidAccessRequest factory function for _AccessControlDataInvalidAccessRequest
+func NewAccessControlDataInvalidAccessRequest(accessControlDirection AccessControlDirection, data []byte, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataInvalidAccessRequest {
+ _result := &_AccessControlDataInvalidAccessRequest{
+ AccessControlDirection: accessControlDirection,
+ Data: data,
+ _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId),
+ }
+ _result._AccessControlData._AccessControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAccessControlDataInvalidAccessRequest(structType interface{}) AccessControlDataInvalidAccessRequest {
+ if casted, ok := structType.(AccessControlDataInvalidAccessRequest); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AccessControlDataInvalidAccessRequest); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AccessControlDataInvalidAccessRequest) GetTypeName() string {
+ return "AccessControlDataInvalidAccessRequest"
+}
+
+func (m *_AccessControlDataInvalidAccessRequest) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AccessControlDataInvalidAccessRequest) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (accessControlDirection)
+ lengthInBits += 8
+
+ // Array field
+ if len(m.Data) > 0 {
+ lengthInBits += 8 * uint16(len(m.Data))
+ }
+
+ return lengthInBits
+}
+
+func (m *_AccessControlDataInvalidAccessRequest) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlDataInvalidAccessRequestParse(readBuffer utils.ReadBuffer, commandTypeContainer AccessControlCommandTypeContainer) (AccessControlDataInvalidAccessRequest, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AccessControlDataInvalidAccessRequest"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AccessControlDataInvalidAccessRequest")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (accessControlDirection)
+ if pullErr := readBuffer.PullContext("accessControlDirection"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for accessControlDirection")
+ }
+ _accessControlDirection, _accessControlDirectionErr := AccessControlDirectionParse(readBuffer)
+ if _accessControlDirectionErr != nil {
+ return nil, errors.Wrap(_accessControlDirectionErr, "Error parsing 'accessControlDirection' field of AccessControlDataInvalidAccessRequest")
+ }
+ accessControlDirection := _accessControlDirection
+ if closeErr := readBuffer.CloseContext("accessControlDirection"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for accessControlDirection")
+ }
+ // Byte Array field (data)
+ numberOfBytesdata := int(uint16(commandTypeContainer.NumBytes()) - uint16(uint16(3)))
+ data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata)
+ if _readArrayErr != nil {
+ return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of AccessControlDataInvalidAccessRequest")
+ }
+
+ if closeErr := readBuffer.CloseContext("AccessControlDataInvalidAccessRequest"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AccessControlDataInvalidAccessRequest")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AccessControlDataInvalidAccessRequest{
+ AccessControlDirection: accessControlDirection,
+ Data: data,
+ _AccessControlData: &_AccessControlData{},
+ }
+ _child._AccessControlData._AccessControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AccessControlDataInvalidAccessRequest) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AccessControlDataInvalidAccessRequest"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AccessControlDataInvalidAccessRequest")
+ }
+
+ // Simple Field (accessControlDirection)
+ if pushErr := writeBuffer.PushContext("accessControlDirection"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for accessControlDirection")
+ }
+ _accessControlDirectionErr := writeBuffer.WriteSerializable(m.GetAccessControlDirection())
+ if popErr := writeBuffer.PopContext("accessControlDirection"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for accessControlDirection")
+ }
+ if _accessControlDirectionErr != nil {
+ return errors.Wrap(_accessControlDirectionErr, "Error serializing 'accessControlDirection' field")
+ }
+
+ // Array Field (data)
+ // Byte Array field (data)
+ if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil {
+ return errors.Wrap(err, "Error serializing 'data' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AccessControlDataInvalidAccessRequest"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AccessControlDataInvalidAccessRequest")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AccessControlDataInvalidAccessRequest) isAccessControlDataInvalidAccessRequest() bool {
+ return true
+}
+
+func (m *_AccessControlDataInvalidAccessRequest) 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/AccessControlDataLockAccessPoint.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataLockAccessPoint.go
new file mode 100644
index 000000000..70e8e1856
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataLockAccessPoint.go
@@ -0,0 +1,156 @@
+/*
+ * 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.
+
+// AccessControlDataLockAccessPoint is the corresponding interface of AccessControlDataLockAccessPoint
+type AccessControlDataLockAccessPoint interface {
+ utils.LengthAware
+ utils.Serializable
+ AccessControlData
+}
+
+// AccessControlDataLockAccessPointExactly can be used when we want exactly this type and not a type which fulfills AccessControlDataLockAccessPoint.
+// This is useful for switch cases.
+type AccessControlDataLockAccessPointExactly interface {
+ AccessControlDataLockAccessPoint
+ isAccessControlDataLockAccessPoint() bool
+}
+
+// _AccessControlDataLockAccessPoint is the data-structure of this message
+type _AccessControlDataLockAccessPoint struct {
+ *_AccessControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AccessControlDataLockAccessPoint) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.NetworkId = networkId
+ m.AccessPointId = accessPointId
+}
+
+func (m *_AccessControlDataLockAccessPoint) GetParent() AccessControlData {
+ return m._AccessControlData
+}
+
+// NewAccessControlDataLockAccessPoint factory function for _AccessControlDataLockAccessPoint
+func NewAccessControlDataLockAccessPoint(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataLockAccessPoint {
+ _result := &_AccessControlDataLockAccessPoint{
+ _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId),
+ }
+ _result._AccessControlData._AccessControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAccessControlDataLockAccessPoint(structType interface{}) AccessControlDataLockAccessPoint {
+ if casted, ok := structType.(AccessControlDataLockAccessPoint); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AccessControlDataLockAccessPoint); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AccessControlDataLockAccessPoint) GetTypeName() string {
+ return "AccessControlDataLockAccessPoint"
+}
+
+func (m *_AccessControlDataLockAccessPoint) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AccessControlDataLockAccessPoint) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_AccessControlDataLockAccessPoint) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlDataLockAccessPointParse(readBuffer utils.ReadBuffer) (AccessControlDataLockAccessPoint, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AccessControlDataLockAccessPoint"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AccessControlDataLockAccessPoint")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("AccessControlDataLockAccessPoint"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AccessControlDataLockAccessPoint")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AccessControlDataLockAccessPoint{
+ _AccessControlData: &_AccessControlData{},
+ }
+ _child._AccessControlData._AccessControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AccessControlDataLockAccessPoint) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AccessControlDataLockAccessPoint"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AccessControlDataLockAccessPoint")
+ }
+
+ if popErr := writeBuffer.PopContext("AccessControlDataLockAccessPoint"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AccessControlDataLockAccessPoint")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AccessControlDataLockAccessPoint) isAccessControlDataLockAccessPoint() bool {
+ return true
+}
+
+func (m *_AccessControlDataLockAccessPoint) 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/AccessControlDataRequestToExit.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataRequestToExit.go
new file mode 100644
index 000000000..d81647d15
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataRequestToExit.go
@@ -0,0 +1,156 @@
+/*
+ * 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.
+
+// AccessControlDataRequestToExit is the corresponding interface of AccessControlDataRequestToExit
+type AccessControlDataRequestToExit interface {
+ utils.LengthAware
+ utils.Serializable
+ AccessControlData
+}
+
+// AccessControlDataRequestToExitExactly can be used when we want exactly this type and not a type which fulfills AccessControlDataRequestToExit.
+// This is useful for switch cases.
+type AccessControlDataRequestToExitExactly interface {
+ AccessControlDataRequestToExit
+ isAccessControlDataRequestToExit() bool
+}
+
+// _AccessControlDataRequestToExit is the data-structure of this message
+type _AccessControlDataRequestToExit struct {
+ *_AccessControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AccessControlDataRequestToExit) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.NetworkId = networkId
+ m.AccessPointId = accessPointId
+}
+
+func (m *_AccessControlDataRequestToExit) GetParent() AccessControlData {
+ return m._AccessControlData
+}
+
+// NewAccessControlDataRequestToExit factory function for _AccessControlDataRequestToExit
+func NewAccessControlDataRequestToExit(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataRequestToExit {
+ _result := &_AccessControlDataRequestToExit{
+ _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId),
+ }
+ _result._AccessControlData._AccessControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAccessControlDataRequestToExit(structType interface{}) AccessControlDataRequestToExit {
+ if casted, ok := structType.(AccessControlDataRequestToExit); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AccessControlDataRequestToExit); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AccessControlDataRequestToExit) GetTypeName() string {
+ return "AccessControlDataRequestToExit"
+}
+
+func (m *_AccessControlDataRequestToExit) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AccessControlDataRequestToExit) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_AccessControlDataRequestToExit) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlDataRequestToExitParse(readBuffer utils.ReadBuffer) (AccessControlDataRequestToExit, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AccessControlDataRequestToExit"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AccessControlDataRequestToExit")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("AccessControlDataRequestToExit"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AccessControlDataRequestToExit")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AccessControlDataRequestToExit{
+ _AccessControlData: &_AccessControlData{},
+ }
+ _child._AccessControlData._AccessControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AccessControlDataRequestToExit) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AccessControlDataRequestToExit"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AccessControlDataRequestToExit")
+ }
+
+ if popErr := writeBuffer.PopContext("AccessControlDataRequestToExit"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AccessControlDataRequestToExit")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AccessControlDataRequestToExit) isAccessControlDataRequestToExit() bool {
+ return true
+}
+
+func (m *_AccessControlDataRequestToExit) 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/AccessControlDataValidAccessRequest.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataValidAccessRequest.go
new file mode 100644
index 000000000..2ac399a05
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataValidAccessRequest.go
@@ -0,0 +1,229 @@
+/*
+ * 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.
+
+// AccessControlDataValidAccessRequest is the corresponding interface of AccessControlDataValidAccessRequest
+type AccessControlDataValidAccessRequest interface {
+ utils.LengthAware
+ utils.Serializable
+ AccessControlData
+ // GetAccessControlDirection returns AccessControlDirection (property field)
+ GetAccessControlDirection() AccessControlDirection
+ // GetData returns Data (property field)
+ GetData() []byte
+}
+
+// AccessControlDataValidAccessRequestExactly can be used when we want exactly this type and not a type which fulfills AccessControlDataValidAccessRequest.
+// This is useful for switch cases.
+type AccessControlDataValidAccessRequestExactly interface {
+ AccessControlDataValidAccessRequest
+ isAccessControlDataValidAccessRequest() bool
+}
+
+// _AccessControlDataValidAccessRequest is the data-structure of this message
+type _AccessControlDataValidAccessRequest struct {
+ *_AccessControlData
+ AccessControlDirection AccessControlDirection
+ Data []byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_AccessControlDataValidAccessRequest) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.NetworkId = networkId
+ m.AccessPointId = accessPointId
+}
+
+func (m *_AccessControlDataValidAccessRequest) GetParent() AccessControlData {
+ return m._AccessControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_AccessControlDataValidAccessRequest) GetAccessControlDirection() AccessControlDirection {
+ return m.AccessControlDirection
+}
+
+func (m *_AccessControlDataValidAccessRequest) GetData() []byte {
+ return m.Data
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewAccessControlDataValidAccessRequest factory function for _AccessControlDataValidAccessRequest
+func NewAccessControlDataValidAccessRequest(accessControlDirection AccessControlDirection, data []byte, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataValidAccessRequest {
+ _result := &_AccessControlDataValidAccessRequest{
+ AccessControlDirection: accessControlDirection,
+ Data: data,
+ _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId),
+ }
+ _result._AccessControlData._AccessControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastAccessControlDataValidAccessRequest(structType interface{}) AccessControlDataValidAccessRequest {
+ if casted, ok := structType.(AccessControlDataValidAccessRequest); ok {
+ return casted
+ }
+ if casted, ok := structType.(*AccessControlDataValidAccessRequest); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_AccessControlDataValidAccessRequest) GetTypeName() string {
+ return "AccessControlDataValidAccessRequest"
+}
+
+func (m *_AccessControlDataValidAccessRequest) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_AccessControlDataValidAccessRequest) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (accessControlDirection)
+ lengthInBits += 8
+
+ // Array field
+ if len(m.Data) > 0 {
+ lengthInBits += 8 * uint16(len(m.Data))
+ }
+
+ return lengthInBits
+}
+
+func (m *_AccessControlDataValidAccessRequest) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlDataValidAccessRequestParse(readBuffer utils.ReadBuffer, commandTypeContainer AccessControlCommandTypeContainer) (AccessControlDataValidAccessRequest, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("AccessControlDataValidAccessRequest"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for AccessControlDataValidAccessRequest")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (accessControlDirection)
+ if pullErr := readBuffer.PullContext("accessControlDirection"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for accessControlDirection")
+ }
+ _accessControlDirection, _accessControlDirectionErr := AccessControlDirectionParse(readBuffer)
+ if _accessControlDirectionErr != nil {
+ return nil, errors.Wrap(_accessControlDirectionErr, "Error parsing 'accessControlDirection' field of AccessControlDataValidAccessRequest")
+ }
+ accessControlDirection := _accessControlDirection
+ if closeErr := readBuffer.CloseContext("accessControlDirection"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for accessControlDirection")
+ }
+ // Byte Array field (data)
+ numberOfBytesdata := int(uint16(commandTypeContainer.NumBytes()) - uint16(uint16(3)))
+ data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata)
+ if _readArrayErr != nil {
+ return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of AccessControlDataValidAccessRequest")
+ }
+
+ if closeErr := readBuffer.CloseContext("AccessControlDataValidAccessRequest"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for AccessControlDataValidAccessRequest")
+ }
+
+ // Create a partially initialized instance
+ _child := &_AccessControlDataValidAccessRequest{
+ AccessControlDirection: accessControlDirection,
+ Data: data,
+ _AccessControlData: &_AccessControlData{},
+ }
+ _child._AccessControlData._AccessControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_AccessControlDataValidAccessRequest) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("AccessControlDataValidAccessRequest"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for AccessControlDataValidAccessRequest")
+ }
+
+ // Simple Field (accessControlDirection)
+ if pushErr := writeBuffer.PushContext("accessControlDirection"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for accessControlDirection")
+ }
+ _accessControlDirectionErr := writeBuffer.WriteSerializable(m.GetAccessControlDirection())
+ if popErr := writeBuffer.PopContext("accessControlDirection"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for accessControlDirection")
+ }
+ if _accessControlDirectionErr != nil {
+ return errors.Wrap(_accessControlDirectionErr, "Error serializing 'accessControlDirection' field")
+ }
+
+ // Array Field (data)
+ // Byte Array field (data)
+ if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil {
+ return errors.Wrap(err, "Error serializing 'data' field")
+ }
+
+ if popErr := writeBuffer.PopContext("AccessControlDataValidAccessRequest"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for AccessControlDataValidAccessRequest")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_AccessControlDataValidAccessRequest) isAccessControlDataValidAccessRequest() bool {
+ return true
+}
+
+func (m *_AccessControlDataValidAccessRequest) 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/AccessControlDirection.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDirection.go
new file mode 100644
index 000000000..3289fa376
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDirection.go
@@ -0,0 +1,137 @@
+/*
+ * 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.
+
+// AccessControlDirection is an enum
+type AccessControlDirection uint8
+
+type IAccessControlDirection interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ AccessControlDirection_NOT_USED AccessControlDirection = 0x00
+ AccessControlDirection_IN AccessControlDirection = 0x01
+ AccessControlDirection_OUT AccessControlDirection = 0x02
+)
+
+var AccessControlDirectionValues []AccessControlDirection
+
+func init() {
+ _ = errors.New
+ AccessControlDirectionValues = []AccessControlDirection{
+ AccessControlDirection_NOT_USED,
+ AccessControlDirection_IN,
+ AccessControlDirection_OUT,
+ }
+}
+
+func AccessControlDirectionByValue(value uint8) (enum AccessControlDirection, ok bool) {
+ switch value {
+ case 0x00:
+ return AccessControlDirection_NOT_USED, true
+ case 0x01:
+ return AccessControlDirection_IN, true
+ case 0x02:
+ return AccessControlDirection_OUT, true
+ }
+ return 0, false
+}
+
+func AccessControlDirectionByName(value string) (enum AccessControlDirection, ok bool) {
+ switch value {
+ case "NOT_USED":
+ return AccessControlDirection_NOT_USED, true
+ case "IN":
+ return AccessControlDirection_IN, true
+ case "OUT":
+ return AccessControlDirection_OUT, true
+ }
+ return 0, false
+}
+
+func AccessControlDirectionKnows(value uint8) bool {
+ for _, typeValue := range AccessControlDirectionValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastAccessControlDirection(structType interface{}) AccessControlDirection {
+ castFunc := func(typ interface{}) AccessControlDirection {
+ if sAccessControlDirection, ok := typ.(AccessControlDirection); ok {
+ return sAccessControlDirection
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m AccessControlDirection) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m AccessControlDirection) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func AccessControlDirectionParse(readBuffer utils.ReadBuffer) (AccessControlDirection, error) {
+ val, err := readBuffer.ReadUint8("AccessControlDirection", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading AccessControlDirection")
+ }
+ if enum, ok := AccessControlDirectionByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return AccessControlDirection(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e AccessControlDirection) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("AccessControlDirection", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e AccessControlDirection) PLC4XEnumName() string {
+ switch e {
+ case AccessControlDirection_NOT_USED:
+ return "NOT_USED"
+ case AccessControlDirection_IN:
+ return "IN"
+ case AccessControlDirection_OUT:
+ return "OUT"
+ }
+ return ""
+}
+
+func (e AccessControlDirection) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataAccessControl.go b/plc4go/protocols/cbus/readwrite/model/SALDataAccessControl.go
index 963be5b81..541ff48e1 100644
--- a/plc4go/protocols/cbus/readwrite/model/SALDataAccessControl.go
+++ b/plc4go/protocols/cbus/readwrite/model/SALDataAccessControl.go
@@ -31,6 +31,8 @@ type SALDataAccessControl interface {
utils.LengthAware
utils.Serializable
SALData
+ // GetAccessControlData returns AccessControlData (property field)
+ GetAccessControlData() AccessControlData
}
// SALDataAccessControlExactly can be used when we want exactly this type and not a type which fulfills SALDataAccessControl.
@@ -43,6 +45,7 @@ type SALDataAccessControlExactly interface {
// _SALDataAccessControl is the data-structure of this message
type _SALDataAccessControl struct {
*_SALData
+ AccessControlData AccessControlData
}
///////////////////////////////////////////////////////////
@@ -67,10 +70,25 @@ func (m *_SALDataAccessControl) GetParent() SALData {
return m._SALData
}
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SALDataAccessControl) GetAccessControlData() AccessControlData {
+ return m.AccessControlData
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
// NewSALDataAccessControl factory function for _SALDataAccessControl
-func NewSALDataAccessControl(salData SALData) *_SALDataAccessControl {
+func NewSALDataAccessControl(accessControlData AccessControlData, salData SALData) *_SALDataAccessControl {
_result := &_SALDataAccessControl{
- _SALData: NewSALData(salData),
+ AccessControlData: accessControlData,
+ _SALData: NewSALData(salData),
}
_result._SALData._SALDataChildRequirements = _result
return _result
@@ -98,6 +116,9 @@ func (m *_SALDataAccessControl) GetLengthInBits() uint16 {
func (m *_SALDataAccessControl) GetLengthInBitsConditional(lastItem bool) uint16 {
lengthInBits := uint16(m.GetParentLengthInBits())
+ // Simple field (accessControlData)
+ lengthInBits += m.AccessControlData.GetLengthInBits()
+
return lengthInBits
}
@@ -114,9 +135,17 @@ func SALDataAccessControlParse(readBuffer utils.ReadBuffer, applicationId Applic
currentPos := positionAware.GetPos()
_ = currentPos
- // Validation
- if !(bool((1) == (2))) {
- return nil, errors.WithStack(utils.ParseValidationError{"ACCESS_CONTROL Not yet implemented"})
+ // Simple Field (accessControlData)
+ if pullErr := readBuffer.PullContext("accessControlData"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for accessControlData")
+ }
+ _accessControlData, _accessControlDataErr := AccessControlDataParse(readBuffer)
+ if _accessControlDataErr != nil {
+ return nil, errors.Wrap(_accessControlDataErr, "Error parsing 'accessControlData' field of SALDataAccessControl")
+ }
+ accessControlData := _accessControlData.(AccessControlData)
+ if closeErr := readBuffer.CloseContext("accessControlData"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for accessControlData")
}
if closeErr := readBuffer.CloseContext("SALDataAccessControl"); closeErr != nil {
@@ -125,7 +154,8 @@ func SALDataAccessControlParse(readBuffer utils.ReadBuffer, applicationId Applic
// Create a partially initialized instance
_child := &_SALDataAccessControl{
- _SALData: &_SALData{},
+ AccessControlData: accessControlData,
+ _SALData: &_SALData{},
}
_child._SALData._SALDataChildRequirements = _child
return _child, nil
@@ -139,6 +169,18 @@ func (m *_SALDataAccessControl) Serialize(writeBuffer utils.WriteBuffer) error {
return errors.Wrap(pushErr, "Error pushing for SALDataAccessControl")
}
+ // Simple Field (accessControlData)
+ if pushErr := writeBuffer.PushContext("accessControlData"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for accessControlData")
+ }
+ _accessControlDataErr := writeBuffer.WriteSerializable(m.GetAccessControlData())
+ if popErr := writeBuffer.PopContext("accessControlData"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for accessControlData")
+ }
+ if _accessControlDataErr != nil {
+ return errors.Wrap(_accessControlDataErr, "Error serializing 'accessControlData' field")
+ }
+
if popErr := writeBuffer.PopContext("SALDataAccessControl"); popErr != nil {
return errors.Wrap(popErr, "Error popping for SALDataAccessControl")
}
diff --git a/plc4go/protocols/cbus/readwrite/model/StaticHelper.go b/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
index ce19caf6c..ae86cb3fc 100644
--- a/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
+++ b/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
@@ -181,3 +181,13 @@ func KnowsTemperatureBroadcastCommandTypeContainer(readBuffer utils.ReadBuffer)
}
return TemperatureBroadcastCommandTypeContainerKnows(readUint8)
}
+
+func KnowsAccessControlCommandTypeContainer(readBuffer utils.ReadBuffer) bool {
+ oldPos := readBuffer.GetPos()
+ defer readBuffer.Reset(oldPos)
+ readUint8, err := readBuffer.ReadUint8("", 8)
+ if err != nil {
+ return false
+ }
+ return AccessControlCommandTypeContainerKnows(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 eafcb0209..a6c6b1b59 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
@@ -150,7 +150,6 @@ public class StaticHelper {
}
}
-
public static boolean knowsTemperatureBroadcastCommandTypeContainer(ReadBuffer readBuffer) {
int oldPos = readBuffer.getPos();
try {
@@ -162,4 +161,16 @@ public class StaticHelper {
}
}
+
+ public static boolean knowsAccessControlCommandTypeContainer(ReadBuffer readBuffer) {
+ int oldPos = readBuffer.getPos();
+ try {
+ return AccessControlCommandTypeContainer.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 ff175b16b..29facb926 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
@@ -1030,4 +1030,62 @@ public class ReferenceTest {
class VentilationApplicationTest{
// TODO: no tests described here but it should work by adjusting the values from Lightning...
}
+
+ // from: https://updates.clipsal.com/ClipsalSoftwareDownload/DL/downloads/OpenCBus/Chapter%2009%20-%20C-Bus%20Temperature%20Control%20Application.pdf
+ @Nested
+ class AccessControlApplicationsTest{
+
+ //9.11
+ @Nested
+ class Examples{
+
+ @Test
+ void validAccessRequest() throws Exception {
+ byte[] bytes = "\\05D500A4010300017D\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 closeAccessPoint() throws Exception {
+ byte[] bytes = "\\05D5000201FF24\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 lockAccessPoint() throws Exception {
+ byte[] bytes = "\\05D5000AFFFF1E\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 lockAccessPointRemote() throws Exception {
+ byte[] bytes = "\\039209D50AFFFF85\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 0f24ecaa9..15110f129 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
@@ -1345,7 +1345,7 @@
[simple MeteringData meteringData]
]
['ACCESS_CONTROL' *AccessControl
- [validation '1==2' "ACCESS_CONTROL Not yet implemented"] // TODO: implement me
+ [simple AccessControlData accessControlData]
]
['CLOCK_AND_TIMEKEEPING' *ClockAndTimekeeping
[validation '1==2' "CLOCK_AND_TIMEKEEPING Not yet implemented"] // TODO: implement me
@@ -2094,6 +2094,132 @@
['0x00' BROADCAST_EVENT ]
]
+[type AccessControlData
+ //TODO: golang doesn't like checking for null so we use that static call to check that the enum is known
+ [validation 'STATIC_CALL("knowsAccessControlCommandTypeContainer", readBuffer)' "no command type could be found" shouldFail=false]
+ [simple AccessControlCommandTypeContainer commandTypeContainer ]
+ [virtual AccessControlCommandType commandType 'commandTypeContainer.commandType']
+ [simple byte networkId ]
+ [simple byte accessPointId ]
+ [typeSwitch commandType
+ ['VALID_ACCESS' *ValidAccessRequest(AccessControlCommandTypeContainer commandTypeContainer)
+ [simple AccessControlDirection accessControlDirection]
+ [array byte data count 'commandTypeContainer.numBytes-3' ]
+ ]
+ ['INVALID_ACCESS' *InvalidAccessRequest(AccessControlCommandTypeContainer commandTypeContainer)
+ [simple AccessControlDirection accessControlDirection]
+ [array byte data count 'commandTypeContainer.numBytes-3' ]
+ ]
+ ['ACCESS_POINT_LEFT_OPEN' *AccessPointLeftOpen
+ ]
+ ['ACCESS_POINT_FORCED_OPEN' *AccessPointForcedOpen
+ ]
+ ['ACCESS_POINT_CLOSED' *AccessPointClosed
+ ]
+ ['REQUEST_TO_EXIT' *RequestToExit
+ ]
+ ['CLOSE_ACCESS_POINT' *CloseAccessPoint
+ ]
+ ['LOCK_ACCESS_POINT' *LockAccessPoint
+ ]
+ ]
+]
+
+[enum uint 8 AccessControlCommandTypeContainer(AccessControlCategory category,AccessControlCommandType commandType, uint 5 numBytes)
+ ['0x02' AccessControlCommandCloseAccessPoint ['SYSTEM_REQUEST', 'CLOSE_ACCESS_POINT', '2']]
+ ['0x0A' AccessControlCommandLockAccessPoint ['SYSTEM_REQUEST', 'LOCK_ACCESS_POINT', '2']]
+ ['0x12' AccessControlCommandAccessPointLeftOpen ['SYSTEM_ACTIVITY', 'ACCESS_POINT_LEFT_OPEN', '2']]
+ ['0x1A' AccessControlCommandAccessPointForcedOpen ['SYSTEM_ACTIVITY', 'ACCESS_POINT_FORCED_OPEN', '2']]
+ ['0x22' AccessControlCommandAccessPointClosed ['SYSTEM_ACTIVITY', 'ACCESS_POINT_CLOSED', '2']]
+ ['0x32' AccessControlCommandRequestToExit ['SYSTEM_ACTIVITY', 'REQUEST_TO_EXIT', '2']]
+ ['0xA0' AccessControlCommandValidAccessRequest_0Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '0']]
+ ['0xA1' AccessControlCommandValidAccessRequest_1Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '1']]
+ ['0xA2' AccessControlCommandValidAccessRequest_2Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '2']]
+ ['0xA3' AccessControlCommandValidAccessRequest_3Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '3']]
+ ['0xA4' AccessControlCommandValidAccessRequest_4Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '4']]
+ ['0xA5' AccessControlCommandValidAccessRequest_5Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '5']]
+ ['0xA6' AccessControlCommandValidAccessRequest_6Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '6']]
+ ['0xA7' AccessControlCommandValidAccessRequest_7Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '7']]
+ ['0xA8' AccessControlCommandValidAccessRequest_8Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '8']]
+ ['0xA9' AccessControlCommandValidAccessRequest_9Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '9']]
+ ['0xAA' AccessControlCommandValidAccessRequest_10Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '10']]
+ ['0xAB' AccessControlCommandValidAccessRequest_11Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '11']]
+ ['0xAC' AccessControlCommandValidAccessRequest_12Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '12']]
+ ['0xAD' AccessControlCommandValidAccessRequest_13Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '13']]
+ ['0xAE' AccessControlCommandValidAccessRequest_14Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '14']]
+ ['0xAF' AccessControlCommandValidAccessRequest_15Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '15']]
+ ['0xB0' AccessControlCommandValidAccessRequest_16Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '16']]
+ ['0xB1' AccessControlCommandValidAccessRequest_17Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '17']]
+ ['0xB2' AccessControlCommandValidAccessRequest_18Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '18']]
+ ['0xB3' AccessControlCommandValidAccessRequest_19Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '19']]
+ ['0xB4' AccessControlCommandValidAccessRequest_20Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '20']]
+ ['0xB5' AccessControlCommandValidAccessRequest_21Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '21']]
+ ['0xB6' AccessControlCommandValidAccessRequest_22Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '22']]
+ ['0xB7' AccessControlCommandValidAccessRequest_23Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '23']]
+ ['0xB8' AccessControlCommandValidAccessRequest_24Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '24']]
+ ['0xB9' AccessControlCommandValidAccessRequest_25Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '25']]
+ ['0xBA' AccessControlCommandValidAccessRequest_26Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '26']]
+ ['0xBB' AccessControlCommandValidAccessRequest_27Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '27']]
+ ['0xBC' AccessControlCommandValidAccessRequest_28Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '28']]
+ ['0xBD' AccessControlCommandValidAccessRequest_29Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '29']]
+ ['0xBE' AccessControlCommandValidAccessRequest_30Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '30']]
+ ['0xBF' AccessControlCommandValidAccessRequest_31Bytes ['SYSTEM_ACTIVITY', 'VALID_ACCESS', '31']]
+ ['0xC0' AccessControlCommandInvalidAccessRequest_0Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '0']]
+ ['0xC1' AccessControlCommandInvalidAccessRequest_1Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '1']]
+ ['0xC2' AccessControlCommandInvalidAccessRequest_2Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '2']]
+ ['0xC3' AccessControlCommandInvalidAccessRequest_3Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '3']]
+ ['0xC4' AccessControlCommandInvalidAccessRequest_4Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '4']]
+ ['0xC5' AccessControlCommandInvalidAccessRequest_5Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '5']]
+ ['0xC6' AccessControlCommandInvalidAccessRequest_6Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '6']]
+ ['0xC7' AccessControlCommandInvalidAccessRequest_7Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '7']]
+ ['0xC8' AccessControlCommandInvalidAccessRequest_8Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '8']]
+ ['0xC9' AccessControlCommandInvalidAccessRequest_9Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '9']]
+ ['0xCA' AccessControlCommandInvalidAccessRequest_10Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '10']]
+ ['0xCB' AccessControlCommandInvalidAccessRequest_11Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '11']]
+ ['0xCC' AccessControlCommandInvalidAccessRequest_12Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '12']]
+ ['0xCD' AccessControlCommandInvalidAccessRequest_13Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '13']]
+ ['0xCE' AccessControlCommandInvalidAccessRequest_14Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '14']]
+ ['0xCF' AccessControlCommandInvalidAccessRequest_15Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '15']]
+ ['0xD0' AccessControlCommandInvalidAccessRequest_16Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '16']]
+ ['0xD1' AccessControlCommandInvalidAccessRequest_17Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '17']]
+ ['0xD2' AccessControlCommandInvalidAccessRequest_18Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '18']]
+ ['0xD3' AccessControlCommandInvalidAccessRequest_19Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '19']]
+ ['0xD4' AccessControlCommandInvalidAccessRequest_20Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '20']]
+ ['0xD5' AccessControlCommandInvalidAccessRequest_21Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '21']]
+ ['0xD6' AccessControlCommandInvalidAccessRequest_22Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '22']]
+ ['0xD7' AccessControlCommandInvalidAccessRequest_23Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '23']]
+ ['0xD8' AccessControlCommandInvalidAccessRequest_24Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '24']]
+ ['0xD9' AccessControlCommandInvalidAccessRequest_25Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '25']]
+ ['0xDA' AccessControlCommandInvalidAccessRequest_26Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '26']]
+ ['0xDB' AccessControlCommandInvalidAccessRequest_27Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '27']]
+ ['0xDC' AccessControlCommandInvalidAccessRequest_28Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '28']]
+ ['0xDD' AccessControlCommandInvalidAccessRequest_29Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '29']]
+ ['0xDE' AccessControlCommandInvalidAccessRequest_30Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '30']]
+ ['0xDF' AccessControlCommandInvalidAccessRequest_31Bytes ['SYSTEM_ACTIVITY', 'INVALID_ACCESS', '31']]
+]
+
+[enum uint 4 AccessControlCommandType
+ ['0x00' CLOSE_ACCESS_POINT ]
+ ['0x01' LOCK_ACCESS_POINT ]
+ ['0x02' ACCESS_POINT_LEFT_OPEN ]
+ ['0x03' ACCESS_POINT_FORCED_OPEN ]
+ ['0x04' ACCESS_POINT_CLOSED ]
+ ['0x05' REQUEST_TO_EXIT ]
+ ['0x06' VALID_ACCESS ]
+ ['0x07' INVALID_ACCESS ]
+]
+
+[enum uint 4 AccessControlCategory
+ ['0x00' SYSTEM_ACTIVITY ]
+ ['0x01' SYSTEM_REQUEST ]
+]
+
+[enum uint 8 AccessControlDirection
+ ['0x00' NOT_USED ]
+ ['0x01' IN ]
+ ['0x02' OUT ]
+]
+
[type ReplyOrConfirmation(CBusOptions cBusOptions, uint 16 messageLength, RequestContext requestContext)
[peek byte peekedByte ]
[virtual bit isAlpha '(peekedByte >= 0x67) && (peekedByte <= 0x7A)' ]