Skip to content

Commit 2450082

Browse files
yufengwangcapull[bot]
authored andcommitted
Add event definitions for OTA Software Update Requestor cluster (#12004)
* Add event definations for OTA Software Update Requestor cluster * Run codegen
1 parent 53c8d23 commit 2450082

File tree

5 files changed

+435
-0
lines changed

5 files changed

+435
-0
lines changed

src/app/zap-templates/zcl/data-model/chip/chip-ota.xml

+39
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,26 @@ limitations under the License.
8787
<item name="UpdateAvailable" value="0x1"/>
8888
<item name="UrgentUpdateAvailable" value="0x2"/>
8989
</enum>
90+
<enum name="UpdateStateEnum" type="ENUM8">
91+
<cluster code="0x002a"/>
92+
<item name="Unknown" value="0x0"/>
93+
<item name="Idle" value="0x1"/>
94+
<item name="Querying" value="0x2"/>
95+
<item name="DelayedOnQuery" value="0x3"/>
96+
<item name="Downloading" value="0x4"/>
97+
<item name="Applying" value="0x5"/>
98+
<item name="DelayedOnApply" value="0x6"/>
99+
<item name="RollingBack" value="0x7"/>
100+
<item name="DelayedOnUserConsent" value="0x8"/>
101+
</enum>
102+
<enum name="ChangeReasonEnum" type="ENUM8">
103+
<cluster code="0x002a"/>
104+
<item name="Unknown" value="0x0"/>
105+
<item name="Success" value="0x1"/>
106+
<item name="Failure" value="0x2"/>
107+
<item name="TimeOut" value="0x3"/>
108+
<item name="DelayByProvider" value="0x4"/>
109+
</enum>
90110
<cluster>
91111
<name>OTA Software Update Requestor</name>
92112
<domain>CHIP</domain>
@@ -104,5 +124,24 @@ limitations under the License.
104124
<arg name="announcementReason" type="OTAAnnouncementReason"/>
105125
<arg name="metadataForNode" type="OCTET_STRING" length="512" optional="true"/>
106126
</command>
127+
<event side="server" code="0x00" name="StateTransition" priority="info" optional="false">
128+
<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>
129+
<field id="0" name="PreviousState" type="UpdateStateEnum"/>
130+
<field id="1" name="NewState" type="UpdateStateEnum"/>
131+
<field id="2" name="Reason" type="ChangeReasonEnum"/>
132+
<field id="3" name="TargetSoftwareVersion" type="INT32U"/>
133+
</event>
134+
<event side="server" code="0x01" name="VersionApplied" priority="critical" optional="false">
135+
<description>This event SHALL be generated whenever a new version starts executing after being applied due to a software update.</description>
136+
<field id="0" name="SoftwareVersion" type="INT32U"/>
137+
<field id="1" name="ProductID" type="INT16U"/>
138+
</event>
139+
<event side="server" code="0x02" name="DownloadError" priority="info" optional="false">
140+
<description>This event SHALL be generated whenever an error occurs during OTA Requestor download operation.</description>
141+
<field id="0" name="SoftwareVersion" type="INT32U"/>
142+
<field id="1" name="BytesDownloaded" type="INT64U"/>
143+
<field id="2" name="ProgressPercent" type="INT8U"/>
144+
<field id="3" name="PlatformCode" type="INT64S"/>
145+
</event>
107146
</cluster>
108147
</configurator>

src/controller/python/chip/clusters/Objects.py

+85
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp

+131
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)