Skip to content

Commit

Permalink
Add TC feature definitions to General Commissioning Cluster XML files
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
swan-amazon committed Jun 24, 2024
1 parent 50971be commit e314d1e
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 1 deletion.
95 changes: 95 additions & 0 deletions data_model/clusters/GeneralCommissioningCluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ Davis, CA 95616, USA
<clusterId id="0x0030" name="General Commissioning"/>
</clusterIds>
<classification hierarchy="base" role="utility" picsCode="CGEN" scope="Node"/>
<features>
<feature bit="0" code="TC" name="Terms and Conditions" summary="Supports Terms and Conditions acknowledgement">
<optionalConform/>
</feature>
</features>
<dataTypes>
<enum name="CommissioningErrorEnum">
<item value="0" name="OK" summary="No error">
Expand All @@ -80,6 +85,30 @@ Davis, CA 95616, USA
<item value="4" name="BusyWithOtherAdmin" summary="[[ref_BusyWithOtherAdmin]] Attempting to arm fail-safe or execute CommissioningComplete from a fabric different than the one associated with the current fail-safe context.">
<mandatoryConform/>
</item>
<item value="5" name="RequiredTCNotAccepted" summary="[[ref_RequiredTCNotAccepted]] One or more required TC features from the Enhanced Setup Flow were not accepted.">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform>
<feature name="TC"/>
</mandatoryConform>
</otherwiseConform>
</item>
<item value="6" name="TCAcknowledgementsNotReceived" summary="[[ref_TCAcknowledgementsNotReceived]] No acknowledgements from the user for the TC features were received.">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform>
<feature name="TC"/>
</mandatoryConform>
</otherwiseConform>
</item>
<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.">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform>
<feature name="TC"/>
</mandatoryConform>
</otherwiseConform>
</item>
</enum>
<enum name="RegulatoryLocationTypeEnum">
<item value="0" name="Indoor" summary="Indoor only">
Expand Down Expand Up @@ -127,6 +156,46 @@ Davis, CA 95616, USA
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
<mandatoryConform/>
</attribute>
<attribute id="0x0005" name="TCAcceptedVersion" type="uint16">
<access read="true" readPrivilege="admin"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
<otherwiseConform>
<provisionalConform/>
<mandatoryConform>
<feature name="TC"/>
</mandatoryConform>
</otherwiseConform>
</attribute>
<attribute id="0x0006" name="TCMinRequiredVersion" type="uint16">
<access read="true" readPrivilege="admin"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
<otherwiseConform>
<provisionalConform/>
<mandatoryConform>
<feature name="TC"/>
</mandatoryConform>
</otherwiseConform>
</attribute>
<attribute id="0x0007" name="TCAcknowledgements" type="map16">
<access read="true" readPrivilege="admin"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
<otherwiseConform>
<provisionalConform/>
<mandatoryConform>
<feature name="TC"/>
</mandatoryConform>
</otherwiseConform>
</attribute>
<attribute id="0x0008" name="TCAcknowledgementsRequired" type="bool" default="true">
<access read="true" readPrivilege="admin"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="fixed" reportable="false"/>
<otherwiseConform>
<provisionalConform/>
<mandatoryConform>
<feature name="TC"/>
</mandatoryConform>
</otherwiseConform>
</attribute>
</attributes>
<commands>
<command id="0x00" name="ArmFailSafe" direction="commandToServer" response="ArmFailSafeResponse">
Expand Down Expand Up @@ -185,5 +254,31 @@ Davis, CA 95616, USA
<mandatoryConform/>
</field>
</command>
<command id="0x06" name="SetTCAcknowledgements" direction="commandToServer" response="SetTCAcknowledgementsResponse">
<access invokePrivilege="admin" fabricScoped="true"/>
<otherwiseConform>
<provisionalConform/>
<mandatoryConform>
<feature name="TC"/>
</mandatoryConform>
</otherwiseConform>
<field id="0" name="TCVersion" type="uint16">
<mandatoryConform/>
</field>
<field id="1" name="TCUserResponse" type="map16">
<mandatoryConform/>
</field>
</command>
<command id="0x05" name="SetTCAcknowledgementsResponse" direction="responseFromServer">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform>
<feature name="TC"/>
</mandatoryConform>
</otherwiseConform>
<field id="0" name="ErrorCode" type="CommissioningErrorEnum" default="OK">
<mandatoryConform/>
</field>
</command>
</commands>
</cluster>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2021 Project CHIP Authors
Copyright (c) 2021-2024 Project CHIP Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -23,6 +23,9 @@ limitations under the License.
<item name="InvalidAuthentication" value="0x2"/>
<item name="NoFailSafe" value="0x3"/>
<item name="BusyWithOtherAdmin" value="0x4"/>
<item name="RequiredTCNotAccepted" value="0x5"/>
<item name="TCAcknowledgementsNotReceived" value="0x6"/>
<item name="TCMinVersionNotMet" value="0x7"/>
</enum>
<enum name="RegulatoryLocationTypeEnum" type="enum8">
<cluster code="0x0030"/>
Expand All @@ -41,6 +44,16 @@ limitations under the License.
<code>0x0030</code>
<define>GENERAL_COMMISSIONING_CLUSTER</define>
<description>This cluster is used to manage global aspects of the Commissioning flow.</description>

