You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/07/19 09:35:06 UTC
[plc4x] 02/02: feat(cbus): implemented media transport 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 f4b45a446233ada6523fa0a67d7a2bd5de0ec1d6
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Jul 19 11:34:55 2022 +0200
feat(cbus): implemented media transport control application
---
plc4go/protocols/cbus/readwrite/ParserHelper.go | 2 +
plc4go/protocols/cbus/readwrite/XmlParserHelper.go | 2 +
.../cbus/readwrite/model/ApplicationId.go | 8 +
.../cbus/readwrite/model/ApplicationIdContainer.go | 16 +-
.../model/MediaTransportControlCommandType.go | 239 +++
.../MediaTransportControlCommandTypeContainer.go | 1974 ++++++++++++++++++++
.../readwrite/model/MediaTransportControlData.go | 307 +++
...ontrolDataEnumerateCategoriesSelectionTracks.go | 294 +++
.../MediaTransportControlDataEnumerationsSize.go | 320 ++++
.../model/MediaTransportControlDataFastForward.go | 336 ++++
...ediaTransportControlDataNextPreviousCategory.go | 234 +++
...diaTransportControlDataNextPreviousSelection.go | 234 +++
.../MediaTransportControlDataNextPreviousTrack.go | 234 +++
.../model/MediaTransportControlDataPauseResume.go | 234 +++
.../model/MediaTransportControlDataPlay.go | 155 ++
.../model/MediaTransportControlDataRepeatOnOff.go | 251 +++
.../model/MediaTransportControlDataRewind.go | 336 ++++
.../MediaTransportControlDataSelectionName.go | 191 ++
.../model/MediaTransportControlDataSetCategory.go | 191 ++
.../model/MediaTransportControlDataSetSelection.go | 217 +++
.../model/MediaTransportControlDataSetTrack.go | 269 +++
.../model/MediaTransportControlDataShuffleOnOff.go | 234 +++
.../MediaTransportControlDataSourcePowerControl.go | 234 +++
.../MediaTransportControlDataStatusRequest.go | 155 ++
.../model/MediaTransportControlDataStop.go | 155 ++
.../model/MediaTransportControlDataTotalTracks.go | 269 +++
.../model/MediaTransportControlDataTrackName.go | 191 ++
plc4go/protocols/cbus/readwrite/model/SALData.go | 2 +
.../cbus/readwrite/model/SALDataMediaTransport.go | 205 ++
.../protocols/cbus/readwrite/model/StaticHelper.go | 10 +
.../java/cbus/readwrite/utils/StaticHelper.java | 12 +-
.../org/apache/plc4x/java/cbus/ReferenceTest.java | 22 +
.../src/main/resources/protocols/cbus/c-bus.mspec | 263 ++-
33 files changed, 7786 insertions(+), 10 deletions(-)
diff --git a/plc4go/protocols/cbus/readwrite/ParserHelper.go b/plc4go/protocols/cbus/readwrite/ParserHelper.go
index 7383b9cb6..51cd487f5 100644
--- a/plc4go/protocols/cbus/readwrite/ParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/ParserHelper.go
@@ -173,6 +173,8 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re
return model.ZoneStatusParse(io)
case "BridgeAddress":
return model.BridgeAddressParse(io)
+ case "MediaTransportControlData":
+ return model.MediaTransportControlDataParse(io)
case "StatusByte":
return model.StatusByteParse(io)
case "LightingLabelOptions":
diff --git a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
index f787f23c1..092627e69 100644
--- a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go
@@ -198,6 +198,8 @@ func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArgu
return model.ZoneStatusParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BridgeAddress":
return model.BridgeAddressParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "MediaTransportControlData":
+ return model.MediaTransportControlDataParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "StatusByte":
return model.StatusByteParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "LightingLabelOptions":
diff --git a/plc4go/protocols/cbus/readwrite/model/ApplicationId.go b/plc4go/protocols/cbus/readwrite/model/ApplicationId.go
index 5d7e1d5a1..a344c03cf 100644
--- a/plc4go/protocols/cbus/readwrite/model/ApplicationId.go
+++ b/plc4go/protocols/cbus/readwrite/model/ApplicationId.go
@@ -55,6 +55,7 @@ const (
ApplicationId_TELEPHONY_STATUS_AND_CONTROL ApplicationId = 0x11
ApplicationId_MEASUREMENT ApplicationId = 0x12
ApplicationId_TESTING ApplicationId = 0x13
+ ApplicationId_MEDIA_TRANSPORT_CONTROL ApplicationId = 0x14
)
var ApplicationIdValues []ApplicationId
@@ -82,6 +83,7 @@ func init() {
ApplicationId_TELEPHONY_STATUS_AND_CONTROL,
ApplicationId_MEASUREMENT,
ApplicationId_TESTING,
+ ApplicationId_MEDIA_TRANSPORT_CONTROL,
}
}
@@ -127,6 +129,8 @@ func ApplicationIdByValue(value uint8) (enum ApplicationId, ok bool) {
return ApplicationId_MEASUREMENT, true
case 0x13:
return ApplicationId_TESTING, true
+ case 0x14:
+ return ApplicationId_MEDIA_TRANSPORT_CONTROL, true
}
return 0, false
}
@@ -173,6 +177,8 @@ func ApplicationIdByName(value string) (enum ApplicationId, ok bool) {
return ApplicationId_MEASUREMENT, true
case "TESTING":
return ApplicationId_TESTING, true
+ case "MEDIA_TRANSPORT_CONTROL":
+ return ApplicationId_MEDIA_TRANSPORT_CONTROL, true
}
return 0, false
}
@@ -264,6 +270,8 @@ func (e ApplicationId) PLC4XEnumName() string {
return "MEASUREMENT"
case ApplicationId_TESTING:
return "TESTING"
+ case ApplicationId_MEDIA_TRANSPORT_CONTROL:
+ return "MEDIA_TRANSPORT_CONTROL"
}
return ""
}
diff --git a/plc4go/protocols/cbus/readwrite/model/ApplicationIdContainer.go b/plc4go/protocols/cbus/readwrite/model/ApplicationIdContainer.go
index b3042b83b..bd885caad 100644
--- a/plc4go/protocols/cbus/readwrite/model/ApplicationIdContainer.go
+++ b/plc4go/protocols/cbus/readwrite/model/ApplicationIdContainer.go
@@ -229,7 +229,7 @@ const (
ApplicationIdContainer_RESERVED_BD ApplicationIdContainer = 0xBD
ApplicationIdContainer_RESERVED_BE ApplicationIdContainer = 0xBE
ApplicationIdContainer_RESERVED_BF ApplicationIdContainer = 0xBF
- ApplicationIdContainer_MEDIA_TRANSPORT_C0 ApplicationIdContainer = 0xC0
+ ApplicationIdContainer_MEDIA_TRANSPORT_CONTROL_C0 ApplicationIdContainer = 0xC0
ApplicationIdContainer_RESERVED_C1 ApplicationIdContainer = 0xC1
ApplicationIdContainer_RESERVED_C2 ApplicationIdContainer = 0xC2
ApplicationIdContainer_RESERVED_C3 ApplicationIdContainer = 0xC3
@@ -492,7 +492,7 @@ func init() {
ApplicationIdContainer_RESERVED_BD,
ApplicationIdContainer_RESERVED_BE,
ApplicationIdContainer_RESERVED_BF,
- ApplicationIdContainer_MEDIA_TRANSPORT_C0,
+ ApplicationIdContainer_MEDIA_TRANSPORT_CONTROL_C0,
ApplicationIdContainer_RESERVED_C1,
ApplicationIdContainer_RESERVED_C2,
ApplicationIdContainer_RESERVED_C3,
@@ -2373,7 +2373,7 @@ func (e ApplicationIdContainer) ApplicationId() ApplicationId {
}
case 0xC0:
{ /* '0xC0' */
- return ApplicationId_RESERVED
+ return ApplicationId_MEDIA_TRANSPORT_CONTROL
}
case 0xC1:
{ /* '0xC1' */
@@ -3029,7 +3029,7 @@ func ApplicationIdContainerByValue(value uint8) (enum ApplicationIdContainer, ok
case 0xBF:
return ApplicationIdContainer_RESERVED_BF, true
case 0xC0:
- return ApplicationIdContainer_MEDIA_TRANSPORT_C0, true
+ return ApplicationIdContainer_MEDIA_TRANSPORT_CONTROL_C0, true
case 0xC1:
return ApplicationIdContainer_RESERVED_C1, true
case 0xC2:
@@ -3546,8 +3546,8 @@ func ApplicationIdContainerByName(value string) (enum ApplicationIdContainer, ok
return ApplicationIdContainer_RESERVED_BE, true
case "RESERVED_BF":
return ApplicationIdContainer_RESERVED_BF, true
- case "MEDIA_TRANSPORT_C0":
- return ApplicationIdContainer_MEDIA_TRANSPORT_C0, true
+ case "MEDIA_TRANSPORT_CONTROL_C0":
+ return ApplicationIdContainer_MEDIA_TRANSPORT_CONTROL_C0, true
case "RESERVED_C1":
return ApplicationIdContainer_RESERVED_C1, true
case "RESERVED_C2":
@@ -4109,8 +4109,8 @@ func (e ApplicationIdContainer) PLC4XEnumName() string {
return "RESERVED_BE"
case ApplicationIdContainer_RESERVED_BF:
return "RESERVED_BF"
- case ApplicationIdContainer_MEDIA_TRANSPORT_C0:
- return "MEDIA_TRANSPORT_C0"
+ case ApplicationIdContainer_MEDIA_TRANSPORT_CONTROL_C0:
+ return "MEDIA_TRANSPORT_CONTROL_C0"
case ApplicationIdContainer_RESERVED_C1:
return "RESERVED_C1"
case ApplicationIdContainer_RESERVED_C2:
diff --git a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlCommandType.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlCommandType.go
new file mode 100644
index 000000000..cacc400d5
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlCommandType.go
@@ -0,0 +1,239 @@
+/*
+ * 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.
+
+// MediaTransportControlCommandType is an enum
+type MediaTransportControlCommandType uint8
+
+type IMediaTransportControlCommandType interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ MediaTransportControlCommandType_STOP MediaTransportControlCommandType = 0x00
+ MediaTransportControlCommandType_PLAY MediaTransportControlCommandType = 0x01
+ MediaTransportControlCommandType_PAUSE_RESUME MediaTransportControlCommandType = 0x02
+ MediaTransportControlCommandType_SELECT_CATEGORY MediaTransportControlCommandType = 0x03
+ MediaTransportControlCommandType_SELECT_SELECTION MediaTransportControlCommandType = 0x04
+ MediaTransportControlCommandType_SELECT_TRACK MediaTransportControlCommandType = 0x05
+ MediaTransportControlCommandType_SHUFFLE_ON_OFF MediaTransportControlCommandType = 0x06
+ MediaTransportControlCommandType_REPEAT_ON_OFF MediaTransportControlCommandType = 0x07
+ MediaTransportControlCommandType_NEXT_PREVIOUS_CATEGORY MediaTransportControlCommandType = 0x08
+ MediaTransportControlCommandType_NEXT_PREVIOUS_SELECTION MediaTransportControlCommandType = 0x09
+ MediaTransportControlCommandType_NEXT_PREVIOUS_TRACK MediaTransportControlCommandType = 0x09
+ MediaTransportControlCommandType_FAST_FORWARD MediaTransportControlCommandType = 0x09
+ MediaTransportControlCommandType_REWIND MediaTransportControlCommandType = 0x09
+ MediaTransportControlCommandType_SOURCE_POWER_CONTROL MediaTransportControlCommandType = 0x09
+ MediaTransportControlCommandType_TOTAL_TRACKS MediaTransportControlCommandType = 0x09
+ MediaTransportControlCommandType_STATUS_REQUEST MediaTransportControlCommandType = 0x09
+ MediaTransportControlCommandType_ENUMERATE_CATEGORIES_SELECTIONS_TRACKS MediaTransportControlCommandType = 0x09
+ MediaTransportControlCommandType_ENUMERATION_SIZE MediaTransportControlCommandType = 0x0A
+ MediaTransportControlCommandType_TRACK_NAME MediaTransportControlCommandType = 0x0B
+ MediaTransportControlCommandType_SELECTION_NAME MediaTransportControlCommandType = 0x0C
+ MediaTransportControlCommandType_CATEGORY_NAME MediaTransportControlCommandType = 0x0D
+)
+
+var MediaTransportControlCommandTypeValues []MediaTransportControlCommandType
+
+func init() {
+ _ = errors.New
+ MediaTransportControlCommandTypeValues = []MediaTransportControlCommandType{
+ MediaTransportControlCommandType_STOP,
+ MediaTransportControlCommandType_PLAY,
+ MediaTransportControlCommandType_PAUSE_RESUME,
+ MediaTransportControlCommandType_SELECT_CATEGORY,
+ MediaTransportControlCommandType_SELECT_SELECTION,
+ MediaTransportControlCommandType_SELECT_TRACK,
+ MediaTransportControlCommandType_SHUFFLE_ON_OFF,
+ MediaTransportControlCommandType_REPEAT_ON_OFF,
+ MediaTransportControlCommandType_NEXT_PREVIOUS_CATEGORY,
+ MediaTransportControlCommandType_NEXT_PREVIOUS_SELECTION,
+ MediaTransportControlCommandType_NEXT_PREVIOUS_TRACK,
+ MediaTransportControlCommandType_FAST_FORWARD,
+ MediaTransportControlCommandType_REWIND,
+ MediaTransportControlCommandType_SOURCE_POWER_CONTROL,
+ MediaTransportControlCommandType_TOTAL_TRACKS,
+ MediaTransportControlCommandType_STATUS_REQUEST,
+ MediaTransportControlCommandType_ENUMERATE_CATEGORIES_SELECTIONS_TRACKS,
+ MediaTransportControlCommandType_ENUMERATION_SIZE,
+ MediaTransportControlCommandType_TRACK_NAME,
+ MediaTransportControlCommandType_SELECTION_NAME,
+ MediaTransportControlCommandType_CATEGORY_NAME,
+ }
+}
+
+func MediaTransportControlCommandTypeByValue(value uint8) (enum MediaTransportControlCommandType, ok bool) {
+ switch value {
+ case 0x00:
+ return MediaTransportControlCommandType_STOP, true
+ case 0x01:
+ return MediaTransportControlCommandType_PLAY, true
+ case 0x02:
+ return MediaTransportControlCommandType_PAUSE_RESUME, true
+ case 0x03:
+ return MediaTransportControlCommandType_SELECT_CATEGORY, true
+ case 0x04:
+ return MediaTransportControlCommandType_SELECT_SELECTION, true
+ case 0x05:
+ return MediaTransportControlCommandType_SELECT_TRACK, true
+ case 0x06:
+ return MediaTransportControlCommandType_SHUFFLE_ON_OFF, true
+ case 0x07:
+ return MediaTransportControlCommandType_REPEAT_ON_OFF, true
+ case 0x08:
+ return MediaTransportControlCommandType_NEXT_PREVIOUS_CATEGORY, true
+ case 0x09:
+ return MediaTransportControlCommandType_NEXT_PREVIOUS_SELECTION, true
+ case 0x0A:
+ return MediaTransportControlCommandType_ENUMERATION_SIZE, true
+ case 0x0B:
+ return MediaTransportControlCommandType_TRACK_NAME, true
+ case 0x0C:
+ return MediaTransportControlCommandType_SELECTION_NAME, true
+ case 0x0D:
+ return MediaTransportControlCommandType_CATEGORY_NAME, true
+ }
+ return 0, false
+}
+
+func MediaTransportControlCommandTypeByName(value string) (enum MediaTransportControlCommandType, ok bool) {
+ switch value {
+ case "STOP":
+ return MediaTransportControlCommandType_STOP, true
+ case "PLAY":
+ return MediaTransportControlCommandType_PLAY, true
+ case "PAUSE_RESUME":
+ return MediaTransportControlCommandType_PAUSE_RESUME, true
+ case "SELECT_CATEGORY":
+ return MediaTransportControlCommandType_SELECT_CATEGORY, true
+ case "SELECT_SELECTION":
+ return MediaTransportControlCommandType_SELECT_SELECTION, true
+ case "SELECT_TRACK":
+ return MediaTransportControlCommandType_SELECT_TRACK, true
+ case "SHUFFLE_ON_OFF":
+ return MediaTransportControlCommandType_SHUFFLE_ON_OFF, true
+ case "REPEAT_ON_OFF":
+ return MediaTransportControlCommandType_REPEAT_ON_OFF, true
+ case "NEXT_PREVIOUS_CATEGORY":
+ return MediaTransportControlCommandType_NEXT_PREVIOUS_CATEGORY, true
+ case "NEXT_PREVIOUS_SELECTION":
+ return MediaTransportControlCommandType_NEXT_PREVIOUS_SELECTION, true
+ case "ENUMERATION_SIZE":
+ return MediaTransportControlCommandType_ENUMERATION_SIZE, true
+ case "TRACK_NAME":
+ return MediaTransportControlCommandType_TRACK_NAME, true
+ case "SELECTION_NAME":
+ return MediaTransportControlCommandType_SELECTION_NAME, true
+ case "CATEGORY_NAME":
+ return MediaTransportControlCommandType_CATEGORY_NAME, true
+ }
+ return 0, false
+}
+
+func MediaTransportControlCommandTypeKnows(value uint8) bool {
+ for _, typeValue := range MediaTransportControlCommandTypeValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastMediaTransportControlCommandType(structType interface{}) MediaTransportControlCommandType {
+ castFunc := func(typ interface{}) MediaTransportControlCommandType {
+ if sMediaTransportControlCommandType, ok := typ.(MediaTransportControlCommandType); ok {
+ return sMediaTransportControlCommandType
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m MediaTransportControlCommandType) GetLengthInBits() uint16 {
+ return 4
+}
+
+func (m MediaTransportControlCommandType) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlCommandTypeParse(readBuffer utils.ReadBuffer) (MediaTransportControlCommandType, error) {
+ val, err := readBuffer.ReadUint8("MediaTransportControlCommandType", 4)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading MediaTransportControlCommandType")
+ }
+ if enum, ok := MediaTransportControlCommandTypeByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return MediaTransportControlCommandType(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e MediaTransportControlCommandType) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("MediaTransportControlCommandType", 4, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e MediaTransportControlCommandType) PLC4XEnumName() string {
+ switch e {
+ case MediaTransportControlCommandType_STOP:
+ return "STOP"
+ case MediaTransportControlCommandType_PLAY:
+ return "PLAY"
+ case MediaTransportControlCommandType_PAUSE_RESUME:
+ return "PAUSE_RESUME"
+ case MediaTransportControlCommandType_SELECT_CATEGORY:
+ return "SELECT_CATEGORY"
+ case MediaTransportControlCommandType_SELECT_SELECTION:
+ return "SELECT_SELECTION"
+ case MediaTransportControlCommandType_SELECT_TRACK:
+ return "SELECT_TRACK"
+ case MediaTransportControlCommandType_SHUFFLE_ON_OFF:
+ return "SHUFFLE_ON_OFF"
+ case MediaTransportControlCommandType_REPEAT_ON_OFF:
+ return "REPEAT_ON_OFF"
+ case MediaTransportControlCommandType_NEXT_PREVIOUS_CATEGORY:
+ return "NEXT_PREVIOUS_CATEGORY"
+ case MediaTransportControlCommandType_NEXT_PREVIOUS_SELECTION:
+ return "NEXT_PREVIOUS_SELECTION"
+ case MediaTransportControlCommandType_ENUMERATION_SIZE:
+ return "ENUMERATION_SIZE"
+ case MediaTransportControlCommandType_TRACK_NAME:
+ return "TRACK_NAME"
+ case MediaTransportControlCommandType_SELECTION_NAME:
+ return "SELECTION_NAME"
+ case MediaTransportControlCommandType_CATEGORY_NAME:
+ return "CATEGORY_NAME"
+ }
+ return ""
+}
+
+func (e MediaTransportControlCommandType) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlCommandTypeContainer.go
new file mode 100644
index 000000000..a76f75c6f
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlCommandTypeContainer.go
@@ -0,0 +1,1974 @@
+/*
+ * 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.
+
+// MediaTransportControlCommandTypeContainer is an enum
+type MediaTransportControlCommandTypeContainer uint8
+
+type IMediaTransportControlCommandTypeContainer interface {
+ NumBytes() uint8
+ CommandType() MediaTransportControlCommandType
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandStop MediaTransportControlCommandTypeContainer = 0x01
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandPlay MediaTransportControlCommandTypeContainer = 0x79
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandPauseResume MediaTransportControlCommandTypeContainer = 0x0A
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectCategory MediaTransportControlCommandTypeContainer = 0x12
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectSelection MediaTransportControlCommandTypeContainer = 0x1B
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectTrack MediaTransportControlCommandTypeContainer = 0x25
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandShuffleOnOff MediaTransportControlCommandTypeContainer = 0x2A
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandRepeatOnOff MediaTransportControlCommandTypeContainer = 0x32
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousCategory MediaTransportControlCommandTypeContainer = 0x3A
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousSelection MediaTransportControlCommandTypeContainer = 0x42
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousTrack MediaTransportControlCommandTypeContainer = 0x4A
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandFastForward MediaTransportControlCommandTypeContainer = 0x52
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandRewind MediaTransportControlCommandTypeContainer = 0x5A
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSourcePowerControl MediaTransportControlCommandTypeContainer = 0x62
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTotalTracks MediaTransportControlCommandTypeContainer = 0x6D
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandStatusRequest MediaTransportControlCommandTypeContainer = 0x71
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandEnumerateCategoriesSelectionsTracks MediaTransportControlCommandTypeContainer = 0x73
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandEnumerationSize MediaTransportControlCommandTypeContainer = 0x74
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_0Bytes MediaTransportControlCommandTypeContainer = 0x80
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_1Bytes MediaTransportControlCommandTypeContainer = 0x81
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_2Bytes MediaTransportControlCommandTypeContainer = 0x82
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_3Bytes MediaTransportControlCommandTypeContainer = 0x83
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_4Bytes MediaTransportControlCommandTypeContainer = 0x84
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_5Bytes MediaTransportControlCommandTypeContainer = 0x85
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_6Bytes MediaTransportControlCommandTypeContainer = 0x86
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_7Bytes MediaTransportControlCommandTypeContainer = 0x87
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_8Bytes MediaTransportControlCommandTypeContainer = 0x88
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_9Bytes MediaTransportControlCommandTypeContainer = 0x89
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_10Bytes MediaTransportControlCommandTypeContainer = 0x8A
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_11Bytes MediaTransportControlCommandTypeContainer = 0x8B
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_12Bytes MediaTransportControlCommandTypeContainer = 0x8C
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_13Bytes MediaTransportControlCommandTypeContainer = 0x8D
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_14Bytes MediaTransportControlCommandTypeContainer = 0x8E
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_15Bytes MediaTransportControlCommandTypeContainer = 0x8F
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_16Bytes MediaTransportControlCommandTypeContainer = 0x90
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_17Bytes MediaTransportControlCommandTypeContainer = 0x91
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_18Bytes MediaTransportControlCommandTypeContainer = 0x92
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_19Bytes MediaTransportControlCommandTypeContainer = 0x93
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_20Bytes MediaTransportControlCommandTypeContainer = 0x94
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_21Bytes MediaTransportControlCommandTypeContainer = 0x95
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_22Bytes MediaTransportControlCommandTypeContainer = 0x96
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_23Bytes MediaTransportControlCommandTypeContainer = 0x97
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_24Bytes MediaTransportControlCommandTypeContainer = 0x98
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_25Bytes MediaTransportControlCommandTypeContainer = 0x99
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_26Bytes MediaTransportControlCommandTypeContainer = 0x9A
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_27Bytes MediaTransportControlCommandTypeContainer = 0x9B
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_28Bytes MediaTransportControlCommandTypeContainer = 0x9C
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_29Bytes MediaTransportControlCommandTypeContainer = 0x9D
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_30Bytes MediaTransportControlCommandTypeContainer = 0x9E
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_31Bytes MediaTransportControlCommandTypeContainer = 0x9F
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_0Bytes MediaTransportControlCommandTypeContainer = 0xA0
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_1Bytes MediaTransportControlCommandTypeContainer = 0xA1
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_2Bytes MediaTransportControlCommandTypeContainer = 0xA2
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_3Bytes MediaTransportControlCommandTypeContainer = 0xA3
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_4Bytes MediaTransportControlCommandTypeContainer = 0xA4
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_5Bytes MediaTransportControlCommandTypeContainer = 0xA5
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_6Bytes MediaTransportControlCommandTypeContainer = 0xA6
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_7Bytes MediaTransportControlCommandTypeContainer = 0xA7
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_8Bytes MediaTransportControlCommandTypeContainer = 0xA8
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_9Bytes MediaTransportControlCommandTypeContainer = 0xA9
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_10Bytes MediaTransportControlCommandTypeContainer = 0xAA
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_11Bytes MediaTransportControlCommandTypeContainer = 0xAB
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_12Bytes MediaTransportControlCommandTypeContainer = 0xAC
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_13Bytes MediaTransportControlCommandTypeContainer = 0xAD
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_14Bytes MediaTransportControlCommandTypeContainer = 0xAE
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_15Bytes MediaTransportControlCommandTypeContainer = 0xAF
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_16Bytes MediaTransportControlCommandTypeContainer = 0xB0
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_17Bytes MediaTransportControlCommandTypeContainer = 0xB1
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_18Bytes MediaTransportControlCommandTypeContainer = 0xB2
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_19Bytes MediaTransportControlCommandTypeContainer = 0xB3
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_20Bytes MediaTransportControlCommandTypeContainer = 0xB4
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_21Bytes MediaTransportControlCommandTypeContainer = 0xB5
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_22Bytes MediaTransportControlCommandTypeContainer = 0xB6
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_23Bytes MediaTransportControlCommandTypeContainer = 0xB7
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_24Bytes MediaTransportControlCommandTypeContainer = 0xB8
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_25Bytes MediaTransportControlCommandTypeContainer = 0xB9
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_26Bytes MediaTransportControlCommandTypeContainer = 0xBA
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_27Bytes MediaTransportControlCommandTypeContainer = 0xBB
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_28Bytes MediaTransportControlCommandTypeContainer = 0xBC
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_29Bytes MediaTransportControlCommandTypeContainer = 0xBD
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_30Bytes MediaTransportControlCommandTypeContainer = 0xBE
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_31Bytes MediaTransportControlCommandTypeContainer = 0xBF
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_0Bytes MediaTransportControlCommandTypeContainer = 0xC0
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_1Bytes MediaTransportControlCommandTypeContainer = 0xC1
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_2Bytes MediaTransportControlCommandTypeContainer = 0xC2
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_3Bytes MediaTransportControlCommandTypeContainer = 0xC3
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_4Bytes MediaTransportControlCommandTypeContainer = 0xC4
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_5Bytes MediaTransportControlCommandTypeContainer = 0xC5
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_6Bytes MediaTransportControlCommandTypeContainer = 0xC6
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_7Bytes MediaTransportControlCommandTypeContainer = 0xC7
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_8Bytes MediaTransportControlCommandTypeContainer = 0xC8
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_9Bytes MediaTransportControlCommandTypeContainer = 0xC9
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_10Bytes MediaTransportControlCommandTypeContainer = 0xCA
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_11Bytes MediaTransportControlCommandTypeContainer = 0xCB
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_12Bytes MediaTransportControlCommandTypeContainer = 0xCC
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_13Bytes MediaTransportControlCommandTypeContainer = 0xCD
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_14Bytes MediaTransportControlCommandTypeContainer = 0xCE
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_15Bytes MediaTransportControlCommandTypeContainer = 0xCF
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_16Bytes MediaTransportControlCommandTypeContainer = 0xD0
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_17Bytes MediaTransportControlCommandTypeContainer = 0xD1
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_18Bytes MediaTransportControlCommandTypeContainer = 0xD2
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_19Bytes MediaTransportControlCommandTypeContainer = 0xD3
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_20Bytes MediaTransportControlCommandTypeContainer = 0xD4
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_21Bytes MediaTransportControlCommandTypeContainer = 0xD5
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_22Bytes MediaTransportControlCommandTypeContainer = 0xD6
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_23Bytes MediaTransportControlCommandTypeContainer = 0xD7
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_24Bytes MediaTransportControlCommandTypeContainer = 0xD8
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_25Bytes MediaTransportControlCommandTypeContainer = 0xD9
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_26Bytes MediaTransportControlCommandTypeContainer = 0xDA
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_27Bytes MediaTransportControlCommandTypeContainer = 0xDB
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_28Bytes MediaTransportControlCommandTypeContainer = 0xDC
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_29Bytes MediaTransportControlCommandTypeContainer = 0xDD
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_30Bytes MediaTransportControlCommandTypeContainer = 0xDE
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_31Bytes MediaTransportControlCommandTypeContainer = 0xDF
+)
+
+var MediaTransportControlCommandTypeContainerValues []MediaTransportControlCommandTypeContainer
+
+func init() {
+ _ = errors.New
+ MediaTransportControlCommandTypeContainerValues = []MediaTransportControlCommandTypeContainer{
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandStop,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandPlay,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandPauseResume,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectCategory,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectSelection,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectTrack,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandShuffleOnOff,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandRepeatOnOff,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousCategory,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousSelection,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousTrack,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandFastForward,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandRewind,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSourcePowerControl,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTotalTracks,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandStatusRequest,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandEnumerateCategoriesSelectionsTracks,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandEnumerationSize,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_0Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_1Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_2Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_3Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_4Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_5Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_6Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_7Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_8Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_9Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_10Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_11Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_12Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_13Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_14Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_15Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_16Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_17Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_18Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_19Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_20Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_21Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_22Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_23Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_24Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_25Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_26Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_27Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_28Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_29Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_30Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_31Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_0Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_1Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_2Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_3Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_4Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_5Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_6Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_7Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_8Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_9Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_10Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_11Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_12Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_13Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_14Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_15Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_16Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_17Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_18Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_19Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_20Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_21Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_22Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_23Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_24Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_25Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_26Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_27Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_28Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_29Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_30Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_31Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_0Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_1Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_2Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_3Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_4Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_5Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_6Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_7Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_8Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_9Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_10Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_11Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_12Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_13Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_14Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_15Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_16Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_17Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_18Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_19Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_20Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_21Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_22Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_23Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_24Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_25Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_26Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_27Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_28Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_29Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_30Bytes,
+ MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_31Bytes,
+ }
+}
+
+func (e MediaTransportControlCommandTypeContainer) NumBytes() uint8 {
+ switch e {
+ case 0x01:
+ { /* '0x01' */
+ return 1
+ }
+ case 0x0A:
+ { /* '0x0A' */
+ return 2
+ }
+ case 0x12:
+ { /* '0x12' */
+ return 2
+ }
+ case 0x1B:
+ { /* '0x1B' */
+ return 3
+ }
+ case 0x25:
+ { /* '0x25' */
+ return 5
+ }
+ case 0x2A:
+ { /* '0x2A' */
+ return 2
+ }
+ case 0x32:
+ { /* '0x32' */
+ return 2
+ }
+ case 0x3A:
+ { /* '0x3A' */
+ return 2
+ }
+ case 0x42:
+ { /* '0x42' */
+ return 2
+ }
+ case 0x4A:
+ { /* '0x4A' */
+ return 2
+ }
+ case 0x52:
+ { /* '0x52' */
+ return 2
+ }
+ case 0x5A:
+ { /* '0x5A' */
+ return 2
+ }
+ case 0x62:
+ { /* '0x62' */
+ return 2
+ }
+ case 0x6D:
+ { /* '0x6D' */
+ return 5
+ }
+ case 0x71:
+ { /* '0x71' */
+ return 1
+ }
+ case 0x73:
+ { /* '0x73' */
+ return 3
+ }
+ case 0x74:
+ { /* '0x74' */
+ return 4
+ }
+ case 0x79:
+ { /* '0x79' */
+ return 1
+ }
+ case 0x80:
+ { /* '0x80' */
+ return 0
+ }
+ case 0x81:
+ { /* '0x81' */
+ return 1
+ }
+ case 0x82:
+ { /* '0x82' */
+ return 2
+ }
+ case 0x83:
+ { /* '0x83' */
+ return 3
+ }
+ case 0x84:
+ { /* '0x84' */
+ return 4
+ }
+ case 0x85:
+ { /* '0x85' */
+ return 5
+ }
+ case 0x86:
+ { /* '0x86' */
+ return 6
+ }
+ case 0x87:
+ { /* '0x87' */
+ return 7
+ }
+ case 0x88:
+ { /* '0x88' */
+ return 8
+ }
+ case 0x89:
+ { /* '0x89' */
+ return 9
+ }
+ case 0x8A:
+ { /* '0x8A' */
+ return 10
+ }
+ case 0x8B:
+ { /* '0x8B' */
+ return 11
+ }
+ case 0x8C:
+ { /* '0x8C' */
+ return 12
+ }
+ case 0x8D:
+ { /* '0x8D' */
+ return 13
+ }
+ case 0x8E:
+ { /* '0x8E' */
+ return 14
+ }
+ case 0x8F:
+ { /* '0x8F' */
+ return 15
+ }
+ case 0x90:
+ { /* '0x90' */
+ return 16
+ }
+ case 0x91:
+ { /* '0x91' */
+ return 17
+ }
+ case 0x92:
+ { /* '0x92' */
+ return 18
+ }
+ case 0x93:
+ { /* '0x93' */
+ return 19
+ }
+ case 0x94:
+ { /* '0x94' */
+ return 20
+ }
+ case 0x95:
+ { /* '0x95' */
+ return 21
+ }
+ case 0x96:
+ { /* '0x96' */
+ return 22
+ }
+ case 0x97:
+ { /* '0x97' */
+ return 23
+ }
+ case 0x98:
+ { /* '0x98' */
+ return 24
+ }
+ case 0x99:
+ { /* '0x99' */
+ return 25
+ }
+ case 0x9A:
+ { /* '0x9A' */
+ return 26
+ }
+ case 0x9B:
+ { /* '0x9B' */
+ return 27
+ }
+ case 0x9C:
+ { /* '0x9C' */
+ return 28
+ }
+ case 0x9D:
+ { /* '0x9D' */
+ return 29
+ }
+ case 0x9E:
+ { /* '0x9E' */
+ return 30
+ }
+ case 0x9F:
+ { /* '0x9F' */
+ return 31
+ }
+ 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 MediaTransportControlCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (MediaTransportControlCommandTypeContainer, error) {
+ for _, sizeValue := range MediaTransportControlCommandTypeContainerValues {
+ if sizeValue.NumBytes() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing NumBytes not found", value)
+}
+
+func (e MediaTransportControlCommandTypeContainer) CommandType() MediaTransportControlCommandType {
+ switch e {
+ case 0x01:
+ { /* '0x01' */
+ return MediaTransportControlCommandType_STOP
+ }
+ case 0x0A:
+ { /* '0x0A' */
+ return MediaTransportControlCommandType_PAUSE_RESUME
+ }
+ case 0x12:
+ { /* '0x12' */
+ return MediaTransportControlCommandType_SELECT_CATEGORY
+ }
+ case 0x1B:
+ { /* '0x1B' */
+ return MediaTransportControlCommandType_SELECT_SELECTION
+ }
+ case 0x25:
+ { /* '0x25' */
+ return MediaTransportControlCommandType_SELECT_TRACK
+ }
+ case 0x2A:
+ { /* '0x2A' */
+ return MediaTransportControlCommandType_SHUFFLE_ON_OFF
+ }
+ case 0x32:
+ { /* '0x32' */
+ return MediaTransportControlCommandType_REPEAT_ON_OFF
+ }
+ case 0x3A:
+ { /* '0x3A' */
+ return MediaTransportControlCommandType_NEXT_PREVIOUS_CATEGORY
+ }
+ case 0x42:
+ { /* '0x42' */
+ return MediaTransportControlCommandType_NEXT_PREVIOUS_SELECTION
+ }
+ case 0x4A:
+ { /* '0x4A' */
+ return MediaTransportControlCommandType_NEXT_PREVIOUS_TRACK
+ }
+ case 0x52:
+ { /* '0x52' */
+ return MediaTransportControlCommandType_FAST_FORWARD
+ }
+ case 0x5A:
+ { /* '0x5A' */
+ return MediaTransportControlCommandType_REWIND
+ }
+ case 0x62:
+ { /* '0x62' */
+ return MediaTransportControlCommandType_SOURCE_POWER_CONTROL
+ }
+ case 0x6D:
+ { /* '0x6D' */
+ return MediaTransportControlCommandType_TOTAL_TRACKS
+ }
+ case 0x71:
+ { /* '0x71' */
+ return MediaTransportControlCommandType_STATUS_REQUEST
+ }
+ case 0x73:
+ { /* '0x73' */
+ return MediaTransportControlCommandType_ENUMERATE_CATEGORIES_SELECTIONS_TRACKS
+ }
+ case 0x74:
+ { /* '0x74' */
+ return MediaTransportControlCommandType_ENUMERATION_SIZE
+ }
+ case 0x79:
+ { /* '0x79' */
+ return MediaTransportControlCommandType_PLAY
+ }
+ case 0x80:
+ { /* '0x80' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x81:
+ { /* '0x81' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x82:
+ { /* '0x82' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x83:
+ { /* '0x83' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x84:
+ { /* '0x84' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x85:
+ { /* '0x85' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x86:
+ { /* '0x86' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x87:
+ { /* '0x87' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x88:
+ { /* '0x88' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x89:
+ { /* '0x89' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x8A:
+ { /* '0x8A' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x8B:
+ { /* '0x8B' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x8C:
+ { /* '0x8C' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x8D:
+ { /* '0x8D' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x8E:
+ { /* '0x8E' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x8F:
+ { /* '0x8F' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x90:
+ { /* '0x90' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x91:
+ { /* '0x91' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x92:
+ { /* '0x92' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x93:
+ { /* '0x93' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x94:
+ { /* '0x94' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x95:
+ { /* '0x95' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x96:
+ { /* '0x96' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x97:
+ { /* '0x97' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x98:
+ { /* '0x98' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x99:
+ { /* '0x99' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x9A:
+ { /* '0x9A' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x9B:
+ { /* '0x9B' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x9C:
+ { /* '0x9C' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x9D:
+ { /* '0x9D' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x9E:
+ { /* '0x9E' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0x9F:
+ { /* '0x9F' */
+ return MediaTransportControlCommandType_TRACK_NAME
+ }
+ case 0xA0:
+ { /* '0xA0' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xA1:
+ { /* '0xA1' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xA2:
+ { /* '0xA2' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xA3:
+ { /* '0xA3' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xA4:
+ { /* '0xA4' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xA5:
+ { /* '0xA5' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xA6:
+ { /* '0xA6' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xA7:
+ { /* '0xA7' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xA8:
+ { /* '0xA8' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xA9:
+ { /* '0xA9' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xAA:
+ { /* '0xAA' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xAB:
+ { /* '0xAB' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xAC:
+ { /* '0xAC' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xAD:
+ { /* '0xAD' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xAE:
+ { /* '0xAE' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xAF:
+ { /* '0xAF' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xB0:
+ { /* '0xB0' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xB1:
+ { /* '0xB1' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xB2:
+ { /* '0xB2' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xB3:
+ { /* '0xB3' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xB4:
+ { /* '0xB4' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xB5:
+ { /* '0xB5' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xB6:
+ { /* '0xB6' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xB7:
+ { /* '0xB7' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xB8:
+ { /* '0xB8' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xB9:
+ { /* '0xB9' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xBA:
+ { /* '0xBA' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xBB:
+ { /* '0xBB' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xBC:
+ { /* '0xBC' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xBD:
+ { /* '0xBD' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xBE:
+ { /* '0xBE' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xBF:
+ { /* '0xBF' */
+ return MediaTransportControlCommandType_SELECTION_NAME
+ }
+ case 0xC0:
+ { /* '0xC0' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xC1:
+ { /* '0xC1' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xC2:
+ { /* '0xC2' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xC3:
+ { /* '0xC3' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xC4:
+ { /* '0xC4' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xC5:
+ { /* '0xC5' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xC6:
+ { /* '0xC6' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xC7:
+ { /* '0xC7' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xC8:
+ { /* '0xC8' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xC9:
+ { /* '0xC9' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xCA:
+ { /* '0xCA' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xCB:
+ { /* '0xCB' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xCC:
+ { /* '0xCC' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xCD:
+ { /* '0xCD' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xCE:
+ { /* '0xCE' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xCF:
+ { /* '0xCF' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xD0:
+ { /* '0xD0' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xD1:
+ { /* '0xD1' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xD2:
+ { /* '0xD2' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xD3:
+ { /* '0xD3' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xD4:
+ { /* '0xD4' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xD5:
+ { /* '0xD5' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xD6:
+ { /* '0xD6' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xD7:
+ { /* '0xD7' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xD8:
+ { /* '0xD8' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xD9:
+ { /* '0xD9' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xDA:
+ { /* '0xDA' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xDB:
+ { /* '0xDB' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xDC:
+ { /* '0xDC' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xDD:
+ { /* '0xDD' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xDE:
+ { /* '0xDE' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ case 0xDF:
+ { /* '0xDF' */
+ return MediaTransportControlCommandType_CATEGORY_NAME
+ }
+ default:
+ {
+ return 0
+ }
+ }
+}
+
+func MediaTransportControlCommandTypeContainerFirstEnumForFieldCommandType(value MediaTransportControlCommandType) (MediaTransportControlCommandTypeContainer, error) {
+ for _, sizeValue := range MediaTransportControlCommandTypeContainerValues {
+ if sizeValue.CommandType() == value {
+ return sizeValue, nil
+ }
+ }
+ return 0, errors.Errorf("enum for %v describing CommandType not found", value)
+}
+func MediaTransportControlCommandTypeContainerByValue(value uint8) (enum MediaTransportControlCommandTypeContainer, ok bool) {
+ switch value {
+ case 0x01:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandStop, true
+ case 0x0A:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandPauseResume, true
+ case 0x12:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectCategory, true
+ case 0x1B:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectSelection, true
+ case 0x25:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectTrack, true
+ case 0x2A:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandShuffleOnOff, true
+ case 0x32:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandRepeatOnOff, true
+ case 0x3A:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousCategory, true
+ case 0x42:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousSelection, true
+ case 0x4A:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousTrack, true
+ case 0x52:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandFastForward, true
+ case 0x5A:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandRewind, true
+ case 0x62:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSourcePowerControl, true
+ case 0x6D:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTotalTracks, true
+ case 0x71:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandStatusRequest, true
+ case 0x73:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandEnumerateCategoriesSelectionsTracks, true
+ case 0x74:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandEnumerationSize, true
+ case 0x79:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandPlay, true
+ case 0x80:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_0Bytes, true
+ case 0x81:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_1Bytes, true
+ case 0x82:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_2Bytes, true
+ case 0x83:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_3Bytes, true
+ case 0x84:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_4Bytes, true
+ case 0x85:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_5Bytes, true
+ case 0x86:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_6Bytes, true
+ case 0x87:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_7Bytes, true
+ case 0x88:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_8Bytes, true
+ case 0x89:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_9Bytes, true
+ case 0x8A:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_10Bytes, true
+ case 0x8B:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_11Bytes, true
+ case 0x8C:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_12Bytes, true
+ case 0x8D:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_13Bytes, true
+ case 0x8E:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_14Bytes, true
+ case 0x8F:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_15Bytes, true
+ case 0x90:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_16Bytes, true
+ case 0x91:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_17Bytes, true
+ case 0x92:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_18Bytes, true
+ case 0x93:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_19Bytes, true
+ case 0x94:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_20Bytes, true
+ case 0x95:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_21Bytes, true
+ case 0x96:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_22Bytes, true
+ case 0x97:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_23Bytes, true
+ case 0x98:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_24Bytes, true
+ case 0x99:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_25Bytes, true
+ case 0x9A:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_26Bytes, true
+ case 0x9B:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_27Bytes, true
+ case 0x9C:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_28Bytes, true
+ case 0x9D:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_29Bytes, true
+ case 0x9E:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_30Bytes, true
+ case 0x9F:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_31Bytes, true
+ case 0xA0:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_0Bytes, true
+ case 0xA1:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_1Bytes, true
+ case 0xA2:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_2Bytes, true
+ case 0xA3:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_3Bytes, true
+ case 0xA4:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_4Bytes, true
+ case 0xA5:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_5Bytes, true
+ case 0xA6:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_6Bytes, true
+ case 0xA7:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_7Bytes, true
+ case 0xA8:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_8Bytes, true
+ case 0xA9:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_9Bytes, true
+ case 0xAA:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_10Bytes, true
+ case 0xAB:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_11Bytes, true
+ case 0xAC:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_12Bytes, true
+ case 0xAD:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_13Bytes, true
+ case 0xAE:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_14Bytes, true
+ case 0xAF:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_15Bytes, true
+ case 0xB0:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_16Bytes, true
+ case 0xB1:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_17Bytes, true
+ case 0xB2:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_18Bytes, true
+ case 0xB3:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_19Bytes, true
+ case 0xB4:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_20Bytes, true
+ case 0xB5:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_21Bytes, true
+ case 0xB6:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_22Bytes, true
+ case 0xB7:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_23Bytes, true
+ case 0xB8:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_24Bytes, true
+ case 0xB9:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_25Bytes, true
+ case 0xBA:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_26Bytes, true
+ case 0xBB:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_27Bytes, true
+ case 0xBC:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_28Bytes, true
+ case 0xBD:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_29Bytes, true
+ case 0xBE:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_30Bytes, true
+ case 0xBF:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_31Bytes, true
+ case 0xC0:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_0Bytes, true
+ case 0xC1:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_1Bytes, true
+ case 0xC2:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_2Bytes, true
+ case 0xC3:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_3Bytes, true
+ case 0xC4:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_4Bytes, true
+ case 0xC5:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_5Bytes, true
+ case 0xC6:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_6Bytes, true
+ case 0xC7:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_7Bytes, true
+ case 0xC8:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_8Bytes, true
+ case 0xC9:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_9Bytes, true
+ case 0xCA:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_10Bytes, true
+ case 0xCB:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_11Bytes, true
+ case 0xCC:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_12Bytes, true
+ case 0xCD:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_13Bytes, true
+ case 0xCE:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_14Bytes, true
+ case 0xCF:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_15Bytes, true
+ case 0xD0:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_16Bytes, true
+ case 0xD1:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_17Bytes, true
+ case 0xD2:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_18Bytes, true
+ case 0xD3:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_19Bytes, true
+ case 0xD4:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_20Bytes, true
+ case 0xD5:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_21Bytes, true
+ case 0xD6:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_22Bytes, true
+ case 0xD7:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_23Bytes, true
+ case 0xD8:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_24Bytes, true
+ case 0xD9:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_25Bytes, true
+ case 0xDA:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_26Bytes, true
+ case 0xDB:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_27Bytes, true
+ case 0xDC:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_28Bytes, true
+ case 0xDD:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_29Bytes, true
+ case 0xDE:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_30Bytes, true
+ case 0xDF:
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_31Bytes, true
+ }
+ return 0, false
+}
+
+func MediaTransportControlCommandTypeContainerByName(value string) (enum MediaTransportControlCommandTypeContainer, ok bool) {
+ switch value {
+ case "MediaTransportControlCommandStop":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandStop, true
+ case "MediaTransportControlCommandPauseResume":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandPauseResume, true
+ case "MediaTransportControlCommandSelectCategory":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectCategory, true
+ case "MediaTransportControlCommandSelectSelection":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectSelection, true
+ case "MediaTransportControlCommandSelectTrack":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectTrack, true
+ case "MediaTransportControlCommandShuffleOnOff":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandShuffleOnOff, true
+ case "MediaTransportControlCommandRepeatOnOff":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandRepeatOnOff, true
+ case "MediaTransportControlCommandNextPreviousCategory":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousCategory, true
+ case "MediaTransportControlCommandNextPreviousSelection":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousSelection, true
+ case "MediaTransportControlCommandNextPreviousTrack":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousTrack, true
+ case "MediaTransportControlCommandFastForward":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandFastForward, true
+ case "MediaTransportControlCommandRewind":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandRewind, true
+ case "MediaTransportControlCommandSourcePowerControl":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSourcePowerControl, true
+ case "MediaTransportControlCommandTotalTracks":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTotalTracks, true
+ case "MediaTransportControlCommandStatusRequest":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandStatusRequest, true
+ case "MediaTransportControlCommandEnumerateCategoriesSelectionsTracks":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandEnumerateCategoriesSelectionsTracks, true
+ case "MediaTransportControlCommandEnumerationSize":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandEnumerationSize, true
+ case "MediaTransportControlCommandPlay":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandPlay, true
+ case "MediaTransportControlCommandTrackName_0Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_0Bytes, true
+ case "MediaTransportControlCommandTrackName_1Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_1Bytes, true
+ case "MediaTransportControlCommandTrackName_2Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_2Bytes, true
+ case "MediaTransportControlCommandTrackName_3Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_3Bytes, true
+ case "MediaTransportControlCommandTrackName_4Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_4Bytes, true
+ case "MediaTransportControlCommandTrackName_5Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_5Bytes, true
+ case "MediaTransportControlCommandTrackName_6Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_6Bytes, true
+ case "MediaTransportControlCommandTrackName_7Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_7Bytes, true
+ case "MediaTransportControlCommandTrackName_8Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_8Bytes, true
+ case "MediaTransportControlCommandTrackName_9Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_9Bytes, true
+ case "MediaTransportControlCommandTrackName_10Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_10Bytes, true
+ case "MediaTransportControlCommandTrackName_11Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_11Bytes, true
+ case "MediaTransportControlCommandTrackName_12Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_12Bytes, true
+ case "MediaTransportControlCommandTrackName_13Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_13Bytes, true
+ case "MediaTransportControlCommandTrackName_14Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_14Bytes, true
+ case "MediaTransportControlCommandTrackName_15Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_15Bytes, true
+ case "MediaTransportControlCommandTrackName_16Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_16Bytes, true
+ case "MediaTransportControlCommandTrackName_17Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_17Bytes, true
+ case "MediaTransportControlCommandTrackName_18Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_18Bytes, true
+ case "MediaTransportControlCommandTrackName_19Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_19Bytes, true
+ case "MediaTransportControlCommandTrackName_20Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_20Bytes, true
+ case "MediaTransportControlCommandTrackName_21Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_21Bytes, true
+ case "MediaTransportControlCommandTrackName_22Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_22Bytes, true
+ case "MediaTransportControlCommandTrackName_23Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_23Bytes, true
+ case "MediaTransportControlCommandTrackName_24Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_24Bytes, true
+ case "MediaTransportControlCommandTrackName_25Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_25Bytes, true
+ case "MediaTransportControlCommandTrackName_26Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_26Bytes, true
+ case "MediaTransportControlCommandTrackName_27Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_27Bytes, true
+ case "MediaTransportControlCommandTrackName_28Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_28Bytes, true
+ case "MediaTransportControlCommandTrackName_29Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_29Bytes, true
+ case "MediaTransportControlCommandTrackName_30Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_30Bytes, true
+ case "MediaTransportControlCommandTrackName_31Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_31Bytes, true
+ case "MediaTransportControlCommandSelectionName_0Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_0Bytes, true
+ case "MediaTransportControlCommandSelectionName_1Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_1Bytes, true
+ case "MediaTransportControlCommandSelectionName_2Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_2Bytes, true
+ case "MediaTransportControlCommandSelectionName_3Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_3Bytes, true
+ case "MediaTransportControlCommandSelectionName_4Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_4Bytes, true
+ case "MediaTransportControlCommandSelectionName_5Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_5Bytes, true
+ case "MediaTransportControlCommandSelectionName_6Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_6Bytes, true
+ case "MediaTransportControlCommandSelectionName_7Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_7Bytes, true
+ case "MediaTransportControlCommandSelectionName_8Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_8Bytes, true
+ case "MediaTransportControlCommandSelectionName_9Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_9Bytes, true
+ case "MediaTransportControlCommandSelectionName_10Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_10Bytes, true
+ case "MediaTransportControlCommandSelectionName_11Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_11Bytes, true
+ case "MediaTransportControlCommandSelectionName_12Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_12Bytes, true
+ case "MediaTransportControlCommandSelectionName_13Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_13Bytes, true
+ case "MediaTransportControlCommandSelectionName_14Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_14Bytes, true
+ case "MediaTransportControlCommandSelectionName_15Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_15Bytes, true
+ case "MediaTransportControlCommandSelectionName_16Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_16Bytes, true
+ case "MediaTransportControlCommandSelectionName_17Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_17Bytes, true
+ case "MediaTransportControlCommandSelectionName_18Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_18Bytes, true
+ case "MediaTransportControlCommandSelectionName_19Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_19Bytes, true
+ case "MediaTransportControlCommandSelectionName_20Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_20Bytes, true
+ case "MediaTransportControlCommandSelectionName_21Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_21Bytes, true
+ case "MediaTransportControlCommandSelectionName_22Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_22Bytes, true
+ case "MediaTransportControlCommandSelectionName_23Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_23Bytes, true
+ case "MediaTransportControlCommandSelectionName_24Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_24Bytes, true
+ case "MediaTransportControlCommandSelectionName_25Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_25Bytes, true
+ case "MediaTransportControlCommandSelectionName_26Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_26Bytes, true
+ case "MediaTransportControlCommandSelectionName_27Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_27Bytes, true
+ case "MediaTransportControlCommandSelectionName_28Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_28Bytes, true
+ case "MediaTransportControlCommandSelectionName_29Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_29Bytes, true
+ case "MediaTransportControlCommandSelectionName_30Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_30Bytes, true
+ case "MediaTransportControlCommandSelectionName_31Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_31Bytes, true
+ case "MediaTransportControlCommandCategoryName_0Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_0Bytes, true
+ case "MediaTransportControlCommandCategoryName_1Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_1Bytes, true
+ case "MediaTransportControlCommandCategoryName_2Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_2Bytes, true
+ case "MediaTransportControlCommandCategoryName_3Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_3Bytes, true
+ case "MediaTransportControlCommandCategoryName_4Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_4Bytes, true
+ case "MediaTransportControlCommandCategoryName_5Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_5Bytes, true
+ case "MediaTransportControlCommandCategoryName_6Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_6Bytes, true
+ case "MediaTransportControlCommandCategoryName_7Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_7Bytes, true
+ case "MediaTransportControlCommandCategoryName_8Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_8Bytes, true
+ case "MediaTransportControlCommandCategoryName_9Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_9Bytes, true
+ case "MediaTransportControlCommandCategoryName_10Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_10Bytes, true
+ case "MediaTransportControlCommandCategoryName_11Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_11Bytes, true
+ case "MediaTransportControlCommandCategoryName_12Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_12Bytes, true
+ case "MediaTransportControlCommandCategoryName_13Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_13Bytes, true
+ case "MediaTransportControlCommandCategoryName_14Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_14Bytes, true
+ case "MediaTransportControlCommandCategoryName_15Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_15Bytes, true
+ case "MediaTransportControlCommandCategoryName_16Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_16Bytes, true
+ case "MediaTransportControlCommandCategoryName_17Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_17Bytes, true
+ case "MediaTransportControlCommandCategoryName_18Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_18Bytes, true
+ case "MediaTransportControlCommandCategoryName_19Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_19Bytes, true
+ case "MediaTransportControlCommandCategoryName_20Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_20Bytes, true
+ case "MediaTransportControlCommandCategoryName_21Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_21Bytes, true
+ case "MediaTransportControlCommandCategoryName_22Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_22Bytes, true
+ case "MediaTransportControlCommandCategoryName_23Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_23Bytes, true
+ case "MediaTransportControlCommandCategoryName_24Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_24Bytes, true
+ case "MediaTransportControlCommandCategoryName_25Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_25Bytes, true
+ case "MediaTransportControlCommandCategoryName_26Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_26Bytes, true
+ case "MediaTransportControlCommandCategoryName_27Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_27Bytes, true
+ case "MediaTransportControlCommandCategoryName_28Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_28Bytes, true
+ case "MediaTransportControlCommandCategoryName_29Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_29Bytes, true
+ case "MediaTransportControlCommandCategoryName_30Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_30Bytes, true
+ case "MediaTransportControlCommandCategoryName_31Bytes":
+ return MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_31Bytes, true
+ }
+ return 0, false
+}
+
+func MediaTransportControlCommandTypeContainerKnows(value uint8) bool {
+ for _, typeValue := range MediaTransportControlCommandTypeContainerValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastMediaTransportControlCommandTypeContainer(structType interface{}) MediaTransportControlCommandTypeContainer {
+ castFunc := func(typ interface{}) MediaTransportControlCommandTypeContainer {
+ if sMediaTransportControlCommandTypeContainer, ok := typ.(MediaTransportControlCommandTypeContainer); ok {
+ return sMediaTransportControlCommandTypeContainer
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m MediaTransportControlCommandTypeContainer) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m MediaTransportControlCommandTypeContainer) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlCommandTypeContainerParse(readBuffer utils.ReadBuffer) (MediaTransportControlCommandTypeContainer, error) {
+ val, err := readBuffer.ReadUint8("MediaTransportControlCommandTypeContainer", 8)
+ if err != nil {
+ return 0, errors.Wrap(err, "error reading MediaTransportControlCommandTypeContainer")
+ }
+ if enum, ok := MediaTransportControlCommandTypeContainerByValue(val); !ok {
+ log.Debug().Msgf("no value %x found for RequestType", val)
+ return MediaTransportControlCommandTypeContainer(val), nil
+ } else {
+ return enum, nil
+ }
+}
+
+func (e MediaTransportControlCommandTypeContainer) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("MediaTransportControlCommandTypeContainer", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.PLC4XEnumName()))
+}
+
+// PLC4XEnumName returns the name that is used in code to identify this enum
+func (e MediaTransportControlCommandTypeContainer) PLC4XEnumName() string {
+ switch e {
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandStop:
+ return "MediaTransportControlCommandStop"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandPauseResume:
+ return "MediaTransportControlCommandPauseResume"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectCategory:
+ return "MediaTransportControlCommandSelectCategory"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectSelection:
+ return "MediaTransportControlCommandSelectSelection"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectTrack:
+ return "MediaTransportControlCommandSelectTrack"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandShuffleOnOff:
+ return "MediaTransportControlCommandShuffleOnOff"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandRepeatOnOff:
+ return "MediaTransportControlCommandRepeatOnOff"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousCategory:
+ return "MediaTransportControlCommandNextPreviousCategory"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousSelection:
+ return "MediaTransportControlCommandNextPreviousSelection"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandNextPreviousTrack:
+ return "MediaTransportControlCommandNextPreviousTrack"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandFastForward:
+ return "MediaTransportControlCommandFastForward"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandRewind:
+ return "MediaTransportControlCommandRewind"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSourcePowerControl:
+ return "MediaTransportControlCommandSourcePowerControl"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTotalTracks:
+ return "MediaTransportControlCommandTotalTracks"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandStatusRequest:
+ return "MediaTransportControlCommandStatusRequest"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandEnumerateCategoriesSelectionsTracks:
+ return "MediaTransportControlCommandEnumerateCategoriesSelectionsTracks"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandEnumerationSize:
+ return "MediaTransportControlCommandEnumerationSize"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandPlay:
+ return "MediaTransportControlCommandPlay"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_0Bytes:
+ return "MediaTransportControlCommandTrackName_0Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_1Bytes:
+ return "MediaTransportControlCommandTrackName_1Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_2Bytes:
+ return "MediaTransportControlCommandTrackName_2Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_3Bytes:
+ return "MediaTransportControlCommandTrackName_3Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_4Bytes:
+ return "MediaTransportControlCommandTrackName_4Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_5Bytes:
+ return "MediaTransportControlCommandTrackName_5Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_6Bytes:
+ return "MediaTransportControlCommandTrackName_6Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_7Bytes:
+ return "MediaTransportControlCommandTrackName_7Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_8Bytes:
+ return "MediaTransportControlCommandTrackName_8Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_9Bytes:
+ return "MediaTransportControlCommandTrackName_9Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_10Bytes:
+ return "MediaTransportControlCommandTrackName_10Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_11Bytes:
+ return "MediaTransportControlCommandTrackName_11Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_12Bytes:
+ return "MediaTransportControlCommandTrackName_12Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_13Bytes:
+ return "MediaTransportControlCommandTrackName_13Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_14Bytes:
+ return "MediaTransportControlCommandTrackName_14Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_15Bytes:
+ return "MediaTransportControlCommandTrackName_15Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_16Bytes:
+ return "MediaTransportControlCommandTrackName_16Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_17Bytes:
+ return "MediaTransportControlCommandTrackName_17Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_18Bytes:
+ return "MediaTransportControlCommandTrackName_18Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_19Bytes:
+ return "MediaTransportControlCommandTrackName_19Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_20Bytes:
+ return "MediaTransportControlCommandTrackName_20Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_21Bytes:
+ return "MediaTransportControlCommandTrackName_21Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_22Bytes:
+ return "MediaTransportControlCommandTrackName_22Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_23Bytes:
+ return "MediaTransportControlCommandTrackName_23Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_24Bytes:
+ return "MediaTransportControlCommandTrackName_24Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_25Bytes:
+ return "MediaTransportControlCommandTrackName_25Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_26Bytes:
+ return "MediaTransportControlCommandTrackName_26Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_27Bytes:
+ return "MediaTransportControlCommandTrackName_27Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_28Bytes:
+ return "MediaTransportControlCommandTrackName_28Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_29Bytes:
+ return "MediaTransportControlCommandTrackName_29Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_30Bytes:
+ return "MediaTransportControlCommandTrackName_30Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandTrackName_31Bytes:
+ return "MediaTransportControlCommandTrackName_31Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_0Bytes:
+ return "MediaTransportControlCommandSelectionName_0Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_1Bytes:
+ return "MediaTransportControlCommandSelectionName_1Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_2Bytes:
+ return "MediaTransportControlCommandSelectionName_2Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_3Bytes:
+ return "MediaTransportControlCommandSelectionName_3Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_4Bytes:
+ return "MediaTransportControlCommandSelectionName_4Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_5Bytes:
+ return "MediaTransportControlCommandSelectionName_5Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_6Bytes:
+ return "MediaTransportControlCommandSelectionName_6Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_7Bytes:
+ return "MediaTransportControlCommandSelectionName_7Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_8Bytes:
+ return "MediaTransportControlCommandSelectionName_8Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_9Bytes:
+ return "MediaTransportControlCommandSelectionName_9Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_10Bytes:
+ return "MediaTransportControlCommandSelectionName_10Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_11Bytes:
+ return "MediaTransportControlCommandSelectionName_11Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_12Bytes:
+ return "MediaTransportControlCommandSelectionName_12Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_13Bytes:
+ return "MediaTransportControlCommandSelectionName_13Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_14Bytes:
+ return "MediaTransportControlCommandSelectionName_14Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_15Bytes:
+ return "MediaTransportControlCommandSelectionName_15Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_16Bytes:
+ return "MediaTransportControlCommandSelectionName_16Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_17Bytes:
+ return "MediaTransportControlCommandSelectionName_17Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_18Bytes:
+ return "MediaTransportControlCommandSelectionName_18Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_19Bytes:
+ return "MediaTransportControlCommandSelectionName_19Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_20Bytes:
+ return "MediaTransportControlCommandSelectionName_20Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_21Bytes:
+ return "MediaTransportControlCommandSelectionName_21Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_22Bytes:
+ return "MediaTransportControlCommandSelectionName_22Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_23Bytes:
+ return "MediaTransportControlCommandSelectionName_23Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_24Bytes:
+ return "MediaTransportControlCommandSelectionName_24Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_25Bytes:
+ return "MediaTransportControlCommandSelectionName_25Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_26Bytes:
+ return "MediaTransportControlCommandSelectionName_26Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_27Bytes:
+ return "MediaTransportControlCommandSelectionName_27Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_28Bytes:
+ return "MediaTransportControlCommandSelectionName_28Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_29Bytes:
+ return "MediaTransportControlCommandSelectionName_29Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_30Bytes:
+ return "MediaTransportControlCommandSelectionName_30Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandSelectionName_31Bytes:
+ return "MediaTransportControlCommandSelectionName_31Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_0Bytes:
+ return "MediaTransportControlCommandCategoryName_0Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_1Bytes:
+ return "MediaTransportControlCommandCategoryName_1Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_2Bytes:
+ return "MediaTransportControlCommandCategoryName_2Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_3Bytes:
+ return "MediaTransportControlCommandCategoryName_3Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_4Bytes:
+ return "MediaTransportControlCommandCategoryName_4Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_5Bytes:
+ return "MediaTransportControlCommandCategoryName_5Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_6Bytes:
+ return "MediaTransportControlCommandCategoryName_6Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_7Bytes:
+ return "MediaTransportControlCommandCategoryName_7Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_8Bytes:
+ return "MediaTransportControlCommandCategoryName_8Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_9Bytes:
+ return "MediaTransportControlCommandCategoryName_9Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_10Bytes:
+ return "MediaTransportControlCommandCategoryName_10Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_11Bytes:
+ return "MediaTransportControlCommandCategoryName_11Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_12Bytes:
+ return "MediaTransportControlCommandCategoryName_12Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_13Bytes:
+ return "MediaTransportControlCommandCategoryName_13Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_14Bytes:
+ return "MediaTransportControlCommandCategoryName_14Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_15Bytes:
+ return "MediaTransportControlCommandCategoryName_15Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_16Bytes:
+ return "MediaTransportControlCommandCategoryName_16Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_17Bytes:
+ return "MediaTransportControlCommandCategoryName_17Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_18Bytes:
+ return "MediaTransportControlCommandCategoryName_18Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_19Bytes:
+ return "MediaTransportControlCommandCategoryName_19Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_20Bytes:
+ return "MediaTransportControlCommandCategoryName_20Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_21Bytes:
+ return "MediaTransportControlCommandCategoryName_21Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_22Bytes:
+ return "MediaTransportControlCommandCategoryName_22Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_23Bytes:
+ return "MediaTransportControlCommandCategoryName_23Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_24Bytes:
+ return "MediaTransportControlCommandCategoryName_24Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_25Bytes:
+ return "MediaTransportControlCommandCategoryName_25Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_26Bytes:
+ return "MediaTransportControlCommandCategoryName_26Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_27Bytes:
+ return "MediaTransportControlCommandCategoryName_27Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_28Bytes:
+ return "MediaTransportControlCommandCategoryName_28Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_29Bytes:
+ return "MediaTransportControlCommandCategoryName_29Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_30Bytes:
+ return "MediaTransportControlCommandCategoryName_30Bytes"
+ case MediaTransportControlCommandTypeContainer_MediaTransportControlCommandCategoryName_31Bytes:
+ return "MediaTransportControlCommandCategoryName_31Bytes"
+ }
+ return ""
+}
+
+func (e MediaTransportControlCommandTypeContainer) String() string {
+ return e.PLC4XEnumName()
+}
diff --git a/plc4go/protocols/cbus/readwrite/model/MediaTransportControlData.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlData.go
new file mode 100644
index 000000000..9a3a566d3
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlData.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.
+
+// MediaTransportControlData is the corresponding interface of MediaTransportControlData
+type MediaTransportControlData interface {
+ utils.LengthAware
+ utils.Serializable
+ // GetCommandTypeContainer returns CommandTypeContainer (property field)
+ GetCommandTypeContainer() MediaTransportControlCommandTypeContainer
+ // GetMediaLinkGroup returns MediaLinkGroup (property field)
+ GetMediaLinkGroup() byte
+ // GetCommandType returns CommandType (virtual field)
+ GetCommandType() MediaTransportControlCommandType
+}
+
+// MediaTransportControlDataExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlData.
+// This is useful for switch cases.
+type MediaTransportControlDataExactly interface {
+ MediaTransportControlData
+ isMediaTransportControlData() bool
+}
+
+// _MediaTransportControlData is the data-structure of this message
+type _MediaTransportControlData struct {
+ _MediaTransportControlDataChildRequirements
+ CommandTypeContainer MediaTransportControlCommandTypeContainer
+ MediaLinkGroup byte
+}
+
+type _MediaTransportControlDataChildRequirements interface {
+ utils.Serializable
+ GetLengthInBits() uint16
+ GetLengthInBitsConditional(lastItem bool) uint16
+}
+
+type MediaTransportControlDataParent interface {
+ SerializeParent(writeBuffer utils.WriteBuffer, child MediaTransportControlData, serializeChildFunction func() error) error
+ GetTypeName() string
+}
+
+type MediaTransportControlDataChild interface {
+ utils.Serializable
+ InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte)
+ GetParent() *MediaTransportControlData
+
+ GetTypeName() string
+ MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlData) GetCommandTypeContainer() MediaTransportControlCommandTypeContainer {
+ return m.CommandTypeContainer
+}
+
+func (m *_MediaTransportControlData) GetMediaLinkGroup() byte {
+ return m.MediaLinkGroup
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlData) GetCommandType() MediaTransportControlCommandType {
+ return CastMediaTransportControlCommandType(m.GetCommandTypeContainer().CommandType())
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlData factory function for _MediaTransportControlData
+func NewMediaTransportControlData(commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlData {
+ return &_MediaTransportControlData{CommandTypeContainer: commandTypeContainer, MediaLinkGroup: mediaLinkGroup}
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlData(structType interface{}) MediaTransportControlData {
+ if casted, ok := structType.(MediaTransportControlData); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlData); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlData) GetTypeName() string {
+ return "MediaTransportControlData"
+}
+
+func (m *_MediaTransportControlData) GetParentLengthInBits() uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (commandTypeContainer)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // Simple field (mediaLinkGroup)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlData) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataParse(readBuffer utils.ReadBuffer) (MediaTransportControlData, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlData"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlData")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Validation
+ if !(KnowsMediaTransportControlCommandTypeContainer(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 := MediaTransportControlCommandTypeContainerParse(readBuffer)
+ if _commandTypeContainerErr != nil {
+ return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of MediaTransportControlData")
+ }
+ commandTypeContainer := _commandTypeContainer
+ if closeErr := readBuffer.CloseContext("commandTypeContainer"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for commandTypeContainer")
+ }
+
+ // Virtual field
+ _commandType := commandTypeContainer.CommandType()
+ commandType := MediaTransportControlCommandType(_commandType)
+ _ = commandType
+
+ // Simple Field (mediaLinkGroup)
+ _mediaLinkGroup, _mediaLinkGroupErr := readBuffer.ReadByte("mediaLinkGroup")
+ if _mediaLinkGroupErr != nil {
+ return nil, errors.Wrap(_mediaLinkGroupErr, "Error parsing 'mediaLinkGroup' field of MediaTransportControlData")
+ }
+ mediaLinkGroup := _mediaLinkGroup
+
+ // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
+ type MediaTransportControlDataChildSerializeRequirement interface {
+ MediaTransportControlData
+ InitializeParent(MediaTransportControlData, MediaTransportControlCommandTypeContainer, byte)
+ GetParent() MediaTransportControlData
+ }
+ var _childTemp interface{}
+ var _child MediaTransportControlDataChildSerializeRequirement
+ var typeSwitchError error
+ switch {
+ case commandType == MediaTransportControlCommandType_STOP: // MediaTransportControlDataStop
+ _childTemp, typeSwitchError = MediaTransportControlDataStopParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_PLAY: // MediaTransportControlDataPlay
+ _childTemp, typeSwitchError = MediaTransportControlDataPlayParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_PAUSE_RESUME: // MediaTransportControlDataPauseResume
+ _childTemp, typeSwitchError = MediaTransportControlDataPauseResumeParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_SELECT_CATEGORY: // MediaTransportControlDataSetCategory
+ _childTemp, typeSwitchError = MediaTransportControlDataSetCategoryParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_SELECT_SELECTION: // MediaTransportControlDataSetSelection
+ _childTemp, typeSwitchError = MediaTransportControlDataSetSelectionParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_SELECT_TRACK: // MediaTransportControlDataSetTrack
+ _childTemp, typeSwitchError = MediaTransportControlDataSetTrackParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_SHUFFLE_ON_OFF: // MediaTransportControlDataShuffleOnOff
+ _childTemp, typeSwitchError = MediaTransportControlDataShuffleOnOffParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_REPEAT_ON_OFF: // MediaTransportControlDataRepeatOnOff
+ _childTemp, typeSwitchError = MediaTransportControlDataRepeatOnOffParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_NEXT_PREVIOUS_CATEGORY: // MediaTransportControlDataNextPreviousCategory
+ _childTemp, typeSwitchError = MediaTransportControlDataNextPreviousCategoryParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_NEXT_PREVIOUS_SELECTION: // MediaTransportControlDataNextPreviousSelection
+ _childTemp, typeSwitchError = MediaTransportControlDataNextPreviousSelectionParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_NEXT_PREVIOUS_TRACK: // MediaTransportControlDataNextPreviousTrack
+ _childTemp, typeSwitchError = MediaTransportControlDataNextPreviousTrackParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_FAST_FORWARD: // MediaTransportControlDataFastForward
+ _childTemp, typeSwitchError = MediaTransportControlDataFastForwardParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_REWIND: // MediaTransportControlDataRewind
+ _childTemp, typeSwitchError = MediaTransportControlDataRewindParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_SOURCE_POWER_CONTROL: // MediaTransportControlDataSourcePowerControl
+ _childTemp, typeSwitchError = MediaTransportControlDataSourcePowerControlParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_TOTAL_TRACKS: // MediaTransportControlDataTotalTracks
+ _childTemp, typeSwitchError = MediaTransportControlDataTotalTracksParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_STATUS_REQUEST: // MediaTransportControlDataStatusRequest
+ _childTemp, typeSwitchError = MediaTransportControlDataStatusRequestParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_ENUMERATE_CATEGORIES_SELECTIONS_TRACKS: // MediaTransportControlDataEnumerateCategoriesSelectionTracks
+ _childTemp, typeSwitchError = MediaTransportControlDataEnumerateCategoriesSelectionTracksParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_ENUMERATION_SIZE: // MediaTransportControlDataEnumerationsSize
+ _childTemp, typeSwitchError = MediaTransportControlDataEnumerationsSizeParse(readBuffer)
+ case commandType == MediaTransportControlCommandType_TRACK_NAME: // MediaTransportControlDataTrackName
+ _childTemp, typeSwitchError = MediaTransportControlDataTrackNameParse(readBuffer, commandTypeContainer)
+ case commandType == MediaTransportControlCommandType_SELECTION_NAME: // MediaTransportControlDataSelectionName
+ _childTemp, typeSwitchError = MediaTransportControlDataSelectionNameParse(readBuffer, commandTypeContainer)
+ 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 MediaTransportControlData")
+ }
+ _child = _childTemp.(MediaTransportControlDataChildSerializeRequirement)
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlData"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlData")
+ }
+
+ // Finish initializing
+ _child.InitializeParent(_child, commandTypeContainer, mediaLinkGroup)
+ return _child, nil
+}
+
+func (pm *_MediaTransportControlData) SerializeParent(writeBuffer utils.WriteBuffer, child MediaTransportControlData, 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("MediaTransportControlData"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlData")
+ }
+
+ // 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 (mediaLinkGroup)
+ mediaLinkGroup := byte(m.GetMediaLinkGroup())
+ _mediaLinkGroupErr := writeBuffer.WriteByte("mediaLinkGroup", (mediaLinkGroup))
+ if _mediaLinkGroupErr != nil {
+ return errors.Wrap(_mediaLinkGroupErr, "Error serializing 'mediaLinkGroup' 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("MediaTransportControlData"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlData")
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlData) isMediaTransportControlData() bool {
+ return true
+}
+
+func (m *_MediaTransportControlData) 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/MediaTransportControlDataEnumerateCategoriesSelectionTracks.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataEnumerateCategoriesSelectionTracks.go
new file mode 100644
index 000000000..3e1ded2b8
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataEnumerateCategoriesSelectionTracks.go
@@ -0,0 +1,294 @@
+/*
+ * 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.
+
+// MediaTransportControlDataEnumerateCategoriesSelectionTracks is the corresponding interface of MediaTransportControlDataEnumerateCategoriesSelectionTracks
+type MediaTransportControlDataEnumerateCategoriesSelectionTracks interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetEnumerateType returns EnumerateType (property field)
+ GetEnumerateType() byte
+ // GetStart returns Start (property field)
+ GetStart() uint8
+ // GetIsListCategories returns IsListCategories (virtual field)
+ GetIsListCategories() bool
+ // GetIsListSelections returns IsListSelections (virtual field)
+ GetIsListSelections() bool
+ // GetIsListTracks returns IsListTracks (virtual field)
+ GetIsListTracks() bool
+ // GetIsReserved returns IsReserved (virtual field)
+ GetIsReserved() bool
+}
+
+// MediaTransportControlDataEnumerateCategoriesSelectionTracksExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataEnumerateCategoriesSelectionTracks.
+// This is useful for switch cases.
+type MediaTransportControlDataEnumerateCategoriesSelectionTracksExactly interface {
+ MediaTransportControlDataEnumerateCategoriesSelectionTracks
+ isMediaTransportControlDataEnumerateCategoriesSelectionTracks() bool
+}
+
+// _MediaTransportControlDataEnumerateCategoriesSelectionTracks is the data-structure of this message
+type _MediaTransportControlDataEnumerateCategoriesSelectionTracks struct {
+ *_MediaTransportControlData
+ EnumerateType byte
+ Start uint8
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) GetEnumerateType() byte {
+ return m.EnumerateType
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) GetStart() uint8 {
+ return m.Start
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) GetIsListCategories() bool {
+ return bool(bool((m.GetEnumerateType()) == (0x00)))
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) GetIsListSelections() bool {
+ return bool(bool((m.GetEnumerateType()) == (0x01)))
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) GetIsListTracks() bool {
+ return bool(bool((m.GetEnumerateType()) == (0x02)))
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) GetIsReserved() bool {
+ return bool(bool(bool(!(m.GetIsListCategories())) && bool(!(m.GetIsListSelections()))) && bool(!(m.GetIsListTracks())))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataEnumerateCategoriesSelectionTracks factory function for _MediaTransportControlDataEnumerateCategoriesSelectionTracks
+func NewMediaTransportControlDataEnumerateCategoriesSelectionTracks(enumerateType byte, start uint8, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataEnumerateCategoriesSelectionTracks {
+ _result := &_MediaTransportControlDataEnumerateCategoriesSelectionTracks{
+ EnumerateType: enumerateType,
+ Start: start,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataEnumerateCategoriesSelectionTracks(structType interface{}) MediaTransportControlDataEnumerateCategoriesSelectionTracks {
+ if casted, ok := structType.(MediaTransportControlDataEnumerateCategoriesSelectionTracks); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataEnumerateCategoriesSelectionTracks); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) GetTypeName() string {
+ return "MediaTransportControlDataEnumerateCategoriesSelectionTracks"
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (enumerateType)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // Simple field (start)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataEnumerateCategoriesSelectionTracksParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataEnumerateCategoriesSelectionTracks, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataEnumerateCategoriesSelectionTracks"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataEnumerateCategoriesSelectionTracks")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (enumerateType)
+ _enumerateType, _enumerateTypeErr := readBuffer.ReadByte("enumerateType")
+ if _enumerateTypeErr != nil {
+ return nil, errors.Wrap(_enumerateTypeErr, "Error parsing 'enumerateType' field of MediaTransportControlDataEnumerateCategoriesSelectionTracks")
+ }
+ enumerateType := _enumerateType
+
+ // Virtual field
+ _isListCategories := bool((enumerateType) == (0x00))
+ isListCategories := bool(_isListCategories)
+ _ = isListCategories
+
+ // Virtual field
+ _isListSelections := bool((enumerateType) == (0x01))
+ isListSelections := bool(_isListSelections)
+ _ = isListSelections
+
+ // Virtual field
+ _isListTracks := bool((enumerateType) == (0x02))
+ isListTracks := bool(_isListTracks)
+ _ = isListTracks
+
+ // Virtual field
+ _isReserved := bool(bool(!(isListCategories)) && bool(!(isListSelections))) && bool(!(isListTracks))
+ isReserved := bool(_isReserved)
+ _ = isReserved
+
+ // Simple Field (start)
+ _start, _startErr := readBuffer.ReadUint8("start", 8)
+ if _startErr != nil {
+ return nil, errors.Wrap(_startErr, "Error parsing 'start' field of MediaTransportControlDataEnumerateCategoriesSelectionTracks")
+ }
+ start := _start
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataEnumerateCategoriesSelectionTracks"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataEnumerateCategoriesSelectionTracks")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataEnumerateCategoriesSelectionTracks{
+ EnumerateType: enumerateType,
+ Start: start,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataEnumerateCategoriesSelectionTracks"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataEnumerateCategoriesSelectionTracks")
+ }
+
+ // Simple Field (enumerateType)
+ enumerateType := byte(m.GetEnumerateType())
+ _enumerateTypeErr := writeBuffer.WriteByte("enumerateType", (enumerateType))
+ if _enumerateTypeErr != nil {
+ return errors.Wrap(_enumerateTypeErr, "Error serializing 'enumerateType' field")
+ }
+ // Virtual field
+ if _isListCategoriesErr := writeBuffer.WriteVirtual("isListCategories", m.GetIsListCategories()); _isListCategoriesErr != nil {
+ return errors.Wrap(_isListCategoriesErr, "Error serializing 'isListCategories' field")
+ }
+ // Virtual field
+ if _isListSelectionsErr := writeBuffer.WriteVirtual("isListSelections", m.GetIsListSelections()); _isListSelectionsErr != nil {
+ return errors.Wrap(_isListSelectionsErr, "Error serializing 'isListSelections' field")
+ }
+ // Virtual field
+ if _isListTracksErr := writeBuffer.WriteVirtual("isListTracks", m.GetIsListTracks()); _isListTracksErr != nil {
+ return errors.Wrap(_isListTracksErr, "Error serializing 'isListTracks' field")
+ }
+ // Virtual field
+ if _isReservedErr := writeBuffer.WriteVirtual("isReserved", m.GetIsReserved()); _isReservedErr != nil {
+ return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field")
+ }
+
+ // Simple Field (start)
+ start := uint8(m.GetStart())
+ _startErr := writeBuffer.WriteUint8("start", 8, (start))
+ if _startErr != nil {
+ return errors.Wrap(_startErr, "Error serializing 'start' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataEnumerateCategoriesSelectionTracks"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataEnumerateCategoriesSelectionTracks")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) isMediaTransportControlDataEnumerateCategoriesSelectionTracks() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataEnumerateCategoriesSelectionTracks) 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/MediaTransportControlDataEnumerationsSize.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataEnumerationsSize.go
new file mode 100644
index 000000000..d15814d99
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataEnumerationsSize.go
@@ -0,0 +1,320 @@
+/*
+ * 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.
+
+// MediaTransportControlDataEnumerationsSize is the corresponding interface of MediaTransportControlDataEnumerationsSize
+type MediaTransportControlDataEnumerationsSize interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetSizeType returns SizeType (property field)
+ GetSizeType() byte
+ // GetStart returns Start (property field)
+ GetStart() uint8
+ // GetSize returns Size (property field)
+ GetSize() uint8
+ // GetIsListCategories returns IsListCategories (virtual field)
+ GetIsListCategories() bool
+ // GetIsListSelections returns IsListSelections (virtual field)
+ GetIsListSelections() bool
+ // GetIsListTracks returns IsListTracks (virtual field)
+ GetIsListTracks() bool
+ // GetIsReserved returns IsReserved (virtual field)
+ GetIsReserved() bool
+}
+
+// MediaTransportControlDataEnumerationsSizeExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataEnumerationsSize.
+// This is useful for switch cases.
+type MediaTransportControlDataEnumerationsSizeExactly interface {
+ MediaTransportControlDataEnumerationsSize
+ isMediaTransportControlDataEnumerationsSize() bool
+}
+
+// _MediaTransportControlDataEnumerationsSize is the data-structure of this message
+type _MediaTransportControlDataEnumerationsSize struct {
+ *_MediaTransportControlData
+ SizeType byte
+ Start uint8
+ Size uint8
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataEnumerationsSize) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetSizeType() byte {
+ return m.SizeType
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetStart() uint8 {
+ return m.Start
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetSize() uint8 {
+ return m.Size
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetIsListCategories() bool {
+ return bool(bool((m.GetSizeType()) == (0x00)))
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetIsListSelections() bool {
+ return bool(bool((m.GetSizeType()) == (0x01)))
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetIsListTracks() bool {
+ return bool(bool((m.GetSizeType()) == (0x02)))
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetIsReserved() bool {
+ return bool(bool(bool(!(m.GetIsListCategories())) && bool(!(m.GetIsListSelections()))) && bool(!(m.GetIsListTracks())))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataEnumerationsSize factory function for _MediaTransportControlDataEnumerationsSize
+func NewMediaTransportControlDataEnumerationsSize(sizeType byte, start uint8, size uint8, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataEnumerationsSize {
+ _result := &_MediaTransportControlDataEnumerationsSize{
+ SizeType: sizeType,
+ Start: start,
+ Size: size,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataEnumerationsSize(structType interface{}) MediaTransportControlDataEnumerationsSize {
+ if casted, ok := structType.(MediaTransportControlDataEnumerationsSize); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataEnumerationsSize); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetTypeName() string {
+ return "MediaTransportControlDataEnumerationsSize"
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (sizeType)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // Simple field (start)
+ lengthInBits += 8
+
+ // Simple field (size)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataEnumerationsSizeParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataEnumerationsSize, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataEnumerationsSize"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataEnumerationsSize")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (sizeType)
+ _sizeType, _sizeTypeErr := readBuffer.ReadByte("sizeType")
+ if _sizeTypeErr != nil {
+ return nil, errors.Wrap(_sizeTypeErr, "Error parsing 'sizeType' field of MediaTransportControlDataEnumerationsSize")
+ }
+ sizeType := _sizeType
+
+ // Virtual field
+ _isListCategories := bool((sizeType) == (0x00))
+ isListCategories := bool(_isListCategories)
+ _ = isListCategories
+
+ // Virtual field
+ _isListSelections := bool((sizeType) == (0x01))
+ isListSelections := bool(_isListSelections)
+ _ = isListSelections
+
+ // Virtual field
+ _isListTracks := bool((sizeType) == (0x02))
+ isListTracks := bool(_isListTracks)
+ _ = isListTracks
+
+ // Virtual field
+ _isReserved := bool(bool(!(isListCategories)) && bool(!(isListSelections))) && bool(!(isListTracks))
+ isReserved := bool(_isReserved)
+ _ = isReserved
+
+ // Simple Field (start)
+ _start, _startErr := readBuffer.ReadUint8("start", 8)
+ if _startErr != nil {
+ return nil, errors.Wrap(_startErr, "Error parsing 'start' field of MediaTransportControlDataEnumerationsSize")
+ }
+ start := _start
+
+ // Simple Field (size)
+ _size, _sizeErr := readBuffer.ReadUint8("size", 8)
+ if _sizeErr != nil {
+ return nil, errors.Wrap(_sizeErr, "Error parsing 'size' field of MediaTransportControlDataEnumerationsSize")
+ }
+ size := _size
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataEnumerationsSize"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataEnumerationsSize")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataEnumerationsSize{
+ SizeType: sizeType,
+ Start: start,
+ Size: size,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataEnumerationsSize"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataEnumerationsSize")
+ }
+
+ // Simple Field (sizeType)
+ sizeType := byte(m.GetSizeType())
+ _sizeTypeErr := writeBuffer.WriteByte("sizeType", (sizeType))
+ if _sizeTypeErr != nil {
+ return errors.Wrap(_sizeTypeErr, "Error serializing 'sizeType' field")
+ }
+ // Virtual field
+ if _isListCategoriesErr := writeBuffer.WriteVirtual("isListCategories", m.GetIsListCategories()); _isListCategoriesErr != nil {
+ return errors.Wrap(_isListCategoriesErr, "Error serializing 'isListCategories' field")
+ }
+ // Virtual field
+ if _isListSelectionsErr := writeBuffer.WriteVirtual("isListSelections", m.GetIsListSelections()); _isListSelectionsErr != nil {
+ return errors.Wrap(_isListSelectionsErr, "Error serializing 'isListSelections' field")
+ }
+ // Virtual field
+ if _isListTracksErr := writeBuffer.WriteVirtual("isListTracks", m.GetIsListTracks()); _isListTracksErr != nil {
+ return errors.Wrap(_isListTracksErr, "Error serializing 'isListTracks' field")
+ }
+ // Virtual field
+ if _isReservedErr := writeBuffer.WriteVirtual("isReserved", m.GetIsReserved()); _isReservedErr != nil {
+ return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field")
+ }
+
+ // Simple Field (start)
+ start := uint8(m.GetStart())
+ _startErr := writeBuffer.WriteUint8("start", 8, (start))
+ if _startErr != nil {
+ return errors.Wrap(_startErr, "Error serializing 'start' field")
+ }
+
+ // Simple Field (size)
+ size := uint8(m.GetSize())
+ _sizeErr := writeBuffer.WriteUint8("size", 8, (size))
+ if _sizeErr != nil {
+ return errors.Wrap(_sizeErr, "Error serializing 'size' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataEnumerationsSize"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataEnumerationsSize")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) isMediaTransportControlDataEnumerationsSize() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataEnumerationsSize) 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/MediaTransportControlDataFastForward.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataFastForward.go
new file mode 100644
index 000000000..3dd84a4e2
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataFastForward.go
@@ -0,0 +1,336 @@
+/*
+ * 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.
+
+// MediaTransportControlDataFastForward is the corresponding interface of MediaTransportControlDataFastForward
+type MediaTransportControlDataFastForward interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetOperation returns Operation (property field)
+ GetOperation() byte
+ // GetIsCeaseFastForward returns IsCeaseFastForward (virtual field)
+ GetIsCeaseFastForward() bool
+ // GetIs2x returns Is2x (virtual field)
+ GetIs2x() bool
+ // GetIs4x returns Is4x (virtual field)
+ GetIs4x() bool
+ // GetIs8x returns Is8x (virtual field)
+ GetIs8x() bool
+ // GetIs16x returns Is16x (virtual field)
+ GetIs16x() bool
+ // GetIs32x returns Is32x (virtual field)
+ GetIs32x() bool
+ // GetIs64x returns Is64x (virtual field)
+ GetIs64x() bool
+ // GetIsReserved returns IsReserved (virtual field)
+ GetIsReserved() bool
+}
+
+// MediaTransportControlDataFastForwardExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataFastForward.
+// This is useful for switch cases.
+type MediaTransportControlDataFastForwardExactly interface {
+ MediaTransportControlDataFastForward
+ isMediaTransportControlDataFastForward() bool
+}
+
+// _MediaTransportControlDataFastForward is the data-structure of this message
+type _MediaTransportControlDataFastForward struct {
+ *_MediaTransportControlData
+ Operation byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataFastForward) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataFastForward) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataFastForward) GetOperation() byte {
+ return m.Operation
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataFastForward) GetIsCeaseFastForward() bool {
+ return bool(bool((m.GetOperation()) == (0x00)))
+}
+
+func (m *_MediaTransportControlDataFastForward) GetIs2x() bool {
+ return bool(bool((m.GetOperation()) == (0x02)))
+}
+
+func (m *_MediaTransportControlDataFastForward) GetIs4x() bool {
+ return bool(bool((m.GetOperation()) == (0x04)))
+}
+
+func (m *_MediaTransportControlDataFastForward) GetIs8x() bool {
+ return bool(bool((m.GetOperation()) == (0x06)))
+}
+
+func (m *_MediaTransportControlDataFastForward) GetIs16x() bool {
+ return bool(bool((m.GetOperation()) == (0x08)))
+}
+
+func (m *_MediaTransportControlDataFastForward) GetIs32x() bool {
+ return bool(bool((m.GetOperation()) == (0x0A)))
+}
+
+func (m *_MediaTransportControlDataFastForward) GetIs64x() bool {
+ return bool(bool((m.GetOperation()) == (0x0C)))
+}
+
+func (m *_MediaTransportControlDataFastForward) GetIsReserved() bool {
+ return bool(bool(bool(bool(bool(bool(bool(!(m.GetIsCeaseFastForward())) && bool(!(m.GetIs2x()))) && bool(!(m.GetIs4x()))) && bool(!(m.GetIs8x()))) && bool(!(m.GetIs16x()))) && bool(!(m.GetIs32x()))) && bool(!(m.GetIs64x())))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataFastForward factory function for _MediaTransportControlDataFastForward
+func NewMediaTransportControlDataFastForward(operation byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataFastForward {
+ _result := &_MediaTransportControlDataFastForward{
+ Operation: operation,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataFastForward(structType interface{}) MediaTransportControlDataFastForward {
+ if casted, ok := structType.(MediaTransportControlDataFastForward); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataFastForward); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataFastForward) GetTypeName() string {
+ return "MediaTransportControlDataFastForward"
+}
+
+func (m *_MediaTransportControlDataFastForward) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataFastForward) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (operation)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataFastForward) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataFastForwardParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataFastForward, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataFastForward"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataFastForward")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (operation)
+ _operation, _operationErr := readBuffer.ReadByte("operation")
+ if _operationErr != nil {
+ return nil, errors.Wrap(_operationErr, "Error parsing 'operation' field of MediaTransportControlDataFastForward")
+ }
+ operation := _operation
+
+ // Virtual field
+ _isCeaseFastForward := bool((operation) == (0x00))
+ isCeaseFastForward := bool(_isCeaseFastForward)
+ _ = isCeaseFastForward
+
+ // Virtual field
+ _is2x := bool((operation) == (0x02))
+ is2x := bool(_is2x)
+ _ = is2x
+
+ // Virtual field
+ _is4x := bool((operation) == (0x04))
+ is4x := bool(_is4x)
+ _ = is4x
+
+ // Virtual field
+ _is8x := bool((operation) == (0x06))
+ is8x := bool(_is8x)
+ _ = is8x
+
+ // Virtual field
+ _is16x := bool((operation) == (0x08))
+ is16x := bool(_is16x)
+ _ = is16x
+
+ // Virtual field
+ _is32x := bool((operation) == (0x0A))
+ is32x := bool(_is32x)
+ _ = is32x
+
+ // Virtual field
+ _is64x := bool((operation) == (0x0C))
+ is64x := bool(_is64x)
+ _ = is64x
+
+ // Virtual field
+ _isReserved := bool(bool(bool(bool(bool(bool(!(isCeaseFastForward)) && bool(!(is2x))) && bool(!(is4x))) && bool(!(is8x))) && bool(!(is16x))) && bool(!(is32x))) && bool(!(is64x))
+ isReserved := bool(_isReserved)
+ _ = isReserved
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataFastForward"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataFastForward")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataFastForward{
+ Operation: operation,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataFastForward) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataFastForward"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataFastForward")
+ }
+
+ // Simple Field (operation)
+ operation := byte(m.GetOperation())
+ _operationErr := writeBuffer.WriteByte("operation", (operation))
+ if _operationErr != nil {
+ return errors.Wrap(_operationErr, "Error serializing 'operation' field")
+ }
+ // Virtual field
+ if _isCeaseFastForwardErr := writeBuffer.WriteVirtual("isCeaseFastForward", m.GetIsCeaseFastForward()); _isCeaseFastForwardErr != nil {
+ return errors.Wrap(_isCeaseFastForwardErr, "Error serializing 'isCeaseFastForward' field")
+ }
+ // Virtual field
+ if _is2xErr := writeBuffer.WriteVirtual("is2x", m.GetIs2x()); _is2xErr != nil {
+ return errors.Wrap(_is2xErr, "Error serializing 'is2x' field")
+ }
+ // Virtual field
+ if _is4xErr := writeBuffer.WriteVirtual("is4x", m.GetIs4x()); _is4xErr != nil {
+ return errors.Wrap(_is4xErr, "Error serializing 'is4x' field")
+ }
+ // Virtual field
+ if _is8xErr := writeBuffer.WriteVirtual("is8x", m.GetIs8x()); _is8xErr != nil {
+ return errors.Wrap(_is8xErr, "Error serializing 'is8x' field")
+ }
+ // Virtual field
+ if _is16xErr := writeBuffer.WriteVirtual("is16x", m.GetIs16x()); _is16xErr != nil {
+ return errors.Wrap(_is16xErr, "Error serializing 'is16x' field")
+ }
+ // Virtual field
+ if _is32xErr := writeBuffer.WriteVirtual("is32x", m.GetIs32x()); _is32xErr != nil {
+ return errors.Wrap(_is32xErr, "Error serializing 'is32x' field")
+ }
+ // Virtual field
+ if _is64xErr := writeBuffer.WriteVirtual("is64x", m.GetIs64x()); _is64xErr != nil {
+ return errors.Wrap(_is64xErr, "Error serializing 'is64x' field")
+ }
+ // Virtual field
+ if _isReservedErr := writeBuffer.WriteVirtual("isReserved", m.GetIsReserved()); _isReservedErr != nil {
+ return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataFastForward"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataFastForward")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataFastForward) isMediaTransportControlDataFastForward() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataFastForward) 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/MediaTransportControlDataNextPreviousCategory.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataNextPreviousCategory.go
new file mode 100644
index 000000000..feac3fa58
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataNextPreviousCategory.go
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataNextPreviousCategory is the corresponding interface of MediaTransportControlDataNextPreviousCategory
+type MediaTransportControlDataNextPreviousCategory interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetOperation returns Operation (property field)
+ GetOperation() byte
+ // GetIsSetThePreviousCategory returns IsSetThePreviousCategory (virtual field)
+ GetIsSetThePreviousCategory() bool
+ // GetIsSetTheNextCategory returns IsSetTheNextCategory (virtual field)
+ GetIsSetTheNextCategory() bool
+}
+
+// MediaTransportControlDataNextPreviousCategoryExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataNextPreviousCategory.
+// This is useful for switch cases.
+type MediaTransportControlDataNextPreviousCategoryExactly interface {
+ MediaTransportControlDataNextPreviousCategory
+ isMediaTransportControlDataNextPreviousCategory() bool
+}
+
+// _MediaTransportControlDataNextPreviousCategory is the data-structure of this message
+type _MediaTransportControlDataNextPreviousCategory struct {
+ *_MediaTransportControlData
+ Operation byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataNextPreviousCategory) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataNextPreviousCategory) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataNextPreviousCategory) GetOperation() byte {
+ return m.Operation
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataNextPreviousCategory) GetIsSetThePreviousCategory() bool {
+ return bool(bool((m.GetOperation()) == (0x00)))
+}
+
+func (m *_MediaTransportControlDataNextPreviousCategory) GetIsSetTheNextCategory() bool {
+ return bool(bool((m.GetOperation()) != (0x00)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataNextPreviousCategory factory function for _MediaTransportControlDataNextPreviousCategory
+func NewMediaTransportControlDataNextPreviousCategory(operation byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataNextPreviousCategory {
+ _result := &_MediaTransportControlDataNextPreviousCategory{
+ Operation: operation,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataNextPreviousCategory(structType interface{}) MediaTransportControlDataNextPreviousCategory {
+ if casted, ok := structType.(MediaTransportControlDataNextPreviousCategory); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataNextPreviousCategory); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataNextPreviousCategory) GetTypeName() string {
+ return "MediaTransportControlDataNextPreviousCategory"
+}
+
+func (m *_MediaTransportControlDataNextPreviousCategory) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataNextPreviousCategory) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (operation)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataNextPreviousCategory) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataNextPreviousCategoryParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataNextPreviousCategory, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataNextPreviousCategory"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataNextPreviousCategory")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (operation)
+ _operation, _operationErr := readBuffer.ReadByte("operation")
+ if _operationErr != nil {
+ return nil, errors.Wrap(_operationErr, "Error parsing 'operation' field of MediaTransportControlDataNextPreviousCategory")
+ }
+ operation := _operation
+
+ // Virtual field
+ _isSetThePreviousCategory := bool((operation) == (0x00))
+ isSetThePreviousCategory := bool(_isSetThePreviousCategory)
+ _ = isSetThePreviousCategory
+
+ // Virtual field
+ _isSetTheNextCategory := bool((operation) != (0x00))
+ isSetTheNextCategory := bool(_isSetTheNextCategory)
+ _ = isSetTheNextCategory
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataNextPreviousCategory"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataNextPreviousCategory")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataNextPreviousCategory{
+ Operation: operation,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataNextPreviousCategory) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataNextPreviousCategory"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataNextPreviousCategory")
+ }
+
+ // Simple Field (operation)
+ operation := byte(m.GetOperation())
+ _operationErr := writeBuffer.WriteByte("operation", (operation))
+ if _operationErr != nil {
+ return errors.Wrap(_operationErr, "Error serializing 'operation' field")
+ }
+ // Virtual field
+ if _isSetThePreviousCategoryErr := writeBuffer.WriteVirtual("isSetThePreviousCategory", m.GetIsSetThePreviousCategory()); _isSetThePreviousCategoryErr != nil {
+ return errors.Wrap(_isSetThePreviousCategoryErr, "Error serializing 'isSetThePreviousCategory' field")
+ }
+ // Virtual field
+ if _isSetTheNextCategoryErr := writeBuffer.WriteVirtual("isSetTheNextCategory", m.GetIsSetTheNextCategory()); _isSetTheNextCategoryErr != nil {
+ return errors.Wrap(_isSetTheNextCategoryErr, "Error serializing 'isSetTheNextCategory' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataNextPreviousCategory"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataNextPreviousCategory")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataNextPreviousCategory) isMediaTransportControlDataNextPreviousCategory() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataNextPreviousCategory) 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/MediaTransportControlDataNextPreviousSelection.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataNextPreviousSelection.go
new file mode 100644
index 000000000..e24525674
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataNextPreviousSelection.go
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataNextPreviousSelection is the corresponding interface of MediaTransportControlDataNextPreviousSelection
+type MediaTransportControlDataNextPreviousSelection interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetOperation returns Operation (property field)
+ GetOperation() byte
+ // GetIsSetThePreviousSelection returns IsSetThePreviousSelection (virtual field)
+ GetIsSetThePreviousSelection() bool
+ // GetIsSetTheNextSelection returns IsSetTheNextSelection (virtual field)
+ GetIsSetTheNextSelection() bool
+}
+
+// MediaTransportControlDataNextPreviousSelectionExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataNextPreviousSelection.
+// This is useful for switch cases.
+type MediaTransportControlDataNextPreviousSelectionExactly interface {
+ MediaTransportControlDataNextPreviousSelection
+ isMediaTransportControlDataNextPreviousSelection() bool
+}
+
+// _MediaTransportControlDataNextPreviousSelection is the data-structure of this message
+type _MediaTransportControlDataNextPreviousSelection struct {
+ *_MediaTransportControlData
+ Operation byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataNextPreviousSelection) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataNextPreviousSelection) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataNextPreviousSelection) GetOperation() byte {
+ return m.Operation
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataNextPreviousSelection) GetIsSetThePreviousSelection() bool {
+ return bool(bool((m.GetOperation()) == (0x00)))
+}
+
+func (m *_MediaTransportControlDataNextPreviousSelection) GetIsSetTheNextSelection() bool {
+ return bool(bool((m.GetOperation()) != (0x00)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataNextPreviousSelection factory function for _MediaTransportControlDataNextPreviousSelection
+func NewMediaTransportControlDataNextPreviousSelection(operation byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataNextPreviousSelection {
+ _result := &_MediaTransportControlDataNextPreviousSelection{
+ Operation: operation,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataNextPreviousSelection(structType interface{}) MediaTransportControlDataNextPreviousSelection {
+ if casted, ok := structType.(MediaTransportControlDataNextPreviousSelection); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataNextPreviousSelection); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataNextPreviousSelection) GetTypeName() string {
+ return "MediaTransportControlDataNextPreviousSelection"
+}
+
+func (m *_MediaTransportControlDataNextPreviousSelection) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataNextPreviousSelection) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (operation)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataNextPreviousSelection) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataNextPreviousSelectionParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataNextPreviousSelection, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataNextPreviousSelection"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataNextPreviousSelection")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (operation)
+ _operation, _operationErr := readBuffer.ReadByte("operation")
+ if _operationErr != nil {
+ return nil, errors.Wrap(_operationErr, "Error parsing 'operation' field of MediaTransportControlDataNextPreviousSelection")
+ }
+ operation := _operation
+
+ // Virtual field
+ _isSetThePreviousSelection := bool((operation) == (0x00))
+ isSetThePreviousSelection := bool(_isSetThePreviousSelection)
+ _ = isSetThePreviousSelection
+
+ // Virtual field
+ _isSetTheNextSelection := bool((operation) != (0x00))
+ isSetTheNextSelection := bool(_isSetTheNextSelection)
+ _ = isSetTheNextSelection
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataNextPreviousSelection"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataNextPreviousSelection")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataNextPreviousSelection{
+ Operation: operation,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataNextPreviousSelection) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataNextPreviousSelection"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataNextPreviousSelection")
+ }
+
+ // Simple Field (operation)
+ operation := byte(m.GetOperation())
+ _operationErr := writeBuffer.WriteByte("operation", (operation))
+ if _operationErr != nil {
+ return errors.Wrap(_operationErr, "Error serializing 'operation' field")
+ }
+ // Virtual field
+ if _isSetThePreviousSelectionErr := writeBuffer.WriteVirtual("isSetThePreviousSelection", m.GetIsSetThePreviousSelection()); _isSetThePreviousSelectionErr != nil {
+ return errors.Wrap(_isSetThePreviousSelectionErr, "Error serializing 'isSetThePreviousSelection' field")
+ }
+ // Virtual field
+ if _isSetTheNextSelectionErr := writeBuffer.WriteVirtual("isSetTheNextSelection", m.GetIsSetTheNextSelection()); _isSetTheNextSelectionErr != nil {
+ return errors.Wrap(_isSetTheNextSelectionErr, "Error serializing 'isSetTheNextSelection' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataNextPreviousSelection"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataNextPreviousSelection")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataNextPreviousSelection) isMediaTransportControlDataNextPreviousSelection() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataNextPreviousSelection) 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/MediaTransportControlDataNextPreviousTrack.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataNextPreviousTrack.go
new file mode 100644
index 000000000..384f27f05
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataNextPreviousTrack.go
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataNextPreviousTrack is the corresponding interface of MediaTransportControlDataNextPreviousTrack
+type MediaTransportControlDataNextPreviousTrack interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetOperation returns Operation (property field)
+ GetOperation() byte
+ // GetIsSetThePreviousTrack returns IsSetThePreviousTrack (virtual field)
+ GetIsSetThePreviousTrack() bool
+ // GetIsSetTheNextTrack returns IsSetTheNextTrack (virtual field)
+ GetIsSetTheNextTrack() bool
+}
+
+// MediaTransportControlDataNextPreviousTrackExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataNextPreviousTrack.
+// This is useful for switch cases.
+type MediaTransportControlDataNextPreviousTrackExactly interface {
+ MediaTransportControlDataNextPreviousTrack
+ isMediaTransportControlDataNextPreviousTrack() bool
+}
+
+// _MediaTransportControlDataNextPreviousTrack is the data-structure of this message
+type _MediaTransportControlDataNextPreviousTrack struct {
+ *_MediaTransportControlData
+ Operation byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataNextPreviousTrack) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataNextPreviousTrack) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataNextPreviousTrack) GetOperation() byte {
+ return m.Operation
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataNextPreviousTrack) GetIsSetThePreviousTrack() bool {
+ return bool(bool((m.GetOperation()) == (0x00)))
+}
+
+func (m *_MediaTransportControlDataNextPreviousTrack) GetIsSetTheNextTrack() bool {
+ return bool(bool((m.GetOperation()) != (0x00)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataNextPreviousTrack factory function for _MediaTransportControlDataNextPreviousTrack
+func NewMediaTransportControlDataNextPreviousTrack(operation byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataNextPreviousTrack {
+ _result := &_MediaTransportControlDataNextPreviousTrack{
+ Operation: operation,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataNextPreviousTrack(structType interface{}) MediaTransportControlDataNextPreviousTrack {
+ if casted, ok := structType.(MediaTransportControlDataNextPreviousTrack); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataNextPreviousTrack); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataNextPreviousTrack) GetTypeName() string {
+ return "MediaTransportControlDataNextPreviousTrack"
+}
+
+func (m *_MediaTransportControlDataNextPreviousTrack) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataNextPreviousTrack) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (operation)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataNextPreviousTrack) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataNextPreviousTrackParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataNextPreviousTrack, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataNextPreviousTrack"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataNextPreviousTrack")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (operation)
+ _operation, _operationErr := readBuffer.ReadByte("operation")
+ if _operationErr != nil {
+ return nil, errors.Wrap(_operationErr, "Error parsing 'operation' field of MediaTransportControlDataNextPreviousTrack")
+ }
+ operation := _operation
+
+ // Virtual field
+ _isSetThePreviousTrack := bool((operation) == (0x00))
+ isSetThePreviousTrack := bool(_isSetThePreviousTrack)
+ _ = isSetThePreviousTrack
+
+ // Virtual field
+ _isSetTheNextTrack := bool((operation) != (0x00))
+ isSetTheNextTrack := bool(_isSetTheNextTrack)
+ _ = isSetTheNextTrack
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataNextPreviousTrack"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataNextPreviousTrack")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataNextPreviousTrack{
+ Operation: operation,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataNextPreviousTrack) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataNextPreviousTrack"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataNextPreviousTrack")
+ }
+
+ // Simple Field (operation)
+ operation := byte(m.GetOperation())
+ _operationErr := writeBuffer.WriteByte("operation", (operation))
+ if _operationErr != nil {
+ return errors.Wrap(_operationErr, "Error serializing 'operation' field")
+ }
+ // Virtual field
+ if _isSetThePreviousTrackErr := writeBuffer.WriteVirtual("isSetThePreviousTrack", m.GetIsSetThePreviousTrack()); _isSetThePreviousTrackErr != nil {
+ return errors.Wrap(_isSetThePreviousTrackErr, "Error serializing 'isSetThePreviousTrack' field")
+ }
+ // Virtual field
+ if _isSetTheNextTrackErr := writeBuffer.WriteVirtual("isSetTheNextTrack", m.GetIsSetTheNextTrack()); _isSetTheNextTrackErr != nil {
+ return errors.Wrap(_isSetTheNextTrackErr, "Error serializing 'isSetTheNextTrack' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataNextPreviousTrack"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataNextPreviousTrack")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataNextPreviousTrack) isMediaTransportControlDataNextPreviousTrack() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataNextPreviousTrack) 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/MediaTransportControlDataPauseResume.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataPauseResume.go
new file mode 100644
index 000000000..7fff628a0
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataPauseResume.go
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataPauseResume is the corresponding interface of MediaTransportControlDataPauseResume
+type MediaTransportControlDataPauseResume interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetOperation returns Operation (property field)
+ GetOperation() byte
+ // GetIsPause returns IsPause (virtual field)
+ GetIsPause() bool
+ // GetIsResume returns IsResume (virtual field)
+ GetIsResume() bool
+}
+
+// MediaTransportControlDataPauseResumeExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataPauseResume.
+// This is useful for switch cases.
+type MediaTransportControlDataPauseResumeExactly interface {
+ MediaTransportControlDataPauseResume
+ isMediaTransportControlDataPauseResume() bool
+}
+
+// _MediaTransportControlDataPauseResume is the data-structure of this message
+type _MediaTransportControlDataPauseResume struct {
+ *_MediaTransportControlData
+ Operation byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataPauseResume) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataPauseResume) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataPauseResume) GetOperation() byte {
+ return m.Operation
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataPauseResume) GetIsPause() bool {
+ return bool(bool((m.GetOperation()) == (0x00)))
+}
+
+func (m *_MediaTransportControlDataPauseResume) GetIsResume() bool {
+ return bool(bool((m.GetOperation()) > (0xFE)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataPauseResume factory function for _MediaTransportControlDataPauseResume
+func NewMediaTransportControlDataPauseResume(operation byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataPauseResume {
+ _result := &_MediaTransportControlDataPauseResume{
+ Operation: operation,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataPauseResume(structType interface{}) MediaTransportControlDataPauseResume {
+ if casted, ok := structType.(MediaTransportControlDataPauseResume); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataPauseResume); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataPauseResume) GetTypeName() string {
+ return "MediaTransportControlDataPauseResume"
+}
+
+func (m *_MediaTransportControlDataPauseResume) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataPauseResume) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (operation)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataPauseResume) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataPauseResumeParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataPauseResume, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataPauseResume"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataPauseResume")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (operation)
+ _operation, _operationErr := readBuffer.ReadByte("operation")
+ if _operationErr != nil {
+ return nil, errors.Wrap(_operationErr, "Error parsing 'operation' field of MediaTransportControlDataPauseResume")
+ }
+ operation := _operation
+
+ // Virtual field
+ _isPause := bool((operation) == (0x00))
+ isPause := bool(_isPause)
+ _ = isPause
+
+ // Virtual field
+ _isResume := bool((operation) > (0xFE))
+ isResume := bool(_isResume)
+ _ = isResume
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataPauseResume"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataPauseResume")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataPauseResume{
+ Operation: operation,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataPauseResume) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataPauseResume"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataPauseResume")
+ }
+
+ // Simple Field (operation)
+ operation := byte(m.GetOperation())
+ _operationErr := writeBuffer.WriteByte("operation", (operation))
+ if _operationErr != nil {
+ return errors.Wrap(_operationErr, "Error serializing 'operation' field")
+ }
+ // Virtual field
+ if _isPauseErr := writeBuffer.WriteVirtual("isPause", m.GetIsPause()); _isPauseErr != nil {
+ return errors.Wrap(_isPauseErr, "Error serializing 'isPause' field")
+ }
+ // Virtual field
+ if _isResumeErr := writeBuffer.WriteVirtual("isResume", m.GetIsResume()); _isResumeErr != nil {
+ return errors.Wrap(_isResumeErr, "Error serializing 'isResume' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataPauseResume"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataPauseResume")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataPauseResume) isMediaTransportControlDataPauseResume() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataPauseResume) 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/MediaTransportControlDataPlay.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataPlay.go
new file mode 100644
index 000000000..03cbeadc6
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataPlay.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataPlay is the corresponding interface of MediaTransportControlDataPlay
+type MediaTransportControlDataPlay interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+}
+
+// MediaTransportControlDataPlayExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataPlay.
+// This is useful for switch cases.
+type MediaTransportControlDataPlayExactly interface {
+ MediaTransportControlDataPlay
+ isMediaTransportControlDataPlay() bool
+}
+
+// _MediaTransportControlDataPlay is the data-structure of this message
+type _MediaTransportControlDataPlay struct {
+ *_MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataPlay) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataPlay) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+// NewMediaTransportControlDataPlay factory function for _MediaTransportControlDataPlay
+func NewMediaTransportControlDataPlay(commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataPlay {
+ _result := &_MediaTransportControlDataPlay{
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataPlay(structType interface{}) MediaTransportControlDataPlay {
+ if casted, ok := structType.(MediaTransportControlDataPlay); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataPlay); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataPlay) GetTypeName() string {
+ return "MediaTransportControlDataPlay"
+}
+
+func (m *_MediaTransportControlDataPlay) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataPlay) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataPlay) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataPlayParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataPlay, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataPlay"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataPlay")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataPlay"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataPlay")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataPlay{
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataPlay) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataPlay"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataPlay")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataPlay"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataPlay")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataPlay) isMediaTransportControlDataPlay() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataPlay) 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/MediaTransportControlDataRepeatOnOff.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataRepeatOnOff.go
new file mode 100644
index 000000000..697741fbe
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataRepeatOnOff.go
@@ -0,0 +1,251 @@
+/*
+ * 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.
+
+// MediaTransportControlDataRepeatOnOff is the corresponding interface of MediaTransportControlDataRepeatOnOff
+type MediaTransportControlDataRepeatOnOff interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetRepeatType returns RepeatType (property field)
+ GetRepeatType() byte
+ // GetIsOff returns IsOff (virtual field)
+ GetIsOff() bool
+ // GetIsRepeatCurrent returns IsRepeatCurrent (virtual field)
+ GetIsRepeatCurrent() bool
+ // GetIsRepeatTracks returns IsRepeatTracks (virtual field)
+ GetIsRepeatTracks() bool
+}
+
+// MediaTransportControlDataRepeatOnOffExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataRepeatOnOff.
+// This is useful for switch cases.
+type MediaTransportControlDataRepeatOnOffExactly interface {
+ MediaTransportControlDataRepeatOnOff
+ isMediaTransportControlDataRepeatOnOff() bool
+}
+
+// _MediaTransportControlDataRepeatOnOff is the data-structure of this message
+type _MediaTransportControlDataRepeatOnOff struct {
+ *_MediaTransportControlData
+ RepeatType byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataRepeatOnOff) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataRepeatOnOff) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataRepeatOnOff) GetRepeatType() byte {
+ return m.RepeatType
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataRepeatOnOff) GetIsOff() bool {
+ return bool(bool((m.GetRepeatType()) == (0x00)))
+}
+
+func (m *_MediaTransportControlDataRepeatOnOff) GetIsRepeatCurrent() bool {
+ return bool(bool(bool((m.GetRepeatType()) > (0x00))) && bool(bool((m.GetRepeatType()) <= (0xFE))))
+}
+
+func (m *_MediaTransportControlDataRepeatOnOff) GetIsRepeatTracks() bool {
+ return bool(bool((m.GetRepeatType()) >= (0xFE)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataRepeatOnOff factory function for _MediaTransportControlDataRepeatOnOff
+func NewMediaTransportControlDataRepeatOnOff(repeatType byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataRepeatOnOff {
+ _result := &_MediaTransportControlDataRepeatOnOff{
+ RepeatType: repeatType,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataRepeatOnOff(structType interface{}) MediaTransportControlDataRepeatOnOff {
+ if casted, ok := structType.(MediaTransportControlDataRepeatOnOff); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataRepeatOnOff); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataRepeatOnOff) GetTypeName() string {
+ return "MediaTransportControlDataRepeatOnOff"
+}
+
+func (m *_MediaTransportControlDataRepeatOnOff) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataRepeatOnOff) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (repeatType)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataRepeatOnOff) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataRepeatOnOffParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataRepeatOnOff, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataRepeatOnOff"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataRepeatOnOff")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (repeatType)
+ _repeatType, _repeatTypeErr := readBuffer.ReadByte("repeatType")
+ if _repeatTypeErr != nil {
+ return nil, errors.Wrap(_repeatTypeErr, "Error parsing 'repeatType' field of MediaTransportControlDataRepeatOnOff")
+ }
+ repeatType := _repeatType
+
+ // Virtual field
+ _isOff := bool((repeatType) == (0x00))
+ isOff := bool(_isOff)
+ _ = isOff
+
+ // Virtual field
+ _isRepeatCurrent := bool(bool((repeatType) > (0x00))) && bool(bool((repeatType) <= (0xFE)))
+ isRepeatCurrent := bool(_isRepeatCurrent)
+ _ = isRepeatCurrent
+
+ // Virtual field
+ _isRepeatTracks := bool((repeatType) >= (0xFE))
+ isRepeatTracks := bool(_isRepeatTracks)
+ _ = isRepeatTracks
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataRepeatOnOff"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataRepeatOnOff")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataRepeatOnOff{
+ RepeatType: repeatType,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataRepeatOnOff) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataRepeatOnOff"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataRepeatOnOff")
+ }
+
+ // Simple Field (repeatType)
+ repeatType := byte(m.GetRepeatType())
+ _repeatTypeErr := writeBuffer.WriteByte("repeatType", (repeatType))
+ if _repeatTypeErr != nil {
+ return errors.Wrap(_repeatTypeErr, "Error serializing 'repeatType' field")
+ }
+ // Virtual field
+ if _isOffErr := writeBuffer.WriteVirtual("isOff", m.GetIsOff()); _isOffErr != nil {
+ return errors.Wrap(_isOffErr, "Error serializing 'isOff' field")
+ }
+ // Virtual field
+ if _isRepeatCurrentErr := writeBuffer.WriteVirtual("isRepeatCurrent", m.GetIsRepeatCurrent()); _isRepeatCurrentErr != nil {
+ return errors.Wrap(_isRepeatCurrentErr, "Error serializing 'isRepeatCurrent' field")
+ }
+ // Virtual field
+ if _isRepeatTracksErr := writeBuffer.WriteVirtual("isRepeatTracks", m.GetIsRepeatTracks()); _isRepeatTracksErr != nil {
+ return errors.Wrap(_isRepeatTracksErr, "Error serializing 'isRepeatTracks' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataRepeatOnOff"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataRepeatOnOff")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataRepeatOnOff) isMediaTransportControlDataRepeatOnOff() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataRepeatOnOff) 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/MediaTransportControlDataRewind.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataRewind.go
new file mode 100644
index 000000000..689d0159c
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataRewind.go
@@ -0,0 +1,336 @@
+/*
+ * 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.
+
+// MediaTransportControlDataRewind is the corresponding interface of MediaTransportControlDataRewind
+type MediaTransportControlDataRewind interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetOperation returns Operation (property field)
+ GetOperation() byte
+ // GetIsCeaseRewind returns IsCeaseRewind (virtual field)
+ GetIsCeaseRewind() bool
+ // GetIs2x returns Is2x (virtual field)
+ GetIs2x() bool
+ // GetIs4x returns Is4x (virtual field)
+ GetIs4x() bool
+ // GetIs8x returns Is8x (virtual field)
+ GetIs8x() bool
+ // GetIs16x returns Is16x (virtual field)
+ GetIs16x() bool
+ // GetIs32x returns Is32x (virtual field)
+ GetIs32x() bool
+ // GetIs64x returns Is64x (virtual field)
+ GetIs64x() bool
+ // GetIsReserved returns IsReserved (virtual field)
+ GetIsReserved() bool
+}
+
+// MediaTransportControlDataRewindExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataRewind.
+// This is useful for switch cases.
+type MediaTransportControlDataRewindExactly interface {
+ MediaTransportControlDataRewind
+ isMediaTransportControlDataRewind() bool
+}
+
+// _MediaTransportControlDataRewind is the data-structure of this message
+type _MediaTransportControlDataRewind struct {
+ *_MediaTransportControlData
+ Operation byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataRewind) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataRewind) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataRewind) GetOperation() byte {
+ return m.Operation
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataRewind) GetIsCeaseRewind() bool {
+ return bool(bool((m.GetOperation()) == (0x00)))
+}
+
+func (m *_MediaTransportControlDataRewind) GetIs2x() bool {
+ return bool(bool((m.GetOperation()) == (0x02)))
+}
+
+func (m *_MediaTransportControlDataRewind) GetIs4x() bool {
+ return bool(bool((m.GetOperation()) == (0x04)))
+}
+
+func (m *_MediaTransportControlDataRewind) GetIs8x() bool {
+ return bool(bool((m.GetOperation()) == (0x06)))
+}
+
+func (m *_MediaTransportControlDataRewind) GetIs16x() bool {
+ return bool(bool((m.GetOperation()) == (0x08)))
+}
+
+func (m *_MediaTransportControlDataRewind) GetIs32x() bool {
+ return bool(bool((m.GetOperation()) == (0x0A)))
+}
+
+func (m *_MediaTransportControlDataRewind) GetIs64x() bool {
+ return bool(bool((m.GetOperation()) == (0x0C)))
+}
+
+func (m *_MediaTransportControlDataRewind) GetIsReserved() bool {
+ return bool(bool(bool(bool(bool(bool(bool(!(m.GetIsCeaseRewind())) && bool(!(m.GetIs2x()))) && bool(!(m.GetIs4x()))) && bool(!(m.GetIs8x()))) && bool(!(m.GetIs16x()))) && bool(!(m.GetIs32x()))) && bool(!(m.GetIs64x())))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataRewind factory function for _MediaTransportControlDataRewind
+func NewMediaTransportControlDataRewind(operation byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataRewind {
+ _result := &_MediaTransportControlDataRewind{
+ Operation: operation,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataRewind(structType interface{}) MediaTransportControlDataRewind {
+ if casted, ok := structType.(MediaTransportControlDataRewind); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataRewind); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataRewind) GetTypeName() string {
+ return "MediaTransportControlDataRewind"
+}
+
+func (m *_MediaTransportControlDataRewind) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataRewind) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (operation)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataRewind) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataRewindParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataRewind, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataRewind"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataRewind")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (operation)
+ _operation, _operationErr := readBuffer.ReadByte("operation")
+ if _operationErr != nil {
+ return nil, errors.Wrap(_operationErr, "Error parsing 'operation' field of MediaTransportControlDataRewind")
+ }
+ operation := _operation
+
+ // Virtual field
+ _isCeaseRewind := bool((operation) == (0x00))
+ isCeaseRewind := bool(_isCeaseRewind)
+ _ = isCeaseRewind
+
+ // Virtual field
+ _is2x := bool((operation) == (0x02))
+ is2x := bool(_is2x)
+ _ = is2x
+
+ // Virtual field
+ _is4x := bool((operation) == (0x04))
+ is4x := bool(_is4x)
+ _ = is4x
+
+ // Virtual field
+ _is8x := bool((operation) == (0x06))
+ is8x := bool(_is8x)
+ _ = is8x
+
+ // Virtual field
+ _is16x := bool((operation) == (0x08))
+ is16x := bool(_is16x)
+ _ = is16x
+
+ // Virtual field
+ _is32x := bool((operation) == (0x0A))
+ is32x := bool(_is32x)
+ _ = is32x
+
+ // Virtual field
+ _is64x := bool((operation) == (0x0C))
+ is64x := bool(_is64x)
+ _ = is64x
+
+ // Virtual field
+ _isReserved := bool(bool(bool(bool(bool(bool(!(isCeaseRewind)) && bool(!(is2x))) && bool(!(is4x))) && bool(!(is8x))) && bool(!(is16x))) && bool(!(is32x))) && bool(!(is64x))
+ isReserved := bool(_isReserved)
+ _ = isReserved
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataRewind"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataRewind")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataRewind{
+ Operation: operation,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataRewind) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataRewind"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataRewind")
+ }
+
+ // Simple Field (operation)
+ operation := byte(m.GetOperation())
+ _operationErr := writeBuffer.WriteByte("operation", (operation))
+ if _operationErr != nil {
+ return errors.Wrap(_operationErr, "Error serializing 'operation' field")
+ }
+ // Virtual field
+ if _isCeaseRewindErr := writeBuffer.WriteVirtual("isCeaseRewind", m.GetIsCeaseRewind()); _isCeaseRewindErr != nil {
+ return errors.Wrap(_isCeaseRewindErr, "Error serializing 'isCeaseRewind' field")
+ }
+ // Virtual field
+ if _is2xErr := writeBuffer.WriteVirtual("is2x", m.GetIs2x()); _is2xErr != nil {
+ return errors.Wrap(_is2xErr, "Error serializing 'is2x' field")
+ }
+ // Virtual field
+ if _is4xErr := writeBuffer.WriteVirtual("is4x", m.GetIs4x()); _is4xErr != nil {
+ return errors.Wrap(_is4xErr, "Error serializing 'is4x' field")
+ }
+ // Virtual field
+ if _is8xErr := writeBuffer.WriteVirtual("is8x", m.GetIs8x()); _is8xErr != nil {
+ return errors.Wrap(_is8xErr, "Error serializing 'is8x' field")
+ }
+ // Virtual field
+ if _is16xErr := writeBuffer.WriteVirtual("is16x", m.GetIs16x()); _is16xErr != nil {
+ return errors.Wrap(_is16xErr, "Error serializing 'is16x' field")
+ }
+ // Virtual field
+ if _is32xErr := writeBuffer.WriteVirtual("is32x", m.GetIs32x()); _is32xErr != nil {
+ return errors.Wrap(_is32xErr, "Error serializing 'is32x' field")
+ }
+ // Virtual field
+ if _is64xErr := writeBuffer.WriteVirtual("is64x", m.GetIs64x()); _is64xErr != nil {
+ return errors.Wrap(_is64xErr, "Error serializing 'is64x' field")
+ }
+ // Virtual field
+ if _isReservedErr := writeBuffer.WriteVirtual("isReserved", m.GetIsReserved()); _isReservedErr != nil {
+ return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataRewind"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataRewind")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataRewind) isMediaTransportControlDataRewind() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataRewind) 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/MediaTransportControlDataSelectionName.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSelectionName.go
new file mode 100644
index 000000000..acd89ec13
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSelectionName.go
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataSelectionName is the corresponding interface of MediaTransportControlDataSelectionName
+type MediaTransportControlDataSelectionName interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetSelectionName returns SelectionName (property field)
+ GetSelectionName() string
+}
+
+// MediaTransportControlDataSelectionNameExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataSelectionName.
+// This is useful for switch cases.
+type MediaTransportControlDataSelectionNameExactly interface {
+ MediaTransportControlDataSelectionName
+ isMediaTransportControlDataSelectionName() bool
+}
+
+// _MediaTransportControlDataSelectionName is the data-structure of this message
+type _MediaTransportControlDataSelectionName struct {
+ *_MediaTransportControlData
+ SelectionName string
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataSelectionName) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataSelectionName) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataSelectionName) GetSelectionName() string {
+ return m.SelectionName
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataSelectionName factory function for _MediaTransportControlDataSelectionName
+func NewMediaTransportControlDataSelectionName(selectionName string, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataSelectionName {
+ _result := &_MediaTransportControlDataSelectionName{
+ SelectionName: selectionName,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataSelectionName(structType interface{}) MediaTransportControlDataSelectionName {
+ if casted, ok := structType.(MediaTransportControlDataSelectionName); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataSelectionName); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataSelectionName) GetTypeName() string {
+ return "MediaTransportControlDataSelectionName"
+}
+
+func (m *_MediaTransportControlDataSelectionName) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataSelectionName) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (selectionName)
+ lengthInBits += uint16(int32(m.GetCommandTypeContainer().NumBytes()) - int32(int32(1)))
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataSelectionName) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataSelectionNameParse(readBuffer utils.ReadBuffer, commandTypeContainer MediaTransportControlCommandTypeContainer) (MediaTransportControlDataSelectionName, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataSelectionName"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataSelectionName")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (selectionName)
+ _selectionName, _selectionNameErr := readBuffer.ReadString("selectionName", uint32((commandTypeContainer.NumBytes())-(1)))
+ if _selectionNameErr != nil {
+ return nil, errors.Wrap(_selectionNameErr, "Error parsing 'selectionName' field of MediaTransportControlDataSelectionName")
+ }
+ selectionName := _selectionName
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataSelectionName"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataSelectionName")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataSelectionName{
+ SelectionName: selectionName,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataSelectionName) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataSelectionName"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataSelectionName")
+ }
+
+ // Simple Field (selectionName)
+ selectionName := string(m.GetSelectionName())
+ _selectionNameErr := writeBuffer.WriteString("selectionName", uint32((m.GetCommandTypeContainer().NumBytes())-(1)), "UTF-8", (selectionName))
+ if _selectionNameErr != nil {
+ return errors.Wrap(_selectionNameErr, "Error serializing 'selectionName' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataSelectionName"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataSelectionName")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataSelectionName) isMediaTransportControlDataSelectionName() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataSelectionName) 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/MediaTransportControlDataSetCategory.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSetCategory.go
new file mode 100644
index 000000000..2cbe2c390
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSetCategory.go
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataSetCategory is the corresponding interface of MediaTransportControlDataSetCategory
+type MediaTransportControlDataSetCategory interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetCategoryNumber returns CategoryNumber (property field)
+ GetCategoryNumber() uint8
+}
+
+// MediaTransportControlDataSetCategoryExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataSetCategory.
+// This is useful for switch cases.
+type MediaTransportControlDataSetCategoryExactly interface {
+ MediaTransportControlDataSetCategory
+ isMediaTransportControlDataSetCategory() bool
+}
+
+// _MediaTransportControlDataSetCategory is the data-structure of this message
+type _MediaTransportControlDataSetCategory struct {
+ *_MediaTransportControlData
+ CategoryNumber uint8
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataSetCategory) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataSetCategory) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataSetCategory) GetCategoryNumber() uint8 {
+ return m.CategoryNumber
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataSetCategory factory function for _MediaTransportControlDataSetCategory
+func NewMediaTransportControlDataSetCategory(categoryNumber uint8, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataSetCategory {
+ _result := &_MediaTransportControlDataSetCategory{
+ CategoryNumber: categoryNumber,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataSetCategory(structType interface{}) MediaTransportControlDataSetCategory {
+ if casted, ok := structType.(MediaTransportControlDataSetCategory); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataSetCategory); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataSetCategory) GetTypeName() string {
+ return "MediaTransportControlDataSetCategory"
+}
+
+func (m *_MediaTransportControlDataSetCategory) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataSetCategory) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (categoryNumber)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataSetCategory) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataSetCategoryParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataSetCategory, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataSetCategory"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataSetCategory")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (categoryNumber)
+ _categoryNumber, _categoryNumberErr := readBuffer.ReadUint8("categoryNumber", 8)
+ if _categoryNumberErr != nil {
+ return nil, errors.Wrap(_categoryNumberErr, "Error parsing 'categoryNumber' field of MediaTransportControlDataSetCategory")
+ }
+ categoryNumber := _categoryNumber
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataSetCategory"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataSetCategory")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataSetCategory{
+ CategoryNumber: categoryNumber,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataSetCategory) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataSetCategory"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataSetCategory")
+ }
+
+ // Simple Field (categoryNumber)
+ categoryNumber := uint8(m.GetCategoryNumber())
+ _categoryNumberErr := writeBuffer.WriteUint8("categoryNumber", 8, (categoryNumber))
+ if _categoryNumberErr != nil {
+ return errors.Wrap(_categoryNumberErr, "Error serializing 'categoryNumber' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataSetCategory"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataSetCategory")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataSetCategory) isMediaTransportControlDataSetCategory() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataSetCategory) 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/MediaTransportControlDataSetSelection.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSetSelection.go
new file mode 100644
index 000000000..c74ebd244
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSetSelection.go
@@ -0,0 +1,217 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataSetSelection is the corresponding interface of MediaTransportControlDataSetSelection
+type MediaTransportControlDataSetSelection interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetSelectionHi returns SelectionHi (property field)
+ GetSelectionHi() byte
+ // GetSelectionLo returns SelectionLo (property field)
+ GetSelectionLo() byte
+}
+
+// MediaTransportControlDataSetSelectionExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataSetSelection.
+// This is useful for switch cases.
+type MediaTransportControlDataSetSelectionExactly interface {
+ MediaTransportControlDataSetSelection
+ isMediaTransportControlDataSetSelection() bool
+}
+
+// _MediaTransportControlDataSetSelection is the data-structure of this message
+type _MediaTransportControlDataSetSelection struct {
+ *_MediaTransportControlData
+ SelectionHi byte
+ SelectionLo byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataSetSelection) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataSetSelection) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataSetSelection) GetSelectionHi() byte {
+ return m.SelectionHi
+}
+
+func (m *_MediaTransportControlDataSetSelection) GetSelectionLo() byte {
+ return m.SelectionLo
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataSetSelection factory function for _MediaTransportControlDataSetSelection
+func NewMediaTransportControlDataSetSelection(selectionHi byte, selectionLo byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataSetSelection {
+ _result := &_MediaTransportControlDataSetSelection{
+ SelectionHi: selectionHi,
+ SelectionLo: selectionLo,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataSetSelection(structType interface{}) MediaTransportControlDataSetSelection {
+ if casted, ok := structType.(MediaTransportControlDataSetSelection); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataSetSelection); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataSetSelection) GetTypeName() string {
+ return "MediaTransportControlDataSetSelection"
+}
+
+func (m *_MediaTransportControlDataSetSelection) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataSetSelection) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (selectionHi)
+ lengthInBits += 8
+
+ // Simple field (selectionLo)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataSetSelection) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataSetSelectionParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataSetSelection, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataSetSelection"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataSetSelection")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (selectionHi)
+ _selectionHi, _selectionHiErr := readBuffer.ReadByte("selectionHi")
+ if _selectionHiErr != nil {
+ return nil, errors.Wrap(_selectionHiErr, "Error parsing 'selectionHi' field of MediaTransportControlDataSetSelection")
+ }
+ selectionHi := _selectionHi
+
+ // Simple Field (selectionLo)
+ _selectionLo, _selectionLoErr := readBuffer.ReadByte("selectionLo")
+ if _selectionLoErr != nil {
+ return nil, errors.Wrap(_selectionLoErr, "Error parsing 'selectionLo' field of MediaTransportControlDataSetSelection")
+ }
+ selectionLo := _selectionLo
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataSetSelection"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataSetSelection")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataSetSelection{
+ SelectionHi: selectionHi,
+ SelectionLo: selectionLo,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataSetSelection) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataSetSelection"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataSetSelection")
+ }
+
+ // Simple Field (selectionHi)
+ selectionHi := byte(m.GetSelectionHi())
+ _selectionHiErr := writeBuffer.WriteByte("selectionHi", (selectionHi))
+ if _selectionHiErr != nil {
+ return errors.Wrap(_selectionHiErr, "Error serializing 'selectionHi' field")
+ }
+
+ // Simple Field (selectionLo)
+ selectionLo := byte(m.GetSelectionLo())
+ _selectionLoErr := writeBuffer.WriteByte("selectionLo", (selectionLo))
+ if _selectionLoErr != nil {
+ return errors.Wrap(_selectionLoErr, "Error serializing 'selectionLo' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataSetSelection"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataSetSelection")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataSetSelection) isMediaTransportControlDataSetSelection() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataSetSelection) 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/MediaTransportControlDataSetTrack.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSetTrack.go
new file mode 100644
index 000000000..7c949f10d
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSetTrack.go
@@ -0,0 +1,269 @@
+/*
+ * 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.
+
+// MediaTransportControlDataSetTrack is the corresponding interface of MediaTransportControlDataSetTrack
+type MediaTransportControlDataSetTrack interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetTrackMSB returns TrackMSB (property field)
+ GetTrackMSB() byte
+ // GetTrackMMSB returns TrackMMSB (property field)
+ GetTrackMMSB() byte
+ // GetTrackMLSB returns TrackMLSB (property field)
+ GetTrackMLSB() byte
+ // GetTrackLSB returns TrackLSB (property field)
+ GetTrackLSB() byte
+}
+
+// MediaTransportControlDataSetTrackExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataSetTrack.
+// This is useful for switch cases.
+type MediaTransportControlDataSetTrackExactly interface {
+ MediaTransportControlDataSetTrack
+ isMediaTransportControlDataSetTrack() bool
+}
+
+// _MediaTransportControlDataSetTrack is the data-structure of this message
+type _MediaTransportControlDataSetTrack struct {
+ *_MediaTransportControlData
+ TrackMSB byte
+ TrackMMSB byte
+ TrackMLSB byte
+ TrackLSB byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataSetTrack) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataSetTrack) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataSetTrack) GetTrackMSB() byte {
+ return m.TrackMSB
+}
+
+func (m *_MediaTransportControlDataSetTrack) GetTrackMMSB() byte {
+ return m.TrackMMSB
+}
+
+func (m *_MediaTransportControlDataSetTrack) GetTrackMLSB() byte {
+ return m.TrackMLSB
+}
+
+func (m *_MediaTransportControlDataSetTrack) GetTrackLSB() byte {
+ return m.TrackLSB
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataSetTrack factory function for _MediaTransportControlDataSetTrack
+func NewMediaTransportControlDataSetTrack(trackMSB byte, trackMMSB byte, trackMLSB byte, trackLSB byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataSetTrack {
+ _result := &_MediaTransportControlDataSetTrack{
+ TrackMSB: trackMSB,
+ TrackMMSB: trackMMSB,
+ TrackMLSB: trackMLSB,
+ TrackLSB: trackLSB,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataSetTrack(structType interface{}) MediaTransportControlDataSetTrack {
+ if casted, ok := structType.(MediaTransportControlDataSetTrack); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataSetTrack); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataSetTrack) GetTypeName() string {
+ return "MediaTransportControlDataSetTrack"
+}
+
+func (m *_MediaTransportControlDataSetTrack) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataSetTrack) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (trackMSB)
+ lengthInBits += 8
+
+ // Simple field (trackMMSB)
+ lengthInBits += 8
+
+ // Simple field (trackMLSB)
+ lengthInBits += 8
+
+ // Simple field (trackLSB)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataSetTrack) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataSetTrackParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataSetTrack, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataSetTrack"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataSetTrack")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (trackMSB)
+ _trackMSB, _trackMSBErr := readBuffer.ReadByte("trackMSB")
+ if _trackMSBErr != nil {
+ return nil, errors.Wrap(_trackMSBErr, "Error parsing 'trackMSB' field of MediaTransportControlDataSetTrack")
+ }
+ trackMSB := _trackMSB
+
+ // Simple Field (trackMMSB)
+ _trackMMSB, _trackMMSBErr := readBuffer.ReadByte("trackMMSB")
+ if _trackMMSBErr != nil {
+ return nil, errors.Wrap(_trackMMSBErr, "Error parsing 'trackMMSB' field of MediaTransportControlDataSetTrack")
+ }
+ trackMMSB := _trackMMSB
+
+ // Simple Field (trackMLSB)
+ _trackMLSB, _trackMLSBErr := readBuffer.ReadByte("trackMLSB")
+ if _trackMLSBErr != nil {
+ return nil, errors.Wrap(_trackMLSBErr, "Error parsing 'trackMLSB' field of MediaTransportControlDataSetTrack")
+ }
+ trackMLSB := _trackMLSB
+
+ // Simple Field (trackLSB)
+ _trackLSB, _trackLSBErr := readBuffer.ReadByte("trackLSB")
+ if _trackLSBErr != nil {
+ return nil, errors.Wrap(_trackLSBErr, "Error parsing 'trackLSB' field of MediaTransportControlDataSetTrack")
+ }
+ trackLSB := _trackLSB
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataSetTrack"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataSetTrack")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataSetTrack{
+ TrackMSB: trackMSB,
+ TrackMMSB: trackMMSB,
+ TrackMLSB: trackMLSB,
+ TrackLSB: trackLSB,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataSetTrack) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataSetTrack"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataSetTrack")
+ }
+
+ // Simple Field (trackMSB)
+ trackMSB := byte(m.GetTrackMSB())
+ _trackMSBErr := writeBuffer.WriteByte("trackMSB", (trackMSB))
+ if _trackMSBErr != nil {
+ return errors.Wrap(_trackMSBErr, "Error serializing 'trackMSB' field")
+ }
+
+ // Simple Field (trackMMSB)
+ trackMMSB := byte(m.GetTrackMMSB())
+ _trackMMSBErr := writeBuffer.WriteByte("trackMMSB", (trackMMSB))
+ if _trackMMSBErr != nil {
+ return errors.Wrap(_trackMMSBErr, "Error serializing 'trackMMSB' field")
+ }
+
+ // Simple Field (trackMLSB)
+ trackMLSB := byte(m.GetTrackMLSB())
+ _trackMLSBErr := writeBuffer.WriteByte("trackMLSB", (trackMLSB))
+ if _trackMLSBErr != nil {
+ return errors.Wrap(_trackMLSBErr, "Error serializing 'trackMLSB' field")
+ }
+
+ // Simple Field (trackLSB)
+ trackLSB := byte(m.GetTrackLSB())
+ _trackLSBErr := writeBuffer.WriteByte("trackLSB", (trackLSB))
+ if _trackLSBErr != nil {
+ return errors.Wrap(_trackLSBErr, "Error serializing 'trackLSB' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataSetTrack"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataSetTrack")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataSetTrack) isMediaTransportControlDataSetTrack() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataSetTrack) 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/MediaTransportControlDataShuffleOnOff.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataShuffleOnOff.go
new file mode 100644
index 000000000..9dce7fa8d
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataShuffleOnOff.go
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataShuffleOnOff is the corresponding interface of MediaTransportControlDataShuffleOnOff
+type MediaTransportControlDataShuffleOnOff interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetState returns State (property field)
+ GetState() byte
+ // GetIsOff returns IsOff (virtual field)
+ GetIsOff() bool
+ // GetIsOn returns IsOn (virtual field)
+ GetIsOn() bool
+}
+
+// MediaTransportControlDataShuffleOnOffExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataShuffleOnOff.
+// This is useful for switch cases.
+type MediaTransportControlDataShuffleOnOffExactly interface {
+ MediaTransportControlDataShuffleOnOff
+ isMediaTransportControlDataShuffleOnOff() bool
+}
+
+// _MediaTransportControlDataShuffleOnOff is the data-structure of this message
+type _MediaTransportControlDataShuffleOnOff struct {
+ *_MediaTransportControlData
+ State byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataShuffleOnOff) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataShuffleOnOff) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataShuffleOnOff) GetState() byte {
+ return m.State
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataShuffleOnOff) GetIsOff() bool {
+ return bool(bool((m.GetState()) == (0x00)))
+}
+
+func (m *_MediaTransportControlDataShuffleOnOff) GetIsOn() bool {
+ return bool(bool((m.GetState()) > (0xFE)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataShuffleOnOff factory function for _MediaTransportControlDataShuffleOnOff
+func NewMediaTransportControlDataShuffleOnOff(state byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataShuffleOnOff {
+ _result := &_MediaTransportControlDataShuffleOnOff{
+ State: state,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataShuffleOnOff(structType interface{}) MediaTransportControlDataShuffleOnOff {
+ if casted, ok := structType.(MediaTransportControlDataShuffleOnOff); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataShuffleOnOff); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataShuffleOnOff) GetTypeName() string {
+ return "MediaTransportControlDataShuffleOnOff"
+}
+
+func (m *_MediaTransportControlDataShuffleOnOff) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataShuffleOnOff) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (state)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataShuffleOnOff) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataShuffleOnOffParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataShuffleOnOff, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataShuffleOnOff"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataShuffleOnOff")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (state)
+ _state, _stateErr := readBuffer.ReadByte("state")
+ if _stateErr != nil {
+ return nil, errors.Wrap(_stateErr, "Error parsing 'state' field of MediaTransportControlDataShuffleOnOff")
+ }
+ state := _state
+
+ // Virtual field
+ _isOff := bool((state) == (0x00))
+ isOff := bool(_isOff)
+ _ = isOff
+
+ // Virtual field
+ _isOn := bool((state) > (0xFE))
+ isOn := bool(_isOn)
+ _ = isOn
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataShuffleOnOff"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataShuffleOnOff")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataShuffleOnOff{
+ State: state,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataShuffleOnOff) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataShuffleOnOff"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataShuffleOnOff")
+ }
+
+ // Simple Field (state)
+ state := byte(m.GetState())
+ _stateErr := writeBuffer.WriteByte("state", (state))
+ if _stateErr != nil {
+ return errors.Wrap(_stateErr, "Error serializing 'state' field")
+ }
+ // Virtual field
+ if _isOffErr := writeBuffer.WriteVirtual("isOff", m.GetIsOff()); _isOffErr != nil {
+ return errors.Wrap(_isOffErr, "Error serializing 'isOff' field")
+ }
+ // Virtual field
+ if _isOnErr := writeBuffer.WriteVirtual("isOn", m.GetIsOn()); _isOnErr != nil {
+ return errors.Wrap(_isOnErr, "Error serializing 'isOn' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataShuffleOnOff"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataShuffleOnOff")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataShuffleOnOff) isMediaTransportControlDataShuffleOnOff() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataShuffleOnOff) 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/MediaTransportControlDataSourcePowerControl.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSourcePowerControl.go
new file mode 100644
index 000000000..e14efb309
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataSourcePowerControl.go
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataSourcePowerControl is the corresponding interface of MediaTransportControlDataSourcePowerControl
+type MediaTransportControlDataSourcePowerControl interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetState returns State (property field)
+ GetState() byte
+ // GetIsShouldPowerOn returns IsShouldPowerOn (virtual field)
+ GetIsShouldPowerOn() bool
+ // GetIsShouldPowerOff returns IsShouldPowerOff (virtual field)
+ GetIsShouldPowerOff() bool
+}
+
+// MediaTransportControlDataSourcePowerControlExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataSourcePowerControl.
+// This is useful for switch cases.
+type MediaTransportControlDataSourcePowerControlExactly interface {
+ MediaTransportControlDataSourcePowerControl
+ isMediaTransportControlDataSourcePowerControl() bool
+}
+
+// _MediaTransportControlDataSourcePowerControl is the data-structure of this message
+type _MediaTransportControlDataSourcePowerControl struct {
+ *_MediaTransportControlData
+ State byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataSourcePowerControl) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataSourcePowerControl) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataSourcePowerControl) GetState() byte {
+ return m.State
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataSourcePowerControl) GetIsShouldPowerOn() bool {
+ return bool(bool((m.GetState()) == (0x00)))
+}
+
+func (m *_MediaTransportControlDataSourcePowerControl) GetIsShouldPowerOff() bool {
+ return bool(bool((m.GetState()) != (0x00)))
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataSourcePowerControl factory function for _MediaTransportControlDataSourcePowerControl
+func NewMediaTransportControlDataSourcePowerControl(state byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataSourcePowerControl {
+ _result := &_MediaTransportControlDataSourcePowerControl{
+ State: state,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataSourcePowerControl(structType interface{}) MediaTransportControlDataSourcePowerControl {
+ if casted, ok := structType.(MediaTransportControlDataSourcePowerControl); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataSourcePowerControl); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataSourcePowerControl) GetTypeName() string {
+ return "MediaTransportControlDataSourcePowerControl"
+}
+
+func (m *_MediaTransportControlDataSourcePowerControl) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataSourcePowerControl) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (state)
+ lengthInBits += 8
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataSourcePowerControl) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataSourcePowerControlParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataSourcePowerControl, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataSourcePowerControl"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataSourcePowerControl")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (state)
+ _state, _stateErr := readBuffer.ReadByte("state")
+ if _stateErr != nil {
+ return nil, errors.Wrap(_stateErr, "Error parsing 'state' field of MediaTransportControlDataSourcePowerControl")
+ }
+ state := _state
+
+ // Virtual field
+ _isShouldPowerOn := bool((state) == (0x00))
+ isShouldPowerOn := bool(_isShouldPowerOn)
+ _ = isShouldPowerOn
+
+ // Virtual field
+ _isShouldPowerOff := bool((state) != (0x00))
+ isShouldPowerOff := bool(_isShouldPowerOff)
+ _ = isShouldPowerOff
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataSourcePowerControl"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataSourcePowerControl")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataSourcePowerControl{
+ State: state,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataSourcePowerControl) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataSourcePowerControl"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataSourcePowerControl")
+ }
+
+ // Simple Field (state)
+ state := byte(m.GetState())
+ _stateErr := writeBuffer.WriteByte("state", (state))
+ if _stateErr != nil {
+ return errors.Wrap(_stateErr, "Error serializing 'state' field")
+ }
+ // Virtual field
+ if _isShouldPowerOnErr := writeBuffer.WriteVirtual("isShouldPowerOn", m.GetIsShouldPowerOn()); _isShouldPowerOnErr != nil {
+ return errors.Wrap(_isShouldPowerOnErr, "Error serializing 'isShouldPowerOn' field")
+ }
+ // Virtual field
+ if _isShouldPowerOffErr := writeBuffer.WriteVirtual("isShouldPowerOff", m.GetIsShouldPowerOff()); _isShouldPowerOffErr != nil {
+ return errors.Wrap(_isShouldPowerOffErr, "Error serializing 'isShouldPowerOff' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataSourcePowerControl"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataSourcePowerControl")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataSourcePowerControl) isMediaTransportControlDataSourcePowerControl() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataSourcePowerControl) 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/MediaTransportControlDataStatusRequest.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataStatusRequest.go
new file mode 100644
index 000000000..0aa02b453
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataStatusRequest.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataStatusRequest is the corresponding interface of MediaTransportControlDataStatusRequest
+type MediaTransportControlDataStatusRequest interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+}
+
+// MediaTransportControlDataStatusRequestExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataStatusRequest.
+// This is useful for switch cases.
+type MediaTransportControlDataStatusRequestExactly interface {
+ MediaTransportControlDataStatusRequest
+ isMediaTransportControlDataStatusRequest() bool
+}
+
+// _MediaTransportControlDataStatusRequest is the data-structure of this message
+type _MediaTransportControlDataStatusRequest struct {
+ *_MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataStatusRequest) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataStatusRequest) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+// NewMediaTransportControlDataStatusRequest factory function for _MediaTransportControlDataStatusRequest
+func NewMediaTransportControlDataStatusRequest(commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataStatusRequest {
+ _result := &_MediaTransportControlDataStatusRequest{
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataStatusRequest(structType interface{}) MediaTransportControlDataStatusRequest {
+ if casted, ok := structType.(MediaTransportControlDataStatusRequest); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataStatusRequest); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataStatusRequest) GetTypeName() string {
+ return "MediaTransportControlDataStatusRequest"
+}
+
+func (m *_MediaTransportControlDataStatusRequest) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataStatusRequest) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataStatusRequest) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataStatusRequestParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataStatusRequest, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataStatusRequest"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataStatusRequest")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataStatusRequest"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataStatusRequest")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataStatusRequest{
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataStatusRequest) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataStatusRequest"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataStatusRequest")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataStatusRequest"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataStatusRequest")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataStatusRequest) isMediaTransportControlDataStatusRequest() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataStatusRequest) 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/MediaTransportControlDataStop.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataStop.go
new file mode 100644
index 000000000..5a448ef53
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataStop.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataStop is the corresponding interface of MediaTransportControlDataStop
+type MediaTransportControlDataStop interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+}
+
+// MediaTransportControlDataStopExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataStop.
+// This is useful for switch cases.
+type MediaTransportControlDataStopExactly interface {
+ MediaTransportControlDataStop
+ isMediaTransportControlDataStop() bool
+}
+
+// _MediaTransportControlDataStop is the data-structure of this message
+type _MediaTransportControlDataStop struct {
+ *_MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataStop) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataStop) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+// NewMediaTransportControlDataStop factory function for _MediaTransportControlDataStop
+func NewMediaTransportControlDataStop(commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataStop {
+ _result := &_MediaTransportControlDataStop{
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataStop(structType interface{}) MediaTransportControlDataStop {
+ if casted, ok := structType.(MediaTransportControlDataStop); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataStop); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataStop) GetTypeName() string {
+ return "MediaTransportControlDataStop"
+}
+
+func (m *_MediaTransportControlDataStop) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataStop) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataStop) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataStopParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataStop, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataStop"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataStop")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataStop"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataStop")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataStop{
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataStop) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataStop"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataStop")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataStop"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataStop")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataStop) isMediaTransportControlDataStop() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataStop) 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/MediaTransportControlDataTotalTracks.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataTotalTracks.go
new file mode 100644
index 000000000..43758c104
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataTotalTracks.go
@@ -0,0 +1,269 @@
+/*
+ * 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.
+
+// MediaTransportControlDataTotalTracks is the corresponding interface of MediaTransportControlDataTotalTracks
+type MediaTransportControlDataTotalTracks interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetTotalTracksMSB returns TotalTracksMSB (property field)
+ GetTotalTracksMSB() byte
+ // GetTotalTracksMMSB returns TotalTracksMMSB (property field)
+ GetTotalTracksMMSB() byte
+ // GetTotalTracksMLSB returns TotalTracksMLSB (property field)
+ GetTotalTracksMLSB() byte
+ // GetTotalTracksLSB returns TotalTracksLSB (property field)
+ GetTotalTracksLSB() byte
+}
+
+// MediaTransportControlDataTotalTracksExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataTotalTracks.
+// This is useful for switch cases.
+type MediaTransportControlDataTotalTracksExactly interface {
+ MediaTransportControlDataTotalTracks
+ isMediaTransportControlDataTotalTracks() bool
+}
+
+// _MediaTransportControlDataTotalTracks is the data-structure of this message
+type _MediaTransportControlDataTotalTracks struct {
+ *_MediaTransportControlData
+ TotalTracksMSB byte
+ TotalTracksMMSB byte
+ TotalTracksMLSB byte
+ TotalTracksLSB byte
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataTotalTracks) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataTotalTracks) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataTotalTracks) GetTotalTracksMSB() byte {
+ return m.TotalTracksMSB
+}
+
+func (m *_MediaTransportControlDataTotalTracks) GetTotalTracksMMSB() byte {
+ return m.TotalTracksMMSB
+}
+
+func (m *_MediaTransportControlDataTotalTracks) GetTotalTracksMLSB() byte {
+ return m.TotalTracksMLSB
+}
+
+func (m *_MediaTransportControlDataTotalTracks) GetTotalTracksLSB() byte {
+ return m.TotalTracksLSB
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataTotalTracks factory function for _MediaTransportControlDataTotalTracks
+func NewMediaTransportControlDataTotalTracks(totalTracksMSB byte, totalTracksMMSB byte, totalTracksMLSB byte, totalTracksLSB byte, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataTotalTracks {
+ _result := &_MediaTransportControlDataTotalTracks{
+ TotalTracksMSB: totalTracksMSB,
+ TotalTracksMMSB: totalTracksMMSB,
+ TotalTracksMLSB: totalTracksMLSB,
+ TotalTracksLSB: totalTracksLSB,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataTotalTracks(structType interface{}) MediaTransportControlDataTotalTracks {
+ if casted, ok := structType.(MediaTransportControlDataTotalTracks); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataTotalTracks); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataTotalTracks) GetTypeName() string {
+ return "MediaTransportControlDataTotalTracks"
+}
+
+func (m *_MediaTransportControlDataTotalTracks) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataTotalTracks) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (totalTracksMSB)
+ lengthInBits += 8
+
+ // Simple field (totalTracksMMSB)
+ lengthInBits += 8
+
+ // Simple field (totalTracksMLSB)
+ lengthInBits += 8
+
+ // Simple field (totalTracksLSB)
+ lengthInBits += 8
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataTotalTracks) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataTotalTracksParse(readBuffer utils.ReadBuffer) (MediaTransportControlDataTotalTracks, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataTotalTracks"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataTotalTracks")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (totalTracksMSB)
+ _totalTracksMSB, _totalTracksMSBErr := readBuffer.ReadByte("totalTracksMSB")
+ if _totalTracksMSBErr != nil {
+ return nil, errors.Wrap(_totalTracksMSBErr, "Error parsing 'totalTracksMSB' field of MediaTransportControlDataTotalTracks")
+ }
+ totalTracksMSB := _totalTracksMSB
+
+ // Simple Field (totalTracksMMSB)
+ _totalTracksMMSB, _totalTracksMMSBErr := readBuffer.ReadByte("totalTracksMMSB")
+ if _totalTracksMMSBErr != nil {
+ return nil, errors.Wrap(_totalTracksMMSBErr, "Error parsing 'totalTracksMMSB' field of MediaTransportControlDataTotalTracks")
+ }
+ totalTracksMMSB := _totalTracksMMSB
+
+ // Simple Field (totalTracksMLSB)
+ _totalTracksMLSB, _totalTracksMLSBErr := readBuffer.ReadByte("totalTracksMLSB")
+ if _totalTracksMLSBErr != nil {
+ return nil, errors.Wrap(_totalTracksMLSBErr, "Error parsing 'totalTracksMLSB' field of MediaTransportControlDataTotalTracks")
+ }
+ totalTracksMLSB := _totalTracksMLSB
+
+ // Simple Field (totalTracksLSB)
+ _totalTracksLSB, _totalTracksLSBErr := readBuffer.ReadByte("totalTracksLSB")
+ if _totalTracksLSBErr != nil {
+ return nil, errors.Wrap(_totalTracksLSBErr, "Error parsing 'totalTracksLSB' field of MediaTransportControlDataTotalTracks")
+ }
+ totalTracksLSB := _totalTracksLSB
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataTotalTracks"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataTotalTracks")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataTotalTracks{
+ TotalTracksMSB: totalTracksMSB,
+ TotalTracksMMSB: totalTracksMMSB,
+ TotalTracksMLSB: totalTracksMLSB,
+ TotalTracksLSB: totalTracksLSB,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataTotalTracks) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataTotalTracks"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataTotalTracks")
+ }
+
+ // Simple Field (totalTracksMSB)
+ totalTracksMSB := byte(m.GetTotalTracksMSB())
+ _totalTracksMSBErr := writeBuffer.WriteByte("totalTracksMSB", (totalTracksMSB))
+ if _totalTracksMSBErr != nil {
+ return errors.Wrap(_totalTracksMSBErr, "Error serializing 'totalTracksMSB' field")
+ }
+
+ // Simple Field (totalTracksMMSB)
+ totalTracksMMSB := byte(m.GetTotalTracksMMSB())
+ _totalTracksMMSBErr := writeBuffer.WriteByte("totalTracksMMSB", (totalTracksMMSB))
+ if _totalTracksMMSBErr != nil {
+ return errors.Wrap(_totalTracksMMSBErr, "Error serializing 'totalTracksMMSB' field")
+ }
+
+ // Simple Field (totalTracksMLSB)
+ totalTracksMLSB := byte(m.GetTotalTracksMLSB())
+ _totalTracksMLSBErr := writeBuffer.WriteByte("totalTracksMLSB", (totalTracksMLSB))
+ if _totalTracksMLSBErr != nil {
+ return errors.Wrap(_totalTracksMLSBErr, "Error serializing 'totalTracksMLSB' field")
+ }
+
+ // Simple Field (totalTracksLSB)
+ totalTracksLSB := byte(m.GetTotalTracksLSB())
+ _totalTracksLSBErr := writeBuffer.WriteByte("totalTracksLSB", (totalTracksLSB))
+ if _totalTracksLSBErr != nil {
+ return errors.Wrap(_totalTracksLSBErr, "Error serializing 'totalTracksLSB' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataTotalTracks"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataTotalTracks")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataTotalTracks) isMediaTransportControlDataTotalTracks() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataTotalTracks) 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/MediaTransportControlDataTrackName.go b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataTrackName.go
new file mode 100644
index 000000000..b9b204d23
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/MediaTransportControlDataTrackName.go
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// MediaTransportControlDataTrackName is the corresponding interface of MediaTransportControlDataTrackName
+type MediaTransportControlDataTrackName interface {
+ utils.LengthAware
+ utils.Serializable
+ MediaTransportControlData
+ // GetTrackName returns TrackName (property field)
+ GetTrackName() string
+}
+
+// MediaTransportControlDataTrackNameExactly can be used when we want exactly this type and not a type which fulfills MediaTransportControlDataTrackName.
+// This is useful for switch cases.
+type MediaTransportControlDataTrackNameExactly interface {
+ MediaTransportControlDataTrackName
+ isMediaTransportControlDataTrackName() bool
+}
+
+// _MediaTransportControlDataTrackName is the data-structure of this message
+type _MediaTransportControlDataTrackName struct {
+ *_MediaTransportControlData
+ TrackName string
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_MediaTransportControlDataTrackName) InitializeParent(parent MediaTransportControlData, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) {
+ m.CommandTypeContainer = commandTypeContainer
+ m.MediaLinkGroup = mediaLinkGroup
+}
+
+func (m *_MediaTransportControlDataTrackName) GetParent() MediaTransportControlData {
+ return m._MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_MediaTransportControlDataTrackName) GetTrackName() string {
+ return m.TrackName
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewMediaTransportControlDataTrackName factory function for _MediaTransportControlDataTrackName
+func NewMediaTransportControlDataTrackName(trackName string, commandTypeContainer MediaTransportControlCommandTypeContainer, mediaLinkGroup byte) *_MediaTransportControlDataTrackName {
+ _result := &_MediaTransportControlDataTrackName{
+ TrackName: trackName,
+ _MediaTransportControlData: NewMediaTransportControlData(commandTypeContainer, mediaLinkGroup),
+ }
+ _result._MediaTransportControlData._MediaTransportControlDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastMediaTransportControlDataTrackName(structType interface{}) MediaTransportControlDataTrackName {
+ if casted, ok := structType.(MediaTransportControlDataTrackName); ok {
+ return casted
+ }
+ if casted, ok := structType.(*MediaTransportControlDataTrackName); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_MediaTransportControlDataTrackName) GetTypeName() string {
+ return "MediaTransportControlDataTrackName"
+}
+
+func (m *_MediaTransportControlDataTrackName) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_MediaTransportControlDataTrackName) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (trackName)
+ lengthInBits += uint16(int32(m.GetCommandTypeContainer().NumBytes()) - int32(int32(1)))
+
+ return lengthInBits
+}
+
+func (m *_MediaTransportControlDataTrackName) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func MediaTransportControlDataTrackNameParse(readBuffer utils.ReadBuffer, commandTypeContainer MediaTransportControlCommandTypeContainer) (MediaTransportControlDataTrackName, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("MediaTransportControlDataTrackName"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for MediaTransportControlDataTrackName")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (trackName)
+ _trackName, _trackNameErr := readBuffer.ReadString("trackName", uint32((commandTypeContainer.NumBytes())-(1)))
+ if _trackNameErr != nil {
+ return nil, errors.Wrap(_trackNameErr, "Error parsing 'trackName' field of MediaTransportControlDataTrackName")
+ }
+ trackName := _trackName
+
+ if closeErr := readBuffer.CloseContext("MediaTransportControlDataTrackName"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for MediaTransportControlDataTrackName")
+ }
+
+ // Create a partially initialized instance
+ _child := &_MediaTransportControlDataTrackName{
+ TrackName: trackName,
+ _MediaTransportControlData: &_MediaTransportControlData{},
+ }
+ _child._MediaTransportControlData._MediaTransportControlDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_MediaTransportControlDataTrackName) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("MediaTransportControlDataTrackName"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for MediaTransportControlDataTrackName")
+ }
+
+ // Simple Field (trackName)
+ trackName := string(m.GetTrackName())
+ _trackNameErr := writeBuffer.WriteString("trackName", uint32((m.GetCommandTypeContainer().NumBytes())-(1)), "UTF-8", (trackName))
+ if _trackNameErr != nil {
+ return errors.Wrap(_trackNameErr, "Error serializing 'trackName' field")
+ }
+
+ if popErr := writeBuffer.PopContext("MediaTransportControlDataTrackName"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for MediaTransportControlDataTrackName")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_MediaTransportControlDataTrackName) isMediaTransportControlDataTrackName() bool {
+ return true
+}
+
+func (m *_MediaTransportControlDataTrackName) 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/SALData.go b/plc4go/protocols/cbus/readwrite/model/SALData.go
index 5339a4e5c..b135d269e 100644
--- a/plc4go/protocols/cbus/readwrite/model/SALData.go
+++ b/plc4go/protocols/cbus/readwrite/model/SALData.go
@@ -180,6 +180,8 @@ func SALDataParse(readBuffer utils.ReadBuffer, applicationId ApplicationId) (SAL
_childTemp, typeSwitchError = SALDataMeasurementParse(readBuffer, applicationId)
case applicationId == ApplicationId_TESTING: // SALDataTesting
_childTemp, typeSwitchError = SALDataTestingParse(readBuffer, applicationId)
+ case applicationId == ApplicationId_MEDIA_TRANSPORT_CONTROL: // SALDataMediaTransport
+ _childTemp, typeSwitchError = SALDataMediaTransportParse(readBuffer, applicationId)
default:
typeSwitchError = errors.Errorf("Unmapped type for parameters [applicationId=%v]", applicationId)
}
diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataMediaTransport.go b/plc4go/protocols/cbus/readwrite/model/SALDataMediaTransport.go
new file mode 100644
index 000000000..4dbdd01e8
--- /dev/null
+++ b/plc4go/protocols/cbus/readwrite/model/SALDataMediaTransport.go
@@ -0,0 +1,205 @@
+/*
+ * 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.
+
+// SALDataMediaTransport is the corresponding interface of SALDataMediaTransport
+type SALDataMediaTransport interface {
+ utils.LengthAware
+ utils.Serializable
+ SALData
+ // GetMediaTransportControlData returns MediaTransportControlData (property field)
+ GetMediaTransportControlData() MediaTransportControlData
+}
+
+// SALDataMediaTransportExactly can be used when we want exactly this type and not a type which fulfills SALDataMediaTransport.
+// This is useful for switch cases.
+type SALDataMediaTransportExactly interface {
+ SALDataMediaTransport
+ isSALDataMediaTransport() bool
+}
+
+// _SALDataMediaTransport is the data-structure of this message
+type _SALDataMediaTransport struct {
+ *_SALData
+ MediaTransportControlData MediaTransportControlData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for discriminator values.
+///////////////////////
+
+func (m *_SALDataMediaTransport) GetApplicationId() ApplicationId {
+ return ApplicationId_MEDIA_TRANSPORT_CONTROL
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+func (m *_SALDataMediaTransport) InitializeParent(parent SALData, salData SALData) {
+ m.SalData = salData
+}
+
+func (m *_SALDataMediaTransport) GetParent() SALData {
+ return m._SALData
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *_SALDataMediaTransport) GetMediaTransportControlData() MediaTransportControlData {
+ return m.MediaTransportControlData
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewSALDataMediaTransport factory function for _SALDataMediaTransport
+func NewSALDataMediaTransport(mediaTransportControlData MediaTransportControlData, salData SALData) *_SALDataMediaTransport {
+ _result := &_SALDataMediaTransport{
+ MediaTransportControlData: mediaTransportControlData,
+ _SALData: NewSALData(salData),
+ }
+ _result._SALData._SALDataChildRequirements = _result
+ return _result
+}
+
+// Deprecated: use the interface for direct cast
+func CastSALDataMediaTransport(structType interface{}) SALDataMediaTransport {
+ if casted, ok := structType.(SALDataMediaTransport); ok {
+ return casted
+ }
+ if casted, ok := structType.(*SALDataMediaTransport); ok {
+ return *casted
+ }
+ return nil
+}
+
+func (m *_SALDataMediaTransport) GetTypeName() string {
+ return "SALDataMediaTransport"
+}
+
+func (m *_SALDataMediaTransport) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *_SALDataMediaTransport) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(m.GetParentLengthInBits())
+
+ // Simple field (mediaTransportControlData)
+ lengthInBits += m.MediaTransportControlData.GetLengthInBits()
+
+ return lengthInBits
+}
+
+func (m *_SALDataMediaTransport) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func SALDataMediaTransportParse(readBuffer utils.ReadBuffer, applicationId ApplicationId) (SALDataMediaTransport, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("SALDataMediaTransport"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for SALDataMediaTransport")
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (mediaTransportControlData)
+ if pullErr := readBuffer.PullContext("mediaTransportControlData"); pullErr != nil {
+ return nil, errors.Wrap(pullErr, "Error pulling for mediaTransportControlData")
+ }
+ _mediaTransportControlData, _mediaTransportControlDataErr := MediaTransportControlDataParse(readBuffer)
+ if _mediaTransportControlDataErr != nil {
+ return nil, errors.Wrap(_mediaTransportControlDataErr, "Error parsing 'mediaTransportControlData' field of SALDataMediaTransport")
+ }
+ mediaTransportControlData := _mediaTransportControlData.(MediaTransportControlData)
+ if closeErr := readBuffer.CloseContext("mediaTransportControlData"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for mediaTransportControlData")
+ }
+
+ if closeErr := readBuffer.CloseContext("SALDataMediaTransport"); closeErr != nil {
+ return nil, errors.Wrap(closeErr, "Error closing for SALDataMediaTransport")
+ }
+
+ // Create a partially initialized instance
+ _child := &_SALDataMediaTransport{
+ MediaTransportControlData: mediaTransportControlData,
+ _SALData: &_SALData{},
+ }
+ _child._SALData._SALDataChildRequirements = _child
+ return _child, nil
+}
+
+func (m *_SALDataMediaTransport) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ ser := func() error {
+ if pushErr := writeBuffer.PushContext("SALDataMediaTransport"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for SALDataMediaTransport")
+ }
+
+ // Simple Field (mediaTransportControlData)
+ if pushErr := writeBuffer.PushContext("mediaTransportControlData"); pushErr != nil {
+ return errors.Wrap(pushErr, "Error pushing for mediaTransportControlData")
+ }
+ _mediaTransportControlDataErr := writeBuffer.WriteSerializable(m.GetMediaTransportControlData())
+ if popErr := writeBuffer.PopContext("mediaTransportControlData"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for mediaTransportControlData")
+ }
+ if _mediaTransportControlDataErr != nil {
+ return errors.Wrap(_mediaTransportControlDataErr, "Error serializing 'mediaTransportControlData' field")
+ }
+
+ if popErr := writeBuffer.PopContext("SALDataMediaTransport"); popErr != nil {
+ return errors.Wrap(popErr, "Error popping for SALDataMediaTransport")
+ }
+ return nil
+ }
+ return m.SerializeParent(writeBuffer, m, ser)
+}
+
+func (m *_SALDataMediaTransport) isSALDataMediaTransport() bool {
+ return true
+}
+
+func (m *_SALDataMediaTransport) 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/StaticHelper.go b/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
index ae86cb3fc..475ee7cbf 100644
--- a/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
+++ b/plc4go/protocols/cbus/readwrite/model/StaticHelper.go
@@ -191,3 +191,13 @@ func KnowsAccessControlCommandTypeContainer(readBuffer utils.ReadBuffer) bool {
}
return AccessControlCommandTypeContainerKnows(readUint8)
}
+
+func KnowsMediaTransportControlCommandTypeContainer(readBuffer utils.ReadBuffer) bool {
+ oldPos := readBuffer.GetPos()
+ defer readBuffer.Reset(oldPos)
+ readUint8, err := readBuffer.ReadUint8("", 8)
+ if err != nil {
+ return false
+ }
+ return MediaTransportControlCommandTypeContainerKnows(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 a6c6b1b59..6e8131fab 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
@@ -161,7 +161,6 @@ public class StaticHelper {
}
}
-
public static boolean knowsAccessControlCommandTypeContainer(ReadBuffer readBuffer) {
int oldPos = readBuffer.getPos();
try {
@@ -173,4 +172,15 @@ public class StaticHelper {
}
}
+ public static boolean knowsMediaTransportControlCommandTypeContainer(ReadBuffer readBuffer) {
+ int oldPos = readBuffer.getPos();
+ try {
+ return MediaTransportControlCommandTypeContainer.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 29facb926..f5ea8954c 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
@@ -1088,4 +1088,26 @@ public class ReferenceTest {
}
}
}
+
+ // from: https://updates.clipsal.com/ClipsalSoftwareDownload/DL/downloads/OpenCBus/Chapter%2021%20-%20C-Bus%20Media%20Transport%20Control%20Application.pdf
+ @Nested
+ class MediaTransportControlApplicationsTest{
+
+ //9.11
+ @Nested
+ class Examples{
+
+ @Test
+ void tbd() 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);
+ }
+ }
+ }
}
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 15110f129..f0311debe 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
@@ -288,6 +288,7 @@
['0x11' TELEPHONY_STATUS_AND_CONTROL ]
['0x12' MEASUREMENT ]
['0x13' TESTING ]
+ ['0x14' MEDIA_TRANSPORT_CONTROL ]
]
[enum uint 4 LightingCompatible
@@ -490,7 +491,7 @@
['0xBD' RESERVED_BD ['RESERVED' , 'NA' ]]
['0xBE' RESERVED_BE ['RESERVED' , 'NA' ]]
['0xBF' RESERVED_BF ['RESERVED' , 'NA' ]]
- ['0xC0' MEDIA_TRANSPORT_C0 ['RESERVED' , 'NA' ]] // MEDIA_TRANSPORT
+ ['0xC0' MEDIA_TRANSPORT_CONTROL_C0 ['MEDIA_TRANSPORT_CONTROL' , 'NA' ]] // MEDIA_TRANSPORT_CONTROL
['0xC1' RESERVED_C1 ['RESERVED' , 'NA' ]]
['0xC2' RESERVED_C2 ['RESERVED' , 'NA' ]]
['0xC3' RESERVED_C3 ['RESERVED' , 'NA' ]]
@@ -1359,6 +1360,9 @@
['TESTING' *Testing
[validation '1==2' "TESTING Not yet implemented"] // TODO: implement me
]
+ ['MEDIA_TRANSPORT_CONTROL' *MediaTransport
+ [simple MediaTransportControlData mediaTransportControlData]
+ ]
]
// TODO: we need to check that we don't read the crc by accident
[optional SALData('applicationId') salData ]
@@ -2220,6 +2224,263 @@
['0x02' OUT ]
]
+[type MediaTransportControlData
+ //TODO: golang doesn't like checking for null so we use that static call to check that the enum is known
+ [validation 'STATIC_CALL("knowsMediaTransportControlCommandTypeContainer", readBuffer)' "no command type could be found" shouldFail=false]
+ [simple MediaTransportControlCommandTypeContainer commandTypeContainer ]
+ [virtual MediaTransportControlCommandType commandType 'commandTypeContainer.commandType']
+ [simple byte mediaLinkGroup ]
+ [typeSwitch commandType
+ ['STOP' *Stop
+ ]
+ ['PLAY' *Play
+ ]
+ ['PAUSE_RESUME' *PauseResume
+ [simple byte operation ]
+ [virtual bit isPause 'operation == 0x00' ]
+ [virtual bit isResume 'operation > 0xFE' ]
+ ]
+ ['SELECT_CATEGORY' *SetCategory
+ [simple uint 8 categoryNumber ]
+ ]
+ ['SELECT_SELECTION' *SetSelection
+ [simple byte selectionHi ]
+ [simple byte selectionLo ]
+ ]
+ ['SELECT_TRACK' *SetTrack
+ [simple byte trackMSB ]
+ [simple byte trackMMSB ]
+ [simple byte trackMLSB ]
+ [simple byte trackLSB ]
+ ]
+ ['SHUFFLE_ON_OFF' *ShuffleOnOff
+ [simple byte state ]
+ [virtual bit isOff 'state == 0x00' ]
+ [virtual bit isOn 'state > 0xFE' ]
+ ]
+ ['REPEAT_ON_OFF' *RepeatOnOff
+ [simple byte repeatType ]
+ [virtual bit isOff 'repeatType == 0x00' ]
+ [virtual bit isRepeatCurrent 'repeatType > 0x00 && repeatType <= 0xFE' ]
+ [virtual bit isRepeatTracks 'repeatType >= 0xFE' ]
+ ]
+ ['NEXT_PREVIOUS_CATEGORY' *NextPreviousCategory
+ [simple byte operation ]
+ [virtual bit isSetThePreviousCategory 'operation == 0x00' ]
+ [virtual bit isSetTheNextCategory 'operation != 0x00' ]
+ ]
+ ['NEXT_PREVIOUS_SELECTION' *NextPreviousSelection
+ [simple byte operation ]
+ [virtual bit isSetThePreviousSelection 'operation == 0x00' ]
+ [virtual bit isSetTheNextSelection 'operation != 0x00' ]
+ ]
+ ['NEXT_PREVIOUS_TRACK' *NextPreviousTrack
+ [simple byte operation ]
+ [virtual bit isSetThePreviousTrack 'operation == 0x00' ]
+ [virtual bit isSetTheNextTrack 'operation != 0x00' ]
+ ]
+ ['FAST_FORWARD' *FastForward
+ [simple byte operation ]
+ [virtual bit isCeaseFastForward 'operation == 0x00' ]
+ [virtual bit is2x 'operation == 0x02' ]
+ [virtual bit is4x 'operation == 0x04' ]
+ [virtual bit is8x 'operation == 0x06' ]
+ [virtual bit is16x 'operation == 0x08' ]
+ [virtual bit is32x 'operation == 0x0A' ]
+ [virtual bit is64x 'operation == 0x0C' ]
+ [virtual bit isReserved '!isCeaseFastForward && !is2x && !is4x && !is8x && !is16x && !is32x && !is64x' ]
+ ]
+ ['REWIND' *Rewind
+ [simple byte operation ]
+ [virtual bit isCeaseRewind 'operation == 0x00' ]
+ [virtual bit is2x 'operation == 0x02' ]
+ [virtual bit is4x 'operation == 0x04' ]
+ [virtual bit is8x 'operation == 0x06' ]
+ [virtual bit is16x 'operation == 0x08' ]
+ [virtual bit is32x 'operation == 0x0A' ]
+ [virtual bit is64x 'operation == 0x0C' ]
+ [virtual bit isReserved '!isCeaseRewind && !is2x && !is4x && !is8x && !is16x && !is32x && !is64x' ]
+ ]
+ ['SOURCE_POWER_CONTROL' *SourcePowerControl
+ [simple byte state ]
+ [virtual bit isShouldPowerOn 'state == 0x00' ]
+ [virtual bit isShouldPowerOff 'state != 0x00' ]
+ ]
+ ['TOTAL_TRACKS' *TotalTracks
+ [simple byte totalTracksMSB ]
+ [simple byte totalTracksMMSB ]
+ [simple byte totalTracksMLSB ]
+ [simple byte totalTracksLSB ]
+ ]
+ ['STATUS_REQUEST' *StatusRequest
+ ]
+ ['ENUMERATE_CATEGORIES_SELECTIONS_TRACKS' *EnumerateCategoriesSelectionTracks
+ [simple byte enumerateType ]
+ [virtual bit isListCategories 'enumerateType == 0x00' ]
+ [virtual bit isListSelections 'enumerateType == 0x01' ]
+ [virtual bit isListTracks 'enumerateType == 0x02' ]
+ [virtual bit isReserved '!isListCategories && !isListSelections && !isListTracks' ]
+ [simple uint 8 start ]
+ ]
+ ['ENUMERATION_SIZE' *EnumerationsSize
+ [simple byte sizeType ]
+ [virtual bit isListCategories 'sizeType == 0x00' ]
+ [virtual bit isListSelections 'sizeType == 0x01' ]
+ [virtual bit isListTracks 'sizeType == 0x02' ]
+ [virtual bit isReserved '!isListCategories && !isListSelections && !isListTracks' ]
+ [simple uint 8 start ]
+ [simple uint 8 size ]
+ ]
+ ['TRACK_NAME' *TrackName(MediaTransportControlCommandTypeContainer commandTypeContainer)
+ [simple vstring 'commandTypeContainer.numBytes-1' trackName ]
+ ]
+ ['SELECTION_NAME' *SelectionName(MediaTransportControlCommandTypeContainer commandTypeContainer)
+ [simple vstring 'commandTypeContainer.numBytes-1' selectionName ]
+ ]
+ ]
+]
+
+[enum uint 8 MediaTransportControlCommandTypeContainer(MediaTransportControlCommandType commandType, uint 5 numBytes)
+ ['0x01' MediaTransportControlCommandStop ['STOP', '1']]
+ ['0x79' MediaTransportControlCommandPlay ['PLAY', '1']]
+ ['0x0A' MediaTransportControlCommandPauseResume ['PAUSE_RESUME', '2']]
+ ['0x12' MediaTransportControlCommandSelectCategory ['SELECT_CATEGORY', '2']]
+ ['0x1B' MediaTransportControlCommandSelectSelection ['SELECT_SELECTION', '3']]
+ ['0x25' MediaTransportControlCommandSelectTrack ['SELECT_TRACK', '5']]
+ ['0x2A' MediaTransportControlCommandShuffleOnOff ['SHUFFLE_ON_OFF', '2']]
+ ['0x32' MediaTransportControlCommandRepeatOnOff ['REPEAT_ON_OFF', '2']]
+ ['0x3A' MediaTransportControlCommandNextPreviousCategory ['NEXT_PREVIOUS_CATEGORY', '2']]
+ ['0x42' MediaTransportControlCommandNextPreviousSelection ['NEXT_PREVIOUS_SELECTION', '2']]
+ ['0x4A' MediaTransportControlCommandNextPreviousTrack ['NEXT_PREVIOUS_TRACK', '2']]
+ ['0x52' MediaTransportControlCommandFastForward ['FAST_FORWARD', '2']]
+ ['0x5A' MediaTransportControlCommandRewind ['REWIND', '2']]
+ ['0x62' MediaTransportControlCommandSourcePowerControl ['SOURCE_POWER_CONTROL', '2']]
+ ['0x6D' MediaTransportControlCommandTotalTracks ['TOTAL_TRACKS', '5']]
+ ['0x71' MediaTransportControlCommandStatusRequest ['STATUS_REQUEST', '1']]
+ ['0x73' MediaTransportControlCommandEnumerateCategoriesSelectionsTracks ['ENUMERATE_CATEGORIES_SELECTIONS_TRACKS', '3']]
+ ['0x74' MediaTransportControlCommandEnumerationSize ['ENUMERATION_SIZE', '4']]
+ ['0x80' MediaTransportControlCommandTrackName_0Bytes ['TRACK_NAME', '0']]
+ ['0x81' MediaTransportControlCommandTrackName_1Bytes ['TRACK_NAME', '1']]
+ ['0x82' MediaTransportControlCommandTrackName_2Bytes ['TRACK_NAME', '2']]
+ ['0x83' MediaTransportControlCommandTrackName_3Bytes ['TRACK_NAME', '3']]
+ ['0x84' MediaTransportControlCommandTrackName_4Bytes ['TRACK_NAME', '4']]
+ ['0x85' MediaTransportControlCommandTrackName_5Bytes ['TRACK_NAME', '5']]
+ ['0x86' MediaTransportControlCommandTrackName_6Bytes ['TRACK_NAME', '6']]
+ ['0x87' MediaTransportControlCommandTrackName_7Bytes ['TRACK_NAME', '7']]
+ ['0x88' MediaTransportControlCommandTrackName_8Bytes ['TRACK_NAME', '8']]
+ ['0x89' MediaTransportControlCommandTrackName_9Bytes ['TRACK_NAME', '9']]
+ ['0x8A' MediaTransportControlCommandTrackName_10Bytes ['TRACK_NAME', '10']]
+ ['0x8B' MediaTransportControlCommandTrackName_11Bytes ['TRACK_NAME', '11']]
+ ['0x8C' MediaTransportControlCommandTrackName_12Bytes ['TRACK_NAME', '12']]
+ ['0x8D' MediaTransportControlCommandTrackName_13Bytes ['TRACK_NAME', '13']]
+ ['0x8E' MediaTransportControlCommandTrackName_14Bytes ['TRACK_NAME', '14']]
+ ['0x8F' MediaTransportControlCommandTrackName_15Bytes ['TRACK_NAME', '15']]
+ ['0x90' MediaTransportControlCommandTrackName_16Bytes ['TRACK_NAME', '16']]
+ ['0x91' MediaTransportControlCommandTrackName_17Bytes ['TRACK_NAME', '17']]
+ ['0x92' MediaTransportControlCommandTrackName_18Bytes ['TRACK_NAME', '18']]
+ ['0x93' MediaTransportControlCommandTrackName_19Bytes ['TRACK_NAME', '19']]
+ ['0x94' MediaTransportControlCommandTrackName_20Bytes ['TRACK_NAME', '20']]
+ ['0x95' MediaTransportControlCommandTrackName_21Bytes ['TRACK_NAME', '21']]
+ ['0x96' MediaTransportControlCommandTrackName_22Bytes ['TRACK_NAME', '22']]
+ ['0x97' MediaTransportControlCommandTrackName_23Bytes ['TRACK_NAME', '23']]
+ ['0x98' MediaTransportControlCommandTrackName_24Bytes ['TRACK_NAME', '24']]
+ ['0x99' MediaTransportControlCommandTrackName_25Bytes ['TRACK_NAME', '25']]
+ ['0x9A' MediaTransportControlCommandTrackName_26Bytes ['TRACK_NAME', '26']]
+ ['0x9B' MediaTransportControlCommandTrackName_27Bytes ['TRACK_NAME', '27']]
+ ['0x9C' MediaTransportControlCommandTrackName_28Bytes ['TRACK_NAME', '28']]
+ ['0x9D' MediaTransportControlCommandTrackName_29Bytes ['TRACK_NAME', '29']]
+ ['0x9E' MediaTransportControlCommandTrackName_30Bytes ['TRACK_NAME', '30']]
+ ['0x9F' MediaTransportControlCommandTrackName_31Bytes ['TRACK_NAME', '31']]
+ ['0xA0' MediaTransportControlCommandSelectionName_0Bytes ['SELECTION_NAME', '0']]
+ ['0xA1' MediaTransportControlCommandSelectionName_1Bytes ['SELECTION_NAME', '1']]
+ ['0xA2' MediaTransportControlCommandSelectionName_2Bytes ['SELECTION_NAME', '2']]
+ ['0xA3' MediaTransportControlCommandSelectionName_3Bytes ['SELECTION_NAME', '3']]
+ ['0xA4' MediaTransportControlCommandSelectionName_4Bytes ['SELECTION_NAME', '4']]
+ ['0xA5' MediaTransportControlCommandSelectionName_5Bytes ['SELECTION_NAME', '5']]
+ ['0xA6' MediaTransportControlCommandSelectionName_6Bytes ['SELECTION_NAME', '6']]
+ ['0xA7' MediaTransportControlCommandSelectionName_7Bytes ['SELECTION_NAME', '7']]
+ ['0xA8' MediaTransportControlCommandSelectionName_8Bytes ['SELECTION_NAME', '8']]
+ ['0xA9' MediaTransportControlCommandSelectionName_9Bytes ['SELECTION_NAME', '9']]
+ ['0xAA' MediaTransportControlCommandSelectionName_10Bytes ['SELECTION_NAME', '10']]
+ ['0xAB' MediaTransportControlCommandSelectionName_11Bytes ['SELECTION_NAME', '11']]
+ ['0xAC' MediaTransportControlCommandSelectionName_12Bytes ['SELECTION_NAME', '12']]
+ ['0xAD' MediaTransportControlCommandSelectionName_13Bytes ['SELECTION_NAME', '13']]
+ ['0xAE' MediaTransportControlCommandSelectionName_14Bytes ['SELECTION_NAME', '14']]
+ ['0xAF' MediaTransportControlCommandSelectionName_15Bytes ['SELECTION_NAME', '15']]
+ ['0xB0' MediaTransportControlCommandSelectionName_16Bytes ['SELECTION_NAME', '16']]
+ ['0xB1' MediaTransportControlCommandSelectionName_17Bytes ['SELECTION_NAME', '17']]
+ ['0xB2' MediaTransportControlCommandSelectionName_18Bytes ['SELECTION_NAME', '18']]
+ ['0xB3' MediaTransportControlCommandSelectionName_19Bytes ['SELECTION_NAME', '19']]
+ ['0xB4' MediaTransportControlCommandSelectionName_20Bytes ['SELECTION_NAME', '20']]
+ ['0xB5' MediaTransportControlCommandSelectionName_21Bytes ['SELECTION_NAME', '21']]
+ ['0xB6' MediaTransportControlCommandSelectionName_22Bytes ['SELECTION_NAME', '22']]
+ ['0xB7' MediaTransportControlCommandSelectionName_23Bytes ['SELECTION_NAME', '23']]
+ ['0xB8' MediaTransportControlCommandSelectionName_24Bytes ['SELECTION_NAME', '24']]
+ ['0xB9' MediaTransportControlCommandSelectionName_25Bytes ['SELECTION_NAME', '25']]
+ ['0xBA' MediaTransportControlCommandSelectionName_26Bytes ['SELECTION_NAME', '26']]
+ ['0xBB' MediaTransportControlCommandSelectionName_27Bytes ['SELECTION_NAME', '27']]
+ ['0xBC' MediaTransportControlCommandSelectionName_28Bytes ['SELECTION_NAME', '28']]
+ ['0xBD' MediaTransportControlCommandSelectionName_29Bytes ['SELECTION_NAME', '29']]
+ ['0xBE' MediaTransportControlCommandSelectionName_30Bytes ['SELECTION_NAME', '30']]
+ ['0xBF' MediaTransportControlCommandSelectionName_31Bytes ['SELECTION_NAME', '31']]
+ ['0xC0' MediaTransportControlCommandCategoryName_0Bytes ['CATEGORY_NAME', '0']]
+ ['0xC1' MediaTransportControlCommandCategoryName_1Bytes ['CATEGORY_NAME', '1']]
+ ['0xC2' MediaTransportControlCommandCategoryName_2Bytes ['CATEGORY_NAME', '2']]
+ ['0xC3' MediaTransportControlCommandCategoryName_3Bytes ['CATEGORY_NAME', '3']]
+ ['0xC4' MediaTransportControlCommandCategoryName_4Bytes ['CATEGORY_NAME', '4']]
+ ['0xC5' MediaTransportControlCommandCategoryName_5Bytes ['CATEGORY_NAME', '5']]
+ ['0xC6' MediaTransportControlCommandCategoryName_6Bytes ['CATEGORY_NAME', '6']]
+ ['0xC7' MediaTransportControlCommandCategoryName_7Bytes ['CATEGORY_NAME', '7']]
+ ['0xC8' MediaTransportControlCommandCategoryName_8Bytes ['CATEGORY_NAME', '8']]
+ ['0xC9' MediaTransportControlCommandCategoryName_9Bytes ['CATEGORY_NAME', '9']]
+ ['0xCA' MediaTransportControlCommandCategoryName_10Bytes ['CATEGORY_NAME', '10']]
+ ['0xCB' MediaTransportControlCommandCategoryName_11Bytes ['CATEGORY_NAME', '11']]
+ ['0xCC' MediaTransportControlCommandCategoryName_12Bytes ['CATEGORY_NAME', '12']]
+ ['0xCD' MediaTransportControlCommandCategoryName_13Bytes ['CATEGORY_NAME', '13']]
+ ['0xCE' MediaTransportControlCommandCategoryName_14Bytes ['CATEGORY_NAME', '14']]
+ ['0xCF' MediaTransportControlCommandCategoryName_15Bytes ['CATEGORY_NAME', '15']]
+ ['0xD0' MediaTransportControlCommandCategoryName_16Bytes ['CATEGORY_NAME', '16']]
+ ['0xD1' MediaTransportControlCommandCategoryName_17Bytes ['CATEGORY_NAME', '17']]
+ ['0xD2' MediaTransportControlCommandCategoryName_18Bytes ['CATEGORY_NAME', '18']]
+ ['0xD3' MediaTransportControlCommandCategoryName_19Bytes ['CATEGORY_NAME', '19']]
+ ['0xD4' MediaTransportControlCommandCategoryName_20Bytes ['CATEGORY_NAME', '20']]
+ ['0xD5' MediaTransportControlCommandCategoryName_21Bytes ['CATEGORY_NAME', '21']]
+ ['0xD6' MediaTransportControlCommandCategoryName_22Bytes ['CATEGORY_NAME', '22']]
+ ['0xD7' MediaTransportControlCommandCategoryName_23Bytes ['CATEGORY_NAME', '23']]
+ ['0xD8' MediaTransportControlCommandCategoryName_24Bytes ['CATEGORY_NAME', '24']]
+ ['0xD9' MediaTransportControlCommandCategoryName_25Bytes ['CATEGORY_NAME', '25']]
+ ['0xDA' MediaTransportControlCommandCategoryName_26Bytes ['CATEGORY_NAME', '26']]
+ ['0xDB' MediaTransportControlCommandCategoryName_27Bytes ['CATEGORY_NAME', '27']]
+ ['0xDC' MediaTransportControlCommandCategoryName_28Bytes ['CATEGORY_NAME', '28']]
+ ['0xDD' MediaTransportControlCommandCategoryName_29Bytes ['CATEGORY_NAME', '29']]
+ ['0xDE' MediaTransportControlCommandCategoryName_30Bytes ['CATEGORY_NAME', '30']]
+ ['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 ]
+]
+
[type ReplyOrConfirmation(CBusOptions cBusOptions, uint 16 messageLength, RequestContext requestContext)
[peek byte peekedByte ]
[virtual bit isAlpha '(peekedByte >= 0x67) && (peekedByte <= 0x7A)' ]