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/08/18 12:27:45 UTC

[plc4x] 01/02: feat(cbus): added number of arguments to sal command types

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 86c462032279f9b581862ce69cf573c28664d305
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Aug 18 14:19:35 2022 +0200

    feat(cbus): added number of arguments to sal command types
---
 .../readwrite/model/AccessControlCommandType.go    |  50 ++++++
 .../readwrite/model/AirConditioningCommandType.go  |  94 ++++++++++
 .../model/ClockAndTimekeepingCommandType.go        |  26 +++
 .../readwrite/model/EnableControlCommandType.go    |  22 +++
 .../readwrite/model/ErrorReportingCommandType.go   |  34 ++++
 .../cbus/readwrite/model/LightingCommandType.go    |  38 ++++
 .../cbus/readwrite/model/MeasurementCommandType.go |  22 +++
 .../model/MediaTransportControlCommandType.go      |  74 ++++++++
 .../readwrite/model/MediaTransportControlData.go   |   2 +
 .../model/MediaTransportControlDataCategoryName.go | 191 +++++++++++++++++++++
 .../cbus/readwrite/model/MeteringCommandType.go    |  22 +++
 .../cbus/readwrite/model/SecurityCommandType.go    |  30 ++++
 .../cbus/readwrite/model/TelephonyCommandType.go   |  22 +++
 .../model/TemperatureBroadcastCommandType.go       |  22 +++
 .../readwrite/model/TriggerControlCommandType.go   |  38 ++++
 .../knxnetip/readwrite/model/KnxManufacturer.go    |  26 ++-
 .../cbus/c-bus_access_control_application.mspec    |  18 +-
 .../cbus/c-bus_air_conditioning_application.mspec  |  40 ++---
 .../c-bus_clock_and_timekeeping_application.mspec  |   6 +-
 .../cbus/c-bus_enable_control_application.mspec    |   4 +-
 .../cbus/c-bus_error_reporting_application.mspec   |  10 +-
 .../cbus/c-bus_lighting_application.mspec          |  12 +-
 .../cbus/c-bus_measurement_application.mspec       |   4 +-
 ...c-bus_media_transport_control_application.mspec |  47 ++---
 .../cbus/c-bus_metering_application.mspec          |   4 +-
 .../cbus/c-bus_security_application.mspec          |   8 +-
 .../cbus/c-bus_telephony_application.mspec         |   4 +-
 .../c-bus_temperature_broadcast_application.mspec  |   4 +-
 .../cbus/c-bus_trigger_control_application.mspec   |  12 +-
 29 files changed, 796 insertions(+), 90 deletions(-)

diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlCommandType.go b/plc4go/protocols/cbus/readwrite/model/AccessControlCommandType.go
index 9d59d340e..c6f01e2bf 100644
--- a/plc4go/protocols/cbus/readwrite/model/AccessControlCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/AccessControlCommandType.go
@@ -31,6 +31,7 @@ import (
 type AccessControlCommandType uint8
 
 type IAccessControlCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -61,6 +62,55 @@ func init() {
 	}
 }
 
