diff --git a/Jenkinsfile b/Jenkinsfile
index 8bf3094edd9308..a48b7c7c1ac01d 100755
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -45,12 +45,14 @@ def initWorkspaceAndScm()
sh 'git submodule set-url ./third_party/silabs/gecko_sdk https://stash.silabs.com/scm/embsw/gecko_sdk_release.git'
// Matter Init --Checkout relevant submodule
- sh 'scripts/checkout_submodules.py --shallow --recursive --platform efr32'
+ sh 'scripts/checkout_submodules.py --shallow --recursive --platform efr32 linux'
dir('third_party/silabs/matter_support/matter/efr32'){
stash name: 'BootLoader', includes: 'bootloader_binaries/*.*'
}
+
sh 'du -sk'
+
}
dir(buildOverlayDir+'/matter-scripts'){
@@ -72,7 +74,14 @@ def initWorkspaceAndScm()
userRemoteConfigs : [[credentialsId: 'svc_gsdk',
url: 'https://stash.silabs.com/scm/wmn_sqa/sqa-tools.git']]]
}
-
+ dir(buildOverlayDir+"/overlay/unify"){
+ checkout scm: [$class: 'GitSCM',
+ branches: [[name: 'ver_1.2.1-103-g34db9516-unify-matter-bridge']],
+ extensions: [[$class: 'CloneOption', depth: 1, noTags: false, reference: '', shallow: true],
+ [$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true,
+ recursiveSubmodules: true, reference: '', shallow: true, trackingSubmodules: false]],
+ userRemoteConfigs: [[credentialsId: 'svc_gsdk', url: 'https://bitbucket-cph.silabs.com/scm/stash/uic/uic.git']]]
+ }
}
def runInWorkspace(Map args, Closure cl)
@@ -282,6 +291,58 @@ def buildChipTool()
}
}
+def buildUnifyBridge()
+{
+ actionWithRetry {
+ node(buildFarmLargeLabel)
+ {
+ def workspaceTmpDir = createWorkspaceOverlay(advanceStageMarker.getBuildStagesList(),
+ buildOverlayDir)
+ def dirPath = workspaceTmpDir + createWorkspaceOverlay.overlayMatterPath
+ def unifyCheckoutDir = workspaceTmpDir + "/overlay/unify"
+ def saveDir = 'matter/out/'
+ try {
+ def unify_bridge_docker = docker.image('nexus.silabs.net/unify-cache/unify-matter:1.0.1-armhf')
+ dir(dirPath)
+ {
+ unify_bridge_docker.inside("-u root -v${unifyCheckoutDir}:/unify")
+ {
+ withEnv(['PW_ENVIRONMENT_ROOT='+dirPath])
+ {
+ echo "Build libunify"
+ sh 'cd /unify && cmake -DCMAKE_INSTALL_PREFIX=$PWD/stage -GNinja -DCMAKE_TOOLCHAIN_FILE=../cmake/armhf_debian.cmake -B build_unify_armhf/ -S components'
+ sh 'cd /unify && cmake --build build_unify_armhf'
+ sh 'cd /unify && cmake --install build_unify_armhf --prefix $PWD/stage'
+
+ echo "Build Unify Matter Bridge"
+ sh 'rm -rf ./.environment'
+ sh 'git config --global --add safe.directory $(pwd)'
+ sh 'git config --global --add safe.directory $(pwd)/third_party/pigweed/repo'
+ dir ("silabs_examples/unify-matter-bridge/linux")
+ {
+ def out_path = "../../../out/silabs_examples/unify-matter-bridge/armhf_debian_buster"
+ def pkg_config_export = "export PKG_CONFIG_PATH=:/unify/stage/share/pkgconfig:/usr/lib/arm-linux-gnueabihf/pkgconfig"
+ sh "../../../scripts/run_in_build_env.sh \"${pkg_config_export}; gn gen ${out_path} --args='target_cpu=\\\"arm\\\"'\""
+ sh "../../../scripts/run_in_build_env.sh \"${pkg_config_export}; ninja -C ${out_path}\""
+ }
+ }
+ }
+ }
+ } catch (e) {
+ deactivateWorkspaceOverlay(advanceStageMarker.getBuildStagesList(),
+ workspaceTmpDir,
+ "matter",
+ '-name no-files')
+ throw e
+ }
+ deactivateWorkspaceOverlay(advanceStageMarker.getBuildStagesList(),
+ workspaceTmpDir,
+ saveDir,
+ '-name unify-matter-bridge')
+ }
+ }
+}
+
def exportIoTReports()
{
actionWithRetry {
@@ -783,6 +844,11 @@ def pipeline()
{
advanceStageMarker()
+ //---------------------------------------------------------------------
+ // Build Unify Matter Bridge
+ //---------------------------------------------------------------------
+ parallelNodesBuild["Unify Matter Bridge"] = {this.buildUnifyBridge()}
+
//---------------------------------------------------------------------
// Build OpenThread Examples
//---------------------------------------------------------------------
diff --git a/silabs_examples/unify-matter-bridge/LICENSE.md b/silabs_examples/unify-matter-bridge/LICENSE.md
new file mode 100644
index 00000000000000..35b759774978be
--- /dev/null
+++ b/silabs_examples/unify-matter-bridge/LICENSE.md
@@ -0,0 +1,8 @@
+**Copyright 2022 Silicon Laboratories Inc. www.silabs.com**
+
+The licensor of this software is Silicon Laboratories Inc. Your use of this
+software is governed by the terms of Silicon Labs Master Software License
+Agreement (MSLA) available at
+www.silabs.com/about-us/legal/master-software-license-agreement. This software
+is distributed to you in Source Code format and is governed by the sections of
+the MSLA applicable to Source Code.
diff --git a/silabs_examples/unify-matter-bridge/docker/Dockerfile b/silabs_examples/unify-matter-bridge/docker/Dockerfile
index ad6c3cdb9599a0..0b56e48982f3cc 100644
--- a/silabs_examples/unify-matter-bridge/docker/Dockerfile
+++ b/silabs_examples/unify-matter-bridge/docker/Dockerfile
@@ -1,33 +1,77 @@
-ARG VERSION=latest
-FROM connectedhomeip/chip-build:${VERSION}
+FROM debian:buster
+
+ENV DEBIAN_FRONTEND=noninteractive
+
+SHELL ["/bin/bash", "-c"]
+
+ARG ARCH="armhf"
+
+ARG TARGET_DEPS="libavahi-client-dev libssl-dev libsystemd-dev libwrap0-dev uthash-dev \
+ libsqlite3-dev libedit-dev libyaml-cpp0.6 libmosquitto-dev\
+ libreadline-dev libncurses5-dev libncursesw5-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 procps libmbedtls-dev libglib2.0-dev"
+
+ARG HOST_DEPS="ninja-build git git-lfs curl pkg-config \
+ ruby ruby-dev \
+ gcc g++ gdb-multiarch \
+ build-essential \
+ clang nlohmann-json3-dev \
+ libdbus-glib-1-dev libssl-dev libgirepository1.0-dev"
+
+# configure additional arches in dpkg/apt
+RUN for arch in ${ARCH} ; do \
+ dpkg --add-architecture $arch ; \
+ echo $arch ; \
+ done
+
+RUN apt-get update \
+ && apt-get install --no-install-recommends -y curl gnupg2 ca-certificates \
+ && apt-get update \
+ && apt-get install --no-install-recommends -y \
+ ${HOST_DEPS} \
+ $(for dep in ${TARGET_DEPS} ; do \
+ for arch in ${ARCH} ; do echo $dep:$arch ; done ; \
+ done) \
+ $(for arch in ${ARCH} ; do echo crossbuild-essential-${arch} ; done)\
+ && rm -rf /var/lib/apt/lists/*
+
+# Install python 3.9
+RUN curl -L https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh --output /tmp/Miniconda.sh \
+ && cd /tmp \
+ && echo 78f39f9bae971ec1ae7969f0516017f2413f17796670f7040725dd83fcff5689 Miniconda.sh > /tmp/Miniconda.sh.sha256 \
+ && sha256sum -c /tmp/Miniconda.sh.sha256 \
+ && bash /tmp/Miniconda.sh -b -p /usr/local/miniconda \
+ && /usr/local/miniconda/condabin/conda init bash \
+ && ln -sf /usr/local/miniconda/bin/python3.9 /usr/bin/python3 \
+ && ln -sf /usr/local/miniconda/bin/pip3 /usr/bin/pip3
# Rust Version to install
-ENV RUST_VERSION=1.60.0
+ENV RUST_VERSION=1.64.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}\
+ && if [[ $ARCH == *"armhf"* ]]; then export RUST_TRIPLES="$RUST_TRIPLES armv7-unknown-linux-gnueabihf"; fi \
+ && if [[ $ARCH == *"amd64"* ]]; then export RUST_TRIPLES="$RUST_TRIPLES x86_64-unknown-linux-gnu"; fi \
+ && ./sh.rustup.rs -y --profile minimal --target ${RUST_TRIPLES} --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
+# Install cmake 1.19.2
+RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-Linux-x86_64.sh --output /tmp/cmake-3.19.2-Linux-x86_64.sh \
+ && cd /tmp \
+ && echo 2fc84c1bd5a5fa8850426905a76147fbf897cf67ef324b009bcdb7eceafa9662 cmake-3.19.2-Linux-x86_64.sh > /tmp/cmake-3.19.2-Linux-x86_64.sh.sha256 \
+ && sha256sum -c cmake-3.19.2-Linux-x86_64.sh.sha256 \
+ && chmod +x /tmp/cmake*.sh \
+ && /tmp/cmake*.sh --prefix=/usr/local --skip-license \
+ && rm /tmp/cmake*
\ No newline at end of file
diff --git a/silabs_examples/unify-matter-bridge/linux/.gn b/silabs_examples/unify-matter-bridge/linux/.gn
index 70728706ea4a14..25f6ec73d28d65 100644
--- a/silabs_examples/unify-matter-bridge/linux/.gn
+++ b/silabs_examples/unify-matter-bridge/linux/.gn
@@ -1,18 +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.
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
import("//build_overrides/build.gni")
+import("//build_overrides/pigweed.gni")
# The location of the build configuration file.
buildconfig = "${build_root}/config/BUILDCONFIG.gn"
@@ -21,5 +21,7 @@ buildconfig = "${build_root}/config/BUILDCONFIG.gn"
check_system_includes = true
default_args = {
+ pw_unit_test_AUTOMATIC_RUNNER = "$dir_pigweed/targets/host/run_test"
+
import("//args.gni")
}
diff --git a/silabs_examples/unify-matter-bridge/linux/BUILD.gn b/silabs_examples/unify-matter-bridge/linux/BUILD.gn
index b4b7f6e2c82cf9..5dd3ff6f8478b8 100644
--- a/silabs_examples/unify-matter-bridge/linux/BUILD.gn
+++ b/silabs_examples/unify-matter-bridge/linux/BUILD.gn
@@ -1,6 +1,21 @@
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
+
import("//build_overrides/chip.gni")
import("${chip_root}/build/chip/tools.gni")
+import("${chip_root}/build/chip/tests.gni")
import("${chip_root}/build/config/linux/pkg_config.gni")
+import("${chip_root}/build/config/compiler/compiler.gni")
assert(chip_build_tools)
@@ -8,46 +23,74 @@ pkg_config("unify") {
packages = [ "libunify" ]
}
-executable("unify-matter-bridge") {
+config("unify-config") {
include_dirs = [
"src",
"src/cluster_translator",
"src/device_type_mapper",
"src/matter_node_state_monitor",
+ "src/matter_wrappers",
"include",
+ "zap-handlers/gen"
]
+ ldflags = [ "-lboost_system" ]
+
+}
+
+static_library("unify-matter-bridge-lib") {
+
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_bridge_cli.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",
+ "zap-handlers/gen/command_translator.cpp",
+ "zap-handlers/gen/attribute_translator.cpp",
+ "zap-handlers/gen/unify_accessors.cpp",
+ "src/uic_mqtt_wrapper.cpp"
]
- deps = [
+ public_deps = [
"${chip_root}/examples/platform/linux:app-main",
"//../unify-matter-bridge-common",
]
- configs += [ ":unify" ]
+
+ output_dir = root_out_dir
+
+ public_configs = [ ":unify-config" , ":unify" ]
+
+}
+
+executable("unify-matter-bridge") {
+ sources = [
+ "src/matter_bridge_main.cpp",
+ ]
+
+ deps = [
+ ":unify-matter-bridge-lib"
+ ]
}
group("linux") {
deps = [ ":unify-matter-bridge" ]
}
+
+
+if (chip_build_tests) {
+ group("check") {
+ deps = [
+ "//src/tests",
+ ]
+ }
+}
diff --git a/silabs_examples/unify-matter-bridge/linux/args.gni b/silabs_examples/unify-matter-bridge/linux/args.gni
index df05cd7f1c6c62..a8420b7d23decc 100644
--- a/silabs_examples/unify-matter-bridge/linux/args.gni
+++ b/silabs_examples/unify-matter-bridge/linux/args.gni
@@ -1,16 +1,15 @@
-# 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.
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
import("//build_overrides/chip.gni")
@@ -21,18 +20,16 @@ chip_project_config_include = ""
chip_system_project_config_include = ""
chip_project_config_include_dirs =
- [ "${chip_root}/examples/tv-app/tv-common/include" ]
+ [ "//../unify-matter-bridge-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
+chip_build_libshell = false
+chip_enable_additional_data_advertising = false
+chip_enable_rotating_device_id = false
cpp_standard = "c++17"
-
enable_pic = false
+is_debug = true
default_configs_exceptions =
[ "//third_party/connectedhomeip/build/config/compiler:exceptions" ]
diff --git a/silabs_examples/unify-matter-bridge/linux/build_overrides/build.gni b/silabs_examples/unify-matter-bridge/linux/build_overrides/build.gni
index 323b150ed3399a..f0342b4cb0a82c 100644
--- a/silabs_examples/unify-matter-bridge/linux/build_overrides/build.gni
+++ b/silabs_examples/unify-matter-bridge/linux/build_overrides/build.gni
@@ -1,16 +1,15 @@
-# 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.
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
declare_args() {
# Root directory for build files.
diff --git a/silabs_examples/unify-matter-bridge/linux/build_overrides/chip.gni b/silabs_examples/unify-matter-bridge/linux/build_overrides/chip.gni
index 23aafc1df7b3cd..c4c7744442f26b 100644
--- a/silabs_examples/unify-matter-bridge/linux/build_overrides/chip.gni
+++ b/silabs_examples/unify-matter-bridge/linux/build_overrides/chip.gni
@@ -1,16 +1,15 @@
-# 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.
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
declare_args() {
# Root directory for CHIP.
diff --git a/silabs_examples/unify-matter-bridge/linux/build_overrides/jsoncpp.gni b/silabs_examples/unify-matter-bridge/linux/build_overrides/jsoncpp.gni
new file mode 100644
index 00000000000000..3f799db8fb5910
--- /dev/null
+++ b/silabs_examples/unify-matter-bridge/linux/build_overrides/jsoncpp.gni
@@ -0,0 +1,16 @@
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
+
+declare_args() {
+ jsoncpp_root = "//third_party/connectedhomeip/third_party/jsoncpp"
+}
diff --git a/silabs_examples/unify-matter-bridge/linux/build_overrides/nlassert.gni b/silabs_examples/unify-matter-bridge/linux/build_overrides/nlassert.gni
index 30e8c701634664..ce3d99a6e9547d 100644
--- a/silabs_examples/unify-matter-bridge/linux/build_overrides/nlassert.gni
+++ b/silabs_examples/unify-matter-bridge/linux/build_overrides/nlassert.gni
@@ -1,16 +1,15 @@
-# 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.
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
declare_args() {
# Root directory for nlassert.
diff --git a/silabs_examples/unify-matter-bridge/linux/build_overrides/nlfaultinjection.gni b/silabs_examples/unify-matter-bridge/linux/build_overrides/nlfaultinjection.gni
index 155d765597d110..60fb476cccb37f 100644
--- a/silabs_examples/unify-matter-bridge/linux/build_overrides/nlfaultinjection.gni
+++ b/silabs_examples/unify-matter-bridge/linux/build_overrides/nlfaultinjection.gni
@@ -1,16 +1,15 @@
-# 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.
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
declare_args() {
# Root directory for nlfaultinjection.
diff --git a/silabs_examples/unify-matter-bridge/linux/build_overrides/nlio.gni b/silabs_examples/unify-matter-bridge/linux/build_overrides/nlio.gni
index f7d5ee6117e826..1aae2a1ea0fa6d 100644
--- a/silabs_examples/unify-matter-bridge/linux/build_overrides/nlio.gni
+++ b/silabs_examples/unify-matter-bridge/linux/build_overrides/nlio.gni
@@ -1,16 +1,15 @@
-# 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.
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
declare_args() {
# Root directory for nlio.
diff --git a/silabs_examples/unify-matter-bridge/linux/build_overrides/nlunit_test.gni b/silabs_examples/unify-matter-bridge/linux/build_overrides/nlunit_test.gni
index ed017adc65f04a..463176791dd201 100644
--- a/silabs_examples/unify-matter-bridge/linux/build_overrides/nlunit_test.gni
+++ b/silabs_examples/unify-matter-bridge/linux/build_overrides/nlunit_test.gni
@@ -1,16 +1,15 @@
-# 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.
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
declare_args() {
# Root directory for nlunit-test.
diff --git a/silabs_examples/unify-matter-bridge/linux/build_overrides/openthread.gni b/silabs_examples/unify-matter-bridge/linux/build_overrides/openthread.gni
index 10edfdf202e885..de37961076174e 100644
--- a/silabs_examples/unify-matter-bridge/linux/build_overrides/openthread.gni
+++ b/silabs_examples/unify-matter-bridge/linux/build_overrides/openthread.gni
@@ -1,16 +1,15 @@
-# 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.
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
declare_args() {
openthread_root = "//third_party/openthread/repo"
diff --git a/silabs_examples/unify-matter-bridge/linux/build_overrides/ot_br_posix.gni b/silabs_examples/unify-matter-bridge/linux/build_overrides/ot_br_posix.gni
index 2ed583ff245c14..b30de22bead4e4 100644
--- a/silabs_examples/unify-matter-bridge/linux/build_overrides/ot_br_posix.gni
+++ b/silabs_examples/unify-matter-bridge/linux/build_overrides/ot_br_posix.gni
@@ -1,16 +1,15 @@
-# 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.
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
declare_args() {
ot_br_posix_root = "//third_party/ot-br-posix"
diff --git a/silabs_examples/unify-matter-bridge/linux/build_overrides/pigweed.gni b/silabs_examples/unify-matter-bridge/linux/build_overrides/pigweed.gni
index 0aaf7c4d226844..9a7970fefe0d71 100644
--- a/silabs_examples/unify-matter-bridge/linux/build_overrides/pigweed.gni
+++ b/silabs_examples/unify-matter-bridge/linux/build_overrides/pigweed.gni
@@ -1,16 +1,15 @@
-# 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.
+# ******************************************************************************
+# * # License
+# * Copyright 2022 Silicon Laboratories Inc. www.silabs.com
+# ******************************************************************************
+# * The licensor of this software is Silicon Laboratories Inc. Your use of this
+# * software is governed by the terms of Silicon Labs Master Software License
+# * Agreement (MSLA) available at
+# * www.silabs.com/about-us/legal/master-software-license-agreement. This
+# * software is distributed to you in Source Code format and is governed by the
+# * sections of the MSLA applicable to Source Code.
+# *
+# ******************************************************************************
declare_args() {
# Location of the Pigweed repository.
diff --git a/silabs_examples/unify-matter-bridge/linux/include/attribute_state_cache.hpp b/silabs_examples/unify-matter-bridge/linux/include/attribute_state_cache.hpp
index aa0b45e4af9767..0126a295c236b7 100644
--- a/silabs_examples/unify-matter-bridge/linux/include/attribute_state_cache.hpp
+++ b/silabs_examples/unify-matter-bridge/linux/include/attribute_state_cache.hpp
@@ -23,59 +23,173 @@
#ifndef ATTRIBUTE_STATE_CASH_H
#define ATTRIBUTE_STATE_CASH_H
-#include
+#include
#include