Skip to content

Commit

Permalink
Match Unit Localization Cluster to spec (#29960)
Browse files Browse the repository at this point in the history
* Match unit localization cluster to spec

* Zap regen

* Undo isnullable change

* Zap regen

* ran zap_convert_all

---------

Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Jan 15, 2024
1 parent 53a973e commit 9b4b2b5
Show file tree
Hide file tree
Showing 26 changed files with 42 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7064,7 +7064,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "TemperatureDisplayModeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand All @@ -7080,7 +7080,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "KeypadLockoutEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
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 @@ -649,7 +649,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3037,7 +3037,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "TemperatureDisplayModeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand All @@ -3053,7 +3053,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "KeypadLockoutEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand Down
4 changes: 2 additions & 2 deletions examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap
Original file line number Diff line number Diff line change
Expand Up @@ -3596,7 +3596,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "TemperatureDisplayModeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand All @@ -3612,7 +3612,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "KeypadLockoutEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
4 changes: 2 additions & 2 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ client cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute optional TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -1047,7 +1047,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
6 changes: 3 additions & 3 deletions examples/placeholder/linux/apps/app1/config.zap
Original file line number Diff line number Diff line change
Expand Up @@ -8760,7 +8760,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "TemperatureDisplayModeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand All @@ -8776,7 +8776,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "KeypadLockoutEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand All @@ -8792,7 +8792,7 @@
"code": 2,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "ScheduleProgrammingVisibilityEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
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 @@ -1006,7 +1006,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
6 changes: 3 additions & 3 deletions examples/placeholder/linux/apps/app2/config.zap
Original file line number Diff line number Diff line change
Expand Up @@ -8834,7 +8834,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "TemperatureDisplayModeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand All @@ -8850,7 +8850,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "KeypadLockoutEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand All @@ -8866,7 +8866,7 @@
"code": 2,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "ScheduleProgrammingVisibilityEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
2 changes: 1 addition & 1 deletion examples/thermostat/nxp/zap/thermostat_matter_wifi.matter
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
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 @@ -596,7 +596,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
4 changes: 2 additions & 2 deletions examples/thermostat/thermostat-common/thermostat.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4964,7 +4964,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "TemperatureDisplayModeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand All @@ -4980,7 +4980,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "KeypadLockoutEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
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 @@ -528,7 +528,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ server cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
6 changes: 3 additions & 3 deletions scripts/tools/zap/tests/inputs/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -10346,7 +10346,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "TemperatureDisplayModeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand All @@ -10362,7 +10362,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "KeypadLockoutEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand All @@ -10378,7 +10378,7 @@
"code": 2,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "ScheduleProgrammingVisibilityEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@
0x0000002B, /* Cluster: Localization Configuration, Attribute: ActiveLocale, Privilege: manage */ \
0x0000002C, /* Cluster: Time Format Localization, Attribute: HourFormat, Privilege: manage */ \
0x0000002C, /* Cluster: Time Format Localization, Attribute: ActiveCalendarType, Privilege: manage */ \
0x0000002D, /* Cluster: Unit Localization, Attribute: TemperatureUnit, Privilege: manage */ \
0x00000030, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \
0x0000003F, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \
Expand Down Expand Up @@ -292,6 +293,7 @@
0x00000000, /* Cluster: Localization Configuration, Attribute: ActiveLocale, Privilege: manage */ \
0x00000000, /* Cluster: Time Format Localization, Attribute: HourFormat, Privilege: manage */ \
0x00000001, /* Cluster: Time Format Localization, Attribute: ActiveCalendarType, Privilege: manage */ \
0x00000000, /* Cluster: Unit Localization, Attribute: TemperatureUnit, Privilege: manage */ \
0x00000000, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \
0x00000004, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \
0x00000000, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \
Expand Down Expand Up @@ -350,6 +352,7 @@
kMatterAccessPrivilegeManage, /* Cluster: Localization Configuration, Attribute: ActiveLocale, Privilege: manage */ \
kMatterAccessPrivilegeManage, /* Cluster: Time Format Localization, Attribute: HourFormat, Privilege: manage */ \
kMatterAccessPrivilegeManage, /* Cluster: Time Format Localization, Attribute: ActiveCalendarType, Privilege: manage */ \
kMatterAccessPrivilegeManage, /* Cluster: Unit Localization, Attribute: TemperatureUnit, Privilege: manage */ \
kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \
kMatterAccessPrivilegeManage, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ limitations under the License.
mechanism by which they can be configured to use a user’s preferred unit.</description>
<globalAttribute side="either" code="0xFFFD" value="1"/>
<!-- Base data types -->
<attribute side="server" code="0x00" define="TEMPERATURE_UNIT" type="TempUnitEnum" min="0" max="2" writable="true" optional="true">TemperatureUnit</attribute>
<attribute side="server" code="0x00" define="TEMPERATURE_UNIT" type="TempUnitEnum" min="0" max="2" writable="true" optional="true">
<description>TemperatureUnit</description>
<access op="write" role="manage"/>
</attribute>
</cluster>
<bitmap name="Feature" type="bitmap32">
<cluster code="0x002d"/>
Expand Down
2 changes: 1 addition & 1 deletion src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ client cluster UnitLocalization = 45 {
kTemperatureUnit = 0x1;
}

attribute optional TempUnitEnum temperatureUnit = 0;
attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down

0 comments on commit 9b4b2b5

Please sign in to comment.