Skip to content

Commit

Permalink
Remove 'cluster side' from matter IDL files (#30605)
Browse files Browse the repository at this point in the history
* Mass remove of ClusterSide

* Start adding helper functions for cluster selection - some code still cares about client/server status

* Fix PluginApplicationCallbacks because this was sensitive to client/server

* Side is not a thing that backwards compatibility can test anymore

* Start fixing the IDL generator text

* Generate all clusters in the same way

* Zap regen

* Add better differs in output assertions

* Fix some whitespacing - zap regen

* Event better whitespacing - zap regen

* Fix what gets generated and regen

* Cluster doxygen seems to take effect now (I believe)

* Some unit test updates - manually validated

* Update documentation

* Restyle

* Fix lint

* Fix linter logic

* Skip metadata for compares, add logic to allow repeated cluster definitions and add todo

* Restyle

* Add a typedef

* Fix tests and conversion to list

* Restyle

* Fix tests

* Restyle

* update comment

* Zap regen

---------

Co-authored-by: Andrei Litvin <andreilitvin@google.com>
  • Loading branch information
2 people authored and pull[bot] committed Dec 7, 2023
1 parent 5824ab9 commit 9569667
Show file tree
Hide file tree
Showing 107 changed files with 22,540 additions and 11,799 deletions.
507 changes: 286 additions & 221 deletions examples/air-purifier-app/air-purifier-common/air-purifier-app.matter

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,900 changes: 1,272 additions & 628 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

Large diffs are not rendered by default.

Large diffs are not rendered by default.

531 changes: 360 additions & 171 deletions examples/bridge-app/bridge-common/bridge-app.matter

Large diffs are not rendered by default.

416 changes: 255 additions & 161 deletions examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter

Large diffs are not rendered by default.

Large diffs are not rendered by default.

484 changes: 274 additions & 210 deletions examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter

Large diffs are not rendered by default.

346 changes: 245 additions & 101 deletions examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter

Large diffs are not rendered by default.

399 changes: 267 additions & 132 deletions examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter

Large diffs are not rendered by default.

280 changes: 175 additions & 105 deletions examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter

Large diffs are not rendered by default.

342 changes: 227 additions & 115 deletions examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter

Large diffs are not rendered by default.

230 changes: 142 additions & 88 deletions examples/chef/devices/rootnode_dishwasher_cc105034fe.matter

Large diffs are not rendered by default.

473 changes: 338 additions & 135 deletions examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter

Large diffs are not rendered by default.

424 changes: 293 additions & 131 deletions examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter

Large diffs are not rendered by default.

296 changes: 185 additions & 111 deletions examples/chef/devices/rootnode_fan_7N2TobIlOX.matter

Large diffs are not rendered by default.

242 changes: 153 additions & 89 deletions examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter

Large diffs are not rendered by default.

205 changes: 131 additions & 74 deletions examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter

Large diffs are not rendered by default.

358 changes: 245 additions & 113 deletions examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter

Large diffs are not rendered by default.

242 changes: 153 additions & 89 deletions examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter

Large diffs are not rendered by default.

230 changes: 143 additions & 87 deletions examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter

Large diffs are not rendered by default.

243 changes: 154 additions & 89 deletions examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter

Large diffs are not rendered by default.

249 changes: 161 additions & 88 deletions examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter

Large diffs are not rendered by default.

340 changes: 226 additions & 114 deletions examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter

Large diffs are not rendered by default.

352 changes: 233 additions & 119 deletions examples/chef/devices/rootnode_onofflight_samplemei.matter

Large diffs are not rendered by default.

306 changes: 200 additions & 106 deletions examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter

Large diffs are not rendered by default.

308 changes: 199 additions & 109 deletions examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter

Large diffs are not rendered by default.

248 changes: 159 additions & 89 deletions examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter

Large diffs are not rendered by default.

256 changes: 181 additions & 75 deletions examples/chef/devices/rootnode_pump_5f904818cc.matter

Large diffs are not rendered by default.

237 changes: 170 additions & 67 deletions examples/chef/devices/rootnode_pump_a811bb33a0.matter

Large diffs are not rendered by default.

Large diffs are not rendered by default.

266 changes: 169 additions & 97 deletions examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter

Large diffs are not rendered by default.

373 changes: 272 additions & 101 deletions examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter

Large diffs are not rendered by default.

296 changes: 192 additions & 104 deletions examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter

Large diffs are not rendered by default.

292 changes: 202 additions & 90 deletions examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter

Large diffs are not rendered by default.

241 changes: 153 additions & 88 deletions examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter

Large diffs are not rendered by default.

387 changes: 253 additions & 134 deletions examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter

Large diffs are not rendered by default.

321 changes: 199 additions & 122 deletions examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter

Large diffs are not rendered by default.

Large diffs are not rendered by default.

279 changes: 172 additions & 107 deletions examples/dishwasher-app/dishwasher-common/dishwasher-app.matter

Large diffs are not rendered by default.

490 changes: 298 additions & 192 deletions examples/light-switch-app/light-switch-common/light-switch-app.matter

Large diffs are not rendered by default.

449 changes: 284 additions & 165 deletions examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter

Large diffs are not rendered by default.

526 changes: 323 additions & 203 deletions examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter

Large diffs are not rendered by default.

449 changes: 285 additions & 164 deletions examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter

Large diffs are not rendered by default.

667 changes: 425 additions & 242 deletions examples/lighting-app/lighting-common/lighting-app.matter

Large diffs are not rendered by default.

392 changes: 254 additions & 138 deletions examples/lighting-app/nxp/zap/lighting-on-off.matter

Large diffs are not rendered by default.

508 changes: 320 additions & 188 deletions examples/lighting-app/qpg/zap/light.matter

Large diffs are not rendered by default.

663 changes: 416 additions & 247 deletions examples/lighting-app/silabs/data_model/lighting-thread-app.matter

Large diffs are not rendered by default.

574 changes: 383 additions & 191 deletions examples/lighting-app/silabs/data_model/lighting-wifi-app.matter

Large diffs are not rendered by default.

310 changes: 224 additions & 86 deletions examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter

Large diffs are not rendered by default.

613 changes: 381 additions & 232 deletions examples/lock-app/lock-common/lock-app.matter

Large diffs are not rendered by default.

489 changes: 360 additions & 129 deletions examples/lock-app/nxp/zap/lock-app.matter

Large diffs are not rendered by default.

587 changes: 412 additions & 175 deletions examples/lock-app/qpg/zap/lock.matter

Large diffs are not rendered by default.

147 changes: 99 additions & 48 deletions examples/log-source-app/log-source-common/log-source-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Node's Access Control List (ACL), which codifies the rules used to manage
and enforce Access Control for the Node's endpoints and their associated
cluster instances. */
server cluster AccessControl = 31 {
cluster AccessControl = 31 {
revision 1; // NOTE: Default/not specifically set

enum AccessControlEntryAuthModeEnum : enum8 {
Expand Down Expand Up @@ -64,7 +64,7 @@ server cluster AccessControl = 31 {
}

attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1;
attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1;
readonly attribute int16u subjectsPerAccessControlEntry = 2;
readonly attribute int16u targetsPerAccessControlEntry = 3;
readonly attribute int16u accessControlEntriesPerFabric = 4;
Expand All @@ -77,7 +77,7 @@ server cluster AccessControl = 31 {
}

/** This cluster is used to manage global aspects of the Commissioning flow. */
server cluster GeneralCommissioning = 48 {
cluster GeneralCommissioning = 48 {
revision 1; // NOTE: Default/not specifically set

enum CommissioningErrorEnum : enum8 {
Expand All @@ -101,6 +101,8 @@ server cluster GeneralCommissioning = 48 {

attribute access(write: administer) int64u breadcrumb = 0;
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand All @@ -114,17 +116,17 @@ server cluster GeneralCommissioning = 48 {
int64u breadcrumb = 1;
}

response struct ArmFailSafeResponse = 1 {
CommissioningErrorEnum errorCode = 0;
char_string<128> debugText = 1;
}

request struct SetRegulatoryConfigRequest {
RegulatoryLocationTypeEnum newRegulatoryConfig = 0;
char_string<2> countryCode = 1;
int64u breadcrumb = 2;
}

response struct ArmFailSafeResponse = 1 {
CommissioningErrorEnum errorCode = 0;
char_string<128> debugText = 1;
}

response struct SetRegulatoryConfigResponse = 3 {
CommissioningErrorEnum errorCode = 0;
char_string debugText = 1;
Expand All @@ -135,13 +137,16 @@ server cluster GeneralCommissioning = 48 {
char_string debugText = 1;
}

/** 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;
}

/** Functionality to configure, enable, disable network credentials and access on a Matter device. */
server cluster NetworkCommissioning = 49 {
cluster NetworkCommissioning = 49 {
revision 1; // NOTE: Default/not specifically set

enum NetworkCommissioningStatusEnum : enum8 {
Expand Down Expand Up @@ -220,6 +225,17 @@ server cluster NetworkCommissioning = 49 {
int8s rssi = 5;
}

readonly attribute access(read: administer) int8u maxNetworks = 0;
readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1;
readonly attribute optional int8u scanMaxTimeSeconds = 2;
readonly attribute optional int8u connectMaxTimeSeconds = 3;
attribute access(write: administer) boolean interfaceEnabled = 4;
readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5;
readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6;
readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7;
readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8;
readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9;
readonly attribute optional int16u threadVersion = 10;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -232,6 +248,13 @@ server cluster NetworkCommissioning = 49 {
optional int64u breadcrumb = 1;
}

response struct ScanNetworksResponse = 1 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string debugText = 1;
optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2;
optional ThreadInterfaceScanResultStruct threadScanResults[] = 3;
}

request struct AddOrUpdateWiFiNetworkRequest {
octet_string<32> ssid = 0;
octet_string<64> credentials = 1;
Expand All @@ -251,48 +274,59 @@ server cluster NetworkCommissioning = 49 {
optional int64u breadcrumb = 1;
}

response struct NetworkConfigResponse = 5 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string<512> debugText = 1;
optional int8u networkIndex = 2;
optional octet_string<140> clientIdentity = 3;
optional octet_string<64> possessionSignature = 4;
}

request struct ConnectNetworkRequest {
octet_string<32> networkID = 0;
optional int64u breadcrumb = 1;
}

response struct ConnectNetworkResponse = 7 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string debugText = 1;
nullable int32s errorValue = 2;
}

request struct ReorderNetworkRequest {
octet_string<32> networkID = 0;
int8u networkIndex = 1;
optional int64u breadcrumb = 2;
}

response struct ScanNetworksResponse = 1 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string debugText = 1;
optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2;
optional ThreadInterfaceScanResultStruct threadScanResults[] = 3;
}

response struct NetworkConfigResponse = 5 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string<512> debugText = 1;
optional int8u networkIndex = 2;
optional octet_string<140> clientIdentity = 3;
optional octet_string<64> possessionSignature = 4;
request struct QueryIdentityRequest {
OCTET_STRING<20> keyIdentifier = 0;
optional OCTET_STRING<32> possessionNonce = 1;
}

response struct ConnectNetworkResponse = 7 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string debugText = 1;
nullable int32s errorValue = 2;
response struct QueryIdentityResponse = 10 {
OCTET_STRING<140> identity = 0;
optional OCTET_STRING<64> possessionSignature = 1;
}

/** Detemine the set of networks the device sees as available. */
command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0;
/** Add or update the credentials for a given Wi-Fi network. */
command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2;
/** Add or update the credentials for a given Thread network. */
command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3;
/** Remove the definition of a given network (including its credentials). */
command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4;
/** Connect to the specified network, using previously-defined credentials. */
command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6;
/** Modify the order in which networks will be presented in the Networks attribute. */
command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8;
/** Retrieve details about and optionally proof of possession of a network client identity. */
command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9;
}

/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */
server cluster DiagnosticLogs = 50 {
cluster DiagnosticLogs = 50 {
revision 1; // NOTE: Default/not specifically set

enum IntentEnum : enum8 {
Expand Down Expand Up @@ -334,11 +368,12 @@ server cluster DiagnosticLogs = 50 {
optional systime_us timeSinceBoot = 3;
}

/** Retrieving diagnostic logs from a Node */
command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0;
}

/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */
server cluster OperationalCredentials = 62 {
cluster OperationalCredentials = 62 {
revision 1; // NOTE: Default/not specifically set

enum CertificateChainTypeEnum : enum8 {
Expand Down Expand Up @@ -374,10 +409,12 @@ server cluster OperationalCredentials = 62 {
fabric_idx fabricIndex = 254;
}

readonly attribute access(read: administer) NOCStruct NOCs[] = 0;
readonly attribute FabricDescriptorStruct fabrics[] = 1;
readonly attribute int8u supportedFabrics = 2;
readonly attribute int8u commissionedFabrics = 3;
readonly attribute octet_string trustedRootCertificates[] = 4;
readonly attribute int8u currentFabricIndex = 5;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -389,15 +426,29 @@ server cluster OperationalCredentials = 62 {
octet_string<32> attestationNonce = 0;
}

response struct AttestationResponse = 1 {
octet_string<900> attestationElements = 0;
octet_string<64> attestationSignature = 1;
}

request struct CertificateChainRequestRequest {
CertificateChainTypeEnum certificateType = 0;
}

response struct CertificateChainResponse = 3 {
octet_string<600> certificate = 0;
}

request struct CSRRequestRequest {
octet_string<32> CSRNonce = 0;
optional boolean isForUpdateNOC = 1;
}

response struct CSRResponse = 5 {
octet_string NOCSRElements = 0;
octet_string attestationSignature = 1;
}

request struct AddNOCRequest {
octet_string<400> NOCValue = 0;
optional octet_string<400> ICACValue = 1;
Expand All @@ -406,6 +457,17 @@ server cluster OperationalCredentials = 62 {
vendor_id adminVendorId = 4;
}

request struct UpdateNOCRequest {
octet_string NOCValue = 0;
optional octet_string ICACValue = 1;
}

response struct NOCResponse = 8 {
NodeOperationalCertStatusEnum statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional char_string<128> debugText = 2;
}

request struct UpdateFabricLabelRequest {
char_string<32> label = 0;
}
Expand All @@ -418,32 +480,21 @@ server cluster OperationalCredentials = 62 {
octet_string rootCACertificate = 0;
}

response struct AttestationResponse = 1 {
octet_string<900> attestationElements = 0;
octet_string<64> attestationSignature = 1;
}

response struct CertificateChainResponse = 3 {
octet_string<600> certificate = 0;
}

response struct CSRResponse = 5 {
octet_string NOCSRElements = 0;
octet_string attestationSignature = 1;
}

response struct NOCResponse = 8 {
NodeOperationalCertStatusEnum statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional char_string<128> debugText = 2;
}

/** Sender is requesting attestation information from the receiver. */
command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0;
/** Sender is requesting a device attestation certificate from the receiver. */
command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2;
/** Sender is requesting a certificate signing request (CSR) from the receiver. */
command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4;
/** Sender is requesting to add the new node operational certificates. */
command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6;
/** Sender is requesting to update the node operational certificates. */
fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7;
/** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */
fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9;
/** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */
command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
/** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
}

Expand Down
Loading

0 comments on commit 9569667

Please sign in to comment.