Skip to content

Commit eea4349

Browse files
yufengwangcaj-ororke
authored andcommitted
Add XML definition for Commissioner Control Cluster (project-chip#34242)
* Add xml defination for Commissioner Control Cluster * Address review comments
1 parent fac56c3 commit eea4349

Some content is hidden

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

53 files changed

+5647
-0
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ jobs:
112112
src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml \
113113
src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml \
114114
src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml \
115+
src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml \
115116
src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml \
116117
src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \
117118
src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml \

docs/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ Generally regenerate using one of:
131131
| 1294 | 0x50E | AccountLogin |
132132
| 1295 | 0x50F | ContentControl |
133133
| 1296 | 0x510 | ContentAppObserver |
134+
| 1873 | 0x751 | CommissionerControl |
134135
| 2820 | 0xB04 | ElectricalMeasurement |
135136
| 4294048773 | 0xFFF1FC05 | UnitTesting |
136137
| 4294048774 | 0xFFF1FC06 | FaultInjection |

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/chip-ota.xml";
1919
load "../src/app/zap-templates/zcl/data-model/chip/chip-types.xml";
2020
load "../src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml";
2121
load "../src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml";
22+
load "../src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml";
2223
load "../src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml";
2324
load "../src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml";
2425
load "../src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml";

src/app/zap-templates/zcl/data-model/all.xml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<xi:include href="chip/chip-types.xml" />
1919
<xi:include href="chip/clusters-extensions.xml" />
2020
<xi:include href="chip/color-control-cluster.xml" />
21+
<xi:include href="chip/commissioner-control-cluster.xml" />
2122
<xi:include href="chip/concentration-measurement-cluster.xml" />
2223
<xi:include href="chip/content-launch-cluster.xml" />
2324
<xi:include href="chip/descriptor-cluster.xml" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2024 Project CHIP Authors
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<configurator>
18+
<domain name="CHIP"/>
19+
<bitmap name="SupportedDeviceCategoryBitmap" type="bitmap32">
20+
<cluster code="0x0751"/>
21+
<field name="FabricSynchronization" mask="0x1"/>
22+
</bitmap>
23+
24+
<cluster apiMaturity="provisional">
25+
<domain>General</domain>
26+
<name>Commissioner Control</name>
27+
<code>0x0751</code>
28+
<define>COMMISSIONER_CONTROL_CLUSTER</define>
29+
<client init="false" tick="false">true</client>
30+
<server init="false" tick="false">true</server>
31+
<description>Supports the ability for clients to request the commissioning of themselves or other nodes onto a fabric which the cluster server can commission onto.</description>
32+
33+
<!-- cluster revision -->
34+
<globalAttribute side="either" code="0xFFFD" value="1"/>
35+
<attribute side="server" code="0x0000" define="SUPPORTED_DEVICE_CATEGORIES" type="SupportedDeviceCategoryBitmap" default="0" min="0x00000000" max="0x00000001">
36+
<description>SupportedDeviceCategories</description>
37+
<access op="read" privilege="manage"/>
38+
</attribute>
39+
40+
<command source="client" code="0x00" name="RequestCommissioningApproval" optional="false">
41+
<description>This command is sent by a client to request approval for a future CommissionNode call.</description>
42+
<arg id="0" name="RequestId" type="int64u"/>
43+
<arg id="1" name="VendorId" type="vendor_id"/>
44+
<arg id="2" name="ProductId" type="int16u"/>
45+
<arg id="3" name="Label" type="char_string" optional="true" length="64"/>
46+
<access op="invoke" privilege="manage"/>
47+
</command>
48+
49+
<command source="client" code="0x01" name="CommissionNode" response="ReverseOpenCommissioningWindow" optional="false">
50+
<description>This command is sent by a client to request that the server begins commissioning a previously approved request.</description>
51+
<arg id="0" name="RequestId" type="int64u"/>
52+
<arg id="2" name="ResponseTimeoutSeconds" type="int16u" min="30" max="120" default="30"/>
53+
<arg id="3" name="IpAddress" type="octet_string" optional="true" min="4" max="16"/>
54+
<!-- Note: ipadr is not supported yet, use its base type (octet_string) here -->
55+
<arg id="4" name="Port" type="int16u" optional="true"/>
56+
<access op="invoke" privilege="manage"/>
57+
</command>
58+
59+
<command source="server" code="0x02" name="ReverseOpenCommissioningWindow" optional="false">
60+
<description>When received within the timeout specified by CommissionNode, the client SHALL open a commissioning window on to the node which the client called RequestCommissioningApproval to have commissioned.</description>
61+
<arg id="0" name="CommissioningTimeout" type="int16u"/>
62+
<arg id="1" name="PAKEPasscodeVerifier" type="octet_string"/>
63+
<arg id="2" name="Discriminator" type="int16u" min="0" max="4095"/>
64+
<arg id="3" name="Iterations" type="int32u" min="1000" max="100000"/>
65+
<arg id="4" name="Salt" type="octet_string" length="32" minLength="16"/>
66+
</command>
67+
68+
<event code="0x00" name="CommissioningRequestResult" priority="info" side="server" isFabricSensitive="true">
69+
<description>This event SHALL be sent by the server following a RequestCommissioningApproval command which the server responded to with SUCCESS.</description>
70+
<field id="0" name="RequestId" type="int64u"/>
71+
<field id="1" name="ClientNodeId" type="node_id"/>
72+
<field id="2" name="StatusCode" type="enum8"/>
73+
<access op="read" privilege="manage"/>
74+
</event>
75+
76+
</cluster>
77+
</configurator>

src/app/zap-templates/zcl/zcl-with-test-extensions.json

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"channel-cluster.xml",
3434
"clusters-extensions.xml",
3535
"color-control-cluster.xml",
36+
"commissioner-control-cluster.xml",
3637
"concentration-measurement-cluster.xml",
3738
"content-launch-cluster.xml",
3839
"content-app-observer-cluster.xml",

src/app/zap-templates/zcl/zcl.json

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"channel-cluster.xml",
3333
"clusters-extensions.xml",
3434
"color-control-cluster.xml",
35+
"commissioner-control-cluster.xml",
3536
"concentration-measurement-cluster.xml",
3637
"content-launch-cluster.xml",
3738
"content-app-observer-cluster.xml",

src/app/zap_cluster_list.json

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"CHANNEL_CLUSTER": [],
2424
"CLIENT_MONITORING_CLUSTER": [],
2525
"COLOR_CONTROL_CLUSTER": [],
26+
"COMMISSIONER_CONTROL_CLUSTER": [],
2627
"COMMISSIONING_CLUSTER": [],
2728
"CONTENT_LAUNCHER_CLUSTER": [],
2829
"CONTENT_CONTROL_CLUSTER": [],
@@ -168,6 +169,7 @@
168169
],
169170
"CHANNEL_CLUSTER": ["channel-server"],
170171
"COLOR_CONTROL_CLUSTER": ["color-control-server"],
172+
"COMMISSIONER_CONTROL_CLUSTER": ["commissioner-control-server"],
171173
"COMMISSIONING_CLUSTER": [],
172174
"CONTENT_LAUNCHER_CLUSTER": ["content-launch-server"],
173175
"CONTENT_CONTROL_CLUSTER": ["content-control-server"],