+func (e AccessControlCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 0
+		}
+	case 0x01:
+		{ /* '0x01' */
+			return 0
+		}
+	case 0x02:
+		{ /* '0x02' */
+			return 0
+		}
+	case 0x03:
+		{ /* '0x03' */
+			return 0
+		}
+	case 0x04:
+		{ /* '0x04' */
+			return 0
+		}
+	case 0x05:
+		{ /* '0x05' */
+			return 0
+		}
+	case 0x06:
+		{ /* '0x06' */
+			return 2
+		}
+	case 0x07:
+		{ /* '0x07' */
+			return 2
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func AccessControlCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (AccessControlCommandType, error) {
+	for _, sizeValue := range AccessControlCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func AccessControlCommandTypeByValue(value uint8) (enum AccessControlCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go
index 1ce9d8848..a9e31f1b4 100644
--- a/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go
@@ -31,6 +31,7 @@ import (
 type AirConditioningCommandType uint8
 
 type IAirConditioningCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -83,6 +84,99 @@ func init() {
 	}
 }
 
+func (e AirConditioningCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 0
+		}
+	case 0x01:
+		{ /* '0x01' */
+			return 5
+		}
+	case 0x02:
+		{ /* '0x02' */
+			return 5
+		}
+	case 0x03:
+		{ /* '0x03' */
+			return 4
+		}
+	case 0x04:
+		{ /* '0x04' */
+			return 4
+		}
+	case 0x05:
+		{ /* '0x05' */
+			return 1
+		}
+	case 0x06:
+		{ /* '0x06' */
+			return 5
+		}
+	case 0x07:
+		{ /* '0x07' */
+			return 5
+		}
+	case 0x08:
+		{ /* '0x08' */
+			return 5
+		}
+	case 0x09:
+		{ /* '0x09' */
+			return 5
+		}
+	case 0x0A:
+		{ /* '0x0A' */
+			return 4
+		}
+	case 0x0B:
+		{ /* '0x0B' */
+			return 4
+		}
+	case 0x0C:
+		{ /* '0x0C' */
+			return 4
+		}
+	case 0x0D:
+		{ /* '0x0D' */
+			return 4
+		}
+	case 0x0E:
+		{ /* '0x0E' */
+			return 4
+		}
+	case 0x0F:
+		{ /* '0x0F' */
+			return 1
+		}
+	case 0x10:
+		{ /* '0x10' */
+			return 1
+		}
+	case 0x11:
+		{ /* '0x11' */
+			return 7
+		}
+	case 0x12:
+		{ /* '0x12' */
+			return 7
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func AirConditioningCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (AirConditioningCommandType, error) {
+	for _, sizeValue := range AirConditioningCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func AirConditioningCommandTypeByValue(value uint8) (enum AirConditioningCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandType.go b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandType.go
index beca120d1..bcdf92307 100644
--- a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandType.go
@@ -31,6 +31,7 @@ import (
 type ClockAndTimekeepingCommandType uint8
 
 type IClockAndTimekeepingCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -49,6 +50,31 @@ func init() {
 	}
 }
 
+func (e ClockAndTimekeepingCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 0xFF
+		}
+	case 0x01:
+		{ /* '0x01' */
+			return 0
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func ClockAndTimekeepingCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (ClockAndTimekeepingCommandType, error) {
+	for _, sizeValue := range ClockAndTimekeepingCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func ClockAndTimekeepingCommandTypeByValue(value uint8) (enum ClockAndTimekeepingCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/EnableControlCommandType.go b/plc4go/protocols/cbus/readwrite/model/EnableControlCommandType.go
index dbc9a9989..df7d6d4b6 100644
--- a/plc4go/protocols/cbus/readwrite/model/EnableControlCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/EnableControlCommandType.go
@@ -31,6 +31,7 @@ import (
 type EnableControlCommandType uint8
 
 type IEnableControlCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -47,6 +48,27 @@ func init() {
 	}
 }
 
+func (e EnableControlCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 1
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func EnableControlCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (EnableControlCommandType, error) {
+	for _, sizeValue := range EnableControlCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func EnableControlCommandTypeByValue(value uint8) (enum EnableControlCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandType.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandType.go
index 21377a5a2..b24514e14 100644
--- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandType.go
@@ -31,6 +31,7 @@ import (
 type ErrorReportingCommandType uint8
 
 type IErrorReportingCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -53,6 +54,39 @@ func init() {
 	}
 }
 
+func (e ErrorReportingCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 8
+		}
+	case 0x01:
+		{ /* '0x01' */
+			return 8
+		}
+	case 0x02:
+		{ /* '0x02' */
+			return 8
+		}
+	case 0x03:
+		{ /* '0x03' */
+			return 8
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func ErrorReportingCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (ErrorReportingCommandType, error) {
+	for _, sizeValue := range ErrorReportingCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func ErrorReportingCommandTypeByValue(value uint8) (enum ErrorReportingCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/LightingCommandType.go b/plc4go/protocols/cbus/readwrite/model/LightingCommandType.go
index 80206d303..ba2bbb139 100644
--- a/plc4go/protocols/cbus/readwrite/model/LightingCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/LightingCommandType.go
@@ -31,6 +31,7 @@ import (
 type LightingCommandType uint8
 
 type ILightingCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -55,6 +56,43 @@ func init() {
 	}
 }
 
+func (e LightingCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 1
+		}
+	case 0x01:
+		{ /* '0x01' */
+			return 1
+		}
+	case 0x02:
+		{ /* '0x02' */
+			return 2
+		}
+	case 0x03:
+		{ /* '0x03' */
+			return 1
+		}
+	case 0x04:
+		{ /* '0x04' */
+			return 4
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func LightingCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (LightingCommandType, error) {
+	for _, sizeValue := range LightingCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func LightingCommandTypeByValue(value uint8) (enum LightingCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/MeasurementCommandType.go b/plc4go/protocols/cbus/readwrite/model/MeasurementCommandType.go
index 0c67bfe2b..42a738f12 100644
--- a/plc4go/protocols/cbus/readwrite/model/MeasurementCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/MeasurementCommandType.go
@@ -31,6 +31,7 @@ import (
 type MeasurementCommandType uint8
 
 type IMeasurementCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -47,6 +48,27 @@ func init() {
 	}
 }
 
+func (e MeasurementCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 6
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func MeasurementCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (MeasurementCommandType, error) {
+	for _, sizeValue := range MeasurementCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func MeasurementCommandTypeByValue(value uint8) (enum MeasurementCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlCommandType.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlCommandType.go
index 4bc5c3410..e9f00c19f 100644
--- a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlCommandType.go
@@ -31,6 +31,7 @@ import (
 type MediaTransportControlCommandType uint8
 
 type IMediaTransportControlCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -87,6 +88,79 @@ func init() {
 	}
 }
 
+func (e MediaTransportControlCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 0
+		}
+	case 0x01:
+		{ /* '0x01' */
+			return 0
+		}
+	case 0x02:
+		{ /* '0x02' */
+			return 1
+		}
+	case 0x03:
+		{ /* '0x03' */
+			return 1
+		}
+	case 0x04:
+		{ /* '0x04' */
+			return 2
+		}
+	case 0x05:
+		{ /* '0x05' */
+			return 4
+		}
+	case 0x06:
+		{ /* '0x06' */
+			return 1
+		}
+	case 0x07:
+		{ /* '0x07' */
+			return 1
+		}
+	case 0x08:
+		{ /* '0x08' */
+			return 1
+		}
+	case 0x09:
+		{ /* '0x09' */
+			return 1
+		}
+	case 0x0A:
+		{ /* '0x0A' */
+			return 3
+		}
+	case 0x0B:
+		{ /* '0x0B' */
+			return 1
+		}
+	case 0x0C:
+		{ /* '0x0C' */
+			return 1
+		}
+	case 0x0D:
+		{ /* '0x0D' */
+			return 1
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func MediaTransportControlCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (MediaTransportControlCommandType, error) {
+	for _, sizeValue := range MediaTransportControlCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func MediaTransportControlCommandTypeByValue(value uint8) (enum MediaTransportControlCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlData.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlData.go
index 587ef55eb..8fefc7983 100644
--- a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlData.go
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlData.go
@@ -230,6 +230,8 @@ func MediaTransportControlDataParse(readBuffer utils.ReadBuffer) (MediaTransport
 		_childTemp, typeSwitchError = MediaTransportControlDataTrackNameParse(readBuffer, commandTypeContainer)
 	case commandType == MediaTransportControlCommandType_SELECTION_NAME: // MediaTransportControlDataSelectionName
 		_childTemp, typeSwitchError = MediaTransportControlDataSelectionNameParse(readBuffer, commandTypeContainer)
+	case commandType == MediaTransportControlCommandType_CATEGORY_NAME: // MediaTransportControlDataCategoryName
+		_childTemp, typeSwitchError = MediaTransportControlDataCategoryNameParse(readBuffer, commandTypeContainer)
 	default:
 		typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v]", commandType)
 	}
diff --git a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataCategoryName.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataCategoryName.go
new file mode 100644
index 000000000..2e2fc10d2
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataCategoryName.go
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+	"github.com/apache/plc4x/plc4go/spi/utils"
+	"github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataCategoryName is the corresponding interface of MediaTransportControlDataCategoryName
+type MediaTransportControlDataCategoryName interface {
+	utils.LengthAware
+	utils.Serializable
+	MediaTransportControlData
+	// GetCategoryName returns CategoryName (property field)
+	GetCategoryName() string
+}
+
+// MediaTransportControlDataCategoryNameExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataCategoryName.
+// This is useful for switch cases.
+type MediaTransportControlDataCategoryNameExactly interface {
+	MediaTransportControlDataCategoryName
+	isMediaTransportControlDataCategoryName() bool
+}
+
+// _MediaTransportControlDataCategoryName is the data-structure of this message
+type _MediaTransportControlDataCategoryName struct {
+	*_MediaTransportControlData
+	CategoryName string
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataCategoryName) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+	m.CommandTypeContainer = commandTypeContainer
+	m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataCategoryName) GetParent() MediaTransportControlData {
+	return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataCategoryName) GetCategoryName() string {
+	return m.CategoryName
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataCategoryName factory function for _MediaTransportControlDataCategoryName
+func NewMediaTransportControlDataCategoryName(categoryName string, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataCategoryName {
+	_result := &_MediaTransportControlDataCategoryName{
+		CategoryName:               categoryName,
+		_MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+	}
+	_result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+	return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataCategoryName(structType interface{}) MediaTransportControlDataCategoryName {
+	if casted, ok := structType.(MediaTransportControlDataCategoryName); ok {
+		return casted
+	}
+	if casted, ok := structType.(*MediaTransportControlDataCategoryName); ok {
+		return *casted
+	}
+	return nil
+}
+
+func (m *_MediaTransportControlDataCategoryName) GetTypeName() string {
+	return "MediaTransportControlDataCategoryName"
+}
+
+func (m *_MediaTransportControlDataCategoryName) GetLengthInBits() uint16 {
+	return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataCategoryName) GetLengthInBitsConditional(lastItem bool) uint16 {
+	lengthInBits := uint16(m.GetParentLengthInBits())
+
+	// Simple field (categoryName)
+	lengthInBits += uint16(int32((int32(m.GetCommandTypeContainer().NumBytes()) - int32(int32(1)))) * int32(int32(8)))
+
+	return lengthInBits
+}
+
+func (m *_MediaTransportControlDataCategoryName) GetLengthInBytes() uint16 {
+	return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataCategoryNameParse(readBuffer utils.ReadBuffer, commandTypeContainer MediaTransportControlCommandTypeContainer) (MediaTransportControlDataCategoryName, error) {
+	positionAware := readBuffer
+	_ = positionAware
+	if pullErr := readBuffer.PullContext("MediaTransportControlDataCategoryName"); pullErr != nil {
+		return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataCategoryName")
+	}
+	currentPos := positionAware.GetPos()
+	_ = currentPos
+
+	// Simple Field (categoryName)
+	_categoryName, _categoryNameErr := readBuffer.ReadString("categoryName", uint32(((commandTypeContainer.NumBytes())-(1))*(8)))
+	if _categoryNameErr != nil {
+		return nil, errors.Wrap(_categoryNameErr, "Error parsing 'categoryName' field of MediaTransportControlDataCategoryName")
+	}
+	categoryName := _categoryName
+
+	if closeErr := readBuffer.CloseContext("MediaTransportControlDataCategoryName"); closeErr != nil {
+		return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataCategoryName")
+	}
+
+	// Create a partially initialized instance
+	_child := &_MediaTransportControlDataCategoryName{
+		_MediaTransportControlData: &_MediaTransportControlData{},
+		CategoryName:               categoryName,
+	}
+	_child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+	return _child, nil
+}
+
+func (m *_MediaTransportControlDataCategoryName) Serialize(writeBuffer utils.WriteBuffer) error {
+	positionAware := writeBuffer
+	_ = positionAware
+	ser := func() error {
+		if pushErr := writeBuffer.PushContext("MediaTransportControlDataCategoryName"); pushErr != nil {
+			return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataCategoryName")
+		}
+
+		// Simple Field (categoryName)
+		categoryName := string(m.GetCategoryName())
+		_categoryNameErr := writeBuffer.WriteString("categoryName", uint32(((m.GetCommandTypeContainer().NumBytes())-(1))*(8)), "UTF-8", (categoryName))
+		if _categoryNameErr != nil {
+			return errors.Wrap(_categoryNameErr, "Error serializing 'categoryName' field")
+		}
+
+		if popErr := writeBuffer.PopContext("MediaTransportControlDataCategoryName"); popErr != nil {
+			return errors.Wrap(popErr, "Error popping for MediaTransportControlDataCategoryName")
+		}
+		return nil
+	}
+	return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataCategoryName) isMediaTransportControlDataCategoryName() bool {
+	return true
+}
+
+func (m *_MediaTransportControlDataCategoryName) 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/MeteringCommandType.go b/plc4go/protocols/cbus/readwrite/model/MeteringCommandType.go
index 6208070ac..1ce616df5 100644
--- a/plc4go/protocols/cbus/readwrite/model/MeteringCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/MeteringCommandType.go
@@ -31,6 +31,7 @@ import (
 type MeteringCommandType uint8
 
 type IMeteringCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -47,6 +48,27 @@ func init() {
 	}
 }
 
+func (e MeteringCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 0xFF
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func MeteringCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (MeteringCommandType, error) {
+	for _, sizeValue := range MeteringCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func MeteringCommandTypeByValue(value uint8) (enum MeteringCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityCommandType.go b/plc4go/protocols/cbus/readwrite/model/SecurityCommandType.go
index 0ca941cbf..eb0de4d78 100644
--- a/plc4go/protocols/cbus/readwrite/model/SecurityCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/SecurityCommandType.go
@@ -31,6 +31,7 @@ import (
 type SecurityCommandType uint8
 
 type ISecurityCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -51,6 +52,35 @@ func init() {
 	}
 }
 
+func (e SecurityCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 0
+		}
+	case 0x01:
+		{ /* '0x01' */
+			return 1
+		}
+	case 0x02:
+		{ /* '0x02' */
+			return 0xFF
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func SecurityCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (SecurityCommandType, error) {
+	for _, sizeValue := range SecurityCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func SecurityCommandTypeByValue(value uint8) (enum SecurityCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go b/plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go
index fffd9c8b9..3c5afc6e2 100644
--- a/plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go
@@ -31,6 +31,7 @@ import (
 type TelephonyCommandType uint8
 
 type ITelephonyCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -47,6 +48,27 @@ func init() {
 	}
 }
 
+func (e TelephonyCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 0xFF
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func TelephonyCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (TelephonyCommandType, error) {
+	for _, sizeValue := range TelephonyCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func TelephonyCommandTypeByValue(value uint8) (enum TelephonyCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandType.go b/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandType.go
index beff2c6d6..98c9dc4a1 100644
--- a/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandType.go
@@ -31,6 +31,7 @@ import (
 type TemperatureBroadcastCommandType uint8
 
 type ITemperatureBroadcastCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -47,6 +48,27 @@ func init() {
 	}
 }
 
+func (e TemperatureBroadcastCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 2
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func TemperatureBroadcastCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (TemperatureBroadcastCommandType, error) {
+	for _, sizeValue := range TemperatureBroadcastCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func TemperatureBroadcastCommandTypeByValue(value uint8) (enum TemperatureBroadcastCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandType.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandType.go
index 205172d96..786a674d3 100644
--- a/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandType.go
+++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandType.go
@@ -31,6 +31,7 @@ import (
 type TriggerControlCommandType uint8
 
 type ITriggerControlCommandType interface {
+	NumberOfArguments() uint8
 	Serialize(writeBuffer utils.WriteBuffer) error
 }
 
@@ -55,6 +56,43 @@ func init() {
 	}
 }
 
+func (e TriggerControlCommandType) NumberOfArguments() uint8 {
+	switch e {
+	case 0x00:
+		{ /* '0x00' */
+			return 1
+		}
+	case 0x01:
+		{ /* '0x01' */
+			return 0
+		}
+	case 0x02:
+		{ /* '0x02' */
+			return 0
+		}
+	case 0x03:
+		{ /* '0x03' */
+			return 0
+		}
+	case 0x04:
+		{ /* '0x04' */
+			return 4
+		}
+	default:
+		{
+			return 0
+		}
+	}
+}
+
+func TriggerControlCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (TriggerControlCommandType, error) {
+	for _, sizeValue := range TriggerControlCommandTypeValues {
+		if sizeValue.NumberOfArguments() == value {
+			return sizeValue, nil
+		}
+	}
+	return 0, errors.Errorf("enum for %v describing NumberOfArguments not found", value)
+}
 func TriggerControlCommandTypeByValue(value uint8) (enum TriggerControlCommandType, ok bool) {
 	switch value {
 	case 0x00:
diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go b/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go
index 01e0555ac..eba4ce85f 100644
--- a/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go
+++ b/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go
@@ -632,8 +632,9 @@ const (
 	KnxManufacturer_M_DELTA_ELECTRONICS                                  KnxManufacturer = 592
 	KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_     KnxManufacturer = 593
 	KnxManufacturer_M_KG_POWER                                           KnxManufacturer = 594
-	KnxManufacturer_M_ABB___RESERVED                                     KnxManufacturer = 595
-	KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED                    KnxManufacturer = 596
+	KnxManufacturer_M_ZHEJIANG_MOORGEN_INTELLIGENT_TECHNOLOGY_CO___LTD   KnxManufacturer = 595
+	KnxManufacturer_M_ABB___RESERVED                                     KnxManufacturer = 596
+	KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED                    KnxManufacturer = 597
 )
 
 var KnxManufacturerValues []KnxManufacturer
@@ -1236,6 +1237,7 @@ func init() {
 		KnxManufacturer_M_DELTA_ELECTRONICS,
 		KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_,
 		KnxManufacturer_M_KG_POWER,
+		KnxManufacturer_M_ZHEJIANG_MOORGEN_INTELLIGENT_TECHNOLOGY_CO___LTD,
 		KnxManufacturer_M_ABB___RESERVED,
 		KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED,
 	}
@@ -3449,10 +3451,14 @@ func (e KnxManufacturer) Number() uint16 {
 		}
 	case 595:
 		{ /* '595' */
-			return 43954
+			return 653
 		}
 	case 596:
 		{ /* '596' */
+			return 43954
+		}
+	case 597:
+		{ /* '597' */
 			return 43959
 		}
 	case 6:
@@ -5855,10 +5861,14 @@ func (e KnxManufacturer) Name() string {
 		}
 	case 595:
 		{ /* '595' */
-			return "ABB - reserved"
+			return "Zhejiang Moorgen Intelligent Technology Co., Ltd"
 		}
 	case 596:
 		{ /* '596' */
+			return "ABB - reserved"
+		}
+	case 597:
+		{ /* '597' */
 			return "Busch-Jaeger Elektro - reserved"
 		}
 	case 6:
@@ -7157,8 +7167,10 @@ func KnxManufacturerByValue(value uint16) (enum KnxManufacturer, ok bool) {
 	case 594:
 		return KnxManufacturer_M_KG_POWER, true
 	case 595:
-		return KnxManufacturer_M_ABB___RESERVED, true
+		return KnxManufacturer_M_ZHEJIANG_MOORGEN_INTELLIGENT_TECHNOLOGY_CO___LTD, true
 	case 596:
+		return KnxManufacturer_M_ABB___RESERVED, true
+	case 597:
 		return KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED, true
 	case 6:
 		return KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO, true
@@ -8356,6 +8368,8 @@ func KnxManufacturerByName(value string) (enum KnxManufacturer, ok bool) {
 		return KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_, true
 	case "M_KG_POWER":
 		return KnxManufacturer_M_KG_POWER, true
+	case "M_ZHEJIANG_MOORGEN_INTELLIGENT_TECHNOLOGY_CO___LTD":
+		return KnxManufacturer_M_ZHEJIANG_MOORGEN_INTELLIGENT_TECHNOLOGY_CO___LTD, true
 	case "M_ABB___RESERVED":
 		return KnxManufacturer_M_ABB___RESERVED, true
 	case "M_BUSCH_JAEGER_ELEKTRO___RESERVED":
@@ -9601,6 +9615,8 @@ func (e KnxManufacturer) PLC4XEnumName() string {
 		return "M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_"
 	case KnxManufacturer_M_KG_POWER:
 		return "M_KG_POWER"
+	case KnxManufacturer_M_ZHEJIANG_MOORGEN_INTELLIGENT_TECHNOLOGY_CO___LTD:
+		return "M_ZHEJIANG_MOORGEN_INTELLIGENT_TECHNOLOGY_CO___LTD"
 	case KnxManufacturer_M_ABB___RESERVED:
 		return "M_ABB___RESERVED"
 	case KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED:
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_access_control_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_access_control_application.mspec
index f0946ff22..f6b6f7dbf 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_access_control_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_access_control_application.mspec
@@ -121,15 +121,15 @@
     ['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 AccessControlCommandType(uint 8 numberOfArguments)
+    ['0x00' CLOSE_ACCESS_POINT          ['0']]
+    ['0x01' LOCK_ACCESS_POINT           ['0']]
+    ['0x02' ACCESS_POINT_LEFT_OPEN      ['0']]
+    ['0x03' ACCESS_POINT_FORCED_OPEN    ['0']]
+    ['0x04' ACCESS_POINT_CLOSED         ['0']]
+    ['0x05' REQUEST_TO_EXIT             ['0']]
+    ['0x06' VALID_ACCESS                ['2']]
+    ['0x07' INVALID_ACCESS              ['2']]
 ]
 
 [enum uint 4 AccessControlCategory
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_air_conditioning_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_air_conditioning_application.mspec
index 53cf89dd8..de0276110 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_air_conditioning_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_air_conditioning_application.mspec
@@ -175,26 +175,26 @@
     ['0xA9' AirConditioningCommandHumidityScheduleEntry         ['HUMIDITY_SCHEDULE_ENTRY',         '9']]
 ]
 
-[enum uint 4 AirConditioningCommandType
-    ['0x00' SET_ZONE_GROUP_OFF              ]
-    ['0x01' ZONE_HVAC_PLANT_STATUS          ]
-    ['0x02' ZONE_HUMIDITY_PLANT_STATUS      ]
-    ['0x03' ZONE_TEMPERATURE                ]
-    ['0x04' ZONE_HUMIDITY                   ]
-    ['0x05' REFRESH                         ]
-    ['0x06' SET_ZONE_HVAC_MODE              ]
-    ['0x07' SET_PLANT_HVAC_LEVEL            ]
-    ['0x08' SET_ZONE_HUMIDITY_MODE          ]
-    ['0x09' SET_PLANT_HUMIDITY_LEVEL        ]
-    ['0x0A' SET_HVAC_UPPER_GUARD_LIMIT      ]
-    ['0x0B' SET_HVAC_LOWER_GUARD_LIMIT      ]
-    ['0x0C' SET_HVAC_SETBACK_LIMIT          ]
-    ['0x0D' SET_HUMIDITY_UPPER_GUARD_LIMIT  ]
-    ['0x0E' SET_HUMIDITY_LOWER_GUARD_LIMIT  ]
-    ['0x0F' SET_ZONE_GROUP_ON               ]
-    ['0x10' SET_HUMIDITY_SETBACK_LIMIT      ]
-    ['0x11' HVAC_SCHEDULE_ENTRY             ]
-    ['0x12' HUMIDITY_SCHEDULE_ENTRY         ]
+[enum uint 4 AirConditioningCommandType(uint 8 numberOfArguments)
+    ['0x00' SET_ZONE_GROUP_OFF              ['0']]
+    ['0x01' ZONE_HVAC_PLANT_STATUS          ['5']]
+    ['0x02' ZONE_HUMIDITY_PLANT_STATUS      ['5']]
+    ['0x03' ZONE_TEMPERATURE                ['4']]
+    ['0x04' ZONE_HUMIDITY                   ['4']]
+    ['0x05' REFRESH                         ['1']]
+    ['0x06' SET_ZONE_HVAC_MODE              ['5']]
+    ['0x07' SET_PLANT_HVAC_LEVEL            ['5']]
+    ['0x08' SET_ZONE_HUMIDITY_MODE          ['5']]
+    ['0x09' SET_PLANT_HUMIDITY_LEVEL        ['5']]
+    ['0x0A' SET_HVAC_UPPER_GUARD_LIMIT      ['4']]
+    ['0x0B' SET_HVAC_LOWER_GUARD_LIMIT      ['4']]
+    ['0x0C' SET_HVAC_SETBACK_LIMIT          ['4']]
+    ['0x0D' SET_HUMIDITY_UPPER_GUARD_LIMIT  ['4']]
+    ['0x0E' SET_HUMIDITY_LOWER_GUARD_LIMIT  ['4']]
+    ['0x0F' SET_ZONE_GROUP_ON               ['1']]
+    ['0x10' SET_HUMIDITY_SETBACK_LIMIT      ['1']]
+    ['0x11' HVAC_SCHEDULE_ENTRY             ['7']]
+    ['0x12' HUMIDITY_SCHEDULE_ENTRY         ['7']]
 ]
 
 [type HVACTemperature
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_clock_and_timekeeping_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_clock_and_timekeeping_application.mspec
index c6fb85766..6661435ba 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_clock_and_timekeeping_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_clock_and_timekeeping_application.mspec
@@ -58,7 +58,7 @@
     ['0x11' MediaTransportControlCommandRequestRefresh                  ['REQUEST_REFRESH',         '1']]
 ]
 
-[enum uint 4 ClockAndTimekeepingCommandType
-    ['0x00' UPDATE_NETWORK_VARIABLE ]
-    ['0x01' REQUEST_REFRESH         ]
+[enum uint 4 ClockAndTimekeepingCommandType(uint 8 numberOfArguments)
+    ['0x00' UPDATE_NETWORK_VARIABLE ['0xFF']]
+    ['0x01' REQUEST_REFRESH         ['0']]
 ]
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_enable_control_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_enable_control_application.mspec
index 61cc8636d..18ecc8baa 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_enable_control_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_enable_control_application.mspec
@@ -45,6 +45,6 @@
     ['0x7A' EnableControlCommandSetNetworkVariable15_2Bytes      ['SET_NETWORK_VARIABLE',   '2']]
 ]
 
-[enum uint 4 EnableControlCommandType
-    ['0x00' SET_NETWORK_VARIABLE   ]
+[enum uint 4 EnableControlCommandType(uint 8 numberOfArguments)
+    ['0x00' SET_NETWORK_VARIABLE   ['1']]
 ]
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_error_reporting_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_error_reporting_application.mspec
index caa1880bb..f3e2c62d7 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_error_reporting_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_error_reporting_application.mspec
@@ -48,11 +48,11 @@
     ['0x35' ErrorReportingCommandClearMostSevere    ['CLEAR_MOST_SEVERE', '5']]
 ]
 
-[enum uint 4 ErrorReportingCommandType
-    ['0x00' DEPRECATED          ]
-    ['0x01' ERROR_REPORT        ]
-    ['0x02' ACKNOWLEDGE         ]
-    ['0x03' CLEAR_MOST_SEVERE   ]
+[enum uint 4 ErrorReportingCommandType(uint 8 numberOfArguments)
+    ['0x00' DEPRECATED          ['8']]
+    ['0x01' ERROR_REPORT        ['8']]
+    ['0x02' ACKNOWLEDGE         ['8']]
+    ['0x03' CLEAR_MOST_SEVERE   ['8']]
 ]
 
 [enum uint 3 ErrorReportingSeverity
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_lighting_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_lighting_application.mspec
index be49513e3..5d690eaad 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_lighting_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_lighting_application.mspec
@@ -194,10 +194,10 @@
     ['0xBF' LightingCommandLabel_32Bytes             ['LABEL',          '31' ]]
 ]
 
-[enum uint 4 LightingCommandType
-    ['0x00' OFF           ]
-    ['0x01' ON            ]
-    ['0x02' RAMP_TO_LEVEL ]
-    ['0x03' TERMINATE_RAMP]
-    ['0x04' LABEL         ]
+[enum uint 4 LightingCommandType(uint 8 numberOfArguments)
+    ['0x00' OFF            ['1']]
+    ['0x01' ON             ['1']]
+    ['0x02' RAMP_TO_LEVEL  ['2']]
+    ['0x03' TERMINATE_RAMP ['1']]
+    ['0x04' LABEL          ['4']]
 ]
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_measurement_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_measurement_application.mspec
index 25403bf33..14356a6fe 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_measurement_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_measurement_application.mspec
@@ -40,8 +40,8 @@
     ['0x0E' MeasurementCommandChannelMeasurementData    ['MEASUREMENT_EVENT',  '6']]
 ]
 
-[enum uint 4 MeasurementCommandType
-    ['0x00' MEASUREMENT_EVENT              ]
+[enum uint 4 MeasurementCommandType(uint 8 numberOfArguments)
+    ['0x00' MEASUREMENT_EVENT              ['6']]
 ]
 
 [enum uint 8 MeasurementUnits
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_media_transport_control_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_media_transport_control_application.mspec
index b3b07f41f..1e1da8cf2 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_media_transport_control_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_media_transport_control_application.mspec
@@ -130,6 +130,9 @@
         ['SELECTION_NAME'   *SelectionName(MediaTransportControlCommandTypeContainer commandTypeContainer)
              [simple vstring '(commandTypeContainer.numBytes-1)*8' selectionName                                ]
         ]
+        ['CATEGORY_NAME'    *CategoryName(MediaTransportControlCommandTypeContainer commandTypeContainer)
+             [simple vstring '(commandTypeContainer.numBytes-1)*8' categoryName                                 ]
+        ]
     ]
 ]
 
@@ -250,26 +253,26 @@
     ['0xDF' MediaTransportControlCommandCategoryName_31Bytes                ['CATEGORY_NAME',                          '31']]
 ]
 
-[enum uint 4 MediaTransportControlCommandType
-    ['0x00' STOP                                    ]
-    ['0x01' PLAY                                    ]
-    ['0x02' PAUSE_RESUME                            ]
-    ['0x03' SELECT_CATEGORY                         ]
-    ['0x04' SELECT_SELECTION                        ]
-    ['0x05' SELECT_TRACK                            ]
-    ['0x06' SHUFFLE_ON_OFF                          ]
-    ['0x07' REPEAT_ON_OFF                           ]
-    ['0x08' NEXT_PREVIOUS_CATEGORY                  ]
-    ['0x09' NEXT_PREVIOUS_SELECTION                 ]
-    ['0x09' NEXT_PREVIOUS_TRACK                     ]
-    ['0x09' FAST_FORWARD                            ]
-    ['0x09' REWIND                                  ]
-    ['0x09' SOURCE_POWER_CONTROL                    ]
-    ['0x09' TOTAL_TRACKS                            ]
-    ['0x09' STATUS_REQUEST                          ]
-    ['0x09' ENUMERATE_CATEGORIES_SELECTIONS_TRACKS  ]
-    ['0x0A' ENUMERATION_SIZE                        ]
-    ['0x0B' TRACK_NAME                              ]
-    ['0x0C' SELECTION_NAME                          ]
-    ['0x0D' CATEGORY_NAME                           ]
+[enum uint 4 MediaTransportControlCommandType(uint 8 numberOfArguments)
+    ['0x00' STOP                                    ['0']]
+    ['0x01' PLAY                                    ['0']]
+    ['0x02' PAUSE_RESUME                            ['1']]
+    ['0x03' SELECT_CATEGORY                         ['1']]
+    ['0x04' SELECT_SELECTION                        ['2']]
+    ['0x05' SELECT_TRACK                            ['4']]
+    ['0x06' SHUFFLE_ON_OFF                          ['1']]
+    ['0x07' REPEAT_ON_OFF                           ['1']]
+    ['0x08' NEXT_PREVIOUS_CATEGORY                  ['1']]
+    ['0x09' NEXT_PREVIOUS_SELECTION                 ['1']]
+    ['0x09' NEXT_PREVIOUS_TRACK                     ['1']]
+    ['0x09' FAST_FORWARD                            ['1']]
+    ['0x09' REWIND                                  ['1']]
+    ['0x09' SOURCE_POWER_CONTROL                    ['1']]
+    ['0x09' TOTAL_TRACKS                            ['4']]
+    ['0x09' STATUS_REQUEST                          ['0']]
+    ['0x09' ENUMERATE_CATEGORIES_SELECTIONS_TRACKS  ['2']]
+    ['0x0A' ENUMERATION_SIZE                        ['3']]
+    ['0x0B' TRACK_NAME                              ['1']]
+    ['0x0C' SELECTION_NAME                          ['1']]
+    ['0x0D' CATEGORY_NAME                           ['1']]
 ]
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_metering_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_metering_application.mspec
index f363c1395..e9043dd23 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_metering_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_metering_application.mspec
@@ -63,6 +63,6 @@
     ['0x0F' MeteringCommandEvent_7Bytes                    ['EVENT',  '7']]
 ]
 
-[enum uint 4 MeteringCommandType
-    ['0x00' EVENT     ]
+[enum uint 4 MeteringCommandType(uint 8 numberOfArguments)
+    ['0x00' EVENT     ['0xFF']]
 ]
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_security_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_security_application.mspec
index 5635e1847..2d5981829 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_security_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_security_application.mspec
@@ -293,10 +293,10 @@
     ['0xFF' SecurityCommandLongOn_31Bytes                ['ON',    '31']]
 ]
 
-[enum uint 4 SecurityCommandType
-    ['0x00' OFF     ]
-    ['0x01' ON      ]
-    ['0x02' EVENT   ]
+[enum uint 4 SecurityCommandType(uint 8 numberOfArguments)
+    ['0x00' OFF     ['0']]
+    ['0x01' ON      ['1']]
+    ['0x02' EVENT   ['0xFF']]
 ]
 
 [type SecurityArmCode
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_telephony_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_telephony_application.mspec
index 096795267..bd4518de7 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_telephony_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_telephony_application.mspec
@@ -104,8 +104,8 @@
     ['0xBF' TelephonyCommandLineOffHook_31Bytes   ['EVENT', '31']]
 ]
 
-[enum uint 4 TelephonyCommandType
-    ['0x00' EVENT ]
+[enum uint 4 TelephonyCommandType(uint 8 numberOfArguments)
+    ['0x00' EVENT ['0xFF']]
 ]
 
 [enum uint 8 LineOffHookReason
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_temperature_broadcast_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_temperature_broadcast_application.mspec
index a95445336..26afb1df6 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_temperature_broadcast_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_temperature_broadcast_application.mspec
@@ -46,6 +46,6 @@
     ['0x7A' TemperatureBroadcastCommandSetBroadcastEvent15_2Bytes      ['BROADCAST_EVENT',   '2']]
 ]
 
-[enum uint 4 TemperatureBroadcastCommandType
-    ['0x00' BROADCAST_EVENT   ]
+[enum uint 4 TemperatureBroadcastCommandType(uint 8 numberOfArguments)
+    ['0x00' BROADCAST_EVENT   ['2']]
 ]
diff --git a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_trigger_control_application.mspec b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_trigger_control_application.mspec
index 2789d0d2b..2b6a1dcf8 100644
--- a/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_trigger_control_application.mspec
+++ b/protocols/c-bus/src/main/resources/protocols/cbus/c-bus_trigger_control_application.mspec
@@ -97,12 +97,12 @@
     ['0xBF' TriggerControlCommandLabel_31Bytes              ['LABEL',          '31']]
 ]
 
-[enum uint 4 TriggerControlCommandType
-    ['0x00' TRIGGER_EVENT   ]
-    ['0x01' TRIGGER_MIN     ]
-    ['0x02' TRIGGER_MAX     ]
-    ['0x03' INDICATOR_KILL  ]
-    ['0x04' LABEL           ]
+[enum uint 4 TriggerControlCommandType(uint 8 numberOfArguments)
+    ['0x00' TRIGGER_EVENT   ['1']]
+    ['0x01' TRIGGER_MIN     ['0']]
+    ['0x02' TRIGGER_MAX     ['0']]
+    ['0x03' INDICATOR_KILL  ['0']]
+    ['0x04' LABEL           ['4']]
 ]
 
 // TODO: maybe can be merged with lightning labels