Skip to content

Commit

Permalink
test update
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanzhouyc committed Oct 6, 2024
1 parent c058d60 commit 4959f39
Show file tree
Hide file tree
Showing 113 changed files with 11,390 additions and 5,369 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,16 @@ jobs:
--log-level info \
src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \
src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/energy-calendar-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/energy-price-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \
src/app/zap-templates/zcl/data-model/chip/global-enums.xml \
src/app/zap-templates/zcl/data-model/chip/global-structs.xml \
src/app/zap-templates/zcl/data-model/chip/humidistat-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/joint-fabric-datastore-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/joint-fabric-pki-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/network-identity-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml \
src/app/zap-templates/zcl/data-model/chip/access-control-definitions.xml \
src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml \
Expand Down
7 changes: 7 additions & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ load "../src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode
load "../src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/energy-calendar-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/energy-price-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/humidistat-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/joint-fabric-datastore-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/joint-fabric-pki-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.xml";
load "../src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml";
Expand Down Expand Up @@ -64,6 +70,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/network-identity-management-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml";
load "../src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2021 Project CHIP Authors
Copyright (c) 2021-2024 Project CHIP Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -14,11 +14,17 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<configurator>
<!--
XML generated by Alchemy; DO NOT EDIT.
Source: src/data_model/ACL-Cluster.adoc
Parameters: in-progress
Git: 0.9-fall2024-87-gcdfdb86be-dirty
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="CHIP"/>

<enum name="AccessControlEntryPrivilegeEnum" type="enum8">
<cluster code="0x001F"/>
<cluster code="0x0752"/>
<item name="View" value="0x01"/>
<item name="ProxyView" value="0x02"/>
<item name="Operate" value="0x03"/>
Expand All @@ -28,6 +34,7 @@ limitations under the License.

<enum name="AccessControlEntryAuthModeEnum" type="enum8">
<cluster code="0x001F"/>
<cluster code="0x0752"/>
<item name="PASE" value="0x01"/>
<item name="CASE" value="0x02"/>
<item name="Group" value="0x03"/>
Expand All @@ -50,13 +57,15 @@ limitations under the License.

<struct name="AccessControlTargetStruct">
<cluster code="0x001F"/>
<cluster code="0x0752"/>
<item fieldId="0" name="Cluster" type="cluster_id" isNullable="true"/>
<item fieldId="1" name="Endpoint" type="endpoint_no" isNullable="true"/>
<item fieldId="2" name="DeviceType" type="devtype_id" isNullable="true"/>
</struct>

<struct name="AccessControlEntryStruct" isFabricScoped="true">
<cluster code="0x001F"/>
<cluster code="0x0752"/>
<item fieldId="1" name="Privilege" type="AccessControlEntryPrivilegeEnum" isFabricSensitive="true" min="0x00" max="0x05"/>
<item fieldId="2" name="AuthMode" type="AccessControlEntryAuthModeEnum" isFabricSensitive="true" min="0x00" max="0x03"/>
<item fieldId="3" name="Subjects" type="int64u" isNullable="true" array="true" isFabricSensitive="true"/>
Expand Down Expand Up @@ -89,7 +98,7 @@ limitations under the License.
</struct>

<cluster>
<domain>General</domain>
<domain name="General"/>
<name>Access Control</name>
<code>0x001F</code>
<define>ACCESS_CONTROL_CLUSTER</define>
Expand All @@ -98,70 +107,101 @@ limitations under the License.
<feature bit="0" code="EXTS" name="Extension" summary="Device provides ACL Extension attribute">
<optionalConform/>
</feature>
<feature bit="1" code="MNGD" name="Managed Device" summary="Device is managed">
<optionalConform/>
</feature>
<feature bit="1" code="MNGD" name="ManagedDevice" summary="Device is managed"/>
</features>
<server init="false" tick="false">true</server>
<globalAttribute code="0xFFFD" side="either" value="2"/>
<description>The Access Control Cluster exposes a data model view of a
Node&apos;s Access Control List (ACL), which codifies the rules used to manage
and enforce Access Control for the Node&apos;s endpoints and their associated
cluster instances.</description>

<attribute side="server" code="0x0000" define="ACL" type="array" entryType="AccessControlEntryStruct" writable="true">
<description>ACL</description>
<access op="read" privilege="administer"/>
<access op="write" privilege="administer"/>
<mandatoryConform/>
</attribute>

