Skip to content

Commit

Permalink
Align naming in Target Navigator cluster XML with the spec. (#24498)
Browse files Browse the repository at this point in the history
* Align naming in Target Navigator cluster XML with the spec.

* Regenerate generated code.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Apr 21, 2023
1 parent 8d0e083 commit 1125099
Show file tree
Hide file tree
Showing 37 changed files with 148 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3218,12 +3218,12 @@ server cluster TargetNavigator = 1285 {
kNotAllowed = 2;
}

struct TargetInfo {
struct TargetInfoStruct {
int8u identifier = 0;
char_string<32> name = 1;
}

readonly attribute TargetInfo targetList[] = 0;
readonly attribute TargetInfoStruct targetList[] = 0;
readonly attribute int8u currentTarget = 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 @@ -2571,12 +2571,12 @@ server cluster TargetNavigator = 1285 {
kNotAllowed = 2;
}

struct TargetInfo {
struct TargetInfoStruct {
int8u identifier = 0;
char_string<32> name = 1;
}

readonly attribute TargetInfo targetList[] = 0;
readonly attribute TargetInfoStruct targetList[] = 0;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
8 changes: 4 additions & 4 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2179,12 +2179,12 @@ client cluster TargetNavigator = 1285 {
kNotAllowed = 2;
}

struct TargetInfo {
struct TargetInfoStruct {
int8u identifier = 0;
char_string<32> name = 1;
}

readonly attribute TargetInfo targetList[] = 0;
readonly attribute TargetInfoStruct targetList[] = 0;
readonly attribute int8u currentTarget = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand Down Expand Up @@ -2212,12 +2212,12 @@ server cluster TargetNavigator = 1285 {
kNotAllowed = 2;
}

struct TargetInfo {
struct TargetInfoStruct {
int8u identifier = 0;
char_string<32> name = 1;
}

readonly attribute TargetInfo targetList[] = 0;
readonly attribute TargetInfoStruct targetList[] = 0;
readonly attribute int8u currentTarget = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand Down
8 changes: 4 additions & 4 deletions examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2156,12 +2156,12 @@ client cluster TargetNavigator = 1285 {
kNotAllowed = 2;
}

struct TargetInfo {
struct TargetInfoStruct {
int8u identifier = 0;
char_string<32> name = 1;
}

readonly attribute TargetInfo targetList[] = 0;
readonly attribute TargetInfoStruct targetList[] = 0;
readonly attribute int8u currentTarget = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand Down Expand Up @@ -2189,12 +2189,12 @@ server cluster TargetNavigator = 1285 {
kNotAllowed = 2;
}

struct TargetInfo {
struct TargetInfoStruct {
int8u identifier = 0;
char_string<32> name = 1;
}

readonly attribute TargetInfo targetList[] = 0;
readonly attribute TargetInfoStruct targetList[] = 0;
readonly attribute int8u currentTarget = 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 @@ -68,7 +68,7 @@ CHIP_ERROR TargetNavigatorManager::HandleGetTargetList(AttributeValueEncoder & a
i++;
continue;
}
Structs::TargetInfo::Type outputInfo;
Structs::TargetInfoStruct::Type outputInfo;
outputInfo.identifier = static_cast<uint8_t>(entry[targetId].asUInt());
outputInfo.name = CharSpan::fromCharString(entry[targetName].asCString());
ReturnErrorOnFailure(encoder.Encode(outputInfo));
Expand All @@ -86,7 +86,7 @@ CHIP_ERROR TargetNavigatorManager::HandleGetTargetList(AttributeValueEncoder & a
int i = 0;
for (std::string & entry : mTargets)
{
Structs::TargetInfo::Type outputInfo;
Structs::TargetInfoStruct::Type outputInfo;
outputInfo.identifier = static_cast<uint8_t>(i + 1);
outputInfo.name = CharSpan::fromCharString(entry.c_str());
ReturnErrorOnFailure(encoder.Encode(outputInfo));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using chip::EndpointId;
using chip::app::AttributeValueEncoder;
using chip::app::CommandResponseHelper;
using TargetNavigatorDelegate = chip::app::Clusters::TargetNavigator::Delegate;
using TargetInfoType = chip::app::Clusters::TargetNavigator::Structs::TargetInfo::Type;
using TargetInfoType = chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::Type;
using NavigateTargetResponseType = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Type;
using ContentAppAttributeDelegate = chip::AppPlatform::ContentAppAttributeDelegate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CHIP_ERROR TargetNavigatorManager::HandleGetTargetList(AttributeValueEncoder & a
int i = 0;
for (std::string & entry : mTargets)
{
Structs::TargetInfo::Type outputInfo;
Structs::TargetInfoStruct::Type outputInfo;
outputInfo.identifier = static_cast<uint8_t>(i + 1);
outputInfo.name = CharSpan::fromCharString(entry.c_str());
ReturnErrorOnFailure(encoder.Encode(outputInfo));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ using chip::CharSpan;
using chip::app::AttributeValueEncoder;
using chip::app::CommandResponseHelper;
using TargetNavigatorDelegate = chip::app::Clusters::TargetNavigator::Delegate;
using TargetInfoType = chip::app::Clusters::TargetNavigator::Structs::TargetInfo::Type;
using TargetInfoType = chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::Type;
using NavigateTargetResponseType = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Type;

class TargetNavigatorManager : public TargetNavigatorDelegate
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 @@ -1628,12 +1628,12 @@ server cluster TargetNavigator = 1285 {
kNotAllowed = 2;
}

struct TargetInfo {
struct TargetInfoStruct {
int8u identifier = 0;
char_string<32> name = 1;
}

readonly attribute TargetInfo targetList[] = 0;
readonly attribute TargetInfoStruct targetList[] = 0;
readonly attribute int8u currentTarget = 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 @@ -1731,12 +1731,12 @@ client cluster TargetNavigator = 1285 {
kNotAllowed = 2;
}

struct TargetInfo {
struct TargetInfoStruct {
int8u identifier = 0;
char_string<32> name = 1;
}

readonly attribute TargetInfo targetList[] = 0;
readonly attribute TargetInfoStruct targetList[] = 0;
readonly attribute int16u clusterRevision = 65533;

request struct NavigateTargetRequest {
Expand Down
4 changes: 2 additions & 2 deletions src/app/tests/suites/TV_TargetNavigatorCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ tests:
response:
value:
[
{ identifier: 1, name: "exampleName" },
{ identifier: 2, name: "exampleName" },
{ Identifier: 1, Name: "exampleName" },
{ Identifier: 2, Name: "exampleName" },
]

- label: "Read attribute current navigator target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ 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 UX navigation within a set of targets on a device or endpoint.</description>
<attribute side="server" code="0x0000" define="TARGET_NAVIGATOR_LIST" type="ARRAY" entryType="TargetInfo" length="254" writable="false" optional="false">TargetList</attribute>
<attribute side="server" code="0x0000" define="TARGET_NAVIGATOR_LIST" type="ARRAY" entryType="TargetInfoStruct" length="254" writable="false" optional="false">TargetList</attribute>
<attribute side="server" code="0x0001" define="TARGET_NAVIGATOR_CURRENT_TARGET" type="INT8U" default="0" min="0x00" max="0xFF" writable="false" optional="true">CurrentTarget</attribute>

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

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

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

<struct name="TargetInfo">
<struct name="TargetInfoStruct">
<cluster code="0x0505"/>
<item name="identifier" type="INT8U"/>
<item name="name" type="CHAR_STRING" length="32"/>
<item name="Identifier" type="INT8U"/>
<item name="Name" type="CHAR_STRING" length="32"/>
</struct>
</configurator>
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 @@ -3580,12 +3580,12 @@ client cluster TargetNavigator = 1285 {
kNotAllowed = 2;
}

struct TargetInfo {
struct TargetInfoStruct {
int8u identifier = 0;
char_string<32> name = 1;
}

readonly attribute TargetInfo targetList[] = 0;
readonly attribute TargetInfoStruct targetList[] = 0;
readonly attribute int8u currentTarget = 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/CHIPInvokeCallbacks.cpp

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

20 changes: 11 additions & 9 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.

Loading

0 comments on commit 1125099

Please sign in to comment.