blob: 9cdf36f0149f5f0fc09dce0074c009bba966374c [file] [log] [blame]
<?xml version="1.0"?>
<!--
Copyright (c) 2021 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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>
<domain name="CHIP"/>
<struct name="SemanticTagStruct">
<cluster code="0x0050"/>
<item name="MfgCode" type="vendor_id"/>
<item name="Value" type="ENUM16" optional="false"/>
</struct>
<struct name="ModeOptionStruct">
<cluster code="0x0050"/>
<item name="Label" type="CHAR_STRING" optional="false" length="64"/>
<item name="Mode" type="INT8U" optional="false"/>
<item name="SemanticTags" type="SemanticTagStruct" array="true" optional="false"/>
</struct>
<cluster>
<domain>General</domain>
<name>Mode Select</name>
<code>0x0050</code>
<define>MODE_SELECT_CLUSTER</define>
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<description>Attributes and commands for selecting a mode from a list of supported options.</description>
<!-- Base data types -->
<attribute side="server" code="0x0000" define="MODE_DESCRIPTION" type="CHAR_STRING" writable="false" optional="false" isNullable="false" length="32">Description</attribute>
<attribute side="server" code="0x0001" define="STANDARD_NAMESPACE" type="ENUM16" writable="false" optional="false" isNullable="true">StandardNamespace</attribute>
<attribute side="server" code="0x0002" define="SUPPORTED_MODES" type="ARRAY" entryType="ModeOptionStruct" writable="false" optional="false" isNullable="false">SupportedModes</attribute>
<attribute side="server" code="0x0003" define="CURRENT_MODE" type="INT8U" writable="false" optional="false" isNullable="false" reportable="true">CurrentMode</attribute>
<attribute side="server" code="0x0004" define="START_UP_MODE" type="INT8U" writable="true" optional="true" isNullable="true">StartUpMode</attribute>
<attribute side="server" code="0x0005" define="ON_MODE" type="INT8U" writable="true" optional="true" isNullable="true">OnMode</attribute>
<!-- Test Commands -->
<command source="client" code="0x00" name="ChangeToMode" optional="false">
<description>
On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response.
</description>
<arg name="NewMode" type="INT8U" />
</command>
</cluster>
<bitmap name="Feature" type="BITMAP32">
<cluster code="0x0050"/>
<field name="DEPONOFF" mask="0x1"/>
</bitmap>
</configurator>