blob: 99d2fc6483e39680e29ad0dcee6b01990cc0bbbb [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" spec="chip-0.7" dependsOn="zcl-1.0-07-5123-03" certifiable="true"/>
<enum name="OTAQueryStatus" type="ENUM8">
<cluster code="0x0029"/>
<item name="UpdateAvailable" value="0x0"/>
<item name="Busy" value="0x1"/>
<item name="NotAvailable" value="0x2"/>
<item name="DownloadProtocolNotSupported" value="0x3"/>
</enum>
<enum name="OTAApplyUpdateAction" type="ENUM8">
<cluster code="0x0029"/>
<item name="Proceed" value="0x0"/>
<item name="AwaitNextAction" value="0x1"/>
<item name="Discontinue" value="0x2"/>
</enum>
<enum name="OTADownloadProtocol" type="ENUM8">
<cluster code="0x0029"/>
<item name="BDXSynchronous" value="0x0"/>
<item name="BDXAsynchronous" value="0x1"/>
<item name="HTTPS" value="0x2"/>
<item name="VendorSpecific" value="0x3"/>
</enum>
<cluster>
<name>OTA Software Update Provider</name>
<domain>CHIP</domain>
<description>Provides an interface for providing OTA software updates</description>
<code>0x0029</code>
<define>OTA_PROVIDER_CLUSTER</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
<command source="client" code="0x00" name="QueryImage" response="QueryImageResponse" optional="false" cli="chip ota queryimage">
<description>Determine availability of a new Software Image</description>
<arg name="vendorId" type="vendor_id"/>
<arg name="productId" type="INT16U"/>
<arg name="softwareVersion" type="INT32U"/>
<arg name="protocolsSupported" type="OTADownloadProtocol" array="true"/>
<arg name="hardwareVersion" type="INT16U" optional="true"/>
<arg name="location" type="CHAR_STRING" length="2" optional="true"/>
<arg name="requestorCanConsent" type="BOOLEAN" default="false" optional="true"/>
<arg name="metadataForProvider" type="OCTET_STRING" length="512" optional="true"/>
</command>
<command source="server" code="0x01" name="QueryImageResponse" optional="false" cli="chip ota queryimageresponse">
<description>Response to QueryImage command</description>
<arg name="status" type="OTAQueryStatus"/>
<arg name="delayedActionTime" type="INT32U" optional="true"/>
<arg name="imageURI" type="CHAR_STRING" length="256" optional="true"/>
<arg name="softwareVersion" type="INT32U" optional="true"/>
<arg name="softwareVersionString" type="CHAR_STRING" length="64" optional="true"/>
<arg name="updateToken" type="OCTET_STRING" length="32" optional="true"/>
<arg name="userConsentNeeded" type="BOOLEAN" default="false" optional="true"/>
<arg name="metadataForRequestor" type="OCTET_STRING" length="512" optional="true"/>
</command>
<command source="client" code="0x02" name="ApplyUpdateRequest" response="ApplyUpdateResponse" optional="false" cli="chip ota applyupdaterequest">
<description>Determine next action to take for a downloaded Software Image</description>
<arg name="updateToken" type="OCTET_STRING" length="32"/>
<arg name="newVersion" type="INT32U"/>
</command>
<command source="server" code="0x03" name="ApplyUpdateResponse" optional="false" cli="chip ota applyupdateresponse">
<description>Reponse to ApplyUpdateRequest command</description>
<arg name="action" type="OTAApplyUpdateAction"/>
<arg name="delayedActionTime" type="INT32U"/>
</command>
<command source="client" code="0x04" name="NotifyUpdateApplied" optional="false" cli="chip ota notifyupdateapplied">
<description>Notify OTA Provider that an update was applied</description>
<arg name="updateToken" type="OCTET_STRING" length="32"/>
<arg name="softwareVersion" type="INT32U"/>
</command>
</cluster>
<enum name="OTAAnnouncementReason" type="ENUM8">
<cluster code="0x002a"/>
<item name="SimpleAnnouncement" value="0x0"/>
<item name="UpdateAvailable" value="0x1"/>
<item name="UrgentUpdateAvailable" value="0x2"/>
</enum>
<enum name="OTAUpdateStateEnum" type="ENUM8">
<cluster code="0x002a"/>
<item name="Unknown" value="0x0"/>
<item name="Idle" value="0x1"/>
<item name="Querying" value="0x2"/>
<item name="DelayedOnQuery" value="0x3"/>
<item name="Downloading" value="0x4"/>
<item name="Applying" value="0x5"/>
<item name="DelayedOnApply" value="0x6"/>
<item name="RollingBack" value="0x7"/>
<item name="DelayedOnUserConsent" value="0x8"/>
</enum>
<enum name="OTAChangeReasonEnum" type="ENUM8">
<cluster code="0x002a"/>
<item name="Unknown" value="0x0"/>
<item name="Success" value="0x1"/>
<item name="Failure" value="0x2"/>
<item name="TimeOut" value="0x3"/>
<item name="DelayByProvider" value="0x4"/>
</enum>
<struct name="ProviderLocation" isFabricScoped="true">
<cluster code="0x002a"/>
<item fieldId="1" name="ProviderNodeID" type="node_id"/>
<item fieldId="2" name="Endpoint" type="endpoint_no"/>
</struct>
<cluster>
<name>OTA Software Update Requestor</name>
<domain>CHIP</domain>
<description>Provides an interface for downloading and applying OTA software updates</description>
<code>0x002a</code>
<define>OTA_REQUESTOR_CLUSTER</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
<attribute side="server" code="0x0000" define="DEFAULT_OTA_PROVIDERS" type="ARRAY" entryType="ProviderLocation" writable="true" optional="false">DefaultOtaProviders</attribute>
<attribute side="server" code="0x0001" define="UPDATE_POSSIBLE" type="BOOLEAN" default="true" writable="false" optional="false">UpdatePossible</attribute>
<attribute side="server" code="0x0002" define="UPDATE_STATE" type="OTAUpdateStateEnum" default="Unknown" writable="false" optional="false">UpdateState</attribute>
<attribute side="server" code="0x0003" define="UPDATE_STATE_PROGRESS" type="INT8U" min="0" max="100" writable="false" isNullable="true" optional="false">UpdateStateProgress</attribute>
<command source="client" code="0x00" name="AnnounceOtaProvider" optional="true" cli="chip ota announceotaprovider">
<description>Announce the presence of an OTA Provider</description>
<arg name="providerNodeId" type="node_id"/>
<arg name="vendorId" type="vendor_id"/>
<arg name="announcementReason" type="OTAAnnouncementReason"/>
<arg name="metadataForNode" type="OCTET_STRING" length="512" optional="true"/>
<arg name="endpoint" type="endpoint_no"/>
</command>
<event side="server" code="0x00" name="StateTransition" priority="info" optional="false">
<description>This event SHALL be generated when a change of the UpdateState attribute occurs due to an OTA Requestor moving through the states necessary to query for updates.</description>
<field id="0" name="PreviousState" type="OTAUpdateStateEnum"/>
<field id="1" name="NewState" type="OTAUpdateStateEnum"/>
<field id="2" name="Reason" type="OTAChangeReasonEnum"/>
<field id="3" name="TargetSoftwareVersion" type="INT32U" isNullable="true"/>
</event>
<event side="server" code="0x01" name="VersionApplied" priority="critical" optional="false">
<description>This event SHALL be generated whenever a new version starts executing after being applied due to a software update.</description>
<field id="0" name="SoftwareVersion" type="INT32U"/>
<field id="1" name="ProductID" type="INT16U"/>
</event>
<event side="server" code="0x02" name="DownloadError" priority="info" optional="false">
<description>This event SHALL be generated whenever an error occurs during OTA Requestor download operation.</description>
<field id="0" name="SoftwareVersion" type="INT32U"/>
<field id="1" name="BytesDownloaded" type="INT64U"/>
<field id="2" name="ProgressPercent" type="INT8U" min="0" max="100" isNullable="true"/>
<field id="3" name="PlatformCode" type="INT64S" isNullable="true"/>
</event>
</cluster>
</configurator>