Skip to content

Commit

Permalink
Add event definitions for OTA Software Update Requestor cluster (#12004)
Browse files Browse the repository at this point in the history
* Add event definations for OTA Software Update Requestor cluster

* Run codegen
  • Loading branch information
yufengwangca authored and pull[bot] committed Jun 20, 2023
1 parent 8e04594 commit 3961008
Show file tree
Hide file tree
Showing 5 changed files with 435 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/chip-ota.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,26 @@ limitations under the License.
<item name="UpdateAvailable" value="0x1"/>
<item name="UrgentUpdateAvailable" value="0x2"/>
</enum>
<enum name="UpdateStateEnum" 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="ChangeReasonEnum" 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>
<cluster>
<name>OTA Software Update Requestor</name>
<domain>CHIP</domain>
Expand All @@ -104,5 +124,24 @@ limitations under the License.
<arg name="announcementReason" type="OTAAnnouncementReason"/>
<arg name="metadataForNode" type="OCTET_STRING" length="512" optional="true"/>
</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="UpdateStateEnum"/>
<field id="1" name="NewState" type="UpdateStateEnum"/>
<field id="2" name="Reason" type="ChangeReasonEnum"/>
<field id="3" name="TargetSoftwareVersion" type="INT32U"/>
</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"/>
<field id="3" name="PlatformCode" type="INT64S"/>
</event>
</cluster>
</configurator>
85 changes: 85 additions & 0 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.

131 changes: 131 additions & 0 deletions zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp

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

Loading

0 comments on commit 3961008

Please sign in to comment.