Skip to content

Commit

Permalink
Updated the onoff-cluster.xml to use the specifications type definiti…
Browse files Browse the repository at this point in the history
…ons, instead of using the enum* directly. See issue project-chip#15528.

Rebuilt all-clusters-app, chip-tool, and re-generated zzz files.
  • Loading branch information
Eugen Feraru committed Mar 18, 2022
1 parent 046100b commit 9f2552a
Show file tree
Hide file tree
Showing 34 changed files with 430 additions and 181 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2247,6 +2247,12 @@ server cluster OccupancySensing = 1030 {
}

server cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down Expand Up @@ -2274,7 +2280,7 @@ server cluster OnOff = 6 {
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute enum8 startUpOnOff = 16387;
attribute DlStartUpOnOff startUpOnOff = 16387;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

Expand Down
6 changes: 6 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,12 @@ server cluster NetworkCommissioning = 49 {
}

server cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 {
}

client cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down Expand Up @@ -1096,7 +1102,7 @@ client cluster OnOff = 6 {
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute enum8 startUpOnOff = 16387;
attribute DlStartUpOnOff startUpOnOff = 16387;
readonly global attribute attrib_id attributeList[] = 65531;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;
Expand Down
8 changes: 7 additions & 1 deletion examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,12 @@ server cluster OccupancySensing = 1030 {
}

server cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down Expand Up @@ -1174,7 +1180,7 @@ server cluster OnOff = 6 {
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute enum8 startUpOnOff = 16387;
attribute DlStartUpOnOff startUpOnOff = 16387;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

Expand Down
8 changes: 7 additions & 1 deletion examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 {
}

server cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down Expand Up @@ -660,7 +666,7 @@ server cluster OnOff = 6 {
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute enum8 startUpOnOff = 16387;
attribute DlStartUpOnOff startUpOnOff = 16387;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

Expand Down
16 changes: 14 additions & 2 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,12 @@ server cluster NetworkCommissioning = 49 {
}

client cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down Expand Up @@ -1162,7 +1168,7 @@ client cluster OnOff = 6 {
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute enum8 startUpOnOff = 16387;
attribute DlStartUpOnOff startUpOnOff = 16387;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

Expand All @@ -1186,6 +1192,12 @@ client cluster OnOff = 6 {
}

server cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down Expand Up @@ -1213,7 +1225,7 @@ server cluster OnOff = 6 {
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute enum8 startUpOnOff = 16387;
attribute DlStartUpOnOff startUpOnOff = 16387;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

Expand Down
8 changes: 7 additions & 1 deletion examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,12 @@ server cluster NetworkCommissioning = 49 {
}

server cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down Expand Up @@ -1150,7 +1156,7 @@ server cluster OnOff = 6 {
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute enum8 startUpOnOff = 16387;
attribute DlStartUpOnOff startUpOnOff = 16387;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

Expand Down
8 changes: 7 additions & 1 deletion examples/pump-app/pump-common/pump-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,12 @@ client cluster OccupancySensing = 1030 {
}

server cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down Expand Up @@ -902,7 +908,7 @@ server cluster OnOff = 6 {
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute enum8 startUpOnOff = 16387;
attribute DlStartUpOnOff startUpOnOff = 16387;
readonly global attribute int16u clusterRevision = 65533;

request struct OffWithEffectRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 {
}

client cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down
6 changes: 6 additions & 0 deletions examples/tv-app/tv-common/tv-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,12 @@ server cluster OtaSoftwareUpdateProvider = 41 {
}

server cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down
16 changes: 14 additions & 2 deletions examples/tv-casting-app/tv-casting-common/tv-casting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2158,6 +2158,12 @@ server cluster OccupancySensing = 1030 {
}

client cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down Expand Up @@ -2185,7 +2191,7 @@ client cluster OnOff = 6 {
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute enum8 startUpOnOff = 16387;
attribute DlStartUpOnOff startUpOnOff = 16387;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

Expand All @@ -2195,6 +2201,12 @@ client cluster OnOff = 6 {
}

server cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down Expand Up @@ -2222,7 +2234,7 @@ server cluster OnOff = 6 {
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute enum8 startUpOnOff = 16387;
attribute DlStartUpOnOff startUpOnOff = 16387;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

Expand Down
9 changes: 8 additions & 1 deletion src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ limitations under the License.
<configurator>
<domain name="General"/>

<enum name="DlStartUpOnOff" type="enum8">
<cluster code="0x0006"/>
<item name="Off" value="0x00"/>
<item name="On" value="0x01"/>
<item name="TogglePreviousOnOff" value="0x02"/>
</enum>

<enum name="OnOffEffectIdentifier" type="enum8">
<cluster code="0x0006"/>
<item name="DelayedAllOff" value="0x00"/>
Expand Down Expand Up @@ -52,7 +59,7 @@ limitations under the License.
<attribute side="server" code="0x4000" define="GLOBAL_SCENE_CONTROL" type="boolean" default="1" optional="true">GlobalSceneControl</attribute>
<attribute side="server" code="0x4001" define="ON_TIME" type="int16u" default="0" writable="true" optional="true">OnTime</attribute>
<attribute side="server" code="0x4002" define="OFF_WAIT_TIME" type="int16u" default="0" writable="true" optional="true">OffWaitTime</attribute>
<attribute side="server" code="0x4003" define="START_UP_ON_OFF" type="enum8" writable="true" optional="true">StartUpOnOff</attribute>
<attribute side="server" code="0x4003" define="START_UP_ON_OFF" type="DlStartUpOnOff" min="0" max="2" writable="true" optional="true">StartUpOnOff</attribute>

<command source="client" code="0x00" name="Off" optional="false">
<description>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.</description>
Expand Down
8 changes: 7 additions & 1 deletion src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2663,6 +2663,12 @@ client cluster OccupancySensing = 1030 {
}

client cluster OnOff = 6 {
enum DlStartUpOnOff : enum8 {
kOff = 0;
kOn = 1;
kTogglePreviousOnOff = 2;
}

enum OnOffDelayedAllOffEffectVariant : enum8 {
kFadeToOffIn0p8Seconds = 0;
kNoFade = 1;
Expand Down Expand Up @@ -2690,7 +2696,7 @@ client cluster OnOff = 6 {
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute enum8 startUpOnOff = 16387;
attribute DlStartUpOnOff startUpOnOff = 16387;
readonly global attribute command_id serverGeneratedCommandList[] = 65528;
readonly global attribute command_id clientGeneratedCommandList[] = 65529;
readonly global attribute attrib_id attributeList[] = 65531;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9f2552a

Please sign in to comment.