Skip to content

Commit adcefe6

Browse files
committed
Add xml defination for Commissioner Control Cluster
1 parent ecfa07a commit adcefe6

Some content is hidden

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

52 files changed

+5575
-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
@@ -130,6 +130,7 @@ Generally regenerate using one of:
130130
| 1294 | 0x50E | AccountLogin |
131131
| 1295 | 0x50F | ContentControl |
132132
| 1296 | 0x510 | ContentAppObserver |
133+
| 1873 | 0x751 | CommissionerControl |
133134
| 2820 | 0xB04 | ElectricalMeasurement |
134135
| 4294048773 | 0xFFF1FC05 | UnitTesting |
135136
| 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,72 @@
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+
20+
<bitmap name="SupportedDeviceCategoryBitmap" type="bitmap32">
21+
<cluster code="0x0751"/>
22+
<field name="FabricSynchronization" mask="0x1"/>
23+
</bitmap>
24+
25+
<cluster>
26+
<domain>General</domain>
27+
<name>Commissioner Control</name>
28+
<code>0x0751</code>
29+
<define>COMMISSIONER_CONTROL_CLUSTER</define>
30+
<client init="false" tick="false">true</client>
31+
<server init="false" tick="false">true</server>
32+
<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>
33+
34+
<attribute side="server" code="0x0000" define="SUPPORTED_DEVICE_CATEGORIES" type="SupportedDeviceCategoryBitmap" default="0" writable="false" optional="false">SupportedDeviceCategories</attribute>
35+
36+
<command source="client" code="0x00" name="RequestCommissioningApproval" optional="false">
37+
<description>This command is sent by a client to request approval for a future CommissionNode call.</description>
38+
<arg name="RequestId" type="int64u" optional="false"/>
39+
<arg name="VendorId" type="vendor_id" optional="false"/>
40+
<arg name="ProductId" type="int16u" optional="false"/>
41+
<arg name="Label" type="char_string" lenght="64" optional="true"/>
42+
<access op="invoke" privilege="manage"/>
43+
</command>
44+
45+
<command source="client" code="0x01" name="CommissionNode" response="ReverseOpenCommissioningWindow" optional="false">
46+
<description>This command is sent by a client to request that the server begins commissioning a previously approved request.</description>
47+
<arg name="RequestId" type="int64u" optional="false"/>
48+
<arg name="ResponseTimeoutSeconds" type="int16u" min="30" max="120" default="30" optional="false"/>
49+
<arg name="IpAddress" type="octet_string" optional="true"/> <!-- Note: ipadr is not supported yet, use its base type (octet_string) here -->
50+
<arg name="Port" type="int16u" optional="true"/>
51+
<access op="invoke" privilege="manage"/>
52+
</command>
53+
54+
<command source="server" code="0x02" name="ReverseOpenCommissioningWindow" optional="false">
55+
<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>
56+
<arg name="CommissioningTimeout" type="int16u" optional="false"/>
57+
<arg name="PAKEPasscodeVerifier" type="octet_string" optional="false"/>
58+
<arg name="Discriminator" type="int16u" min="0" max="4095" optional="false"/>
59+
<arg name="Iterations" type="int32u" min="1000" max="100000" optional="false"/>
60+
<arg name="Salt" type="octet_string" length="32" optional="false"/>
61+
<access op="invoke" privilege="manage"/>
62+
</command>
63+
64+
<event code="0x00" name="CommissioningRequestResult" priority="info" side="server" optional="false">
65+
<description>This event SHALL be sent by the server following a RequestCommissioningApproval command which the server responded to with SUCCESS.</description>
66+
<field id="0" name="RequestId" type="int64u" optional="false"/>
67+
<field id="1" name="ClientNodeId" type="node_id" optional="false"/>
68+
<field id="2" name="StatusCode" type="enum8" optional="false"/>
69+
</event>
70+
71+
</cluster>
72+
</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/controller/data_model/controller-clusters.matter

+50
Original file line numberDiff line numberDiff line change
@@ -9134,6 +9134,56 @@ provisional cluster ContentAppObserver = 1296 {
91349134
command ContentAppMessage(ContentAppMessageRequest): ContentAppMessageResponse = 0;
91359135
}
91369136

9137+
/** Supports the ability for clients to request the commissioning of themselves or other nodes onto a fabric which the cluster server can commission onto. */
9138+
cluster CommissionerControl = 1873 {
9139+
revision 1; // NOTE: Default/not specifically set
9140+
9141+
bitmap SupportedDeviceCategoryBitmap : bitmap32 {
9142+
kFabricSynchronization = 0x1;
9143+
}
9144+
9145+
info event CommissioningRequestResult = 0 {
9146+
int64u requestId = 0;
9147+
node_id clientNodeId = 1;
9148+
enum8 statusCode = 2;
9149+
}
9150+
9151+
readonly attribute SupportedDeviceCategoryBitmap supportedDeviceCategories = 0;
9152+
readonly attribute command_id generatedCommandList[] = 65528;
9153+
readonly attribute command_id acceptedCommandList[] = 65529;
9154+
readonly attribute event_id eventList[] = 65530;
9155+
readonly attribute attrib_id attributeList[] = 65531;
9156+
readonly attribute bitmap32 featureMap = 65532;
9157+
readonly attribute int16u clusterRevision = 65533;
9158+
9159+
request struct RequestCommissioningApprovalRequest {
9160+
int64u requestId = 0;
9161+
vendor_id vendorId = 1;
9162+
int16u productId = 2;
9163+
optional char_string label = 3;
9164+
}
9165+
9166+
request struct CommissionNodeRequest {
9167+
int64u requestId = 0;
9168+
int16u responseTimeoutSeconds = 1;
9169+
optional octet_string ipAddress = 2;
9170+
optional int16u port = 3;
9171+
}
9172+
9173+
response struct ReverseOpenCommissioningWindow = 2 {
9174+
int16u commissioningTimeout = 0;
9175+
octet_string PAKEPasscodeVerifier = 1;
9176+
int16u discriminator = 2;
9177+
int32u iterations = 3;
9178+
octet_string<32> salt = 4;
9179+
}
9180+
9181+
/** This command is sent by a client to request approval for a future CommissionNode call. */
9182+
command access(invoke: manage) RequestCommissioningApproval(RequestCommissioningApprovalRequest): DefaultSuccess = 0;
9183+
/** This command is sent by a client to request that the server begins commissioning a previously approved request. */
9184+
command access(invoke: manage) CommissionNode(CommissionNodeRequest): ReverseOpenCommissioningWindow = 1;
9185+
}
9186+
91379187
/** 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.. */
91389188
deprecated cluster ElectricalMeasurement = 2820 {
91399189
revision 3;

0 commit comments

Comments
 (0)