Skip to content

Commit

Permalink
[icd] integrate ICD management command into CHIP tool (project-chip#3…
Browse files Browse the repository at this point in the history
…0863)

* [icd] integrate ICD management command into CHIP tool

* Delete entry on failure

* Fix build
  • Loading branch information
erjiaqing authored and thivya-amazon committed Dec 12, 2023
1 parent 0e8bed3 commit 704a2ec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions examples/chip-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ static_library("chip-tool-utils") {

public_deps = [
"${chip_root}/examples/common/tracing:commandline",
"${chip_root}/src/app/icd/client:handler",
"${chip_root}/src/app/icd/client:manager",
"${chip_root}/src/app/icd/client:handler",
"${chip_root}/src/app/server",
"${chip_root}/src/app/tests/suites/commands/interaction_model",
"${chip_root}/src/controller/data_model",
Expand Down
6 changes: 6 additions & 0 deletions examples/chip-tool/commands/common/CHIPCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
// TODO: Implement persistent ICD storage for the chip-tool.
ReturnLogErrorOnFailure(sICDClientStorage.Init(&mDefaultStorage, &sSessionKeystore));

// chip-tool uses a non-persistent keystore.
// ICD storage lifetime is currently tied to the chip-tool's lifetime. Since chip-tool interactive mode is currently used for
// ICD commissioning and check-in validation, this temporary storage meets the test requirements.
// TODO: Implement persistent ICD storage for the chip-tool.
ReturnLogErrorOnFailure(sICDClientStorage.Init(&mDefaultStorage, &sSessionKeystore));

chip::Controller::FactoryInitParams factoryInitParams;

factoryInitParams.fabricIndependentStorage = &mDefaultStorage;
Expand Down
2 changes: 0 additions & 2 deletions examples/chip-tool/commands/common/CHIPCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#include "Command.h"

#include <TracingCommandLineArgument.h>
#include <app/icd/client/CheckInHandler.h>
#include <app/icd/client/DefaultCheckInDelegate.h>
#include <app/icd/client/DefaultICDClientStorage.h>
#include <commands/common/CredentialIssuerCommands.h>
#include <commands/example/ExampleCredentialIssuerCommands.h>
Expand Down
1 change: 0 additions & 1 deletion examples/tv-casting-app/tv-casting-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ chip_data_model("tv-casting-common") {

deps = [
"${chip_root}/examples/common/tracing:commandline",
"${chip_root}/src/app/icd/client:handler",
"${chip_root}/src/app/icd/client:manager",
"${chip_root}/src/app/tests/suites/commands/interaction_model",
"${chip_root}/src/lib/support/jsontlv",
Expand Down

0 comments on commit 704a2ec

Please sign in to comment.