Skip to content

Commit

Permalink
Align naming in Audio Output cluster XML with the spec. (#24512)
Browse files Browse the repository at this point in the history
* Align naming in Audio Output cluster XML with the spec.

* Regenerate generated code.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Feb 9, 2024
1 parent 6c6e0c2 commit 1018277
Show file tree
Hide file tree
Showing 32 changed files with 169 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3537,13 +3537,13 @@ server cluster AudioOutput = 1291 {
kNameUpdates = 0x1;
}

struct OutputInfo {
struct OutputInfoStruct {
int8u index = 0;
OutputTypeEnum outputType = 1;
char_string<32> name = 2;
}

readonly attribute OutputInfo outputList[] = 0;
readonly attribute OutputInfoStruct outputList[] = 0;
readonly attribute int8u currentOutput = 1;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2885,13 +2885,13 @@ server cluster AudioOutput = 1291 {
kNameUpdates = 0x1;
}

struct OutputInfo {
struct OutputInfoStruct {
int8u index = 0;
OutputTypeEnum outputType = 1;
char_string<32> name = 2;
}

readonly attribute OutputInfo outputList[] = 0;
readonly attribute OutputInfoStruct outputList[] = 0;
readonly attribute int8u currentOutput = 1;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

using chip::app::AttributeValueEncoder;
using AudioOutputDelegate = chip::app::Clusters::AudioOutput::Delegate;
using OutputInfoType = chip::app::Clusters::AudioOutput::Structs::OutputInfo::Type;
using OutputInfoType = chip::app::Clusters::AudioOutput::Structs::OutputInfoStruct::Type;

class AudioOutputManager : public AudioOutputDelegate
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

using chip::app::AttributeValueEncoder;
using AudioOutputDelegate = chip::app::Clusters::AudioOutput::Delegate;
using OutputInfoType = chip::app::Clusters::AudioOutput::Structs::OutputInfo::Type;
using OutputInfoType = chip::app::Clusters::AudioOutput::Structs::OutputInfoStruct::Type;

class AudioOutputManager : public AudioOutputDelegate
{
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 @@ -2011,13 +2011,13 @@ server cluster AudioOutput = 1291 {
kNameUpdates = 0x1;
}

struct OutputInfo {
struct OutputInfoStruct {
int8u index = 0;
OutputTypeEnum outputType = 1;
char_string<32> name = 2;
}

readonly attribute OutputInfo outputList[] = 0;
readonly attribute OutputInfoStruct outputList[] = 0;
readonly attribute int8u currentOutput = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2060,13 +2060,13 @@ client cluster AudioOutput = 1291 {
kNameUpdates = 0x1;
}

struct OutputInfo {
struct OutputInfoStruct {
int8u index = 0;
OutputTypeEnum outputType = 1;
char_string<32> name = 2;
}

readonly attribute OutputInfo outputList[] = 0;
readonly attribute OutputInfoStruct outputList[] = 0;
readonly attribute int16u clusterRevision = 65533;

request struct SelectOutputRequest {
Expand Down
12 changes: 6 additions & 6 deletions src/app/tests/suites/TV_AudioOutputCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ tests:
response:
value:
[
{ index: 1, outputType: 0, name: "HDMI" },
{ index: 2, outputType: 0, name: "HDMI" },
{ index: 3, outputType: 0, name: "HDMI" },
{ Index: 1, OutputType: 0, Name: "HDMI" },
{ Index: 2, OutputType: 0, Name: "HDMI" },
{ Index: 3, OutputType: 0, Name: "HDMI" },
]

- label: "Read attribute current audio output"
Expand Down Expand Up @@ -67,7 +67,7 @@ tests:
response:
value:
[
{ index: 1, outputType: 0, name: "HDMI Test" },
{ index: 2, outputType: 0, name: "HDMI" },
{ index: 3, outputType: 0, name: "HDMI" },
{ Index: 1, OutputType: 0, Name: "HDMI Test" },
{ Index: 2, OutputType: 0, Name: "HDMI" },
{ Index: 3, OutputType: 0, Name: "HDMI" },
]
22 changes: 11 additions & 11 deletions src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,33 @@ limitations under the License.
<client init="false" tick="false">true</client>
<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="OutputInfo" 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="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>

<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>
<arg name="index" type="INT8U"/>
<arg name="Index" type="INT8U"/>
</command>

<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>
<arg name="index" type="INT8U"/>
<arg name="name" type="CHAR_STRING"/>
<arg name="Index" type="INT8U"/>
<arg name="Name" type="CHAR_STRING"/>
</command>

</cluster>

<struct name="OutputInfo">
<struct name="OutputInfoStruct">
<cluster code="0x050b"/>
<item name="index" type="INT8U"/>
<item name="outputType" type="OutputTypeEnum"/>
<item name="name" type="CHAR_STRING" length="32"/>
<item name="Index" type="INT8U"/>
<item name="OutputType" type="OutputTypeEnum"/>
<item name="Name" type="CHAR_STRING" length="32"/>
</struct>

<enum name="OutputTypeEnum" type="ENUM8">
<cluster code="0x050b"/>
<item name="Hdmi" value="0x00"/>
<item name="Bt" value="0x01"/>
<item name="HDMI" value="0x00"/>
<item name="BT" value="0x01"/>
<item name="Optical" value="0x02"/>
<item name="Headphone" value="0x03"/>
<item name="Internal" value="0x04"/>
Expand Down
4 changes: 2 additions & 2 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3972,13 +3972,13 @@ client cluster AudioOutput = 1291 {
kNameUpdates = 0x1;
}

struct OutputInfo {
struct OutputInfoStruct {
int8u index = 0;
OutputTypeEnum outputType = 1;
char_string<32> name = 2;
}

readonly attribute OutputInfo outputList[] = 0;
readonly attribute OutputInfoStruct outputList[] = 0;
readonly attribute int8u currentOutput = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand Down

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

22 changes: 11 additions & 11 deletions src/controller/java/zap-generated/CHIPReadCallbacks.cpp

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

3 changes: 2 additions & 1 deletion src/controller/java/zap-generated/CHIPReadCallbacks.h

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

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

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

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

10 changes: 5 additions & 5 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.

Loading

0 comments on commit 1018277

Please sign in to comment.