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
…#34604)

* 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.

* Zap regen for Enhanced Setup Flow, Terms and Conditions (TC)

* Auto-update ZAP files.

```bash
python3 ./scripts/tools/zap_regen_all.py
```
  • Loading branch information
swan-amazon authored Jul 30, 2024
1 parent ccd8da9 commit 9032548
Show file tree
Hide file tree
Showing 121 changed files with 4,495 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,9 @@ cluster GeneralCommissioning = 48 {
kInvalidAuthentication = 2;
kNoFailSafe = 3;
kBusyWithOtherAdmin = 4;
kRequiredTCNotAccepted = 5;
kTCAcknowledgementsNotReceived = 6;
kTCMinVersionNotMet = 7;
}

enum RegulatoryLocationTypeEnum : enum8 {
Expand All @@ -499,6 +502,10 @@ cluster GeneralCommissioning = 48 {
kIndoorOutdoor = 2;
}

bitmap Feature : bitmap32 {
kTermsAndConditions = 0x1;
}

struct BasicCommissioningInfo {
int16u failSafeExpiryLengthSeconds = 0;
int16u maxCumulativeFailsafeSeconds = 1;
Expand All @@ -509,6 +516,10 @@ cluster GeneralCommissioning = 48 {
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -542,12 +553,23 @@ cluster GeneralCommissioning = 48 {
char_string debugText = 1;
}

request struct SetTCAcknowledgementsRequest {
int16u TCVersion = 0;
bitmap16 TCUserResponse = 1;
}

response struct SetTCAcknowledgementsResponse = 7 {
CommissioningErrorEnum errorCode = 0;
}

/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
/** Set the regulatory configuration to be used during commissioning */
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
}

/** Functionality to configure, enable, disable network credentials and access on a Matter device. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,9 @@ cluster GeneralCommissioning = 48 {
kInvalidAuthentication = 2;
kNoFailSafe = 3;
kBusyWithOtherAdmin = 4;
kRequiredTCNotAccepted = 5;
kTCAcknowledgementsNotReceived = 6;
kTCMinVersionNotMet = 7;
}

enum RegulatoryLocationTypeEnum : enum8 {
Expand All @@ -499,6 +502,10 @@ cluster GeneralCommissioning = 48 {
kIndoorOutdoor = 2;
}

bitmap Feature : bitmap32 {
kTermsAndConditions = 0x1;
}

struct BasicCommissioningInfo {
int16u failSafeExpiryLengthSeconds = 0;
int16u maxCumulativeFailsafeSeconds = 1;
Expand All @@ -509,6 +516,10 @@ cluster GeneralCommissioning = 48 {
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -542,12 +553,23 @@ cluster GeneralCommissioning = 48 {
char_string debugText = 1;
}

request struct SetTCAcknowledgementsRequest {
int16u TCVersion = 0;
bitmap16 TCUserResponse = 1;
}

response struct SetTCAcknowledgementsResponse = 7 {
CommissioningErrorEnum errorCode = 0;
}

/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
/** Set the regulatory configuration to be used during commissioning */
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
}

/** Functionality to configure, enable, disable network credentials and access on a Matter device. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,9 @@ cluster GeneralCommissioning = 48 {
kInvalidAuthentication = 2;
kNoFailSafe = 3;
kBusyWithOtherAdmin = 4;
kRequiredTCNotAccepted = 5;
kTCAcknowledgementsNotReceived = 6;
kTCMinVersionNotMet = 7;
}

enum RegulatoryLocationTypeEnum : enum8 {
Expand All @@ -1437,6 +1440,10 @@ cluster GeneralCommissioning = 48 {
kIndoorOutdoor = 2;
}

bitmap Feature : bitmap32 {
kTermsAndConditions = 0x1;
}

struct BasicCommissioningInfo {
int16u failSafeExpiryLengthSeconds = 0;
int16u maxCumulativeFailsafeSeconds = 1;
Expand All @@ -1447,6 +1454,10 @@ cluster GeneralCommissioning = 48 {
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1480,12 +1491,23 @@ cluster GeneralCommissioning = 48 {
char_string debugText = 1;
}

request struct SetTCAcknowledgementsRequest {
int16u TCVersion = 0;
bitmap16 TCUserResponse = 1;
}

response struct SetTCAcknowledgementsResponse = 7 {
CommissioningErrorEnum errorCode = 0;
}

/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
/** Set the regulatory configuration to be used during commissioning */
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
}

