Skip to content

Commit cd898c4

Browse files
hicklinrestyled-commitsbzbarsky-apple
authored
Update mode select xml to reflect fall 23 spec (#26508)
* Updated the mode select xml to match the current spec. * Added the version bump to the mode select cluster as per PR comment. * Fixed new command xml definitions missing the response and disableDefaultResponse specifiers. * Renamed the mode select feature map fields to match the general behavior. * Added data-model XML definitions for all Mode Select aliased clusters. * Added the Mode Select alias clusters' XMLs to the relevant lists. * Updated the controller zap file to include the new clusters. * Fixed errors in the Mode Select alias' XML feature maps. * Added generated code * Restyled by prettier-json * Simplified the Mode Select cluster XMLs. * Matched the ModeSelect alias clusters' version to the ModeSelect cluster. * Update src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> * Removed white spaces in ChangeToModeResponseStatus items * removed the STANDARD_NAMESPACE attribute from ModeSelect XMLs * Update src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-select-cluster.xml Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> * Rnamed the Laundry Washer cluster to match the spec. Removed reading of depricated StandardNamespace in the TestModeSelectCluster.yaml. * Added generated code after merge. * Readded the STANDARD_NAMESPACE attribute to the ModeSelect XML as optional to avoid braking client APIs. * Renamed the laundyr washer XML to match the cluster name as defined in the spec. * Renamed the mode select alias clusters to match the latest spec changes. Fixes issue #26551. * Updated the RVC Run ChangeToModeResponseStatus enums to match the latest spec. * Changed the enum names based on the spec PR 6986. * Added generated code after merge. Updated the mode select example following the renaming of the semantic tags. * Added TagName to the ModeOptionStruct following the spce change in PR 6969. * Depricated the MfgCode in ModeOptionStruct following the spec change in PR 6989. * regenerated zap code. * Generated the zap code. Updated the ModeSelect all-clustres-app example. * Restyled by clang-format * Updated the use of semantic tags. in the esp32 examples. * Regenerated code after merge. * Restyled by clang-format * Regenerated code after merge. * Fixed linux build. * Fixed fake linux build... * Updated the TestModeSelectCluster.yaml to match the new name change. * Added expeted generated files to src/controller/data_model/BUILD.gn and sorted the list. * Restyled by clang-format * Restyled by prettier-yaml * Added generated code * Regenerated code after merge. --------- Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
1 parent eaf9ae1 commit cd898c4

File tree

123 files changed

+52641
-12600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+52641
-12600
lines changed

.github/workflows/tests.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ jobs:
140140
src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \
141141
src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \
142142
src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \
143+
src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-select-cluster.xml \
143144
src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml \
144145
src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml \
145146
src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml \
@@ -154,6 +155,7 @@ jobs:
154155
src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml \
155156
src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml \
156157
src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml \
158+
src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-select-cluster.xml \
157159
src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml \
158160
src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml \
159161
src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml \
@@ -173,8 +175,11 @@ jobs:
173175
src/app/zap-templates/zcl/data-model/chip/proxy-valid-cluster.xml \
174176
src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml \
175177
src/app/zap-templates/zcl/data-model/chip/pwm-cluster.xml \
178+
src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-select-cluster.xml \
176179
src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml \
177180
src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml \
181+
src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-select-cluster.xml \
182+
src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-select-cluster.xml \
178183
src/app/zap-templates/zcl/data-model/chip/scene.xml \
179184
src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml \
180185
src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml \

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

+38-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;
@@ -2296,22 +2308,43 @@ server cluster IcdManagement = 70 {
22962308

22972309
/** Attributes and commands for selecting a mode from a list of supported options. */
22982310
server cluster ModeSelect = 80 {
2311+
enum ModeTag : ENUM16 {
2312+
kAuto = 0;
2313+
kQuick = 1;
2314+
kQuiet = 2;
2315+
kLowNoise = 3;
2316+
kLowEnergy = 4;
2317+
kVacation = 5;
2318+
kMin = 6;
2319+
kMax = 7;
2320+
kNight = 8;
2321+
kDay = 9;
2322+
}
2323+
2324+
enum StatusCode : ENUM8 {
2325+
kSuccess = 0;
2326+
kUnsupportedMode = 1;
2327+
kGenericFailure = 2;
2328+
}
2329+
22992330
bitmap Feature : BITMAP32 {
2300-
kDeponoff = 0x1;
2331+
kOnOff = 0x1;
2332+
kExtendedStatus = 0x2;
23012333
}
23022334

2303-
struct SemanticTagStruct {
2304-
vendor_id mfgCode = 0;
2335+
struct ModeTagStruct {
2336+
optional vendor_id mfgCode = 0;
23052337
enum16 value = 1;
2338+
optional char_string<64> tagName = 2;
23062339
}
23072340

23082341
struct ModeOptionStruct {
23092342
char_string<64> label = 0;
23102343
int8u mode = 1;
2311-
SemanticTagStruct semanticTags[] = 2;
2344+
ModeTagStruct modeTags[] = 2;
23122345
}
23132346

2314-
readonly attribute char_string<32> description = 0;
2347+
readonly attribute char_string<64> description = 0;
23152348
readonly attribute nullable enum16 standardNamespace = 1;
23162349
readonly attribute ModeOptionStruct supportedModes[] = 2;
23172350
readonly attribute int8u currentMode = 3;

examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp

+11-12
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,30 @@ using namespace chip::app::Clusters::ModeSelect;
88
using chip::Protocols::InteractionModel::Status;
99

1010
using ModeOptionStructType = Structs::ModeOptionStruct::Type;
11-
using SemanticTag = Structs::SemanticTagStruct::Type;
11+
using ModeTagType = Structs::ModeTagStruct::Type;
1212
template <typename T>
1313
using List = app::DataModel::List<T>;
1414
using storage_value_type = const ModeOptionStructType;
1515
namespace {
16-
Structs::ModeOptionStruct::Type buildModeOptionStruct(const char * label, uint8_t mode,
17-
const List<const SemanticTag> & semanticTags)
16+
Structs::ModeOptionStruct::Type buildModeOptionStruct(const char * label, uint8_t mode, const List<const ModeTagType> & modeTags)
1817
{
1918
Structs::ModeOptionStruct::Type option;
20-
option.label = CharSpan::fromCharString(label);
21-
option.mode = mode;
22-
option.semanticTags = semanticTags;
19+
option.label = CharSpan::fromCharString(label);
20+
option.mode = mode;
21+
option.modeTags = modeTags;
2322
return option;
2423
}
2524
} // namespace
2625

27-
constexpr SemanticTag semanticTagsBlack[] = { { .value = 0 } };
28-
constexpr SemanticTag semanticTagsCappucino[] = { { .value = 0 } };
29-
constexpr SemanticTag semanticTagsEspresso[] = { { .value = 0 } };
26+
ModeTagType modeTagsBlack[] = { detail::Structs::ModeTagStruct::Type{ .value = 0 } };
27+
ModeTagType modeTagsCappucino[] = { detail::Structs::ModeTagStruct::Type{ .value = 0 } };
28+
ModeTagType modeTagsEspresso[] = { detail::Structs::ModeTagStruct::Type{ .value = 0 } };
3029

3130
// TODO: Configure your options for each endpoint
3231
storage_value_type StaticSupportedModesManager::coffeeOptions[] = {
33-
buildModeOptionStruct("Black", 0, List<const SemanticTag>(semanticTagsBlack)),
34-
buildModeOptionStruct("Cappuccino", 4, List<const SemanticTag>(semanticTagsCappucino)),
35-
buildModeOptionStruct("Espresso", 7, List<const SemanticTag>(semanticTagsEspresso))
32+
buildModeOptionStruct("Black", 0, List<const ModeTagType>(modeTagsBlack)),
33+
buildModeOptionStruct("Cappuccino", 4, List<const ModeTagType>(modeTagsCappucino)),
34+
buildModeOptionStruct("Espresso", 7, List<const ModeTagType>(modeTagsEspresso))
3635
};
3736
const StaticSupportedModesManager::EndpointSpanPair
3837
StaticSupportedModesManager::supportedOptionsByEndpoints[EMBER_AF_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT] = {

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

+38-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;
@@ -2029,22 +2041,43 @@ server cluster BooleanState = 69 {
20292041

20302042
/** Attributes and commands for selecting a mode from a list of supported options. */
20312043
server cluster ModeSelect = 80 {
2044+
enum ModeTag : ENUM16 {
2045+
kAuto = 0;
2046+
kQuick = 1;
2047+
kQuiet = 2;
2048+
kLowNoise = 3;
2049+
kLowEnergy = 4;
2050+
kVacation = 5;
2051+
kMin = 6;
2052+
kMax = 7;
2053+
kNight = 8;
2054+
kDay = 9;
2055+
}
2056+
2057+
enum StatusCode : ENUM8 {
2058+
kSuccess = 0;
2059+
kUnsupportedMode = 1;
2060+
kGenericFailure = 2;
2061+
}
2062+
20322063
bitmap Feature : BITMAP32 {
2033-
kDeponoff = 0x1;
2064+
kOnOff = 0x1;
2065+
kExtendedStatus = 0x2;
20342066
}
20352067

2036-
struct SemanticTagStruct {
2037-
vendor_id mfgCode = 0;
2068+
struct ModeTagStruct {
2069+
optional vendor_id mfgCode = 0;
20382070
enum16 value = 1;
2071+
optional char_string<64> tagName = 2;
20392072
}
20402073

20412074
struct ModeOptionStruct {
20422075
char_string<64> label = 0;
20432076
int8u mode = 1;
2044-
SemanticTagStruct semanticTags[] = 2;
2077+
ModeTagStruct modeTags[] = 2;
20452078
}
20462079

2047-
readonly attribute char_string<32> description = 0;
2080+
readonly attribute char_string<64> description = 0;
20482081
readonly attribute nullable enum16 standardNamespace = 1;
20492082
readonly attribute ModeOptionStruct supportedModes[] = 2;
20502083
readonly attribute int8u currentMode = 3;

examples/bridge-app/bridge-common/bridge-app.matter

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;

examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;

examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;

examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;

examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;

examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;

examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;

examples/chef/devices/rootnode_fan_7N2TobIlOX.matter

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;

examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;

examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// This IDL was generated automatically by ZAP.
22
// It is for view/code review purposes only.
33

4+
struct ModeTagStruct {
5+
optional vendor_id mfgCode = 0;
6+
enum16 value = 1;
7+
optional char_string<64> tagName = 2;
8+
}
9+
10+
struct ModeOptionStruct {
11+
char_string<64> label = 0;
12+
int8u mode = 1;
13+
ModeTagStruct modeTags[] = 2;
14+
}
15+
416
struct ApplicationStruct {
517
int16u catalogVendorID = 0;
618
char_string applicationID = 1;

0 commit comments

Comments
 (0)