Skip to content

Commit

Permalink
[Scenes] Legacy removal (#31178)
Browse files Browse the repository at this point in the history
* Updated xml files

* Reworked .zap and .matter files

* Updated Yaml testing related scripts to allow Zap generate all

* Removed enhanced commands from device types

* Regenerated Zap files

* Refactored the code for changes, modified the test to use the new times in ms

* Attempt at Darwin availability modification

* Update the test according to the legacy removal from the test plan

* Reverted the change of TransitionTime to TransitionTimeMS

* Restyled by prettier-yaml

* Updated yaml tests

* Added qpg files

* Update src/app/clusters/scenes-server/SceneTable.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Reverted availability.yaml changes and added failure on max transition time test

* Restyled by whitespace

* Restyled by prettier-yaml

* Modified the test to have a value closer to the max tolerated

---------

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 8, 2024
1 parent 3531f82 commit 2303481
Show file tree
Hide file tree
Showing 82 changed files with 4,959 additions and 11,547 deletions.
131 changes: 9 additions & 122 deletions data_model/clusters/Scenes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,13 @@ Davis, CA 95616, USA
<feature bit="0" code="SN" name="SceneNames" summary="The ability to store a name for a scene.">
<optionalConform/>
</feature>
<feature bit="1" code="EX" name="Explicit" summary="Use explicit attribute IDs, not implicit based on order">
<mandatoryConform/>
</feature>
<feature bit="2" code="TS" name="TableSize" summary="Table size and remaining capacity supported">
<mandatoryConform/>
</feature>
<feature bit="3" code="FS" name="FabricScenes" summary="Supports current scene, count, group etc, as fabric-scoped.">
<mandatoryConform/>
</feature>
</features>
<dataTypes>
<bitmap name="CopyModeBitmap">
<bitfield name="CopyAllScenes" bit="0" summary="Copy all scenes in the scene table">
<mandatoryConform/>
</bitfield>
</bitmap>
<bitmap name="NameSupportBitmap">
<bitfield name="SceneNames" bit="7" summary="The ability to store a name for a scene.">
<mandatoryConform/>
</bitfield>
</bitmap>
<struct name="AttributeValuePairStruct">
<field id="0" name="AttributeID" type="attribute-id">
<access read="true" write="true"/>
Expand Down Expand Up @@ -157,17 +143,13 @@ Davis, CA 95616, USA
</mandatoryConform>
<constraint type="maxLength" value="16"/>
</field>
<field id="3" name="SceneTransitionTime" type="uint16" default="0">
<field id="3" name="SceneTransitionTime" type="uint32" default="0">
<mandatoryConform/>
</field>
<field id="4" name="ExtensionFields" type="list" default="empty">
<entry type="ExtensionFieldSetStruct"/>
<mandatoryConform/>
</field>
<field id="5" name="TransitionTime100ms" type="uint8" default="0">
<mandatoryConform/>
<constraint type="max" value="9"/>
</field>
</struct>
<struct name="SceneInfoStruct">
<field id="0" name="SceneCount" type="uint8" default="0">
Expand Down Expand Up @@ -197,43 +179,6 @@ Davis, CA 95616, USA
</struct>
</dataTypes>
<attributes>
<attribute id="0x0000" name="SceneCount" type="uint8" default="0">
<access read="true" readPrivilege="view"/>
<mandatoryConform>
<notTerm>
<feature name="FS"/>
</notTerm>
</mandatoryConform>
</attribute>
<attribute id="0x0001" name="CurrentScene" type="uint8" default="0">
<access read="true" readPrivilege="view"/>
<mandatoryConform>
<notTerm>
<feature name="FS"/>
</notTerm>
</mandatoryConform>
</attribute>
<attribute id="0x0002" name="CurrentGroup" type="group-id" default="0">
<access read="true" readPrivilege="view"/>
<mandatoryConform>
<notTerm>
<feature name="FS"/>
</notTerm>
</mandatoryConform>
</attribute>
<attribute id="0x0003" name="SceneValid" type="bool" default="False">
<access read="true" readPrivilege="view"/>
<mandatoryConform>
<notTerm>
<feature name="FS"/>
</notTerm>
</mandatoryConform>
</attribute>
<attribute id="0x0004" name="NameSupport" type="NameSupportBitmap" default="0">
<access read="true" readPrivilege="view"/>
<mandatoryConform/>
<constraint type="desc"/>
</attribute>
<attribute id="0x0005" name="LastConfiguredBy" type="node-id" default="null">
<access read="true" readPrivilege="view"/>
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false"/>
Expand Down Expand Up @@ -266,9 +211,9 @@ Davis, CA 95616, USA
<field id="1" name="SceneID" type="uint8">
<mandatoryConform/>
</field>
<field id="2" name="TransitionTime" type="uint16">
<field id="2" name="TransitionTime" type="uint32">
<mandatoryConform/>
<constraint type="max" value="6000"/>
<constraint type="max" value="6000000"/>
</field>
<field id="3" name="SceneName" type="string">
<mandatoryConform/>
Expand Down Expand Up @@ -317,8 +262,8 @@ Davis, CA 95616, USA
<field id="2" name="SceneID" type="uint8">
<mandatoryConform/>
</field>
<field id="3" name="TransitionTime" type="uint16">
<constraint type="max" value="6000"/>
<field id="3" name="TransitionTime" type="uint32">
<constraint type="max" value="6000000"/>
</field>
<field id="4" name="SceneName" type="string">
<constraint type="maxLength" value="16"/>
Expand Down Expand Up @@ -402,10 +347,10 @@ Davis, CA 95616, USA
<field id="1" name="SceneID" type="uint8">
<mandatoryConform/>
</field>
<field id="2" name="TransitionTime" type="uint16">
<field id="2" name="TransitionTime" type="uint32">
<quality nullable="true"/>
<optionalConform/>
<constraint type="max" value="60000"/>
<constraint type="max" value="60000000"/>
</field>
</command>
<command id="0x06" name="GetSceneMembership" response="GetSceneMembershipResponse">
Expand Down Expand Up @@ -433,65 +378,7 @@ Davis, CA 95616, USA
<entry type="uint8"/>
</field>
</command>
<command id="0x40" name="EnhancedAddScene" response="EnhancedAddSceneResponse">
<access invokePrivilege="manage"/>
<optionalConform/>
<field id="0" name="GroupID" type="group-id">
<mandatoryConform/>
</field>
<field id="1" name="SceneID" type="uint8">
<mandatoryConform/>
</field>
<field id="2" name="TransitionTime" type="uint16">
<mandatoryConform/>
<constraint type="max" value="60000"/>
</field>
<field id="3" name="SceneName" type="string">
<mandatoryConform/>
<constraint type="maxLength" value="16"/>
</field>
<field id="4" name="ExtensionFieldSetStructs" type="list">
<entry type="ExtensionFieldSetStruct"/>
<mandatoryConform/>
<constraint type="desc"/>
</field>
</command>
<command id="0x40" name="EnhancedAddSceneResponse" direction="responseFromServer">
<access invokePrivilege="operate"/>
<mandatoryConform>
<attribute name="EnhancedAddScene"/>
</mandatoryConform>
</command>
<command id="0x41" name="EnhancedViewScene" response="EnhancedViewSceneResponse">
<access invokePrivilege="operate"/>
<optionalConform/>
</command>
<command id="0x41" name="EnhancedViewSceneResponse" direction="responseFromServer">
<access invokePrivilege="operate"/>
<mandatoryConform>
<attribute name="EnhancedViewScene"/>
</mandatoryConform>
<field id="0" name="Status" type="status">
<mandatoryConform/>
<constraint type="desc"/>
</field>
<field id="1" name="GroupID" type="group-id">
<mandatoryConform/>
</field>
<field id="2" name="SceneID" type="uint8">
<mandatoryConform/>
</field>
<field id="3" name="TransitionTime" type="uint16">
<constraint type="max" value="60000"/>
</field>
<field id="4" name="SceneName" type="string">
<constraint type="maxLength" value="16"/>
</field>
<field id="5" name="ExtensionFieldSetStructs" type="list">
<entry type="ExtensionFieldSetStruct"/>
</field>
</command>
<command id="0x42" name="CopyScene" response="CopySceneResponse">
<command id="0x40" name="CopyScene" response="CopySceneResponse">
<access invokePrivilege="manage"/>
<optionalConform/>
<field id="0" name="Mode" type="CopyModeBitmap">
Expand All @@ -511,7 +398,7 @@ Davis, CA 95616, USA
<mandatoryConform/>
</field>
</command>
<command id="0x42" name="CopySceneResponse" direction="responseFromServer">
<command id="0x40" name="CopySceneResponse" direction="responseFromServer">
<access invokePrivilege="operate"/>
<mandatoryConform>
<attribute name="CopyScene"/>
Expand Down
12 changes: 0 additions & 12 deletions data_model/device_types/ColorTemperatureLight.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@ Davis, CA 95616, USA
<mandatoryConform/>
</otherwiseConform>
<commands>
<command id="" name="EnhancedAddScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="EnhancedViewScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="CopyScene">
<otherwiseConform>
<provisionalConform/>
Expand Down
12 changes: 0 additions & 12 deletions data_model/device_types/DimmableLight.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@ Davis, CA 95616, USA
<mandatoryConform/>
</otherwiseConform>
<commands>
<command id="" name="EnhancedAddScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="EnhancedViewScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="CopyScene">
<otherwiseConform>
<provisionalConform/>
Expand Down
12 changes: 0 additions & 12 deletions data_model/device_types/DimmablePlug-InUnit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@ Davis, CA 95616, USA
<mandatoryConform/>
</otherwiseConform>
<commands>
<command id="" name="EnhancedAddScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="EnhancedViewScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="CopyScene">
<otherwiseConform>
<provisionalConform/>
Expand Down
12 changes: 0 additions & 12 deletions data_model/device_types/ExtendedColorLight.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@ Davis, CA 95616, USA
<mandatoryConform/>
</otherwiseConform>
<commands>
<command id="" name="EnhancedAddScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="EnhancedViewScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="CopyScene">
<otherwiseConform>
<provisionalConform/>
Expand Down
12 changes: 0 additions & 12 deletions data_model/device_types/OnOffLight.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@ Davis, CA 95616, USA
<mandatoryConform/>
</otherwiseConform>
<commands>
<command id="" name="EnhancedAddScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="EnhancedViewScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="CopyScene">
<otherwiseConform>
<provisionalConform/>
Expand Down
12 changes: 0 additions & 12 deletions data_model/device_types/OnOffPlug-inUnit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@ Davis, CA 95616, USA
<mandatoryConform/>
</otherwiseConform>
<commands>
<command id="" name="EnhancedAddScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="EnhancedViewScene">
<otherwiseConform>
<provisionalConform/>
<mandatoryConform/>
</otherwiseConform>
</command>
<command id="" name="CopyScene">
<otherwiseConform>
<provisionalConform/>
Expand Down
Loading

0 comments on commit 2303481

Please sign in to comment.