From b791a17624ba216a5f22ab049d01a8c8ebec3018 Mon Sep 17 00:00:00 2001 From: Carol Yang Date: Mon, 13 Dec 2021 06:16:45 -0800 Subject: [PATCH] [OTA] Align StatusEnum data type with spec (#12928) --- src/app/clusters/ota-requestor/OTARequestor.cpp | 3 ++- src/app/zap-templates/zcl/data-model/chip/chip-ota.xml | 1 + src/controller/python/chip/clusters/Objects.py | 1 + .../app-common/app-common/zap-generated/cluster-objects.h | 7 ++++--- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index 4bdb2e481b334b..240dea1914fcfc 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -140,7 +140,8 @@ void OTARequestor::OnQueryImageResponse(void * context, const QueryImageResponse break; case OTAQueryStatus::kNotAvailable: break; - // TODO: Add download protocol not supported + case OTAQueryStatus::kDownloadProtocolNotSupported: + break; // Issue #9524 should handle all response status appropriately default: break; diff --git a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml index aaf38d4fdea1a4..8532dc4f7bc4e1 100644 --- a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml +++ b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml @@ -21,6 +21,7 @@ limitations under the License. + diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 6468b2e8d3507e..dae3beae401d44 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -6535,6 +6535,7 @@ class OTAQueryStatus(IntEnum): kUpdateAvailable = 0x00 kBusy = 0x01 kNotAvailable = 0x02 + kDownloadProtocolNotSupported = 0x03 diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 8f498bc240ea88..8cefe4c9e4d7c4 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -7699,9 +7699,10 @@ using OTADownloadProtocol = EmberAfOTADownloadProtocol; // Enum for OTAQueryStatus enum class OTAQueryStatus : uint8_t { - kUpdateAvailable = 0x00, - kBusy = 0x01, - kNotAvailable = 0x02, + kUpdateAvailable = 0x00, + kBusy = 0x01, + kNotAvailable = 0x02, + kDownloadProtocolNotSupported = 0x03, }; namespace Commands {