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.
Pull request project-chip#63: UIC-2321: Moving the Unify Matter Bridg…
…e to matter repo. Merge in WMN_TOOLS/matter from feature/unify_matter_bridge to silabs Squashed commit of the following: commit daf32d2989c04e17911cd1a7379a887210e82ae8 Author: Anders Esbensen <[email protected]> Date: Tue Sep 13 13:29:45 2022 +0200 Applied new formating. commit 7d9e0b2f4ebed9919ae36776ab2536f8d11406ec Author: Anders Esbensen <[email protected]> Date: Tue Sep 13 12:27:05 2022 +0200 Added stograge persistance. commit 354849c5861f15b70241abd2ca91f3d9db449e81 Author: Anders Esbensen <[email protected]> Date: Mon Sep 12 11:06:49 2022 +0200 Only build efr32 examples in CI for now. commit 6b72a5ac9c011cb0570e578e74e92ac7db76c883 Author: Anders Esbensen <[email protected]> Date: Thu Sep 8 12:09:55 2022 +0200 UIC-2321: Use pkg_config instead. commit 28afe77a4b9525909f12b5b04b36e86302dbb31c Author: Anders Esbensen <[email protected]> Date: Fri Sep 2 09:47:11 2022 +0200 UIC-2321: Moving the Unify Matter Bridge to matter repo.
- Loading branch information
1 parent
fd7502c
commit b5f3242
Showing
86 changed files
with
16,807 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
ARG VERSION=latest | ||
FROM connectedhomeip/chip-build:${VERSION} | ||
|
||
# Rust Version to install | ||
ENV RUST_VERSION=1.60.0 | ||
# Rust and Cargo home directories | ||
ENV RUSTUP_HOME=/opt/rustup-home | ||
ENV CARGO_HOME=/opt/cargo-home | ||
# Install Rust and Cargo | ||
RUN curl https://sh.rustup.rs -sSf --output /tmp/sh.rustup.rs \ | ||
&& cd /tmp && chmod +x sh.rustup.rs \ | ||
&& ./sh.rustup.rs -y --profile minimal --default-toolchain ${RUST_VERSION}\ | ||
&& rm /tmp/sh.rustup.rs \ | ||
&& /opt/cargo-home/bin/cargo install cargo2junit \ | ||
# remove the main branch reference once the maintainer tagged 81d73b4 | ||
&& /opt/cargo-home/bin/cargo install cargo-deb --git https://github.com/kornelski/cargo-deb.git --branch main \ | ||
&& chmod -R a+rw ${RUSTUP_HOME} ${CARGO_HOME} \ | ||
&& find ${RUSTUP_HOME} ${CARGO_HOME} -type d -exec chmod a+x {} \; | ||
ENV PATH="${CARGO_HOME}/bin:${PATH}" | ||
|
||
#Target dependencies | ||
RUN apt update && \ | ||
apt install -y \ | ||
libsqlite3-dev libedit-dev libyaml-cpp0.6 libmosquitto-dev\ | ||
libyaml-cpp-dev \ | ||
libboost-atomic-dev libboost-chrono-dev libboost-date-time-dev \ | ||
libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev \ | ||
libboost-serialization-dev libboost-system-dev libboost-thread-dev \ | ||
libboost-log-dev nlohmann-json3-dev | ||
|
||
#Build host dependencies | ||
RUN ln -s /usr/bin/python3 /usr/bin/python | ||
RUN apt install -y ruby ruby-dev |
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,25 @@ | ||
# Copyright (c) 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/build.gni") | ||
|
||
# The location of the build configuration file. | ||
buildconfig = "${build_root}/config/BUILDCONFIG.gn" | ||
|
||
# CHIP uses angle bracket includes. | ||
check_system_includes = true | ||
|
||
default_args = { | ||
import("//args.gni") | ||
} |
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,53 @@ | ||
import("//build_overrides/chip.gni") | ||
import("${chip_root}/build/chip/tools.gni") | ||
import("${chip_root}/build/config/linux/pkg_config.gni") | ||
|
||
assert(chip_build_tools) | ||
|
||
pkg_config("unify") { | ||
packages = [ "libunify" ] | ||
} | ||
|
||
executable("unify-matter-bridge") { | ||
include_dirs = [ | ||
"src", | ||
"src/cluster_translator", | ||
"src/device_type_mapper", | ||
"src/matter_node_state_monitor", | ||
"include", | ||
] | ||
|
||
sources = [ | ||
"src/matter_data_storage.cpp", | ||
"src/attribute_state_cache.cpp", | ||
"src/cluster_translator/bridged_device_basic_info_attribute_translator.cpp", | ||
"src/cluster_translator/group_command_translator.cpp", | ||
"src/cluster_translator/group_translator.cpp", | ||
"src/cluster_translator/identify_attribute_translator.cpp", | ||
"src/cluster_translator/identify_command_translator.cpp", | ||
|
||
#"src/cluster_translator/level_attribute_translator.cpp", | ||
#"src/cluster_translator/level_command_translator.cpp", | ||
"src/cluster_translator/on_off_attribute_translator.cpp", | ||
"src/cluster_translator/on_off_command_translator.cpp", | ||
"src/demo_uic_cli.cpp", | ||
"src/device_type_mapper/matter_device_translator.cpp", | ||
"src/device_type_mapper/matter_device_types_clusters_list_updated.inc", | ||
"src/dummy.cpp", | ||
"src/matter_bridge_config.c", | ||
"src/matter_bridge_main.cpp", | ||
"src/matter_node_state_monitor/matter_cluster_interactor.cpp", | ||
"src/matter_node_state_monitor/matter_endpoint_builder.cpp", | ||
"src/matter_node_state_monitor/matter_node_state_monitor.cpp", | ||
] | ||
|
||
deps = [ | ||
"${chip_root}/examples/platform/linux:app-main", | ||
"//../unify-matter-bridge-common", | ||
] | ||
configs += [ ":unify" ] | ||
} | ||
|
||
group("linux") { | ||
deps = [ ":unify-matter-bridge" ] | ||
} |
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,38 @@ | ||
# Copyright (c) 2020 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("${chip_root}/config/standalone/args.gni") | ||
|
||
chip_device_project_config_include = "<CHIPProjectAppConfig.h>" | ||
chip_project_config_include = "<CHIPProjectAppConfig.h>" | ||
chip_system_project_config_include = "<SystemProjectConfig.h>" | ||
|
||
chip_project_config_include_dirs = | ||
[ "${chip_root}/examples/tv-app/tv-common/include" ] | ||
chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] | ||
|
||
chip_build_libshell = true | ||
|
||
chip_enable_additional_data_advertising = true | ||
|
||
chip_enable_rotating_device_id = true | ||
|
||
cpp_standard = "c++17" | ||
|
||
enable_pic = false | ||
|
||
default_configs_exceptions = | ||
[ "//third_party/connectedhomeip/build/config/compiler:exceptions" ] |
18 changes: 18 additions & 0 deletions
18
silabs_examples/unify-matter-bridge/linux/build_overrides/build.gni
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,18 @@ | ||
# Copyright (c) 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. | ||
|
||
declare_args() { | ||
# Root directory for build files. | ||
build_root = "//third_party/connectedhomeip/build" | ||
} |
18 changes: 18 additions & 0 deletions
18
silabs_examples/unify-matter-bridge/linux/build_overrides/chip.gni
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,18 @@ | ||
# Copyright (c) 2020 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. | ||
|
||
declare_args() { | ||
# Root directory for CHIP. | ||
chip_root = "//third_party/connectedhomeip" | ||
} |
18 changes: 18 additions & 0 deletions
18
silabs_examples/unify-matter-bridge/linux/build_overrides/nlassert.gni
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,18 @@ | ||
# Copyright (c) 2020 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. | ||
|
||
declare_args() { | ||
# Root directory for nlassert. | ||
nlassert_root = "//third_party/connectedhomeip/third_party/nlassert" | ||
} |
19 changes: 19 additions & 0 deletions
19
silabs_examples/unify-matter-bridge/linux/build_overrides/nlfaultinjection.gni
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,19 @@ | ||
# Copyright (c) 2020 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. | ||
|
||
declare_args() { | ||
# Root directory for nlfaultinjection. | ||
nlfaultinjection_root = | ||
"//third_party/connectedhomeip/third_party/nlfaultinjection" | ||
} |
18 changes: 18 additions & 0 deletions
18
silabs_examples/unify-matter-bridge/linux/build_overrides/nlio.gni
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,18 @@ | ||
# Copyright (c) 2020 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. | ||
|
||
declare_args() { | ||
# Root directory for nlio. | ||
nlio_root = "//third_party/connectedhomeip/third_party/nlio" | ||
} |
18 changes: 18 additions & 0 deletions
18
silabs_examples/unify-matter-bridge/linux/build_overrides/nlunit_test.gni
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,18 @@ | ||
# Copyright (c) 2020 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. | ||
|
||
declare_args() { | ||
# Root directory for nlunit-test. | ||
nlunit_test_root = "//third_party/connectedhomeip/third_party/nlunit-test" | ||
} |
17 changes: 17 additions & 0 deletions
17
silabs_examples/unify-matter-bridge/linux/build_overrides/openthread.gni
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,17 @@ | ||
# Copyright (c) 2020 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. | ||
|
||
declare_args() { | ||
openthread_root = "//third_party/openthread/repo" | ||
} |
17 changes: 17 additions & 0 deletions
17
silabs_examples/unify-matter-bridge/linux/build_overrides/ot_br_posix.gni
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,17 @@ | ||
# Copyright (c) 2020 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. | ||
|
||
declare_args() { | ||
ot_br_posix_root = "//third_party/ot-br-posix" | ||
} |
20 changes: 20 additions & 0 deletions
20
silabs_examples/unify-matter-bridge/linux/build_overrides/pigweed.gni
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,20 @@ | ||
# Copyright (c) 2020 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. | ||
|
||
declare_args() { | ||
# Location of the Pigweed repository. | ||
dir_pigweed = "//third_party/connectedhomeip/third_party/pigweed/repo" | ||
} | ||
|
||
import("$dir_pigweed/modules.gni") |
12 changes: 12 additions & 0 deletions
12
silabs_examples/unify-matter-bridge/linux/build_overrides/pigweed_environment.gni
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,12 @@ | ||
# This file is automatically generated by Pigweed's environment setup. Do not | ||
# edit it manually or check it in. | ||
declare_args() { | ||
pw_env_setup_CIPD_ARM = "//.environment/cipd/packages/arm" | ||
dir_cipd_arm = "//.environment/cipd/packages/arm" | ||
pw_env_setup_CIPD_PIGWEED = "//.environment/cipd/packages/pigweed" | ||
dir_cipd_pigweed = "//.environment/cipd/packages/pigweed" | ||
pw_env_setup_CIPD_PYTHON = "//.environment/cipd/packages/python" | ||
dir_cipd_python = "//.environment/cipd/packages/python" | ||
pw_env_setup_VIRTUAL_ENV = "//.environment/pigweed-venv" | ||
pw_env_setup_PACKAGE_ROOT = "//.environment/packages" | ||
} |
Oops, something went wrong.