Skip to content

Commit

Permalink
Localization Time Format Cluster: add UseActiveLocale tag as a pl…
Browse files Browse the repository at this point in the history
…aceholder for NULL (project-chip#30520)

* Define a new constant

* Another constant addition

* Adjust range

* Zap regen

* Undo my editor auto-format, to make diff easier to read

* Update Darwin availability annotations.

* Add extra validation for calendar locales

* Always support using active locale (seems like a better default than just Buddhist

* Set the return value to constraint error on invalid calendar

* Restyle

* Use the pre-change callback for validation, less complex than the write interface

* Fix range for hour format

* Revert "Fix range for hour format"

This reverts commit 9516af5.

* Fix hour format ranges as well

* make compile happy

* Handle null value in autoreleaser

* Enforce that validType is ALWAYS a valid type

* Undo refactor changes

* Rely on IM logic to detect unknown values and return a correct response

* Restyle

* More validation logic ... seems it is not automatic after all

* Remove some chip namespace and use NullOptional

* Use EnsureKnownEnumValue helper

* Restyle

* make code consistent

* update based on review

* Fix the merge

---------

Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
3 people authored Dec 7, 2023
1 parent 11cf339 commit f03cc57
Show file tree
Hide file tree
Showing 63 changed files with 225 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1219,11 +1219,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1112,11 +1112,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
2 changes: 2 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -763,11 +763,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
2 changes: 2 additions & 0 deletions examples/chef/devices/rootnode_dishwasher_cc105034fe.matter
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
2 changes: 2 additions & 0 deletions examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
2 changes: 2 additions & 0 deletions examples/chef/devices/rootnode_fan_7N2TobIlOX.matter
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
2 changes: 2 additions & 0 deletions examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
2 changes: 2 additions & 0 deletions examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
2 changes: 2 additions & 0 deletions examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
2 changes: 2 additions & 0 deletions examples/chef/devices/rootnode_onofflight_samplemei.matter
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,11 +689,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
2 changes: 2 additions & 0 deletions examples/chef/devices/rootnode_pump_5f904818cc.matter
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
2 changes: 2 additions & 0 deletions examples/chef/devices/rootnode_pump_a811bb33a0.matter
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
2 changes: 2 additions & 0 deletions examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,13 @@ cluster TimeFormatLocalization = 44 {
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
Expand Down
Loading

0 comments on commit f03cc57

Please sign in to comment.