forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The commissioning state machine is a short-lived object that is instantiated to commission a given device, and then may be disposed when this succeeds or fails. The design uses the StateMachine utility in src/lib to provide an extensible framework to consuming apps. And it minimizes memory footprint by maintaining only that state in memory that is currently needed. The state machine is provided as these primary resources: * State.h, Event.h: common state and event templates * Discoverer: a commissionable node discoverer * ExampleCommissioningStateMachine.h: a concrete implementation that uses the states, events and discoverer to provide an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as needed. Arbitrarily complex async UI logic can be realized with this design without the need to define callback delegate interfaces in the sdk. ExampleCommissioningStateMachine is integrated into chip-tool, providing feature parity. chip-tool uses the code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
- Loading branch information
1 parent
d6cb587
commit 7342ddb
Showing
24 changed files
with
2,900 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) 2020-2021 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import("//build_overrides/chip.gni") | ||
import("//build_overrides/nlassert.gni") | ||
import("${chip_root}/src/crypto/crypto.gni") | ||
import("${chip_root}/src/platform/device.gni") | ||
|
||
static_library("commissioner") { | ||
output_name = "libCommissioner" | ||
|
||
sources = [ | ||
"Commissionee.h", | ||
"Discoverer.cpp", | ||
"Discoverer.h", | ||
"Events.h", | ||
"ExampleCommissioningStateMachine.cpp", | ||
"ExampleCommissioningStateMachine.h", | ||
"States.h", | ||
] | ||
|
||
public_deps = [ | ||
"${chip_root}/src/controller", | ||
"${chip_root}/src/lib/core", | ||
"${chip_root}/src/lib/dnssd", | ||
"${chip_root}/src/lib/support", | ||
"${chip_root}/src/platform", | ||
"${chip_root}/src/setup_payload", | ||
] | ||
} |
Oops, something went wrong.