Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate EnergyPreference cluster with Alchemy #38063

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2023 Project CHIP Authors
Copyright (c) 2023-2025 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.
You may obtain a copy of the License at
Expand All @@ -11,7 +11,13 @@ 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/EnergyPreference.adoc
Parameters: in-progress
Git:
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="Energy Management"/>
<cluster apiMaturity="provisional">
<name>Energy Preference</name>
Expand All @@ -23,23 +29,20 @@ limitations under the License.
<description>This cluster provides an interface to specify preferences for how devices should consume energy.</description>
<!--Attributes-->
<globalAttribute side="either" code="0xFFFD" value="1"/>

<features>
<feature bit="0" code="BALA" name="EnergyBalance" summary="Device can balance energy consumption vs. another priority">
<optionalConform choice="a" more="true"/>
<optionalConform choice="a" more="true" min="1"/>
</feature>
<feature bit="1" code="LPMS" name="LowPowerModeSensitivity" summary="Device can adjust the conditions for entering a low power mode">
<optionalConform choice="a" more="true"/>
<optionalConform choice="a" more="true" min="1"/>
</feature>
</features>

<!--Conformance feature BALA - for now optional-->
<attribute code="0x0000" side="server" name="EnergyBalances" type="array" entryType="BalanceStruct" define="ENERGY_PREFERENCE_ENERGY_BALANCES" min="2" max="10" optional="true">
<attribute code="0x0000" side="server" name="EnergyBalances" type="array" entryType="BalanceStruct" define="ENERGY_PREFERENCE_ENERGY_BALANCES" optional="true" length="10" minLength="2">
<mandatoryConform>
<feature name="BALA"/>
</mandatoryConform>
</attribute>

<!--Conformance feature BALA - for now optional-->
<attribute code="0x0001" side="server" name="CurrentEnergyBalance" type="int8u" define="ENERGY_PREFERENCE_CURRENT_ENERGY_BALANCE" writable="true" optional="true">
<access op="read" privilege="view"/>
Expand All @@ -48,31 +51,26 @@ limitations under the License.
<feature name="BALA"/>
</mandatoryConform>
</attribute>

<!--Conformance feature BALA - for now optional-->
<attribute code="0x0002" side="server" name="EnergyPriorities" type="array" entryType="EnergyPriorityEnum" define="ENERGY_PREFERENCE_ENERGY_PRIORITIES" max="2" optional="true">
<attribute code="0x0002" side="server" name="EnergyPriorities" type="array" entryType="EnergyPriorityEnum" define="ENERGY_PREFERENCE_ENERGY_PRIORITIES" optional="true" length="2" minLength="2">
<mandatoryConform>
<feature name="BALA"/>
</mandatoryConform>
</attribute>

<!--Conformance feature LPMS - for now optional-->
<attribute code="0x0003" side="server" name="LowPowerModeSensitivities" type="array" entryType="BalanceStruct" define="ENERGY_PREFERENCE_LOW_POWER_MODE_SENSITIVITIES" min="2" max="10" optional="true">
<attribute code="0x0003" side="server" name="LowPowerModeSensitivities" type="array" entryType="BalanceStruct" define="ENERGY_PREFERENCE_LOW_POWER_MODE_SENSITIVITIES" optional="true" length="10" minLength="2">
<mandatoryConform>
<feature name="LPMS"/>
</mandatoryConform>
</attribute>

<!--Conformance feature LPMS - for now optional-->
<attribute code="0x0004" side="server" type="int8u" define="ENERGY_PREFERENCE_CURRENT_LOW_POWER_MODE_SENSITIVITY" writable="true" optional="true">
<attribute code="0x0004" side="server" name="CurrentLowPowerModeSensitivity" type="int8u" define="ENERGY_PREFERENCE_CURRENT_LOW_POWER_MODE_SENSITIVITY" writable="true" optional="true">
<access op="read" privilege="view"/>
<access op="write" privilege="operate"/>
<description>CurrentLowPowerModeSensitivity</description>
<mandatoryConform>
<feature name="LPMS"/>
</mandatoryConform>
</attribute>

</cluster>

<enum name="EnergyPriorityEnum" type="enum8">
Expand All @@ -85,8 +83,7 @@ limitations under the License.

<struct name="BalanceStruct">
<cluster code="0x009B"/>
<item name="Step" type="percent"/>
<item name="Label" type="char_string" optional="true" length="64"/>
<item fieldId="0" name="Step" type="percent"/>
<item fieldId="1" name="Label" type="char_string" optional="true" length="64"/>
</struct>

</configurator>
Loading