From 7b25c6f83e3197a8e71b828c56797a462cafcbff Mon Sep 17 00:00:00 2001 From: Eugen Feraru Date: Mon, 8 Nov 2021 12:08:39 -0600 Subject: [PATCH 1/2] https://github.com/project-chip/connectedhomeip/issues/10246 https://github.com/project-chip/connectedhomeip/issues/11204 https://github.com/project-chip/connectedhomeip/issues/11286 Annotated the operational-credentials-cluster.xml and onoff-cluster.xml based on the Matter Specs, section 11.18, and appclusters, respectively. Normalized the elements. Note that the writeable attribute indicates if a field is writeable, or not. The elements qualifies provileges on a per operation basis. updated all elements to include fieldId; updated NodeOperationalCertStatus to include missing item elements; updated NOCStruct to include a missing item element; Normalized fabric_idx usage across the two updated cluster xml files. --- .../zcl/data-model/chip/onoff-cluster.xml | 42 +++++++-- .../chip/operational-credentials-cluster.xml | 87 +++++++++++++------ 2 files changed, 99 insertions(+), 30 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml index 46631a33cabea0..8ef1e756719406 100644 --- a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml @@ -48,32 +48,62 @@ limitations under the License. Attributes and commands for switching devices between 'On' and 'Off' states. - OnOff - GlobalSceneControl - OnTime - OffWaitTime - StartUpOnOff + + OnOff + + + + GlobalSceneControl + + + + OnTime + + + + + + OffWaitTime + + + + + StartUpOnOff + + + On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. + + On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. + + On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. + + The OffWithEffect command allows devices to be turned off using enhanced ways of fading. + + The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. + + @@ -81,6 +111,8 @@ limitations under the License. + + diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml index a6e0012cd14dec..75c7a6dccd17f7 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml @@ -19,32 +19,35 @@ limitations under the License. - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + + + + - - + + + @@ -54,37 +57,63 @@ limitations under the License. OPERATIONAL_CREDENTIALS_CLUSTER This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. - fabrics list - SupportedFabrics - CommissionedFabrics + + NOCs + + + + + Fabrics + + + + + SupportedFabrics + + + + CommissionedFabrics + + - TrustedRootCertificates - CurrentFabricIndex + + TrustedRootCertificates + + + + CurrentFabricIndex + + Sender is requesting attestation information from the receiver. + An attestation information confirmation from the server. + Sender is requesting a device attestation certificate from the receiver. + A device attestation certificate (DAC) or product attestation intermediate (PAI) certificate from the server. + Sender is requesting a certificate signing request (CSR) from the receiver. + @@ -92,6 +121,7 @@ limitations under the License. A certificate signing request (CSR) from the server. + @@ -101,39 +131,46 @@ limitations under the License. + Sender is requesting to update the node operational certificates. + Response to AddNOC or UpdateNOC commands. - + + 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. + This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. - + + This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. + This command SHALL remove a Trusted Root CA Certificate, provided as its CHIP Certificate representation. + From 09376a8a0bcd3b2c4d7cf8636b959a43920d949e Mon Sep 17 00:00:00 2001 From: Eugen Feraru Date: Fri, 12 Nov 2021 14:19:12 -0600 Subject: [PATCH 2/2] Removed multiple op invoke privileges, as there can only be one privilege. Removed for response commands, as there are no privileges for command responses. --- src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml | 6 ------ .../zcl/data-model/chip/operational-credentials-cluster.xml | 4 ---- 2 files changed, 10 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml index 8ef1e756719406..eff45e99d8a080 100644 --- a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml @@ -76,19 +76,16 @@ limitations under the License. On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. - On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. - On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. - @@ -96,13 +93,11 @@ limitations under the License. The OffWithEffect command allows devices to be turned off using enhanced ways of fading. - The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. - @@ -111,7 +106,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml index 75c7a6dccd17f7..70a6424b354bed 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml @@ -95,7 +95,6 @@ limitations under the License. An attestation information confirmation from the server. - @@ -107,7 +106,6 @@ limitations under the License. A device attestation certificate (DAC) or product attestation intermediate (PAI) certificate from the server. - @@ -121,7 +119,6 @@ limitations under the License. A certificate signing request (CSR) from the server. - @@ -146,7 +143,6 @@ limitations under the License. -