Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OTA] Integrate ota-requestor cluster as normal cluster in data model build flow #13256

Merged
merged 1 commit into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

1 change: 0 additions & 1 deletion examples/all-clusters-app/ameba/chip_main.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ list(
${chip_dir}/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp

${chip_dir}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp
${chip_dir}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp
${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp

${chip_dir}/examples/all-clusters-app/ameba/main/chipinterface.cpp
Expand Down
1 change: 0 additions & 1 deletion examples/all-clusters-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import("//build_overrides/chip.gni")
executable("chip-all-clusters-app") {
sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"include/tv-callbacks.cpp",
"include/tv-callbacks.h",
Expand Down
4 changes: 3 additions & 1 deletion examples/all-clusters-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ target_sources(${APP_TARGET} PRIVATE
${CHIP_ROOT}/src/app/server/CommissioningWindowManager.cpp

${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp
${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp
${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp

${APP_UTIL}/DataModelHandler.cpp
Expand Down Expand Up @@ -139,6 +138,9 @@ target_sources(${APP_TARGET} PRIVATE
${APP_CLUSTERS}/general-diagnostics-server/general-diagnostics-server.cpp
${APP_CLUSTERS}/group-key-mgmt-server/group-key-mgmt-server.cpp
${APP_CLUSTERS}/power-source-configuration-server/power-source-configuration-server.cpp
${APP_CLUSTERS}/ota-requestor/ota-requestor-server.cpp
${APP_CLUSTERS}/ota-requestor/BDXDownloader.cpp
${APP_CLUSTERS}/ota-requestor/OTARequestor.cpp
)

target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip)
Expand Down
1 change: 0 additions & 1 deletion examples/all-clusters-app/p6/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ p6_executable("clusters_app") {

sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"${examples_plat_dir}/LEDWidget.cpp",
"${examples_plat_dir}/init_p6Platform.cpp",
Expand Down
9 changes: 0 additions & 9 deletions examples/ota-requestor-app/ota-requestor-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ chip_data_model("ota-requestor-common") {

deps = [ "${chip_root}/src/lib" ]

sources = [
"${chip_root}/src/app/clusters/ota-requestor/BDXDownloader.cpp",
"${chip_root}/src/app/clusters/ota-requestor/BDXDownloader.h",
"${chip_root}/src/app/clusters/ota-requestor/OTARequestor.cpp",
"${chip_root}/src/app/clusters/ota-requestor/ota-requestor-server.cpp",
]

is_server = true

public_configs = [ ":config" ]

is_server = true
Expand Down
1 change: 0 additions & 1 deletion examples/shell/shell_common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ static_library("shell_common") {

sources += [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
]

Expand Down
8 changes: 8 additions & 0 deletions src/app/chip_data_model.gni
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ template("chip_data_model") {
"${_app_root}/util/ContentApp.cpp",
"${_app_root}/util/ContentAppPlatform.cpp",
]
} else if (cluster == "ota-requestor") {
sources += [
# TODO - align name of folder ?
"${_app_root}/clusters/${cluster}/${cluster}-server.cpp",
"${_app_root}/clusters/${cluster}/BDXDownloader.cpp",
"${_app_root}/clusters/${cluster}/BDXDownloader.h",
"${_app_root}/clusters/${cluster}/OTARequestor.cpp",
]
} else {
sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ]
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/clusters/ota-requestor/OTARequestor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ void OTARequestor::OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR
OTARequestor * requestorCore = static_cast<OTARequestor *>(context);
VerifyOrDie(requestorCore != nullptr);

ChipLogError(SoftwareUpdate, "Failed to connect to node 0x%" PRIX64 ": %" CHIP_ERROR_FORMAT, peerId.GetNodeId(),
error.Format());
ChipLogError(SoftwareUpdate, "Failed to connect to node 0x" ChipLogFormatX64 ": %" CHIP_ERROR_FORMAT,
ChipLogValueX64(peerId.GetNodeId()), error.Format());

switch (requestorCore->mOnConnectedAction)
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/zap_cluster_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
'OPERATIONAL_CREDENTIALS_CLUSTER': ['operational-credentials-server'],
'OTA_BOOTLOAD_CLUSTER': [],
'OTA_PROVIDER_CLUSTER': ['ota-provider'],
'OTA_REQUESTOR_CLUSTER': [],
'OTA_REQUESTOR_CLUSTER': ['ota-requestor'],
'POWER_SOURCE_CLUSTER': [],
'POWER_SOURCE_CONFIGURATION_CLUSTER': ['power-source-configuration-server'],
'POLL_CONTROL_CLUSTER': [],
Expand Down
2 changes: 1 addition & 1 deletion third_party/qpg_sdk/repo
Submodule repo updated from edb134 to 6bce6f