<attribute side="server" code="0x0001" define="EXTENSION" type="array" entryType="AccessControlExtensionStruct" writable="true" optional="true">
<description>Extension</description>
<access op="read" privilege="administer"/>
<access op="write" privilege="administer"/>
<mandatoryConform>
<feature name="EXTS"/>
</mandatoryConform>
</attribute>
<attribute side="server" code="0x0002" define="SUBJECTS_PER_ACCESS_CONTROL_ENTRY" type="int16u" min="4" default="4">
<description>SubjectsPerAccessControlEntry</description>
<mandatoryConform/>
</attribute>
<attribute side="server" code="0x0003" define="TARGETS_PER_ACCESS_CONTROL_ENTRY" type="int16u" min="3" default="3">
<description>TargetsPerAccessControlEntry</description>
<mandatoryConform/>
</attribute>
<attribute side="server" code="0x0004" define="ACCESS_CONTROL_ENTRIES_PER_FABRIC" type="int16u" min="4" default="4">
<description>AccessControlEntriesPerFabric</description>
<mandatoryConform/>
</attribute>
<attribute code="0x0005" side="server" define="COMMISSIONING_ARL" type="array" entryType="CommissioningAccessRestrictionEntryStruct" optional="true">
<description>CommissioningARL</description>
<mandatoryConform>
<feature name="MNGD"/>
</mandatoryConform>
</attribute>
<attribute code="0x0006" side="server" define="ARL" type="array" entryType="AccessRestrictionEntryStruct" optional="true">
<description>ARL</description>
<mandatoryConform>
<feature name="MNGD"/>
</mandatoryConform>
</attribute>

<attribute side="server" code="0x0002" define="SUBJECTS_PER_ACCESS_CONTROL_ENTRY" type="int16u" min="4" default="4">SubjectsPerAccessControlEntry</attribute>
<attribute side="server" code="0x0003" define="TARGETS_PER_ACCESS_CONTROL_ENTRY" type="int16u" min="3" default="3">TargetsPerAccessControlEntry</attribute>
<attribute side="server" code="0x0004" define="ACCESS_CONTROL_ENTRIES_PER_FABRIC" type="int16u" min="4" default="4">AccessControlEntriesPerFabric</attribute>
<attribute code="0x0005" side="server" define="COMMISSIONING_ARL" type="array" entryType="CommissioningAccessRestrictionEntryStruct" optional="true">CommissioningARL</attribute>
<attribute code="0x0006" side="server" define="ARL" type="array" entryType="AccessRestrictionEntryStruct" optional="true">ARL</attribute>

<command code="0x00" source="client" name="ReviewFabricRestrictions" isFabricScoped="true" optional="true" response="ReviewFabricRestrictionsResponse">
<description>This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric.</description>
<access op="invoke" privilege="administer"/>
<access op="invoke" privilege="administer"/>
<arg id="0" name="ARL" array="true" type="CommissioningAccessRestrictionEntryStruct"/>
</command>
<mandatoryConform>
<feature name="MNGD"/>
</mandatoryConform>
</command>

<command code="0x01" source="server" name="ReviewFabricRestrictionsResponse" optional="true" disableDefaultResponse="true">
<description>Returns the review token for the request, which can be used to correlate with a FabricRestrictionReviewUpdate event.</description>
<arg id="0" name="Token" type="int64u"/>
<mandatoryConform>
<feature name="MNGD"/>
</mandatoryConform>
</command>

<event side="server" code="0x0000" name="AccessControlEntryChanged" priority="info" isFabricSensitive="true">
<description>The cluster SHALL send AccessControlEntryChanged events whenever its ACL attribute data is changed by an Administrator.</description>
<description>The cluster SHALL generate AccessControlEntryChanged events whenever its ACL attribute data is changed by an Administrator.</description>
<field id="1" name="AdminNodeID" type="node_id" isNullable="true"/>
<field id="2" name="AdminPasscodeID" type="int16u" isNullable="true"/>
<field id="3" name="ChangeType" type="ChangeTypeEnum" min="0x00" max="0x02"/>
<field id="4" name="LatestValue" type="AccessControlEntryStruct" isNullable="true"/>
<access op="read" privilege="administer"/>
<mandatoryConform/>
</event>

<event side="server" code="0x0001" name="AccessControlExtensionChanged" priority="info" isFabricSensitive="true" optional="true">
<description>The cluster SHALL send AccessControlExtensionChanged events whenever its extension attribute data is changed by an Administrator.</description>
<description>The cluster SHALL generate AccessControlExtensionChanged events whenever its extension attribute data is changed by an Administrator.</description>
<field id="1" name="AdminNodeID" type="node_id" isNullable="true"/>
<field id="2" name="AdminPasscodeID" type="int16u" isNullable="true"/>
<field id="3" name="ChangeType" type="ChangeTypeEnum" min="0x00" max="0x02"/>
<field id="4" name="LatestValue" type="AccessControlExtensionStruct" isNullable="true"/>
<access op="read" privilege="administer"/>
<mandatoryConform>
<feature name="EXTS"/>
</mandatoryConform>
</event>