<features>
<feature bit="0" code="TC" name="TermsAndConditions" summary="Supports Terms and Conditions acknowledgement">
<otherwiseConform>
<provisionalConform/>
<optionalConform/>
</otherwiseConform>
</feature>
</features>

<attribute side="server" code="0x00" define="BREADCRUMB" type="int64u" writable="true" default="0x0000000000000000" optional="false">
<description>Breadcrumb</description>
<access op="read" privilege="view"/>
Expand All @@ -50,6 +63,26 @@ limitations under the License.
<attribute side="server" code="0x02" define="REGULATORY_CONFIG" type="RegulatoryLocationTypeEnum" writable="false" optional="false">RegulatoryConfig</attribute>
<attribute side="server" code="0x03" define="LOCATION_CAPABILITY" type="RegulatoryLocationTypeEnum" writable="false" optional="false">LocationCapability</attribute>
<attribute side="server" code="0x04" define="SUPPORTS_CONCURRENT_CONNECTION" type="boolean" writable="false" default="1" optional="false">SupportsConcurrentConnection</attribute>
<attribute side="server" code="0x05" define="TC_ACCEPTED_VERSION" type="int16u" min="0x0000" max="0xFFFF" writable="false" optional="true" isNullable="true">
<description>TCAcceptedVersion</description>
<access op="read" privilege="view"/>
<access op="read" privilege="administer"/>
</attribute>
<attribute side="server" code="0x06" define="TC_MIN_REQUIRED_VERSION" type="int16u" min="0x0000" max="0xFFFF" writable="false" optional="true" isNullable="true">
<description>TCMinRequiredVersion</description>
<access op="read" privilege="view"/>
<access op="read" privilege="administer"/>
</attribute>
<attribute side="server" code="0x07" define="TC_ACKNOWLEDGEMENTS" type="bitmap16" min="0x0000" max="0xFFFF" writable="false" default="0x0000" optional="true">
<description>TCAcknowledgements</description>
<access op="read" privilege="view"/>
<access op="read" privilege="administer"/>
</attribute>
<attribute side="server" code="0x08" define="TC_ACKNOWLEDGEMENTS_REQUIRED" type="boolean" writable="false" optional="true" isNullable="true">
<description>TCAcknowledgementsRequired</description>
<access op="read" privilege="view"/>
<access op="read" privilege="administer"/>
</attribute>

<command source="client" code="0x00" name="ArmFailSafe" response="ArmFailSafeResponse" optional="false" cli="chip fabric_commissioning armfailsafe">
<description>Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock</description>
Expand Down Expand Up @@ -83,5 +116,15 @@ limitations under the License.
<arg name="ErrorCode" type="CommissioningErrorEnum"/>
<arg name="DebugText" type="char_string"/>
</command>
<command source="client" code="0x06" name="SetTCAcknowledgements" optional="true" response="SetTCAcknowledgementsResponse" cli="chip fabric_commissioning settcacknowledgements">
<description>This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node.</description>
<arg name="TCVersion" type="int16u" min="0x0000" max="0xFFFF"/>
<arg name="TCUserResponse" type="bitmap16" min="0x0000" max="0xFFFF"/>
<access op="invoke" privilege="administer"/>
</command>
<command source="server" code="0x07" name="SetTCAcknowledgementsResponse" optional="true" cli="chip fabric_commissioning settcacknowledgementsresponse">
<description>This command is used to convey the result from SetTCAcknowledgements.</description>
<arg name="ErrorCode" type="CommissioningErrorEnum"/>
</command>
</cluster>
</configurator>

0 comments on commit e314d1e

Please sign in to comment.