Skip to content

Commit e175d46

Browse files
committed
Add TC feature definitions to General Commissioning Cluster XML files
This commit introduces the "Terms and Conditions" (TC) feature definitions to the General Commissioning Cluster XML data model files. The changes include new attributes, commands, and commissioning errors related to the TC feature. Changes include: - Added TC feature definition with bitmask. - Introduced new commissioning errors related to TC: - RequiredTCNotAccepted - TCAcknowledgementsNotReceived - TCMinVersionNotMet - Added new attributes for TC: - TCAcceptedVersion - TCMinRequiredVersion - TCAcknowledgements - TCAcknowledgementsRequired - Added new commands for TC acknowledgements: - SetTCAcknowledgements - SetTCAcknowledgementsResponse These changes only modify the XML files. A follow-up commit will regenerate the necessary files.
1 parent b6cfeac commit e175d46

File tree

2 files changed

+100
-33
lines changed

2 files changed

+100
-33
lines changed

data_model/master/clusters/GeneralCommissioningCluster.xml

+62-31
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Davis, CA 95616, USA
6565
</clusterIds>
6666
<classification hierarchy="base" role="utility" picsCode="CGEN" scope="Node"/>
6767
<features>
68-
<feature bit="0" code="TC" name="Terms" summary="Supports Terms &amp; Conditions acknowledgement">
68+
<feature bit="0" code="TC" name="Terms and Conditions" summary="Supports Terms and Conditions acknowledgement">
6969
<optionalConform/>
7070
</feature>
7171
</features>
@@ -87,19 +87,28 @@ Davis, CA 95616, USA
8787
<mandatoryConform/>
8888
</item>
8989
<item value="5" name="RequiredTCNotAccepted" summary="[[ref_RequiredTCNotAccepted]] One or more required TC features from the Enhanced Setup Flow were not accepted.">
90-
<mandatoryConform>
91-
<feature name="TC"/>
92-
</mandatoryConform>
90+
<otherwiseConform>
91+
<provisionalConform/>
92+
<mandatoryConform>
93+
<feature name="TC"/>
94+
</mandatoryConform>
95+
</otherwiseConform>
9396
</item>
9497
<item value="6" name="TCAcknowledgementsNotReceived" summary="[[ref_TCAcknowledgementsNotReceived]] No acknowledgements from the user for the TC features were received.">
95-
<mandatoryConform>
96-
<feature name="TC"/>
97-
</mandatoryConform>
98+
<otherwiseConform>
99+
<provisionalConform/>
100+
<mandatoryConform>
101+
<feature name="TC"/>
102+
</mandatoryConform>
103+
</otherwiseConform>
98104
</item>
99105
<item value="7" name="TCMinVersionNotMet" summary="[[ref_TCMinVersionNotMet]] The version of the TC features acknowledged by the user did not meet the minimum required version.">
100-
<mandatoryConform>
101-
<feature name="TC"/>
102-
</mandatoryConform>
106+
<otherwiseConform>
107+
<provisionalConform/>
108+
<mandatoryConform>
109+
<feature name="TC"/>
110+
</mandatoryConform>
111+
</otherwiseConform>
103112
</item>
104113
</enum>
105114
<enum name="RegulatoryLocationTypeEnum">
@@ -150,27 +159,43 @@ Davis, CA 95616, USA
150159
</attribute>
151160
<attribute id="0x0005" name="TCAcceptedVersion" type="uint16">
152161
<access read="true" readPrivilege="admin"/>
153-
<mandatoryConform>
154-
<feature name="TC"/>
155-
</mandatoryConform>
162+
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
163+
<otherwiseConform>
164+
<provisionalConform/>
165+
<mandatoryConform>
166+
<feature name="TC"/>
167+
</mandatoryConform>
168+
</otherwiseConform>
156169
</attribute>
157170
<attribute id="0x0006" name="TCMinRequiredVersion" type="uint16">
158171
<access read="true" readPrivilege="admin"/>
159-
<mandatoryConform>
160-
<feature name="TC"/>
161-
</mandatoryConform>
172+
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
173+
<otherwiseConform>
174+
<provisionalConform/>
175+
<mandatoryConform>
176+
<feature name="TC"/>
177+
</mandatoryConform>
178+
</otherwiseConform>
162179
</attribute>
163180
<attribute id="0x0007" name="TCAcknowledgements" type="map16">
164181
<access read="true" readPrivilege="admin"/>
165-
<mandatoryConform>
166-
<feature name="TC"/>
167-
</mandatoryConform>
182+
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
183+
<otherwiseConform>
184+
<provisionalConform/>
185+
<mandatoryConform>
186+
<feature name="TC"/>
187+
</mandatoryConform>
188+
</otherwiseConform>
168189
</attribute>
169190
<attribute id="0x0008" name="TCAcknowledgementsRequired" type="bool" default="true">
170191
<access read="true" readPrivilege="admin"/>
171-
<mandatoryConform>
172-
<feature name="TC"/>
173-
</mandatoryConform>
192+
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
193+
<otherwiseConform>
194+
<provisionalConform/>
195+
<mandatoryConform>
196+
<feature name="TC"/>
197+
</mandatoryConform>
198+
</otherwiseConform>
174199
</attribute>
175200
</attributes>
176201
<commands>
@@ -231,24 +256,30 @@ Davis, CA 95616, USA
231256
</field>
232257
</command>
233258
<command id="0x06" name="SetTCAcknowledgements" direction="commandToServer" response="SetTCAcknowledgementsResponse">
234-
<access invokePrivilege="admin"/>
235-
<mandatoryConform>
236-
<feature name="TC"/>
237-
</mandatoryConform>
259+
<access invokePrivilege="admin" fabricScoped="true"/>
260+
<otherwiseConform>
261+
<provisionalConform/>
262+
<mandatoryConform>
263+
<feature name="TC"/>
264+
</mandatoryConform>
265+
</otherwiseConform>
238266
<field id="0" name="TCVersion" type="uint16">
239267
<mandatoryConform/>
240268
</field>
241269
<field id="1" name="TCUserResponse" type="map16">
242270
<mandatoryConform/>
243271
</field>
244272
</command>
245-
<command id="0x07" name="SetTCAcknowledgementsResponse" direction="responseFromServer">
246-
<mandatoryConform>
247-
<feature name="TC"/>
248-
</mandatoryConform>
273+
<command id="0x05" name="SetTCAcknowledgementsResponse" direction="responseFromServer">
274+
<otherwiseConform>
275+
<provisionalConform/>
276+
<mandatoryConform>
277+
<feature name="TC"/>
278+
</mandatoryConform>
279+
</otherwiseConform>
249280
<field id="0" name="ErrorCode" type="CommissioningErrorEnum" default="OK">
250281
<mandatoryConform/>
251282
</field>
252283
</command>
253284
</commands>
254-
</cluster>
285+
</cluster>