<event side="server" code="0x0002" name="FabricRestrictionReviewUpdate" priority="info" isFabricSensitive="true" optional="true">
<description>The cluster SHALL send FabricRestrictionReviewUpdate events to indicate completion of a fabric restriction review.</description>
<description>The cluster SHALL generate a FabricRestrictionReviewUpdate event to indicate completion of a fabric restriction review.</description>
<field id="0" name="Token" type="int64u"/>
<field id="1" name="Instruction" type="long_char_string" optional="true" length="512"/>
<field id="2" name="ARLRequestFlowUrl" type="long_char_string" optional="true" length="256"/>
<access op="read" privilege="administer"/>
<mandatoryConform>
<feature name="MNGD"/>
</mandatoryConform>
</event>

</cluster>
</configurator>
52 changes: 32 additions & 20 deletions src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2021 Project CHIP Authors
Copyright (c) 2021-2024 Project CHIP Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -14,45 +14,57 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<configurator>
<!--
XML generated by Alchemy; DO NOT EDIT.
Source: src/app_clusters/media/AccountLogin.adoc
Parameters: in-progress
Git: 0.9-fall2024-87-gcdfdb86be-dirty
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="CHIP"/>
<cluster>
<domain>Media</domain>
<domain name="Media"/>
<name>Account Login</name>
<code>0x050e</code>
<define>ACCOUNT_LOGIN_CLUSTER</define>
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<globalAttribute side="either" code="0xFFFD" value="2"/> <!-- Revision -->
<globalAttribute side="either" code="0xFFFD" value="2"/>
<!-- Revision -->
<description>This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client.</description>

<command source="client" code="0x00" name="GetSetupPIN" isFabricScoped="true" response="GetSetupPINResponse" mustUseTimedInvoke="true" optional="false">
<description>Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response.</description>
<access op="invoke" role="administer" />
<arg name="TempAccountIdentifier" minLength="16" length="100" type="char_string"/>
<description>The purpose of this command is to determine if the active user account of the given Content App matches the active user account of a given Commissionee, and when it does, return a Setup PIN code which can be used for password-authenticated session establishment (PASE) with the Commissionee.</description>
<access op="invoke" role="administer"/>
<arg id="0" name="TempAccountIdentifier" minLength="16" length="100" type="char_string"/>
<mandatoryConform/>
</command>

<command source="client" code="0x02" name="Login" isFabricScoped="true" mustUseTimedInvoke="true" optional="false">
<description>Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active.</description>
<access op="invoke" role="administer" />
<arg name="TempAccountIdentifier" minLength="16" length="100" type="char_string"/>
<arg name="SetupPIN" minLength="8" type="char_string"/>
<arg name="Node" type="node_id" optional="true" />
<description>The purpose of this command is to allow the Content App to assume the user account of a given Commissionee by leveraging the Setup PIN code input by the user during the commissioning process.</description>
<access op="invoke" role="administer"/>
<arg id="0" name="TempAccountIdentifier" minLength="16" length="100" type="char_string"/>
<arg id="1" name="SetupPIN" minLength="8" type="char_string"/>
<arg id="2" name="Node" type="node_id" optional="true"/>
<mandatoryConform/>
</command>

<command source="client" code="0x03" name="Logout" isFabricScoped="true" mustUseTimedInvoke="true" optional="false">
<description>The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session.</description>
<arg name="Node" type="node_id" optional="true"/>
<description>The purpose of this command is to instruct the Content App to clear the current user account.</description>
<arg id="0" name="Node" type="node_id" optional="true"/>
<mandatoryConform/>
</command>

<command source="server" code="0x01" name="GetSetupPINResponse" optional="false" disableDefaultResponse="true">
<description>This message is sent in response to the GetSetupPIN Request, and contains the Setup PIN code, or null when the accounts identified in the request does not match the active account of the running Content App.</description>
<arg name="SetupPIN" type="char_string"/>
<command source="server" code="0x01" name="GetSetupPINResponse" optional="false" disableDefaultResponse="true" isFabricScoped="true">
<description>This message is sent in response to the GetSetupPIN command, and contains the Setup PIN code, or null when the account identified in the request does not match the active account of the running Content App.</description>
<arg id="0" name="SetupPIN" type="char_string"/>
<mandatoryConform/>
</command>

<event side="server" code="0x00" priority="critical" name="LoggedOut" optional="false">
<description>This event can be used by the Content App to indicate that the current user has logged out. In response to this event, the Fabric Admin SHALL remove access to this Content App by the specified Node. If no Node is provided, then the Fabric Admin SHALL remove access to all non-Admin Nodes.</description>
<event side="server" code="0x00" priority="critical" name="LoggedOut" optional="true" isFabricSensitive="true">
<description>This event can be used by the Content App to indicate that the current user has logged out.</description>
<field id="0" name="Node" type="node_id" optional="true"/>
<optionalConform/>
<access op="read" privilege="administer"/>
</event>

</cluster>
Expand Down
Loading

0 comments on commit 4959f39

Please sign in to comment.