Skip to content

Commit

Permalink
Smoke/CO: Update XML to spec changes (#26735)
Browse files Browse the repository at this point in the history
* Smoke/CO: Update XML to spec changes

* Remove Unknown Enum states
* Update description
* Regen zap

Close #26705

* Update Darwin availability annotations.

---------

Co-authored-by: Hare <renilr0@outlook.com>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
  • Loading branch information
3 people authored and pull[bot] committed Dec 22, 2023
1 parent 3fc52ed commit 1053814
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ limitations under the License.
<description>This event SHALL be generated when the DeviceMuted attribute changes to True.</description>
</event>
<event side="server" code="0x07" name="MuteEnded" priority="info" optional="true">
<description>This event SHALL be generated when DeviceMuted attribute changes to False.</description>
<description>This event SHALL be generated when DeviceMuted attribute changes to NotMuted.</description>
</event>
<event side="server" code="0x08" name="InterconnectSmokeAlarm" priority="info" optional="true">
<description>This event SHALL be generated when the device hosting the cluster receives a remote smoke alarm.</description>
<description>This event SHALL be generated when the device hosting the cluster receives a smoke alarm from an interconnected sensor.</description>
</event>
<event side="server" code="0x09" name="InterconnectCOAlarm" priority="info" optional="true">
<description>This event SHALL be generated when the device hosting the cluster receives a remote CO alarm.</description>
<description>This event SHALL be generated when the device hosting the cluster receives a CO alarm from an interconnected sensor.</description>
</event>
<event side="server" code="0x0A" name="AllClear" priority="info" optional="false">
<description>This event SHALL be generated when ExpressedState attribute returns to Normal state.</description>
Expand All @@ -96,10 +96,9 @@ limitations under the License.
<!-- Cluster data types -->
<enum name="AlarmStateEnum" type="ENUM8">
<cluster code="0x005C" />
<item value="0" name="Unknown" />
<item value="1" name="Normal" />
<item value="2" name="Warning" />
<item value="3" name="Critical" />
<item value="0" name="Normal" />
<item value="1" name="Warning" />
<item value="2" name="Critical" />
</enum>

<enum name="SensitivityEnum" type="ENUM8">
Expand All @@ -124,25 +123,22 @@ limitations under the License.

<enum name="MuteStateEnum" type="ENUM8">
<cluster code="0x005C" />
<item value="0" name="Unknown" />
<item value="1" name="NotMuted" />
<item value="2" name="Muted" />
<item value="0" name="NotMuted" />
<item value="1" name="Muted" />
</enum>

<enum name="EndOfServiceEnum" type="ENUM8">
<cluster code="0x005C" />
<item value="0" name="Unknown" />
<item value="1" name="Expired" />
<item value="2" name="Normal" />
<item value="0" name="Expired" />
<item value="1" name="Normal" />
</enum>

<enum name="ContaminationStateEnum" type="ENUM8">
<cluster code="0x005C" />
<item value="0" name="Unknown" />
<item value="1" name="Normal" />
<item value="2" name="Low" />
<item value="3" name="Warning" />
<item value="4" name="Critical" />
<item value="0" name="Normal" />
<item value="1" name="Low" />
<item value="2" name="Warning" />
<item value="3" name="Critical" />
</enum>

<bitmap name="Feature" type="BITMAP32">
Expand Down
26 changes: 11 additions & 15 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2869,24 +2869,21 @@ client cluster AirQuality = 91 {
/** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */
client cluster SmokeCoAlarm = 92 {
enum AlarmStateEnum : ENUM8 {
kUnknown = 0;
kNormal = 1;
kWarning = 2;
kCritical = 3;
kNormal = 0;
kWarning = 1;
kCritical = 2;
}

enum ContaminationStateEnum : ENUM8 {
kUnknown = 0;
kNormal = 1;
kLow = 2;
kWarning = 3;
kCritical = 4;
kNormal = 0;
kLow = 1;
kWarning = 2;
kCritical = 3;
}

enum EndOfServiceEnum : ENUM8 {
kUnknown = 0;
kExpired = 1;
kNormal = 2;
kExpired = 0;
kNormal = 1;
}

enum ExpressedStateEnum : ENUM8 {
Expand All @@ -2902,9 +2899,8 @@ client cluster SmokeCoAlarm = 92 {
}

enum MuteStateEnum : ENUM8 {
kUnknown = 0;
kNotMuted = 1;
kMuted = 2;
kNotMuted = 0;
kMuted = 1;
}

enum SensitivityEnum : ENUM8 {
Expand Down
34 changes: 15 additions & 19 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.

4 changes: 0 additions & 4 deletions src/darwin/Framework/CHIP/templates/availability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7678,18 +7678,15 @@
- Unlatch
SmokeCOAlarm:
AlarmStateEnum:
- Unknown
- Normal
- Warning
- Critical
ContaminationStateEnum:
- Unknown
- Normal
- Low
- Warning
- Critical
EndOfServiceEnum:
- Unknown
- Expired
- Normal
ExpressedStateEnum:
Expand All @@ -7703,7 +7700,6 @@
- InterconnectSmoke
- InterconnectCO
MuteStateEnum:
- Unknown
- NotMuted
- Muted
SensitivityEnum:
Expand Down
26 changes: 11 additions & 15 deletions src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

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.

34 changes: 15 additions & 19 deletions zzz_generated/app-common/app-common/zap-generated/cluster-enums.h

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

0 comments on commit 1053814

Please sign in to comment.