Skip to content

Commit

Permalink
Move AudioOutput cluster up to spec (project-chip#29948)
Browse files Browse the repository at this point in the history
* Audio output to spec

* zap regen

* Minor change to re-kick CI

* Enalbe AudioOutput::CurrentOutput as a required attribute in the chef basicvideoplayer example

---------

Co-authored-by: Andrei Litvin <andreilitvin@google.com>
  • Loading branch information
2 people authored and shripad621git committed Oct 31, 2023
1 parent d6e6732 commit f89ee48
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3536,7 +3536,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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1428,10 +1428,11 @@ 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;
readonly attribute int8u currentOutput = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1787,6 +1788,7 @@ endpoint 1 {

server cluster AudioOutput {
callback attribute outputList;
ram attribute currentOutput default = 0x00;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
Expand Down
19 changes: 18 additions & 1 deletion examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap
Original file line number Diff line number Diff line change
Expand Up @@ -3790,6 +3790,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "CurrentOutput",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
Expand Down Expand Up @@ -3906,5 +3922,6 @@
"endpointId": 1,
"networkId": 0
}
]
],
"log": []
}
10 changes: 5 additions & 5 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -6224,11 +6224,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;
Expand All @@ -6248,7 +6248,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. */
Expand All @@ -6269,7 +6269,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;
Expand All @@ -6291,7 +6291,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. */
Expand Down
10 changes: 5 additions & 5 deletions examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -6183,11 +6183,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;
Expand All @@ -6207,7 +6207,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. */
Expand All @@ -6228,7 +6228,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;
Expand All @@ -6250,7 +6250,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. */
Expand Down
4 changes: 2 additions & 2 deletions examples/tv-app/tv-common/tv-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2307,7 +2307,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;
Expand All @@ -2329,7 +2329,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. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1849,11 +1849,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;
Expand All @@ -1873,7 +1873,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. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2021 Project CHIP Authors
Copyright (c) 2023 Project CHIP Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@ limitations under the License.
<server init="false" tick="false">true</server>
<description>This cluster provides an interface for controlling the Output on a media device such as a TV.</description>
<attribute side="server" code="0x0000" define="AUDIO_OUTPUT_LIST" type="ARRAY" entryType="OutputInfoStruct" length="254" writable="false" optional="false">OutputList</attribute>
<attribute side="server" code="0x0001" define="AUDIO_OUTPUT_CURRENT_OUTPUT" type="int8u" default="0x00" min="0x00" max="0xFF" writable="false" optional="true">CurrentOutput</attribute>
<attribute side="server" code="0x0001" define="AUDIO_OUTPUT_CURRENT_OUTPUT" type="int8u" default="0x00" min="0x00" max="0xFF" writable="false" optional="false">CurrentOutput</attribute>

<command source="client" code="0x00" name="SelectOutput" optional="false">
<description>Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List.</description>
Expand All @@ -34,6 +34,7 @@ limitations under the License.

<command source="client" code="0x01" name="RenameOutput" optional="true">
<description>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.</description>
<access op="invoke" role="manage" />
<arg name="Index" type="int8u"/>
<arg name="Name" type="char_string"/>
</command>
Expand All @@ -44,7 +45,7 @@ limitations under the License.
<cluster code="0x050b"/>
<item name="Index" type="int8u"/>
<item name="OutputType" type="OutputTypeEnum"/>
<item name="Name" type="char_string" length="32"/>
<item name="Name" type="char_string"/>
</struct>

<enum name="OutputTypeEnum" type="enum8">
Expand Down
6 changes: 3 additions & 3 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -6275,11 +6275,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;
Expand All @@ -6299,7 +6299,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. */
Expand Down
8 changes: 4 additions & 4 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f89ee48

Please sign in to comment.