Skip to content

Commit 1769548

Browse files
andy31415pull[bot]
authored andcommitted
Add group feature map support (#20458)
1 parent 7fe2f9e commit 1769548

29 files changed

+144
-3
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ server cluster Identify = 3 {
4848
}
4949

5050
server cluster Groups = 4 {
51+
bitmap GroupClusterFeature : BITMAP32 {
52+
kGroupNames = 0x1;
53+
}
54+
5155
readonly attribute bitmap8 nameSupport = 0;
5256
readonly attribute bitmap32 featureMap = 65532;
5357
readonly attribute int16u clusterRevision = 65533;

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

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ server cluster Identify = 3 {
4242
}
4343

4444
server cluster Groups = 4 {
45+
bitmap GroupClusterFeature : BITMAP32 {
46+
kGroupNames = 0x1;
47+
}
48+
4549
readonly attribute bitmap8 nameSupport = 0;
4650
readonly attribute bitmap32 featureMap = 65532;
4751
readonly attribute int16u clusterRevision = 65533;

examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
server cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;

examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
server cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;

examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
client cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -54,6 +58,10 @@ client cluster Groups = 4 {
5458
}
5559

5660
server cluster Groups = 4 {
61+
bitmap GroupClusterFeature : BITMAP32 {
62+
kGroupNames = 0x1;
63+
}
64+
5765
readonly attribute bitmap8 nameSupport = 0;
5866
readonly attribute command_id generatedCommandList[] = 65528;
5967
readonly attribute command_id acceptedCommandList[] = 65529;

examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
server cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;

examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
client cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -54,6 +58,10 @@ client cluster Groups = 4 {
5458
}
5559

5660
server cluster Groups = 4 {
61+
bitmap GroupClusterFeature : BITMAP32 {
62+
kGroupNames = 0x1;
63+
}
64+
5765
readonly attribute bitmap8 nameSupport = 0;
5866
readonly attribute command_id generatedCommandList[] = 65528;
5967
readonly attribute command_id acceptedCommandList[] = 65529;

examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
client cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -54,6 +58,10 @@ client cluster Groups = 4 {
5458
}
5559

5660
server cluster Groups = 4 {
61+
bitmap GroupClusterFeature : BITMAP32 {
62+
kGroupNames = 0x1;
63+
}
64+
5765
readonly attribute bitmap8 nameSupport = 0;
5866
readonly attribute command_id generatedCommandList[] = 65528;
5967
readonly attribute command_id acceptedCommandList[] = 65529;

examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
server cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;

examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
server cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;

examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
client cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -54,6 +58,10 @@ client cluster Groups = 4 {
5458
}
5559

5660
server cluster Groups = 4 {
61+
bitmap GroupClusterFeature : BITMAP32 {
62+
kGroupNames = 0x1;
63+
}
64+
5765
readonly attribute bitmap8 nameSupport = 0;
5866
readonly attribute command_id generatedCommandList[] = 65528;
5967
readonly attribute command_id acceptedCommandList[] = 65529;

examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
server cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute bitmap32 featureMap = 65532;
5054
readonly attribute int16u clusterRevision = 65533;

examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
client cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -54,6 +58,10 @@ client cluster Groups = 4 {
5458
}
5559

5660
server cluster Groups = 4 {
61+
bitmap GroupClusterFeature : BITMAP32 {
62+
kGroupNames = 0x1;
63+
}
64+
5765
readonly attribute bitmap8 nameSupport = 0;
5866
readonly attribute command_id generatedCommandList[] = 65528;
5967
readonly attribute command_id acceptedCommandList[] = 65529;

examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
server cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;

examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ server cluster Identify = 3 {
4545
}
4646

4747
server cluster Groups = 4 {
48+
bitmap GroupClusterFeature : BITMAP32 {
49+
kGroupNames = 0x1;
50+
}
51+
4852
readonly attribute bitmap8 nameSupport = 0;
4953
readonly attribute command_id generatedCommandList[] = 65528;
5054
readonly attribute command_id acceptedCommandList[] = 65529;

examples/light-switch-app/light-switch-common/light-switch-app.matter

+4
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ server cluster Identify = 3 {
8383
}
8484

8585
server cluster Groups = 4 {
86+
bitmap GroupClusterFeature : BITMAP32 {
87+
kGroupNames = 0x1;
88+
}
89+
8690
readonly attribute bitmap8 nameSupport = 0;
8791
readonly attribute bitmap32 featureMap = 65532;
8892
readonly attribute int16u clusterRevision = 65533;

examples/lighting-app/lighting-common/lighting-app.matter

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ server cluster Identify = 3 {
4848
}
4949

5050
server cluster Groups = 4 {
51+
bitmap GroupClusterFeature : BITMAP32 {
52+
kGroupNames = 0x1;
53+
}
54+
5155
readonly attribute bitmap8 nameSupport = 0;
5256
readonly attribute bitmap32 featureMap = 65532;
5357
readonly attribute int16u clusterRevision = 65533;

examples/lock-app/lock-common/lock-app.matter

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ server cluster Identify = 3 {
4242
}
4343

4444
server cluster Groups = 4 {
45+
bitmap GroupClusterFeature : BITMAP32 {
46+
kGroupNames = 0x1;
47+
}
48+
4549
readonly attribute bitmap8 nameSupport = 0;
4650
readonly attribute bitmap32 featureMap = 65532;
4751
readonly attribute int16u clusterRevision = 65533;

examples/placeholder/linux/apps/app1/config.matter

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ server cluster Identify = 3 {
3737
}
3838

3939
server cluster Groups = 4 {
40+
bitmap GroupClusterFeature : BITMAP32 {
41+
kGroupNames = 0x1;
42+
}
43+
4044
readonly attribute bitmap8 nameSupport = 0;
4145
readonly attribute bitmap32 featureMap = 65532;
4246
readonly attribute int16u clusterRevision = 65533;

examples/placeholder/linux/apps/app2/config.matter

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ server cluster Identify = 3 {
3737
}
3838

3939
server cluster Groups = 4 {
40+
bitmap GroupClusterFeature : BITMAP32 {
41+
kGroupNames = 0x1;
42+
}
43+
4044
readonly attribute bitmap8 nameSupport = 0;
4145
readonly attribute bitmap32 featureMap = 65532;
4246
readonly attribute int16u clusterRevision = 65533;

examples/thermostat/thermostat-common/thermostat.matter

+4
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ server cluster Identify = 3 {
7777
}
7878

7979
server cluster Groups = 4 {
80+
bitmap GroupClusterFeature : BITMAP32 {
81+
kGroupNames = 0x1;
82+
}
83+
8084
readonly attribute bitmap8 nameSupport = 0;
8185
readonly attribute bitmap32 featureMap = 65532;
8286
readonly attribute int16u clusterRevision = 65533;

examples/tv-casting-app/tv-casting-common/tv-casting-app.matter

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ server cluster Identify = 3 {
4242
}
4343

4444
server cluster Groups = 4 {
45+
bitmap GroupClusterFeature : BITMAP32 {
46+
kGroupNames = 0x1;
47+
}
48+
4549
readonly attribute bitmap8 nameSupport = 0;
4650
readonly attribute bitmap32 featureMap = 65532;
4751
readonly attribute int16u clusterRevision = 65533;

examples/window-app/common/window-app.matter

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ server cluster Identify = 3 {
5151
}
5252

5353
server cluster Groups = 4 {
54+
bitmap GroupClusterFeature : BITMAP32 {
55+
kGroupNames = 0x1;
56+
}
57+
5458
readonly attribute bitmap8 nameSupport = 0;
5559
readonly attribute command_id generatedCommandList[] = 65528;
5660
readonly attribute command_id acceptedCommandList[] = 65529;

src/app/clusters/groups-server/groups-server.cpp

+11-2
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,21 @@ static EmberAfStatus GroupRemove(FabricIndex fabricIndex, EndpointId endpointId,
120120
void emberAfGroupsClusterServerInitCallback(EndpointId endpointId)
121121
{
122122
// The most significant bit of the NameSupport attribute indicates whether or not group names are supported
123-
static constexpr uint8_t nameSupport = 0x80;
124-
EmberAfStatus status = Attributes::NameSupport::Set(endpointId, nameSupport);
123+
//
124+
// According to spec, highest bit (Group Names supported) MUST match feature bit 0 (Group Names supported)
125+
static constexpr uint8_t kNameSuppportFlagGroupNamesSupported = 0x80;
126+
127+
EmberAfStatus status = Attributes::NameSupport::Set(endpointId, kNameSuppportFlagGroupNamesSupported);
125128
if (status != EMBER_ZCL_STATUS_SUCCESS)
126129
{
127130
ChipLogDetail(Zcl, "ERR: writing name support %x", status);
128131
}
132+
133+
status = Attributes::FeatureMap::Set(endpointId, static_cast<uint32_t>(GroupClusterFeature::kGroupNames));
134+
if (status != EMBER_ZCL_STATUS_SUCCESS)
135+
{
136+
ChipLogDetail(Zcl, "ERR: writing group feature map %x", status);
137+
}
129138
}
130139

131140
bool emberAfGroupsClusterAddGroupCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,

src/app/zap-templates/zcl/data-model/silabs/general.xml

+5-1
Original file line numberDiff line numberDiff line change
@@ -456,5 +456,9 @@ limitations under the License.
456456
<field name="OnOff" mask="0x1"/>
457457
<field name="Lighting" mask="0x2"/>
458458
<field name="Frequency" mask="0x4"/>
459-
</bitmap>
459+
</bitmap>
460+
<bitmap name="GroupClusterFeature" type="BITMAP32">
461+
<cluster code="0x0004"/>
462+
<field name="GroupNames" mask="0x1"/>
463+
</bitmap>
460464
</configurator>

src/controller/data_model/controller-clusters.matter

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ client cluster Identify = 3 {
5151
}
5252

5353
client cluster Groups = 4 {
54+
bitmap GroupClusterFeature : BITMAP32 {
55+
kGroupNames = 0x1;
56+
}
57+
5458
readonly attribute bitmap8 nameSupport = 0;
5559
readonly attribute command_id generatedCommandList[] = 65528;
5660
readonly attribute command_id acceptedCommandList[] = 65529;

src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zzz_generated/app-common/app-common/zap-generated/cluster-enums.h

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zzz_generated/app-common/app-common/zap-generated/enums.h

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)