-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OIS/example] Sharing lock-app cluster service between Linux and OIS …
…platforms (#24551) * [Examples] Create common lock-app cluster service Move lock endpoint, manager and ZCL callbacks from Linux to lock-common directory. Create source set with lock cluster service files. Create cmake macro to add common lock-app sources to the specific target. Use lock-cluster-service in Linux lock-app example. Change "setting door lock state" logs to progress level to be informed of the lock status change directly. Sources can now be easily shared across platform implementations. Signed-off-by: ATmobica <[email protected]> * [OIS] Use common lock-app sources Directly use of common lock cluster service sources in lock-app example instead of creating the copy. Lock-app integration test adaptation. Signed-off-by: ATmobica <[email protected]> --------- Signed-off-by: ATmobica <[email protected]>
- Loading branch information
Showing
17 changed files
with
113 additions
and
915 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
2 changes: 1 addition & 1 deletion
2
...les/lock-app/linux/include/LockEndpoint.h → ...ck-app/lock-common/include/LockEndpoint.h
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
2 changes: 1 addition & 1 deletion
2
...ples/lock-app/linux/include/LockManager.h → ...ock-app/lock-common/include/LockManager.h
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,45 @@ | ||
# | ||
# Copyright (c) 2023 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. | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.21) | ||
|
||
set(CHIP_LOCK_COMMON_BASE_DIR ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
|
||
# Add common lock sources to the specific target | ||
# [Args]: | ||
# target - target name | ||
# Available options are: | ||
# SCOPE sources scope for the target, PRIVATE as default | ||
macro(chip_add_lock_app_common target) | ||
set(SCOPE PRIVATE) | ||
cmake_parse_arguments(ARG "" "SCOPE" "" ${ARGN}) | ||
if (ARG_SCOPE) | ||
set(SCOPE ${ARG_SCOPE}) | ||
endif() | ||
|
||
target_include_directories(${target} | ||
${SCOPE} | ||
${CHIP_LOCK_COMMON_BASE_DIR}/include | ||
) | ||
|
||
target_sources(${target} | ||
${SCOPE} | ||
${CHIP_LOCK_COMMON_BASE_DIR}/src/ZCLDoorLockCallbacks.cpp | ||
${CHIP_LOCK_COMMON_BASE_DIR}/src/LockManager.cpp | ||
${CHIP_LOCK_COMMON_BASE_DIR}/src/LockEndpoint.cpp | ||
) | ||
endmacro() |
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
2 changes: 1 addition & 1 deletion
2
examples/lock-app/linux/src/LockManager.cpp → .../lock-app/lock-common/src/LockManager.cpp
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
18 changes: 18 additions & 0 deletions
18
...ck-app/linux/src/ZCLDoorLockCallbacks.cpp → .../lock-common/src/ZCLDoorLockCallbacks.cpp
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
Oops, something went wrong.