From 667a8def6fbfde23fab0c105e3a8231faeacfce6 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 24 Oct 2023 11:02:17 -0400 Subject: [PATCH 1/4] Audio output to spec --- .../zcl/data-model/chip/audio-output-cluster.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml index d58dfca94375ee..f801a077ecc9b0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml @@ -25,7 +25,7 @@ limitations under the License. true This cluster provides an interface for controlling the Output on a media device such as a TV. OutputList - CurrentOutput + CurrentOutput Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. @@ -34,6 +34,7 @@ limitations under the License. Upon receipt, this SHALL rename the output at a specific index in the Output List. Updates to the output name SHALL appear in the TV settings menus. + @@ -44,7 +45,7 @@ limitations under the License. - + From f0d699167f4a56a64e34baee78f066afd4fde2ee Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 24 Oct 2023 11:06:12 -0400 Subject: [PATCH 2/4] zap regen --- .../all-clusters-minimal-app.matter | 2 +- .../rootnode_basicvideoplayer_0ff86e943b.matter | 2 +- examples/placeholder/linux/apps/app1/config.matter | 10 +++++----- examples/placeholder/linux/apps/app2/config.matter | 10 +++++----- examples/tv-app/tv-common/tv-app.matter | 4 ++-- .../tv-casting-common/tv-casting-app.matter | 6 +++--- src/controller/data_model/controller-clusters.matter | 6 +++--- src/controller/python/chip/clusters/Objects.py | 8 ++++---- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index d8edc24a8e391d..46c8620076d6e8 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -3528,7 +3528,7 @@ server cluster AudioOutput = 1291 { struct OutputInfoStruct { int8u index = 0; OutputTypeEnum outputType = 1; - char_string<32> name = 2; + char_string name = 2; } readonly attribute OutputInfoStruct outputList[] = 0; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 11eef7f41cb6c8..cd23789359ae12 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -1420,7 +1420,7 @@ server cluster AudioOutput = 1291 { struct OutputInfoStruct { int8u index = 0; OutputTypeEnum outputType = 1; - char_string<32> name = 2; + char_string name = 2; } readonly attribute OutputInfoStruct outputList[] = 0; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index bc62ad9ebc9c58..950e10b66c5f8c 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -6216,11 +6216,11 @@ client cluster AudioOutput = 1291 { struct OutputInfoStruct { int8u index = 0; OutputTypeEnum outputType = 1; - char_string<32> name = 2; + char_string name = 2; } readonly attribute OutputInfoStruct outputList[] = 0; - readonly attribute optional int8u currentOutput = 1; + readonly attribute int8u currentOutput = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6240,7 +6240,7 @@ client cluster AudioOutput = 1291 { /** Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. */ command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; /** Upon receipt, this SHALL rename the output at a specific index in the Output List. Updates to the output name SHALL appear in the TV settings menus. */ - command RenameOutput(RenameOutputRequest): DefaultSuccess = 1; + command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } /** This cluster provides an interface for controlling the Output on a media device such as a TV. */ @@ -6261,7 +6261,7 @@ server cluster AudioOutput = 1291 { struct OutputInfoStruct { int8u index = 0; OutputTypeEnum outputType = 1; - char_string<32> name = 2; + char_string name = 2; } readonly attribute OutputInfoStruct outputList[] = 0; @@ -6283,7 +6283,7 @@ server cluster AudioOutput = 1291 { } command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; - command RenameOutput(RenameOutputRequest): DefaultSuccess = 1; + command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 689f75dbc008c8..1f69b0a1059e2d 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -6175,11 +6175,11 @@ client cluster AudioOutput = 1291 { struct OutputInfoStruct { int8u index = 0; OutputTypeEnum outputType = 1; - char_string<32> name = 2; + char_string name = 2; } readonly attribute OutputInfoStruct outputList[] = 0; - readonly attribute optional int8u currentOutput = 1; + readonly attribute int8u currentOutput = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6199,7 +6199,7 @@ client cluster AudioOutput = 1291 { /** Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. */ command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; /** Upon receipt, this SHALL rename the output at a specific index in the Output List. Updates to the output name SHALL appear in the TV settings menus. */ - command RenameOutput(RenameOutputRequest): DefaultSuccess = 1; + command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } /** This cluster provides an interface for controlling the Output on a media device such as a TV. */ @@ -6220,7 +6220,7 @@ server cluster AudioOutput = 1291 { struct OutputInfoStruct { int8u index = 0; OutputTypeEnum outputType = 1; - char_string<32> name = 2; + char_string name = 2; } readonly attribute OutputInfoStruct outputList[] = 0; @@ -6242,7 +6242,7 @@ server cluster AudioOutput = 1291 { } command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; - command RenameOutput(RenameOutputRequest): DefaultSuccess = 1; + command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 23a0e2e8772ef1..50603fa89201ed 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -2288,7 +2288,7 @@ server cluster AudioOutput = 1291 { struct OutputInfoStruct { int8u index = 0; OutputTypeEnum outputType = 1; - char_string<32> name = 2; + char_string name = 2; } readonly attribute OutputInfoStruct outputList[] = 0; @@ -2310,7 +2310,7 @@ server cluster AudioOutput = 1291 { } command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; - command RenameOutput(RenameOutputRequest): DefaultSuccess = 1; + command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 78c2a6aca45cb0..42f81cea46ab08 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1841,11 +1841,11 @@ client cluster AudioOutput = 1291 { struct OutputInfoStruct { int8u index = 0; OutputTypeEnum outputType = 1; - char_string<32> name = 2; + char_string name = 2; } readonly attribute OutputInfoStruct outputList[] = 0; - readonly attribute optional int8u currentOutput = 1; + readonly attribute int8u currentOutput = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1865,7 +1865,7 @@ client cluster AudioOutput = 1291 { /** Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. */ command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; /** Upon receipt, this SHALL rename the output at a specific index in the Output List. Updates to the output name SHALL appear in the TV settings menus. */ - command RenameOutput(RenameOutputRequest): DefaultSuccess = 1; + command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 3527172e57b436..5f7d769d9fadcd 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -6264,11 +6264,11 @@ client cluster AudioOutput = 1291 { struct OutputInfoStruct { int8u index = 0; OutputTypeEnum outputType = 1; - char_string<32> name = 2; + char_string name = 2; } readonly attribute OutputInfoStruct outputList[] = 0; - readonly attribute optional int8u currentOutput = 1; + readonly attribute int8u currentOutput = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6288,7 +6288,7 @@ client cluster AudioOutput = 1291 { /** Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. */ command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; /** Upon receipt, this SHALL rename the output at a specific index in the Output List. Updates to the output name SHALL appear in the TV settings menus. */ - command RenameOutput(RenameOutputRequest): DefaultSuccess = 1; + command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 98a1a611ca54a5..e50c655cf6be51 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -34512,7 +34512,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="outputList", Tag=0x00000000, Type=typing.List[AudioOutput.Structs.OutputInfoStruct]), - ClusterObjectFieldDescriptor(Label="currentOutput", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentOutput", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -34522,7 +34522,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) outputList: 'typing.List[AudioOutput.Structs.OutputInfoStruct]' = None - currentOutput: 'typing.Optional[uint]' = None + currentOutput: 'uint' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -34628,9 +34628,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): From d6ae6f73c0d64d554057a09a596c309b0c447ec0 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 24 Oct 2023 11:07:58 -0400 Subject: [PATCH 3/4] Minor change to re-kick CI --- .../zap-templates/zcl/data-model/chip/audio-output-cluster.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml index f801a077ecc9b0..7cca1ca7f19c28 100644 --- a/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml @@ -1,6 +1,6 @@