/** Functionality to configure, enable, disable network credentials and access on a Matter device. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,9 @@ cluster GeneralCommissioning = 48 {
kInvalidAuthentication = 2;
kNoFailSafe = 3;
kBusyWithOtherAdmin = 4;
kRequiredTCNotAccepted = 5;
kTCAcknowledgementsNotReceived = 6;
kTCMinVersionNotMet = 7;
}

enum RegulatoryLocationTypeEnum : enum8 {
Expand All @@ -1317,6 +1320,10 @@ cluster GeneralCommissioning = 48 {
kIndoorOutdoor = 2;
}

bitmap Feature : bitmap32 {
kTermsAndConditions = 0x1;
}

struct BasicCommissioningInfo {
int16u failSafeExpiryLengthSeconds = 0;
int16u maxCumulativeFailsafeSeconds = 1;
Expand All @@ -1327,6 +1334,10 @@ cluster GeneralCommissioning = 48 {
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1360,12 +1371,23 @@ cluster GeneralCommissioning = 48 {
char_string debugText = 1;
}

request struct SetTCAcknowledgementsRequest {
int16u TCVersion = 0;
bitmap16 TCUserResponse = 1;
}

response struct SetTCAcknowledgementsResponse = 7 {
CommissioningErrorEnum errorCode = 0;
}

/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
/** Set the regulatory configuration to be used during commissioning */
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
}

/** Functionality to configure, enable, disable network credentials and access on a Matter device. */
Expand Down
22 changes: 22 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,9 @@ cluster GeneralCommissioning = 48 {
kInvalidAuthentication = 2;
kNoFailSafe = 3;
kBusyWithOtherAdmin = 4;
kRequiredTCNotAccepted = 5;
kTCAcknowledgementsNotReceived = 6;
kTCMinVersionNotMet = 7;
}

enum RegulatoryLocationTypeEnum : enum8 {
Expand All @@ -956,6 +959,10 @@ cluster GeneralCommissioning = 48 {
kIndoorOutdoor = 2;
}

bitmap Feature : bitmap32 {
kTermsAndConditions = 0x1;
}

struct BasicCommissioningInfo {
int16u failSafeExpiryLengthSeconds = 0;
int16u maxCumulativeFailsafeSeconds = 1;
Expand All @@ -966,6 +973,10 @@ cluster GeneralCommissioning = 48 {
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -999,12 +1010,23 @@ cluster GeneralCommissioning = 48 {
char_string debugText = 1;
}

request struct SetTCAcknowledgementsRequest {
int16u TCVersion = 0;
bitmap16 TCUserResponse = 1;
}

response struct SetTCAcknowledgementsResponse = 7 {
CommissioningErrorEnum errorCode = 0;
}

/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
/** Set the regulatory configuration to be used during commissioning */
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
}

/** Functionality to configure, enable, disable network credentials and access on a Matter device. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,9 @@ cluster GeneralCommissioning = 48 {
kInvalidAuthentication = 2;
kNoFailSafe = 3;
kBusyWithOtherAdmin = 4;
kRequiredTCNotAccepted = 5;
kTCAcknowledgementsNotReceived = 6;
kTCMinVersionNotMet = 7;
}

enum RegulatoryLocationTypeEnum : enum8 {
Expand All @@ -855,6 +858,10 @@ cluster GeneralCommissioning = 48 {
kIndoorOutdoor = 2;
}

bitmap Feature : bitmap32 {
kTermsAndConditions = 0x1;
}

struct BasicCommissioningInfo {
int16u failSafeExpiryLengthSeconds = 0;
int16u maxCumulativeFailsafeSeconds = 1;
Expand All @@ -865,6 +872,10 @@ cluster GeneralCommissioning = 48 {
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -898,12 +909,23 @@ cluster GeneralCommissioning = 48 {
char_string debugText = 1;
}

request struct SetTCAcknowledgementsRequest {
int16u TCVersion = 0;
bitmap16 TCUserResponse = 1;
}

response struct SetTCAcknowledgementsResponse = 7 {
CommissioningErrorEnum errorCode = 0;
}

/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
/** Set the regulatory configuration to be used during commissioning */
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
}

/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */
Expand Down
22 changes: 22 additions & 0 deletions examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,9 @@ cluster GeneralCommissioning = 48 {
kInvalidAuthentication = 2;
kNoFailSafe = 3;
kBusyWithOtherAdmin = 4;
kRequiredTCNotAccepted = 5;
kTCAcknowledgementsNotReceived = 6;
kTCMinVersionNotMet = 7;
}

enum RegulatoryLocationTypeEnum : enum8 {
Expand All @@ -571,6 +574,10 @@ cluster GeneralCommissioning = 48 {
kIndoorOutdoor = 2;
}

bitmap Feature : bitmap32 {
kTermsAndConditions = 0x1;
}

struct BasicCommissioningInfo {
int16u failSafeExpiryLengthSeconds = 0;
int16u maxCumulativeFailsafeSeconds = 1;
Expand All @@ -581,6 +588,10 @@ cluster GeneralCommissioning = 48 {
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5;
provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6;
provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7;
provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -614,12 +625,23 @@ cluster GeneralCommissioning = 48 {
char_string debugText = 1;
}

request struct SetTCAcknowledgementsRequest {
int16u TCVersion = 0;
bitmap16 TCUserResponse = 1;
}

response struct SetTCAcknowledgementsResponse = 7 {
CommissioningErrorEnum errorCode = 0;
}

/** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
/** Set the regulatory configuration to be used during commissioning */
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
/** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
/** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */
command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6;
}

/** Functionality to configure, enable, disable network credentials and access on a Matter device. */
Expand Down
Loading

0 comments on commit 9032548

Please sign in to comment.