src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml

+38-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<!--
3-
Copyright (c) 2021 Project CHIP Authors
3+
Copyright (c) 2021-2024 Project CHIP Authors
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -23,6 +23,9 @@ limitations under the License.
2323
<item name="InvalidAuthentication" value="0x2"/>
2424
<item name="NoFailSafe" value="0x3"/>
2525
<item name="BusyWithOtherAdmin" value="0x4"/>
26+
<item name="RequiredTCNotAccepted" value="0x5" apiMaturity="provisional"/>
27+
<item name="TCAcknowledgementsNotReceived" value="0x6" apiMaturity="provisional"/>
28+
<item name="TCMinVersionNotMet" value="0x7" apiMaturity="provisional"/>
2629
</enum>
2730
<enum name="RegulatoryLocationTypeEnum" type="enum8">
2831
<cluster code="0x0030"/>
@@ -41,6 +44,14 @@ limitations under the License.
4144
<code>0x0030</code>
4245
<define>GENERAL_COMMISSIONING_CLUSTER</define>
4346
<description>This cluster is used to manage global aspects of the Commissioning flow.</description>
47+
<features>
48+
<feature bit="0" code="TC" name="TermsAndConditions" summary="Supports Terms and Conditions acknowledgement" apiMaturity="provisional">
49+
<otherwiseConform>
50+
<provisionalConform/>
51+
<optionalConform/>
52+
</otherwiseConform>
53+
</feature>
54+
</features>
4455
<attribute side="server" code="0x00" define="BREADCRUMB" type="int64u" writable="true" default="0x0000000000000000" optional="false">
4556
<description>Breadcrumb</description>
4657
<access op="read" privilege="view"/>
@@ -50,7 +61,22 @@ limitations under the License.
5061
<attribute side="server" code="0x02" define="REGULATORY_CONFIG" type="RegulatoryLocationTypeEnum" writable="false" optional="false">RegulatoryConfig</attribute>
5162
<attribute side="server" code="0x03" define="LOCATION_CAPABILITY" type="RegulatoryLocationTypeEnum" writable="false" optional="false">LocationCapability</attribute>
5263
<attribute side="server" code="0x04" define="SUPPORTS_CONCURRENT_CONNECTION" type="boolean" writable="false" default="1" optional="false">SupportsConcurrentConnection</attribute>
53-
64+
<attribute side="server" code="0x05" define="TC_ACCEPTED_VERSION" type="int16u" writable="false" optional="true" apiMaturity="provisional">
65+
<description>TCAcceptedVersion</description>
66+
<access op="read" privilege="administer"/>
67+
</attribute>
68+
<attribute side="server" code="0x06" define="TC_MIN_REQUIRED_VERSION" type="int16u" writable="false" optional="true" apiMaturity="provisional">
69+
<description>TCMinRequiredVersion</description>
70+
<access op="read" privilege="administer"/>
71+
</attribute>
72+
<attribute side="server" code="0x07" define="TC_ACKNOWLEDGEMENTS" type="bitmap16" writable="false" default="0x0000" optional="true" apiMaturity="provisional">
73+
<description>TCAcknowledgements</description>
74+
<access op="read" privilege="administer"/>
75+
</attribute>
76+
<attribute side="server" code="0x08" define="TC_ACKNOWLEDGEMENTS_REQUIRED" type="boolean" writable="false" optional="true" apiMaturity="provisional">
77+
<description>TCAcknowledgementsRequired</description>
78+
<access op="read" privilege="administer"/>
79+
</attribute>
5480
<command source="client" code="0x00" name="ArmFailSafe" response="ArmFailSafeResponse" optional="false" cli="chip fabric_commissioning armfailsafe">
5581
<description>Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock</description>
5682
<arg name="ExpiryLengthSeconds" type="int16u"/>
@@ -83,5 +109,15 @@ limitations under the License.
83109
<arg name="ErrorCode" type="CommissioningErrorEnum"/>
84110
<arg name="DebugText" type="char_string"/>
85111
</command>
112+
<command source="client" code="0x06" name="SetTCAcknowledgements" optional="true" response="SetTCAcknowledgementsResponse" cli="chip fabric_commissioning settcacknowledgements" apiMaturity="provisional">
113+
<description>This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node.</description>
114+
<arg name="TCVersion" type="int16u"/>
115+
<arg name="TCUserResponse" type="bitmap16"/>
116+
<access op="invoke" privilege="administer"/>
117+
</command>
118+
<command source="server" code="0x07" name="SetTCAcknowledgementsResponse" optional="true" cli="chip fabric_commissioning settcacknowledgementsresponse" apiMaturity="provisional">
119+
<description>This command is used to convey the result from SetTCAcknowledgements.</description>
120+
<arg name="ErrorCode" type="CommissioningErrorEnum"/>
121+
</command>
86122
</cluster>
87123
</configurator>

0 commit comments

Comments
 (0)