Skip to content

Commit

Permalink
Add SupportsConcurrentConnection flag to SDK (#16899)
Browse files Browse the repository at this point in the history
* Add SupportsConcurrentConnection attribute

* Update ZAP files

* Add SupportsConcurrentConnection` flag to SDK

- General Commissioning cluster recently had the `SupportsConcurrentConnection`
  attribute added to indicate which mode is going to be supported by the device.
  This attribute was missing.
- Several elements of the GeneralCommissioningCluster were using stale names
  or older optionality.

Fixes #16898

- This PR adds support for `SupportsConcurrentConnection` attribute
- This PR renames `location` to `newRegulatoryConfig` attribute to match spec
- Updated all ZAP files to have the mandatory attribute

Testing done:
- All unit tests pass
- All cert tests pass
- Added necessary YAML test to prove-out reading the value

* Regen zap

* Restyled by clang-format

* Restyled by prettier-yaml

* external->External

* Regenerated ZAP

* Restyled by clang-format

* regen zap again, for the Nth time

* Restyled by clang-format

Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
  • Loading branch information
3 people authored and pull[bot] committed Feb 12, 2024
1 parent a6abbba commit 7af7b45
Show file tree
Hide file tree
Showing 92 changed files with 2,002 additions and 701 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1341,20 +1341,19 @@ server cluster GeneralCommissioning = 48 {
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
readonly attribute RegulatoryLocationType regulatoryConfig = 2;
readonly attribute RegulatoryLocationType locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

request struct ArmFailSafeRequest {
INT16U expiryLengthSeconds = 0;
INT64U breadcrumb = 1;
INT32U timeoutMs = 2;
}

request struct SetRegulatoryConfigRequest {
RegulatoryLocationType location = 0;
RegulatoryLocationType newRegulatoryConfig = 0;
CHAR_STRING countryCode = 1;
INT64U breadcrumb = 2;
INT32U timeoutMs = 3;
}

response struct ArmFailSafeResponse {
Expand Down
30 changes: 30 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2024,6 +2024,21 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SupportsConcurrentConnection",
"code": 4,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down Expand Up @@ -9779,6 +9794,21 @@
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "SupportsConcurrentConnection",
"code": 4,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
Expand Down
5 changes: 2 additions & 3 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -300,20 +300,19 @@ server cluster GeneralCommissioning = 48 {
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
readonly attribute RegulatoryLocationType regulatoryConfig = 2;
readonly attribute RegulatoryLocationType locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

request struct ArmFailSafeRequest {
INT16U expiryLengthSeconds = 0;
INT64U breadcrumb = 1;
INT32U timeoutMs = 2;
}

request struct SetRegulatoryConfigRequest {
RegulatoryLocationType location = 0;
RegulatoryLocationType newRegulatoryConfig = 0;
CHAR_STRING countryCode = 1;
INT64U breadcrumb = 2;
INT32U timeoutMs = 3;
}

response struct ArmFailSafeResponse {
Expand Down
17 changes: 16 additions & 1 deletion examples/bridge-app/bridge-common/bridge-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,21 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SupportsConcurrentConnection",
"code": 4,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down Expand Up @@ -5074,4 +5089,4 @@
"deviceIdentifier": 257
}
]
}
}
1 change: 1 addition & 0 deletions examples/chip-tool-darwin/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ function getTests()
'TestDelayCommands',
'TestDescriptorCluster',
'TestBasicInformation',
'TestGeneralCommissioning',
'TestGroupsCluster',
'TestGroupKeyManagementCluster',
'TestIdentifyCluster',
Expand Down
1 change: 1 addition & 0 deletions examples/chip-tool/templates/tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ function getTests()
'TestConfigVariables',
'TestDescriptorCluster',
'TestBasicInformation',
'TestGeneralCommissioning',
'TestIdentifyCluster',
'TestOperationalCredentialsCluster',
'TestModeSelectCluster',
Expand Down
5 changes: 2 additions & 3 deletions examples/door-lock-app/door-lock-common/door-lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -784,20 +784,19 @@ server cluster GeneralCommissioning = 48 {
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
readonly attribute RegulatoryLocationType regulatoryConfig = 2;
readonly attribute RegulatoryLocationType locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

request struct ArmFailSafeRequest {
INT16U expiryLengthSeconds = 0;
INT64U breadcrumb = 1;
INT32U timeoutMs = 2;
}

request struct SetRegulatoryConfigRequest {
RegulatoryLocationType location = 0;
RegulatoryLocationType newRegulatoryConfig = 0;
CHAR_STRING countryCode = 1;
INT64U breadcrumb = 2;
INT32U timeoutMs = 3;
}

response struct ArmFailSafeResponse {
Expand Down
17 changes: 16 additions & 1 deletion examples/door-lock-app/door-lock-common/door-lock-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,21 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SupportsConcurrentConnection",
"code": 4,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down Expand Up @@ -7180,4 +7195,4 @@
"deviceIdentifier": 10
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -481,20 +481,19 @@ server cluster GeneralCommissioning = 48 {
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
readonly attribute RegulatoryLocationType regulatoryConfig = 2;
readonly attribute RegulatoryLocationType locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

request struct ArmFailSafeRequest {
INT16U expiryLengthSeconds = 0;
INT64U breadcrumb = 1;
INT32U timeoutMs = 2;
}

request struct SetRegulatoryConfigRequest {
RegulatoryLocationType location = 0;
RegulatoryLocationType newRegulatoryConfig = 0;
CHAR_STRING countryCode = 1;
INT64U breadcrumb = 2;
INT32U timeoutMs = 3;
}

response struct ArmFailSafeResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1995,6 +1995,21 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SupportsConcurrentConnection",
"code": 4,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down Expand Up @@ -7320,4 +7335,4 @@
"deviceIdentifier": 259
}
]
}
}
5 changes: 2 additions & 3 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -494,20 +494,19 @@ server cluster GeneralCommissioning = 48 {
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
readonly attribute RegulatoryLocationType regulatoryConfig = 2;
readonly attribute RegulatoryLocationType locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

request struct ArmFailSafeRequest {
INT16U expiryLengthSeconds = 0;
INT64U breadcrumb = 1;
INT32U timeoutMs = 2;
}

request struct SetRegulatoryConfigRequest {
RegulatoryLocationType location = 0;
RegulatoryLocationType newRegulatoryConfig = 0;
CHAR_STRING countryCode = 1;
INT64U breadcrumb = 2;
INT32U timeoutMs = 3;
}

response struct ArmFailSafeResponse {
Expand Down
17 changes: 16 additions & 1 deletion examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1996,6 +1996,21 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SupportsConcurrentConnection",
"code": 4,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down Expand Up @@ -6985,4 +7000,4 @@
}
],
"log": []
}
}
5 changes: 2 additions & 3 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -240,20 +240,19 @@ server cluster GeneralCommissioning = 48 {
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
readonly attribute RegulatoryLocationType regulatoryConfig = 2;
readonly attribute RegulatoryLocationType locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

request struct ArmFailSafeRequest {
INT16U expiryLengthSeconds = 0;
INT64U breadcrumb = 1;
INT32U timeoutMs = 2;
}

request struct SetRegulatoryConfigRequest {
RegulatoryLocationType location = 0;
RegulatoryLocationType newRegulatoryConfig = 0;
CHAR_STRING countryCode = 1;
INT64U breadcrumb = 2;
INT32U timeoutMs = 3;
}

response struct ArmFailSafeResponse {
Expand Down
17 changes: 16 additions & 1 deletion examples/lock-app/lock-common/lock-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,21 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SupportsConcurrentConnection",
"code": 4,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down Expand Up @@ -6546,4 +6561,4 @@
"deviceIdentifier": 10
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,18 @@ server cluster GeneralCommissioning = 48 {

attribute int64u breadcrumb = 0;
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
readonly attribute boolean supportsConcurrentConnection = 4;
readonly global attribute int16u clusterRevision = 65533;

request struct ArmFailSafeRequest {
INT16U expiryLengthSeconds = 0;
INT64U breadcrumb = 1;
INT32U timeoutMs = 2;
}

request struct SetRegulatoryConfigRequest {
RegulatoryLocationType location = 0;
RegulatoryLocationType newRegulatoryConfig = 0;
CHAR_STRING countryCode = 1;
INT64U breadcrumb = 2;
INT32U timeoutMs = 3;
}

response struct ArmFailSafeResponse {
Expand Down
15 changes: 15 additions & 0 deletions examples/log-source-app/log-source-common/log-source-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,21 @@
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "SupportsConcurrentConnection",
"code": 4,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
Expand Down
Loading

0 comments on commit 7af7b45

Please sign in to comment.