Skip to content

Commit

Permalink
Enable Terms and Conditions (TC) feature in all-clusters-app example
Browse files Browse the repository at this point in the history
This commit enables the Terms and Conditions (TC) feature in the
all-clusters-app example application. The changes ensure that the app
can handle TC acknowledgements and enforce required terms and conditions
during the commissioning process.

Changes include:
- Added TC attributes and commands in the General Commissioning cluster.
- Enabled the TC feature in the application configuration.

This enables the TC feature logic in the example app, building on the
initial implementation.
  • Loading branch information
swan-amazon committed Sep 3, 2024
1 parent b3f4396 commit ca4cca9
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7864,11 +7864,15 @@ endpoint 0 {
callback attribute regulatoryConfig;
callback attribute locationCapability;
callback attribute supportsConcurrentConnection;
ram attribute TCAcceptedVersion;
ram attribute TCMinRequiredVersion default = 1;
ram attribute TCAcknowledgements default = 0x0000;
ram attribute TCAcknowledgementsRequired default = true;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute featureMap default = 1;
ram attribute clusterRevision default = 1;

handle command ArmFailSafe;
Expand All @@ -7877,6 +7881,8 @@ endpoint 0 {
handle command SetRegulatoryConfigResponse;
handle command CommissioningComplete;
handle command CommissioningCompleteResponse;
handle command SetTCAcknowledgements;
handle command SetTCAcknowledgementsResponse;
}

server cluster NetworkCommissioning {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,7 @@
"define": "GENERAL_COMMISSIONING_CLUSTER",
"side": "server",
"enabled": 1,
"apiMaturity": "provisional",
"commands": [
{
"name": "ArmFailSafe",
Expand Down Expand Up @@ -2172,6 +2173,22 @@
"source": "server",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "SetTCAcknowledgements",
"code": 6,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "SetTCAcknowledgementsResponse",
"code": 7,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
}
],
"attributes": [
Expand Down Expand Up @@ -2255,6 +2272,70 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TCAcceptedVersion",
"code": 5,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TCMinRequiredVersion",
"code": 6,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TCAcknowledgements",
"code": 7,
"mfgCode": null,
"side": "server",
"type": "bitmap16",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TCAcknowledgementsRequired",
"code": 8,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "true",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
Expand Down Expand Up @@ -2329,7 +2410,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down

0 comments on commit ca4cca9

Please sign in to comment.