Skip to content

Commit 1468444

Browse files
bzbarsky-applepull[bot]
authored andcommittedDec 22, 2023
Align naming in Target Navigator cluster XML with the spec. (#24498)
* Align naming in Target Navigator cluster XML with the spec. * Regenerate generated code.
1 parent e4bba36 commit 1468444

File tree

37 files changed

+148
-118
lines changed

37 files changed

+148
-118
lines changed
 

‎examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -3218,12 +3218,12 @@ server cluster TargetNavigator = 1285 {
32183218
kNotAllowed = 2;
32193219
}
32203220

3221-
struct TargetInfo {
3221+
struct TargetInfoStruct {
32223222
int8u identifier = 0;
32233223
char_string<32> name = 1;
32243224
}
32253225

3226-
readonly attribute TargetInfo targetList[] = 0;
3226+
readonly attribute TargetInfoStruct targetList[] = 0;
32273227
readonly attribute int8u currentTarget = 1;
32283228
readonly attribute bitmap32 featureMap = 65532;
32293229
readonly attribute int16u clusterRevision = 65533;

‎examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -2571,12 +2571,12 @@ server cluster TargetNavigator = 1285 {
25712571
kNotAllowed = 2;
25722572
}
25732573

2574-
struct TargetInfo {
2574+
struct TargetInfoStruct {
25752575
int8u identifier = 0;
25762576
char_string<32> name = 1;
25772577
}
25782578

2579-
readonly attribute TargetInfo targetList[] = 0;
2579+
readonly attribute TargetInfoStruct targetList[] = 0;
25802580
readonly attribute bitmap32 featureMap = 65532;
25812581
readonly attribute int16u clusterRevision = 65533;
25822582

‎examples/placeholder/linux/apps/app1/config.matter

+4-4
Original file line numberDiff line numberDiff line change
@@ -2179,12 +2179,12 @@ client cluster TargetNavigator = 1285 {
21792179
kNotAllowed = 2;
21802180
}
21812181

2182-
struct TargetInfo {
2182+
struct TargetInfoStruct {
21832183
int8u identifier = 0;
21842184
char_string<32> name = 1;
21852185
}
21862186

2187-
readonly attribute TargetInfo targetList[] = 0;
2187+
readonly attribute TargetInfoStruct targetList[] = 0;
21882188
readonly attribute int8u currentTarget = 1;
21892189
readonly attribute command_id generatedCommandList[] = 65528;
21902190
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -2212,12 +2212,12 @@ server cluster TargetNavigator = 1285 {
22122212
kNotAllowed = 2;
22132213
}
22142214

2215-
struct TargetInfo {
2215+
struct TargetInfoStruct {
22162216
int8u identifier = 0;
22172217
char_string<32> name = 1;
22182218
}
22192219

2220-
readonly attribute TargetInfo targetList[] = 0;
2220+
readonly attribute TargetInfoStruct targetList[] = 0;
22212221
readonly attribute int8u currentTarget = 1;
22222222
readonly attribute command_id generatedCommandList[] = 65528;
22232223
readonly attribute command_id acceptedCommandList[] = 65529;

‎examples/placeholder/linux/apps/app2/config.matter

+4-4
Original file line numberDiff line numberDiff line change
@@ -2156,12 +2156,12 @@ client cluster TargetNavigator = 1285 {
21562156
kNotAllowed = 2;
21572157
}
21582158

2159-
struct TargetInfo {
2159+
struct TargetInfoStruct {
21602160
int8u identifier = 0;
21612161
char_string<32> name = 1;
21622162
}
21632163

2164-
readonly attribute TargetInfo targetList[] = 0;
2164+
readonly attribute TargetInfoStruct targetList[] = 0;
21652165
readonly attribute int8u currentTarget = 1;
21662166
readonly attribute command_id generatedCommandList[] = 65528;
21672167
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -2189,12 +2189,12 @@ server cluster TargetNavigator = 1285 {
21892189
kNotAllowed = 2;
21902190
}
21912191

2192-
struct TargetInfo {
2192+
struct TargetInfoStruct {
21932193
int8u identifier = 0;
21942194
char_string<32> name = 1;
21952195
}
21962196

2197-
readonly attribute TargetInfo targetList[] = 0;
2197+
readonly attribute TargetInfoStruct targetList[] = 0;
21982198
readonly attribute int8u currentTarget = 1;
21992199
readonly attribute command_id generatedCommandList[] = 65528;
22002200
readonly attribute command_id acceptedCommandList[] = 65529;

‎examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ CHIP_ERROR TargetNavigatorManager::HandleGetTargetList(AttributeValueEncoder & a
6868
i++;
6969
continue;
7070
}
71-
Structs::TargetInfo::Type outputInfo;
71+
Structs::TargetInfoStruct::Type outputInfo;
7272
outputInfo.identifier = static_cast<uint8_t>(entry[targetId].asUInt());
7373
outputInfo.name = CharSpan::fromCharString(entry[targetName].asCString());
7474
ReturnErrorOnFailure(encoder.Encode(outputInfo));
@@ -86,7 +86,7 @@ CHIP_ERROR TargetNavigatorManager::HandleGetTargetList(AttributeValueEncoder & a
8686
int i = 0;
8787
for (std::string & entry : mTargets)
8888
{
89-
Structs::TargetInfo::Type outputInfo;
89+
Structs::TargetInfoStruct::Type outputInfo;
9090
outputInfo.identifier = static_cast<uint8_t>(i + 1);
9191
outputInfo.name = CharSpan::fromCharString(entry.c_str());
9292
ReturnErrorOnFailure(encoder.Encode(outputInfo));

‎examples/tv-app/android/include/target-navigator/TargetNavigatorManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using chip::EndpointId;
2525
using chip::app::AttributeValueEncoder;
2626
using chip::app::CommandResponseHelper;
2727
using TargetNavigatorDelegate = chip::app::Clusters::TargetNavigator::Delegate;
28-
using TargetInfoType = chip::app::Clusters::TargetNavigator::Structs::TargetInfo::Type;
28+
using TargetInfoType = chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::Type;
2929
using NavigateTargetResponseType = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Type;
3030
using ContentAppAttributeDelegate = chip::AppPlatform::ContentAppAttributeDelegate;
3131

‎examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ CHIP_ERROR TargetNavigatorManager::HandleGetTargetList(AttributeValueEncoder & a
3434
int i = 0;
3535
for (std::string & entry : mTargets)
3636
{
37-
Structs::TargetInfo::Type outputInfo;
37+
Structs::TargetInfoStruct::Type outputInfo;
3838
outputInfo.identifier = static_cast<uint8_t>(i + 1);
3939
outputInfo.name = CharSpan::fromCharString(entry.c_str());
4040
ReturnErrorOnFailure(encoder.Encode(outputInfo));

‎examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ using chip::CharSpan;
2323
using chip::app::AttributeValueEncoder;
2424
using chip::app::CommandResponseHelper;
2525
using TargetNavigatorDelegate = chip::app::Clusters::TargetNavigator::Delegate;
26-
using TargetInfoType = chip::app::Clusters::TargetNavigator::Structs::TargetInfo::Type;
26+
using TargetInfoType = chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::Type;
2727
using NavigateTargetResponseType = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Type;
2828

2929
class TargetNavigatorManager : public TargetNavigatorDelegate

‎examples/tv-app/tv-common/tv-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -1628,12 +1628,12 @@ server cluster TargetNavigator = 1285 {
16281628
kNotAllowed = 2;
16291629
}
16301630

1631-
struct TargetInfo {
1631+
struct TargetInfoStruct {
16321632
int8u identifier = 0;
16331633
char_string<32> name = 1;
16341634
}
16351635

1636-
readonly attribute TargetInfo targetList[] = 0;
1636+
readonly attribute TargetInfoStruct targetList[] = 0;
16371637
readonly attribute int8u currentTarget = 1;
16381638
readonly attribute command_id generatedCommandList[] = 65528;
16391639
readonly attribute command_id acceptedCommandList[] = 65529;

‎examples/tv-casting-app/tv-casting-common/tv-casting-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -1731,12 +1731,12 @@ client cluster TargetNavigator = 1285 {
17311731
kNotAllowed = 2;
17321732
}
17331733

1734-
struct TargetInfo {
1734+
struct TargetInfoStruct {
17351735
int8u identifier = 0;
17361736
char_string<32> name = 1;
17371737
}
17381738

1739-
readonly attribute TargetInfo targetList[] = 0;
1739+
readonly attribute TargetInfoStruct targetList[] = 0;
17401740
readonly attribute int16u clusterRevision = 65533;
17411741

17421742
request struct NavigateTargetRequest {

‎src/app/tests/suites/TV_TargetNavigatorCluster.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ tests:
3434
response:
3535
value:
3636
[
37-
{ identifier: 1, name: "exampleName" },
38-
{ identifier: 2, name: "exampleName" },
37+
{ Identifier: 1, Name: "exampleName" },
38+
{ Identifier: 2, Name: "exampleName" },
3939
]
4040

4141
- label: "Read attribute current navigator target"

‎src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ limitations under the License.
2424
<client init="false" tick="false">true</client>
2525
<server init="false" tick="false">true</server>
2626
<description>This cluster provides an interface for UX navigation within a set of targets on a device or endpoint.</description>
27-
<attribute side="server" code="0x0000" define="TARGET_NAVIGATOR_LIST" type="ARRAY" entryType="TargetInfo" length="254" writable="false" optional="false">TargetList</attribute>
27+
<attribute side="server" code="0x0000" define="TARGET_NAVIGATOR_LIST" type="ARRAY" entryType="TargetInfoStruct" length="254" writable="false" optional="false">TargetList</attribute>
2828
<attribute side="server" code="0x0001" define="TARGET_NAVIGATOR_CURRENT_TARGET" type="INT8U" default="0" min="0x00" max="0xFF" writable="false" optional="true">CurrentTarget</attribute>
2929

3030
<command source="client" code="0x00" name="NavigateTarget" response="NavigateTargetResponse" optional="false">
3131
<description>Upon receipt, this SHALL navigation the UX to the target identified.</description>
32-
<arg name="target" type="INT8U"/>
33-
<arg name="data" type="CHAR_STRING" optional="true"/>
32+
<arg name="Target" type="INT8U"/>
33+
<arg name="Data" type="CHAR_STRING" optional="true"/>
3434
</command>
3535

3636
<command source="server" code="0x01" name="NavigateTargetResponse" optional="false">
3737
<description>This command SHALL be generated in response to NavigateTarget commands.</description>
38-
<arg name="status" type="TargetNavigatorStatusEnum"/>
39-
<arg name="data" type="CHAR_STRING" optional="true"/>
38+
<arg name="Status" type="TargetNavigatorStatusEnum"/>
39+
<arg name="Data" type="CHAR_STRING" optional="true"/>
4040
</command>
4141
</cluster>
4242

@@ -47,9 +47,9 @@ limitations under the License.
4747
<item name="NotAllowed" value="0x02"/>
4848
</enum>
4949

50-
<struct name="TargetInfo">
50+
<struct name="TargetInfoStruct">
5151
<cluster code="0x0505"/>
52-
<item name="identifier" type="INT8U"/>
53-
<item name="name" type="CHAR_STRING" length="32"/>
52+
<item name="Identifier" type="INT8U"/>
53+
<item name="Name" type="CHAR_STRING" length="32"/>
5454
</struct>
5555
</configurator>

‎src/controller/data_model/controller-clusters.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -3580,12 +3580,12 @@ client cluster TargetNavigator = 1285 {
35803580
kNotAllowed = 2;
35813581
}
35823582

3583-
struct TargetInfo {
3583+
struct TargetInfoStruct {
35843584
int8u identifier = 0;
35853585
char_string<32> name = 1;
35863586
}
35873587

3588-
readonly attribute TargetInfo targetList[] = 0;
3588+
readonly attribute TargetInfoStruct targetList[] = 0;
35893589
readonly attribute int8u currentTarget = 1;
35903590
readonly attribute command_id generatedCommandList[] = 65528;
35913591
readonly attribute command_id acceptedCommandList[] = 65529;

‎src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/controller/java/zap-generated/CHIPReadCallbacks.cpp

+11-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/controller/java/zap-generated/CHIPReadCallbacks.h

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)