Skip to content

Commit

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

* Regenerate generated files.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Apr 11, 2023
1 parent 0daaa78 commit 3983557
Show file tree
Hide file tree
Showing 60 changed files with 118 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ server cluster BinaryInputBasic = 15 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_fan_7N2TobIlOX.matter
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ server cluster OnOff = 6 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ server cluster OnOff = 6 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ server cluster Groups = 4 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ client cluster OnOff = 6 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/nxp/zap/lighting-on-off.matter
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ server cluster OnOff = 6 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct LabelStruct {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ server cluster OnOff = 6 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/pump-app/pump-common/pump-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ client cluster OnOff = 6 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct LabelStruct {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/thermostat/thermostat-common/thermostat.matter
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ server cluster Scenes = 5 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/tv-app/tv-common/tv-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ server cluster LevelControl = 8 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ server cluster BinaryInputBasic = 15 {

client cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand All @@ -533,7 +533,7 @@ client cluster Descriptor = 29 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/window-app/common/window-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ server cluster Scenes = 5 {

server cluster Descriptor = 29 {
struct DeviceTypeStruct {
devtype_id type = 0;
devtype_id deviceType = 0;
int16u revision = 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/app/clusters/descriptor/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ CHIP_ERROR DescriptorAttrAccess::ReadDeviceAttribute(EndpointId endpoint, Attrib

for (auto & deviceType : deviceTypeList)
{
deviceStruct.type = deviceType.deviceId;
deviceStruct.revision = deviceType.deviceVersion;
deviceStruct.deviceType = deviceType.deviceId;
deviceStruct.revision = deviceType.deviceVersion;
ReturnErrorOnFailure(encoder.Encode(deviceStruct));
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/TestDescriptorCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tests:
command: "readAttribute"
attribute: "DeviceTypeList"
response:
value: [{ type: 22, revision: 1 }]
value: [{ DeviceType: 22, Revision: 1 }]

- label: "Read attribute Server list"
command: "readAttribute"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ limitations under the License.

<struct name="DeviceTypeStruct">
<cluster code="0x001d"/>
<item name="type" type="DEVTYPE_ID"/>
<item name="revision" type="INT16U"/>
<item name="DeviceType" type="DEVTYPE_ID"/>
<item name="Revision" type="INT16U"/>
</struct>

<cluster>
Expand Down
Loading

0 comments on commit 3983557

Please sign in to comment.