src/controller/data_model/controller-clusters.matter

+51
Original file line numberDiff line numberDiff line change
@@ -9195,6 +9195,57 @@ provisional cluster ContentAppObserver = 1296 {
91959195
command ContentAppMessage(ContentAppMessageRequest): ContentAppMessageResponse = 0;
91969196
}
91979197

9198+
/** Supports the ability for clients to request the commissioning of themselves or other nodes onto a fabric which the cluster server can commission onto. */
9199+
provisional cluster CommissionerControl = 1873 {
9200+
revision 1;
9201+
9202+
bitmap SupportedDeviceCategoryBitmap : bitmap32 {
9203+
kFabricSynchronization = 0x1;
9204+
}
9205+
9206+
fabric_sensitive info event access(read: manage) CommissioningRequestResult = 0 {
9207+
int64u requestId = 0;
9208+
node_id clientNodeId = 1;
9209+
enum8 statusCode = 2;
9210+
fabric_idx fabricIndex = 254;
9211+
}
9212+
9213+
readonly attribute access(read: manage) SupportedDeviceCategoryBitmap supportedDeviceCategories = 0;
9214+
readonly attribute command_id generatedCommandList[] = 65528;
9215+
readonly attribute command_id acceptedCommandList[] = 65529;
9216+
readonly attribute event_id eventList[] = 65530;
9217+
readonly attribute attrib_id attributeList[] = 65531;
9218+
readonly attribute bitmap32 featureMap = 65532;
9219+
readonly attribute int16u clusterRevision = 65533;
9220+
9221+
request struct RequestCommissioningApprovalRequest {
9222+
int64u requestId = 0;
9223+
vendor_id vendorId = 1;
9224+
int16u productId = 2;
9225+
optional char_string<64> label = 3;
9226+
}
9227+
9228+
request struct CommissionNodeRequest {
9229+
int64u requestId = 0;
9230+
int16u responseTimeoutSeconds = 1;
9231+
optional octet_string ipAddress = 2;
9232+
optional int16u port = 3;
9233+
}
9234+
9235+
response struct ReverseOpenCommissioningWindow = 2 {
9236+
int16u commissioningTimeout = 0;
9237+
octet_string PAKEPasscodeVerifier = 1;
9238+
int16u discriminator = 2;
9239+
int32u iterations = 3;
9240+
octet_string<32> salt = 4;
9241+
}
9242+
9243+
/** This command is sent by a client to request approval for a future CommissionNode call. */
9244+
command access(invoke: manage) RequestCommissioningApproval(RequestCommissioningApprovalRequest): DefaultSuccess = 0;
9245+
/** This command is sent by a client to request that the server begins commissioning a previously approved request. */
9246+
command access(invoke: manage) CommissionNode(CommissionNodeRequest): ReverseOpenCommissioningWindow = 1;
9247+
}
9248+
91989249
/** Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. */
91999250
deprecated cluster ElectricalMeasurement = 2820 {
92009251
revision 3;

0 commit comments

Comments
 (0)