diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml
index e71ea876e5100a..9f1bfc207f92c8 100644
--- a/.github/workflows/cirque.yaml
+++ b/.github/workflows/cirque.yaml
@@ -71,7 +71,7 @@ jobs:
- name: Get Cirque Bootstrap cache key
id: cirque-bootstrap-cache-key
run: echo "val=$(scripts/tests/cirque_tests.sh cachekeyhash)" >> $GITHUB_OUTPUT
- - uses: Wandalen/wretry.action@v1.3.0
+ - uses: Wandalen/wretry.action@v1.4.4
name: Cirque Bootstrap cache
if: ${{ !env.ACT }}
continue-on-error: true
diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml
index 288166dfb87130..05943be5b0e155 100644
--- a/.github/workflows/darwin-tests.yaml
+++ b/.github/workflows/darwin-tests.yaml
@@ -99,6 +99,7 @@ jobs:
--target darwin-x64-tv-app-${BUILD_VARIANT} \
--target darwin-x64-bridge-${BUILD_VARIANT} \
--target darwin-x64-lit-icd-${BUILD_VARIANT} \
+ --target darwin-x64-microwave-oven-${BUILD_VARIANT} \
build \
--copy-artifacts-to objdir-clone \
"
@@ -118,6 +119,7 @@ jobs:
--ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
--tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
--bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
+ --microwave-oven-app ./out/darwin-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
"
- name: Run OTA Test
run: |
diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml
index 363111a26c0a9c..be2d372e88c177 100644
--- a/.github/workflows/examples-k32w.yaml
+++ b/.github/workflows/examples-k32w.yaml
@@ -37,7 +37,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-k32w:32
+ image: ghcr.io/project-chip/chip-build-k32w:33
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml
index 9b4eabfb63046e..fadc0da4a42f3c 100644
--- a/.github/workflows/gradle-wrapper-validation.yml
+++ b/.github/workflows/gradle-wrapper-validation.yml
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - uses: Wandalen/wretry.action@v1.3.0
+ - uses: Wandalen/wretry.action@v1.4.4
name: Gradle Validation
continue-on-error: true
with:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 613c3aeb6b4e47..189f63837c841e 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -119,7 +119,6 @@ jobs:
--known-failure app/reporting/tests/MockReportScheduler.h \
--known-failure app/server/AppDelegate.h \
--known-failure app/TestEventTriggerDelegate.h \
- --known-failure app/util/af-enums.h \
--known-failure app/util/af.h \
--known-failure app/util/af-types.h \
--known-failure app/util/attribute-metadata.h \
@@ -137,7 +136,6 @@ jobs:
--known-failure app/util/ember-compatibility-functions.cpp \
--known-failure app/util/endpoint-config-api.h \
--known-failure app/util/endpoint-config-defines.h \
- --known-failure app/util/error-mapping.h \
--known-failure app/util/generic-callbacks.h \
--known-failure app/util/generic-callback-stubs.cpp \
--known-failure app/util/im-client-callbacks.h \
@@ -198,7 +196,7 @@ jobs:
- name: Check for incorrect error use in VerifyOrExit
if: always()
run: |
- git grep -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
+ git grep -I -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -206,7 +204,7 @@ jobs:
- name: Check for use of PRI*8, which are not supported on some libcs.
if: always()
run: |
- git grep -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
+ git grep -I -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -214,7 +212,7 @@ jobs:
- name: Check for use of PRI*16, which are not supported on some libcs.
if: always()
run: |
- git grep -n "PRI.16" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
+ git grep -I -n "PRI.16" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -227,7 +225,7 @@ jobs:
# TODO: TLVDebug should ideally not be excluded here.
# TODO: protocol_decoder.cpp should ideally not be excluded here.
# TODO: PersistentStorageMacros.h should ideally not be excluded here.
- git grep -n "PRI.64" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)examples/chip-tool' ':(exclude)examples/tv-casting-app' ':(exclude)src/app/MessageDef/MessageDefHelper.cpp' ':(exclude)src/app/tests/integration/chip_im_initiator.cpp' ':(exclude)src/lib/core/TLVDebug.cpp' ':(exclude)src/lib/dnssd/tests/TestTxtFields.cpp' ':(exclude)src/lib/format/protocol_decoder.cpp' ':(exclude)src/lib/support/PersistentStorageMacros.h' ':(exclude)src/messaging/tests/echo/echo_requester.cpp' ':(exclude)src/platform/Linux' ':(exclude)src/platform/Ameba' ':(exclude)src/platform/ESP32' ':(exclude)src/platform/webos' ':(exclude)zzz_generated/chip-tool' ':(exclude)src/tools/chip-cert/Cmd_PrintCert.cpp' && exit 1 || exit 0
+ git grep -I -n "PRI.64" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)examples/chip-tool' ':(exclude)examples/tv-casting-app' ':(exclude)src/app/MessageDef/MessageDefHelper.cpp' ':(exclude)src/app/tests/integration/chip_im_initiator.cpp' ':(exclude)src/lib/core/TLVDebug.cpp' ':(exclude)src/lib/dnssd/tests/TestTxtFields.cpp' ':(exclude)src/lib/format/protocol_decoder.cpp' ':(exclude)src/lib/support/PersistentStorageMacros.h' ':(exclude)src/messaging/tests/echo/echo_requester.cpp' ':(exclude)src/platform/Linux' ':(exclude)src/platform/Ameba' ':(exclude)src/platform/ESP32' ':(exclude)src/platform/webos' ':(exclude)zzz_generated/chip-tool' ':(exclude)src/tools/chip-cert/Cmd_PrintCert.cpp' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -262,7 +260,7 @@ jobs:
- name: Check for use of 0x%u and the like, which lead to misleading output.
if: always()
run: |
- git grep -n '0x%[0-9l.-]*[^0-9lxX".-]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
+ git grep -I -n '0x%[0-9l.-]*[^0-9lxX".-]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -270,7 +268,7 @@ jobs:
- name: Check for use of '"0x" PRIu*' and the like, which lead to misleading output.
if: always()
run: |
- git grep -n '0x%[0-9-]*" *PRI[^xX]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
+ git grep -I -n '0x%[0-9-]*" *PRI[^xX]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match.
@@ -286,7 +284,7 @@ jobs:
- name: Check for use of 'emberAfReadAttribute' instead of the type-safe getters
if: always()
run: |
- git grep -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0
+ git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -296,7 +294,7 @@ jobs:
- name: Check for use of 'emberAfWriteAttribute' instead of the type-safe setters
if: always()
run: |
- git grep -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0
+ git grep -I -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0
# Run python Linter (flake8) and verify python files
# ignore some style errors, restyler should do that
@@ -311,7 +309,7 @@ jobs:
- name: Check for use of "SuccessOrExit(CHIP_ERROR_*)", which should probably be "SuccessOrExit(err = CHIP_ERROR_*)"
if: always()
run: |
- git grep -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
+ git grep -I -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -319,4 +317,4 @@ jobs:
- name: Check for use of "SuccessOrExit(something-without-assignment(", which should probably be "SuccessOrExit(err = something("
if: always()
run: |
- git grep -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
+ git grep -I -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index cba353a8ecfebd..9d6fcf4ec31bba 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -212,6 +212,7 @@ jobs:
--target linux-x64-tv-app-${BUILD_VARIANT} \
--target linux-x64-bridge-${BUILD_VARIANT} \
--target linux-x64-lit-icd-${BUILD_VARIANT} \
+ --target linux-x64-microwave-oven-${BUILD_VARIANT} \
build \
--copy-artifacts-to objdir-clone \
"
@@ -232,6 +233,7 @@ jobs:
--tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
--bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
--lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
+ --microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
"
- name: Run purposeful failure tests using the python parser sending commands to chip-tool
@@ -271,6 +273,7 @@ jobs:
--tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
--bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
--lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
+ --microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
"
- name: Run Tests using chip-repl (including slow)
if: github.event_name == 'push'
@@ -288,6 +291,7 @@ jobs:
--tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
--bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
--lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
+ --microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
"
- name: Uploading core files
uses: actions/upload-artifact@v4
@@ -354,6 +358,7 @@ jobs:
--target darwin-x64-tv-app-${BUILD_VARIANT} \
--target darwin-x64-bridge-${BUILD_VARIANT} \
--target darwin-x64-lit-icd-${BUILD_VARIANT} \
+ --target darwin-x64-microwave-oven-${BUILD_VARIANT} \
build \
--copy-artifacts-to objdir-clone \
"
@@ -374,7 +379,8 @@ jobs:
--ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
--tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
--bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
- --lit-icd-app ./out/darwin-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
+ --lit-icd-app ./out/darwin-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
+ --microwave-oven-app ./out/darwin-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
"
- name: Run purposeful failure tests using the python parser sending commands to chip-tool
@@ -453,6 +459,7 @@ jobs:
--target linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test \
+ --target linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-python-bindings \
build \
--copy-artifacts-to objdir-clone \
@@ -476,9 +483,16 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DRLK_2_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DeviceBasicComposition.py" --script-args "--storage-path admin_storage.json --manual-code 10054912339 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DeviceConformance.py" --script-args "--storage-path admin_storage.json --manual-code 10054912339 --bool-arg ignore_in_progress:True allow_provisional:True --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto --tests test_TC_IDM_10_2"'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_EEM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_EEM_2_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_EEM_2_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_EEM_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_EEM_2_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_EEVSE_2_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_EEVSE_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_EEVSE_2_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_EPM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_EPM_2_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
@@ -486,7 +500,7 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_ICDM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
- scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_1_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_IDM_1_4.py" --script-args "--hex-arg PIXIT.DGGEN.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_4_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_PWRTL_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_RR_1_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
@@ -513,6 +527,10 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestSpecParsingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
+ scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
- name: Uploading core files
uses: actions/upload-artifact@v4
if: ${{ failure() && !env.ACT }}
diff --git a/BUILD.gn b/BUILD.gn
index 89861ea79af5d0..e201b56ceac00d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -347,6 +347,10 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
enable_linux_lighting_app_build =
enable_default_builds && (host_os == "linux" || host_os == "mac")
+ # Build the Linux microwave oven app example.
+ enable_microwave_oven_app_build =
+ enable_default_builds && (host_os == "linux" || host_os == "mac")
+
# Build the Linux thermostat app example.
enable_linux_thermostat_app_build =
enable_default_builds && (host_os == "linux" || host_os == "mac")
@@ -594,6 +598,14 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
extra_build_deps += [ ":linux_bridge_app" ]
}
+ if (enable_microwave_oven_app_build) {
+ group("linux_microwave_oven_app") {
+ deps = [ "${chip_root}/examples/microwave-oven-app/linux(${standalone_toolchain})" ]
+ }
+
+ extra_build_deps += [ ":linux_microwave_oven_app" ]
+ }
+
if (enable_linux_lighting_app_build) {
group("linux_lighting_app") {
deps = [
diff --git a/src/app/tests/suites/commands/delay/BUILD.gn b/config/nxp/lib/pw_rpc/BUILD.gn
similarity index 50%
rename from src/app/tests/suites/commands/delay/BUILD.gn
rename to config/nxp/lib/pw_rpc/BUILD.gn
index de0babc859026f..05962da9299912 100644
--- a/src/app/tests/suites/commands/delay/BUILD.gn
+++ b/config/nxp/lib/pw_rpc/BUILD.gn
@@ -1,4 +1,4 @@
-# Copyright (c) 2022 Project CHIP Authors
+# 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.
@@ -12,23 +12,27 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
+import("//build_overrides/pigweed.gni")
+import("$dir_pw_build/target_types.gni")
-static_library("delay") {
- output_name = "libDelayCommands"
+static_library("pw_rpc") {
+ output_name = "libPwRpc"
- sources = [
- "DelayCommands.cpp",
- "DelayCommands.h",
+ public_configs = [ "${dir_pigweed}/pw_hdlc:default_config" ]
+ deps = [
+ "$dir_pw_rpc:server",
+ "$dir_pw_rpc/nanopb:echo_service",
+ "${chip_root}/examples/platform/nxp/pw_sys_io:pw_sys_io_nxp",
+ "${dir_pigweed}/pw_hdlc:pw_rpc",
+ dir_pw_assert,
+ dir_pw_hdlc,
+ dir_pw_log,
]
- cflags = [ "-Wconversion" ]
+ deps += pw_build_LINK_DEPS
- public_deps = [
- "${chip_root}/src/app/common:simulated",
- "${chip_root}/src/lib/support",
- "${chip_root}/src/platform",
- "${chip_root}/src/system",
- ]
+ output_dir = "${root_out_dir}/lib"
+
+ complete_static_lib = true
}
diff --git a/src/app/tests/suites/pics/BUILD.gn b/config/nxp/lib/pw_rpc/pw_rpc.gni
similarity index 56%
rename from src/app/tests/suites/pics/BUILD.gn
rename to config/nxp/lib/pw_rpc/pw_rpc.gni
index df8ae17dded523..68255db8bb96da 100644
--- a/src/app/tests/suites/pics/BUILD.gn
+++ b/config/nxp/lib/pw_rpc/pw_rpc.gni
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Project CHIP Authors
+# 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.
@@ -12,22 +12,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
+import("//build_overrides/pigweed.gni")
-static_library("pics") {
- output_name = "libPICS"
+pw_log_BACKEND = "$dir_pw_log_basic"
+pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
+pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex"
+pw_sys_io_BACKEND = "${chip_root}/examples/platform/nxp/pw_sys_io:pw_sys_io_nxp"
- sources = [
- "PICSBooleanExpressionParser.cpp",
- "PICSBooleanExpressionParser.h",
- "PICSBooleanReader.cpp",
- "PICSBooleanReader.h",
- "PICSNormalizer.cpp",
- "PICSNormalizer.h",
- ]
+pw_build_LINK_DEPS = [
+ "$dir_pw_assert:impl",
+ "$dir_pw_log:impl",
+]
- cflags = [ "-Wconversion" ]
-
- public_deps = [ "${chip_root}/src/lib/support" ]
-}
+dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"
diff --git a/config/tizen/chip-gn/platform/BUILD.gn b/config/tizen/chip-gn/platform/BUILD.gn
index bea16af373fd15..7d2f25e9bcf4f8 100644
--- a/config/tizen/chip-gn/platform/BUILD.gn
+++ b/config/tizen/chip-gn/platform/BUILD.gn
@@ -20,10 +20,6 @@ import("${chip_root}/config/tizen/chip-gn/args.gni")
import("${build_root}/config/linux/pkg_config.gni")
import("${chip_root}/src/platform/device.gni")
-pkg_config("capi-system-peripheral-io") {
- packages = [ "capi-system-peripheral-io" ]
-}
-
pkg_config("dlog") {
packages = [ "dlog" ]
}
@@ -73,7 +69,6 @@ source_set("tizen") {
":glib",
":capi-appfw-preference",
":capi-system-info",
- ":capi-system-peripheral-io",
]
if (chip_mdns == "platform") {
diff --git a/data_model/clusters/ConcentrationMeasurement.xml b/data_model/clusters/ConcentrationMeasurement.xml
index c5e2971406f676..4b51cffa124321 100644
--- a/data_model/clusters/ConcentrationMeasurement.xml
+++ b/data_model/clusters/ConcentrationMeasurement.xml
@@ -261,4 +261,4 @@ Davis, CA 95616, USA
-
+
\ No newline at end of file
diff --git a/data_model/clusters/DemandResponseLoadControl.xml b/data_model/clusters/DemandResponseLoadControl.xml
index 170cde68e8acff..a5322bfb4f7206 100644
--- a/data_model/clusters/DemandResponseLoadControl.xml
+++ b/data_model/clusters/DemandResponseLoadControl.xml
@@ -248,17 +248,14 @@ Davis, CA 95616, USA
-
-
-
@@ -266,13 +263,11 @@ Davis, CA 95616, USA
-
-
@@ -286,7 +281,6 @@ Davis, CA 95616, USA
-
@@ -294,7 +288,6 @@ Davis, CA 95616, USA
-
@@ -302,7 +295,6 @@ Davis, CA 95616, USA
-
@@ -310,7 +302,6 @@ Davis, CA 95616, USA
-
diff --git a/data_model/clusters/DeviceEnergyManagement.xml b/data_model/clusters/DeviceEnergyManagement.xml
index 6d6477cc72fb7c..21f74a737d52cb 100644
--- a/data_model/clusters/DeviceEnergyManagement.xml
+++ b/data_model/clusters/DeviceEnergyManagement.xml
@@ -130,10 +130,10 @@ Davis, CA 95616, USA
- -
+
-
- -
+
-
@@ -237,13 +237,13 @@ Davis, CA 95616, USA
- -
+
-
- -
+
-
- -
+
-
@@ -257,36 +257,31 @@ Davis, CA 95616, USA
-
- -
+
-
-
-
-
-
-
@@ -294,181 +289,146 @@ Davis, CA 95616, USA
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -477,7 +437,6 @@ Davis, CA 95616, USA
-
@@ -486,7 +445,6 @@ Davis, CA 95616, USA
-
@@ -498,7 +456,6 @@ Davis, CA 95616, USA
-
diff --git a/data_model/clusters/DiagnosticsGeneral.xml b/data_model/clusters/DiagnosticsGeneral.xml
index 3ea1b41fc62a75..072d75d64acc31 100644
--- a/data_model/clusters/DiagnosticsGeneral.xml
+++ b/data_model/clusters/DiagnosticsGeneral.xml
@@ -58,9 +58,14 @@ Davis, CA 95616, USA
-
+
+
+
+
+
+
-
@@ -176,40 +181,32 @@ Davis, CA 95616, USA
-
-
-
-
-
-
-
-
@@ -289,6 +286,33 @@ Davis, CA 95616, USA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data_model/clusters/ElectricalEnergyMeasurement.xml b/data_model/clusters/ElectricalEnergyMeasurement.xml
index bcf229c0266009..c6bf8e73863c41 100644
--- a/data_model/clusters/ElectricalEnergyMeasurement.xml
+++ b/data_model/clusters/ElectricalEnergyMeasurement.xml
@@ -67,50 +67,21 @@ Davis, CA 95616, USA
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
@@ -120,17 +91,7 @@ Davis, CA 95616, USA
-
-
-
-
-
-
-
-
-
-
-
+
@@ -140,7 +101,7 @@ Davis, CA 95616, USA
-
+
@@ -150,47 +111,7 @@ Davis, CA 95616, USA
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -200,122 +121,57 @@ Davis, CA 95616, USA
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
-
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
diff --git a/data_model/clusters/ElectricalPowerMeasurement.xml b/data_model/clusters/ElectricalPowerMeasurement.xml
index 996fb0ce59ec11..aa5baeaf368cbb 100644
--- a/data_model/clusters/ElectricalPowerMeasurement.xml
+++ b/data_model/clusters/ElectricalPowerMeasurement.xml
@@ -59,238 +59,151 @@ Davis, CA 95616, USA
-
+
-
+
-
+
-
+
-
+
-
+
-
- -
-
-
- -
-
-
- -
+
+
-
- -
+
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
- -
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
+
-
+
+
-
+
-
+
-
+
+
-
+
-
+
-
+
+
-
+
-
+
-
+
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
-
+
@@ -299,7 +212,7 @@ Davis, CA 95616, USA
-
+
@@ -308,51 +221,28 @@ Davis, CA 95616, USA
-
-
-
-
-
-
-
+
-
+
-
-
+
+
-
+
-
-
-
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/data_model/clusters/EnergyCalendar.xml b/data_model/clusters/EnergyCalendar.xml
index 0f9cf3c087ecf8..a21845d92c47c4 100644
--- a/data_model/clusters/EnergyCalendar.xml
+++ b/data_model/clusters/EnergyCalendar.xml
@@ -195,9 +195,21 @@ Davis, CA 95616, USA
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data_model/clusters/EnergyEVSE.xml b/data_model/clusters/EnergyEVSE.xml
index c788edc054ede0..f59d41807d43e6 100644
--- a/data_model/clusters/EnergyEVSE.xml
+++ b/data_model/clusters/EnergyEVSE.xml
@@ -227,12 +227,10 @@ Davis, CA 95616, USA
-
-
@@ -241,7 +239,6 @@ Davis, CA 95616, USA
-
@@ -277,19 +274,19 @@ Davis, CA 95616, USA
-
+
-
+
-
+
@@ -297,7 +294,7 @@ Davis, CA 95616, USA
-
+
@@ -421,11 +418,11 @@ Davis, CA 95616, USA
-
+
-
+
@@ -439,7 +436,7 @@ Davis, CA 95616, USA
-
+
@@ -512,7 +509,7 @@ Davis, CA 95616, USA
-
+
diff --git a/data_model/clusters/EnergyPreference.xml b/data_model/clusters/EnergyPreference.xml
index fa50bbe839ae65..7156be8eafe025 100644
--- a/data_model/clusters/EnergyPreference.xml
+++ b/data_model/clusters/EnergyPreference.xml
@@ -85,11 +85,9 @@ Davis, CA 95616, USA
-
-
diff --git a/data_model/clusters/EnergyPrice.xml b/data_model/clusters/EnergyPrice.xml
index b358e75ab53a5c..23072a6a99ead5 100644
--- a/data_model/clusters/EnergyPrice.xml
+++ b/data_model/clusters/EnergyPrice.xml
@@ -113,15 +113,12 @@ Davis, CA 95616, USA
-
-
-
@@ -129,35 +126,28 @@ Davis, CA 95616, USA
-
-
-
-
-
-
-
diff --git a/data_model/clusters/Group-Key-Management-Cluster.xml b/data_model/clusters/Group-Key-Management-Cluster.xml
index ad86b24e3bd387..43e7a395ac8467 100644
--- a/data_model/clusters/Group-Key-Management-Cluster.xml
+++ b/data_model/clusters/Group-Key-Management-Cluster.xml
@@ -87,16 +87,13 @@ Davis, CA 95616, USA
-
-
-
diff --git a/data_model/clusters/ICDManagement.xml b/data_model/clusters/ICDManagement.xml
index f138e7037687b6..3cc6c9bfab4416 100644
--- a/data_model/clusters/ICDManagement.xml
+++ b/data_model/clusters/ICDManagement.xml
@@ -79,11 +79,11 @@ Davis, CA 95616, USA
-
+
-
+
@@ -185,7 +185,7 @@ Davis, CA 95616, USA
-
+
@@ -197,7 +197,7 @@ Davis, CA 95616, USA
-
+
diff --git a/data_model/clusters/Messages.xml b/data_model/clusters/Messages.xml
index a976e7d260f0ff..9dd223d9a63f46 100644
--- a/data_model/clusters/Messages.xml
+++ b/data_model/clusters/Messages.xml
@@ -193,35 +193,35 @@ Davis, CA 95616, USA
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -248,10 +248,32 @@ Davis, CA 95616, USA
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -262,4 +284,44 @@ Davis, CA 95616, USA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/data_model/clusters/ModeBase.xml b/data_model/clusters/ModeBase.xml
index 1e6a81807e29a2..5774a7fec0c5a5 100644
--- a/data_model/clusters/ModeBase.xml
+++ b/data_model/clusters/ModeBase.xml
@@ -70,29 +70,24 @@ Require at least one standard mode tag. Define reserved ranges for base/derived
-
-
-
-
-
diff --git a/data_model/clusters/ModeSelect.xml b/data_model/clusters/ModeSelect.xml
index 2fff860458f0e5..19fe502c1fcfe2 100644
--- a/data_model/clusters/ModeSelect.xml
+++ b/data_model/clusters/ModeSelect.xml
@@ -69,29 +69,24 @@ Davis, CA 95616, USA
-
-
-
-
-
diff --git a/data_model/clusters/Mode_DeviceEnergyManagement.xml b/data_model/clusters/Mode_DeviceEnergyManagement.xml
index dc28204cecb511..4181b9b60ead42 100644
--- a/data_model/clusters/Mode_DeviceEnergyManagement.xml
+++ b/data_model/clusters/Mode_DeviceEnergyManagement.xml
@@ -62,30 +62,10 @@ Davis, CA 95616, USA
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/data_model/clusters/OccupancySensing.xml b/data_model/clusters/OccupancySensing.xml
index 1dd5cbe6156865..d52f118b70cbde 100644
--- a/data_model/clusters/OccupancySensing.xml
+++ b/data_model/clusters/OccupancySensing.xml
@@ -55,11 +55,12 @@ Connectivity Standards Alliance
508 Second Street, Suite 206
Davis, CA 95616, USA
-->
-
+
+
@@ -159,12 +160,10 @@ Davis, CA 95616, USA
-
-
diff --git a/data_model/clusters/PowerSourceConfigurationCluster.xml b/data_model/clusters/PowerSourceConfigurationCluster.xml
index b2eb27fd4bd7cc..5548bf6ad8e6b5 100644
--- a/data_model/clusters/PowerSourceConfigurationCluster.xml
+++ b/data_model/clusters/PowerSourceConfigurationCluster.xml
@@ -59,7 +59,7 @@ Davis, CA 95616, USA
-
+
diff --git a/data_model/clusters/PowerTopology.xml b/data_model/clusters/PowerTopology.xml
new file mode 100644
index 00000000000000..c8d90baeeded19
--- /dev/null
+++ b/data_model/clusters/PowerTopology.xml
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/data_model/clusters/ResourceMonitoring.xml b/data_model/clusters/ResourceMonitoring.xml
index 9772efbd429982..17fc7554ac41f0 100644
--- a/data_model/clusters/ResourceMonitoring.xml
+++ b/data_model/clusters/ResourceMonitoring.xml
@@ -116,12 +116,10 @@ Davis, CA 95616, USA
-
-
@@ -171,4 +169,4 @@ Davis, CA 95616, USA
-
+
\ No newline at end of file
diff --git a/data_model/clusters/Scenes.xml b/data_model/clusters/Scenes.xml
index 2168c164a02460..0c4347c4e8be8a 100644
--- a/data_model/clusters/Scenes.xml
+++ b/data_model/clusters/Scenes.xml
@@ -1,59 +1,59 @@
-
@@ -73,50 +73,39 @@ Davis, CA 95616, USA
-
-
-
-
-
-
-
-
-
-
-
@@ -146,24 +135,22 @@ Davis, CA 95616, USA
-
-
+
-
+
-
+
-
diff --git a/data_model/clusters/Thermostat.xml b/data_model/clusters/Thermostat.xml
index b7e811bb8738ae..400d55a048a116 100644
--- a/data_model/clusters/Thermostat.xml
+++ b/data_model/clusters/Thermostat.xml
@@ -451,27 +451,16 @@ Davis, CA 95616, USA
-
-
-
-
-
-
-
-
-
-
+
-
-
@@ -701,7 +690,7 @@ Davis, CA 95616, USA
-
+
@@ -742,7 +731,7 @@ Davis, CA 95616, USA
-
+
@@ -772,7 +761,7 @@ Davis, CA 95616, USA
-
+
@@ -898,7 +887,7 @@ Davis, CA 95616, USA
-
+
diff --git a/data_model/clusters/WaterContentMeasurement.xml b/data_model/clusters/WaterContentMeasurement.xml
index bca3f6de8e4101..8b1ff6a9a049bc 100644
--- a/data_model/clusters/WaterContentMeasurement.xml
+++ b/data_model/clusters/WaterContentMeasurement.xml
@@ -87,4 +87,4 @@ Davis, CA 95616, USA
-
+
\ No newline at end of file
diff --git a/data_model/clusters/WiFiNetworkManagement.xml b/data_model/clusters/WiFiNetworkManagement.xml
new file mode 100644
index 00000000000000..6308eca7e4b184
--- /dev/null
+++ b/data_model/clusters/WiFiNetworkManagement.xml
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/data_model/clusters/bridge-clusters-Actions.xml b/data_model/clusters/bridge-clusters-Actions.xml
index ccacb56e8b2576..51f7ee79bb4bad 100644
--- a/data_model/clusters/bridge-clusters-Actions.xml
+++ b/data_model/clusters/bridge-clusters-Actions.xml
@@ -157,28 +157,22 @@ Davis, CA 95616, USA
-
-
-
-
-
-
diff --git a/data_model/device_types/Aggregator.xml b/data_model/device_types/Aggregator.xml
index f9bff7aa27cd55..4e0eb1cee512c3 100644
--- a/data_model/device_types/Aggregator.xml
+++ b/data_model/device_types/Aggregator.xml
@@ -60,7 +60,7 @@ Davis, CA 95616, USA
-
+
diff --git a/data_model/device_types/ColorTemperatureLight.xml b/data_model/device_types/ColorTemperatureLight.xml
index 210ce03b2da41c..5d6ac140803e23 100644
--- a/data_model/device_types/ColorTemperatureLight.xml
+++ b/data_model/device_types/ColorTemperatureLight.xml
@@ -60,7 +60,7 @@ Davis, CA 95616, USA
-
+
@@ -114,12 +114,6 @@ Davis, CA 95616, USA
-
-
-
-
-
-
diff --git a/data_model/device_types/ContentApp.xml b/data_model/device_types/ContentApp.xml
index a6eb1a4ca0d424..0db03141e7f9a1 100644
--- a/data_model/device_types/ContentApp.xml
+++ b/data_model/device_types/ContentApp.xml
@@ -61,7 +61,6 @@ Davis, CA 95616, USA
-
diff --git a/data_model/device_types/DimmableLight.xml b/data_model/device_types/DimmableLight.xml
index ce5dce7c8bf192..42c7d20fb4caad 100644
--- a/data_model/device_types/DimmableLight.xml
+++ b/data_model/device_types/DimmableLight.xml
@@ -55,12 +55,11 @@ Connectivity Standards Alliance
508 Second Street, Suite 206
Davis, CA 95616, USA
-->
-
+
-
@@ -114,12 +113,6 @@ Davis, CA 95616, USA
-
-
-
-
-
-
diff --git a/data_model/device_types/DimmablePlug-InUnit.xml b/data_model/device_types/DimmablePlug-InUnit.xml
index 0756ed62baf9c0..a41db3ad0ae255 100644
--- a/data_model/device_types/DimmablePlug-InUnit.xml
+++ b/data_model/device_types/DimmablePlug-InUnit.xml
@@ -60,7 +60,7 @@ Davis, CA 95616, USA
-
+
@@ -114,12 +114,6 @@ Davis, CA 95616, USA
-
-
-
-
-
-
diff --git a/data_model/device_types/DoorLockController.xml b/data_model/device_types/DoorLockController.xml
index a41cdad0e1bf5a..0e4529c8b5e381 100644
--- a/data_model/device_types/DoorLockController.xml
+++ b/data_model/device_types/DoorLockController.xml
@@ -63,16 +63,6 @@ Davis, CA 95616, USA
-
-
-
-
-
-
-
-
-
-
diff --git a/data_model/device_types/EVSE.xml b/data_model/device_types/EVSE.xml
index 42636733090c9c..f15b1db770b454 100644
--- a/data_model/device_types/EVSE.xml
+++ b/data_model/device_types/EVSE.xml
@@ -68,12 +68,6 @@ Davis, CA 95616, USA
-
-
-
-
-
-
diff --git a/data_model/device_types/ElectricalSensor.xml b/data_model/device_types/ElectricalSensor.xml
new file mode 100644
index 00000000000000..62c6dd9b4128b2
--- /dev/null
+++ b/data_model/device_types/ElectricalSensor.xml
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/data_model/device_types/ExtendedColorLight.xml b/data_model/device_types/ExtendedColorLight.xml
index a0337009f660eb..73490485fa27fa 100644
--- a/data_model/device_types/ExtendedColorLight.xml
+++ b/data_model/device_types/ExtendedColorLight.xml
@@ -60,7 +60,7 @@ Davis, CA 95616, USA
-
+
@@ -114,12 +114,6 @@ Davis, CA 95616, USA
-
-
-
-
-
-
diff --git a/data_model/device_types/NetworkInfraManager.xml b/data_model/device_types/NetworkInfraManager.xml
index 750a97f22cad86..cc7e22295f40be 100644
--- a/data_model/device_types/NetworkInfraManager.xml
+++ b/data_model/device_types/NetworkInfraManager.xml
@@ -65,5 +65,8 @@ Davis, CA 95616, USA
+
+
+
\ No newline at end of file
diff --git a/data_model/device_types/OnOffLight.xml b/data_model/device_types/OnOffLight.xml
index ea520612b9dc42..9762c718dcc05b 100644
--- a/data_model/device_types/OnOffLight.xml
+++ b/data_model/device_types/OnOffLight.xml
@@ -55,12 +55,11 @@ Connectivity Standards Alliance
508 Second Street, Suite 206
Davis, CA 95616, USA
-->
-
+
-
@@ -114,12 +113,6 @@ Davis, CA 95616, USA
-
-
-
-
-
-
diff --git a/data_model/device_types/OnOffPlug-inUnit.xml b/data_model/device_types/OnOffPlug-inUnit.xml
index d63e3b22e81aae..41d0a1398ad6f3 100644
--- a/data_model/device_types/OnOffPlug-inUnit.xml
+++ b/data_model/device_types/OnOffPlug-inUnit.xml
@@ -55,12 +55,11 @@ Connectivity Standards Alliance
508 Second Street, Suite 206
Davis, CA 95616, USA
-->
-
+
-
@@ -114,12 +113,6 @@ Davis, CA 95616, USA
-
-
-
-
-
-
diff --git a/data_model/device_types/PowerSource.xml b/data_model/device_types/PowerSource.xml
index 3767d5c19ad025..9ed71e905535bd 100644
--- a/data_model/device_types/PowerSource.xml
+++ b/data_model/device_types/PowerSource.xml
@@ -55,21 +55,14 @@ Connectivity Standards Alliance
508 Second Street, Suite 206
Davis, CA 95616, USA
-->
-
+
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/data_model/device_types/TemperatureControlledCabinet.xml b/data_model/device_types/TemperatureControlledCabinet.xml
index 090931ace14f61..b39861690cad61 100644
--- a/data_model/device_types/TemperatureControlledCabinet.xml
+++ b/data_model/device_types/TemperatureControlledCabinet.xml
@@ -66,6 +66,14 @@ Davis, CA 95616, USA
+
+
+
+
+
+
+
+
diff --git a/data_model/device_types/Thermostat.xml b/data_model/device_types/Thermostat.xml
index 8676fe965ef280..fc154468e97c5f 100644
--- a/data_model/device_types/Thermostat.xml
+++ b/data_model/device_types/Thermostat.xml
@@ -97,9 +97,6 @@ Davis, CA 95616, USA
-
-
-
diff --git a/data_model/spec_sha b/data_model/spec_sha
index 9c275037d5b895..ec683a1872fc3e 100644
--- a/data_model/spec_sha
+++ b/data_model/spec_sha
@@ -1 +1 @@
-7e16e82e5264105bdc61d6bc8fe18095959b8292
+72ce960f71810d6ca96125aea54e4fb0a9631e34
diff --git a/docs/QUICK_START.md b/docs/QUICK_START.md
index 5a4027e3dc7278..97f0f76b3b0436 100644
--- a/docs/QUICK_START.md
+++ b/docs/QUICK_START.md
@@ -19,7 +19,7 @@ combination listed below.
| Border Router
| Node
| Description |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [**ot-br**](https://openthread.io/guides/border-router/build)
Thread Border Router RasPi BeagleBone | **lighting-app** [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect/README.md) [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nxp/k32w/k32w0/README.md) [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/qpg) [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/efr32/README.md) | The Lighting example is supported by many of the available Thread platforms. See the chip-tool controller instructions for how to actuate the light on/off cluster. |
+| [**ot-br**](https://openthread.io/guides/border-router/build)
Thread Border Router RasPi BeagleBone | **lighting-app** [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect/README.md) [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nxp/k32w/k32w0/README.md) [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/qpg) [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/silabs/README.md) | The Lighting example is supported by many of the available Thread platforms. See the chip-tool controller instructions for how to actuate the light on/off cluster. |
| [**ot-br**](https://openthread.io/guides/border-router/build)
Thread Border Router RasPi BeagleBone | **lock-app** [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nrfconnect/README.md) [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nxp/k32w/k32w0/README.md) [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/qpg) [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/efr32/README.md) [TI CC13x2x7](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/cc13x2x7_26x2x7/README.md) | The Lock example is supported by many of the available Thread and Wi-Fi platforms. |
## Controllers
diff --git a/docs/guides/silabs_efr32_software_update.md b/docs/guides/silabs_efr32_software_update.md
index ec57cc4acaa372..9f94753aa7d29f 100644
--- a/docs/guides/silabs_efr32_software_update.md
+++ b/docs/guides/silabs_efr32_software_update.md
@@ -8,7 +8,7 @@ all of the EFR32 example applications.
## Running the OTA Download scenario
- For Matter with OpenThread: Bring up the OpenThread Border Router as
- discussed in examples/lighting-app/efr32/README.md and get its operational
+ discussed in examples/lighting-app/silabs/README.md and get its operational
dataset.
- On a Linux or Darwin platform build the chip-tool and the ota-provider-app
diff --git a/docs/guides/simulated_device_linux.md b/docs/guides/simulated_device_linux.md
index 686a5387eb6eb9..81d36c90347115 100644
--- a/docs/guides/simulated_device_linux.md
+++ b/docs/guides/simulated_device_linux.md
@@ -11,11 +11,6 @@ If some parameters need to be overridden, a `CHIPProjectConfig.h` file can be
placed under an ‘include’ folder into the app folder. For example
`examples/placeholder/linux/apps/app1/include/CHIPProjectConfig.h`
-In order to generate specific tests for a given accessory, a
-[examples/placeholder/linux/apps/app1/tests.js](../../examples/placeholder/linux/apps/app1/tests.js)
-file can be added into the application directory. The tests listed there are the
-one that will be executed once the application has been commissioned.
-
Simulated Device: simulation of an application in which tests can be added. It
is defined by a ZAP config file and tests can be added with a
[YAML file](../../src/app/tests/suites/certification/Test_TC_DM_1_3_Simulated.yaml).
@@ -66,7 +61,7 @@ Now that the building is completed there is a `chip-app1` binary created. This
binary can be executed on a linux os with test commands.
```
-./out/debug/simulated/chip-app1 --command [TEST NAME]
+./scripts/tests/yaml/runner.py [TEST NAME] app1
```
## Interacting with the simulated app
@@ -99,8 +94,7 @@ interact with it using chip-tool
## Adding simulated Tests via YAML
In order to validate commissioner/controller behavior, tests need to be added to
-the simulated device test framework. To achieve this, YAML files are created and
-new code is generated.
+the simulated device test framework. To achieve this, YAML files are created.
1. YAML test file are located in
[YAML folder](../../src/app/tests/suites/certification/)
@@ -124,26 +118,3 @@ new code is generated.
5. [Test_TC_DM_1_3_Simulated](../../src/app/tests/suites/certification/Test_TC_DM_1_3_Simulated.yaml)
is an example of a written test that runs on the simulated device.
-
-6. Next, it will need to be added to
- [examples/placeholder/linux/apps/app1/tests.js](../../examples/placeholder/linux/apps/app1/tests.js)
- in the following array:
-
- ```javascript
- const tests = ["Test_TC_DM_1_3_Simulated"];
- ```
-
-7. Then, the code will be generated using ZAP.
-
- ```
- ./scripts/tools/zap/generate.py examples/placeholder/linux/apps/app1/config.zap -t examples/placeholder/templates/templates.json -o zzz_generated/placeholder/app1/zap-generated
- ```
-
- The following command can be used to generate and compile:
-
- ```
- ./scripts/examples/gn_build_test_example.sh app1
- ```
-
-8) When submitting code for review, create 2 commits. One for YAML changes and
- second for generated code.
diff --git a/docs/guides/ti/matter_cc2674_migration.md b/docs/guides/ti/matter_cc2674_migration.md
index 03a0c2e4f41e62..994954d6ae7a53 100644
--- a/docs/guides/ti/matter_cc2674_migration.md
+++ b/docs/guides/ti/matter_cc2674_migration.md
@@ -11,8 +11,6 @@ project accordingly. Example projects can be found in the following location:
The following must be installed on your system before proceeding:
- [SysConfig](https://www.ti.com/tool/SYSCONFIG) v1.16.2 or later
-- [SIMPLELINK-LOWPOWER-F2-SDK](https://www.ti.com/tool/SIMPLELINK-LOWPOWER-SDK)
- v7.10.01.24
## Matter source code changes
@@ -22,12 +20,20 @@ CC2674P10 device
- `examples/[application]/cc13x4_26x4/args.gni`, modify/add the following
defines for the CC2674
- - `ti_simplelink_board = CC2674`
- - `ti_simplelink_device = CC2674P10RGZ`
-- `third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx`, replace this folder
- contents with the 7.10.01.24 version from
- [TI's downloads page](https://www.ti.com/tool/download/SIMPLELINK-LOWPOWER-F2-SDK/7.10.01.24)
- which is required to add support SDK for the CC2674P10 device.
+ - `ti_simplelink_board = "CC2674"`
+ - `ti_simplelink_device = "CC2674P10RGZ"`
+- `third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/source/ti/common/flash/no_rtos/extFlash/bsp.h`,
+ modify the SPI GPIO pins to the value below:
+
+```
+#define BSP_IOID_FLASH_CS IOID_20
+#define BSP_SPI_MOSI IOID_9
+#define BSP_SPI_MISO IOID_8
+#define BSP_SPI_CLK_FLASH IOID_10
+
+```
+
+The GPIO pin values for SPI will need to be adjusted based on your design.
## Configuring `chip.syscfg` in the SysConfig GUI
diff --git a/examples/air-purifier-app/air-purifier-common/include/relative-humidity-sensor-manager.h b/examples/air-purifier-app/air-purifier-common/include/relative-humidity-sensor-manager.h
index 23c82787b0203e..f950121b5a22b2 100644
--- a/examples/air-purifier-app/air-purifier-common/include/relative-humidity-sensor-manager.h
+++ b/examples/air-purifier-app/air-purifier-common/include/relative-humidity-sensor-manager.h
@@ -19,6 +19,7 @@
#pragma once
#include
+#include
namespace chip {
namespace app {
@@ -31,19 +32,20 @@ class RelativeHumiditySensorManager
void Init()
{
- EmberAfStatus status = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, 0);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ Protocols::InteractionModel::Status status = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, 0);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MinMeasuredValue attribute"));
status = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Set(mEndpointId, 10000);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MaxMeasuredValue attribute"));
};
void OnHumidityChangeHandler(uint16_t newValue)
{
- EmberAfStatus status = RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ Protocols::InteractionModel::Status status =
+ RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MeasuredValue attribute"));
ChipLogDetail(NotSpecified, "The new RelativeHumidityMeasurement value: %d", newValue);
}
diff --git a/examples/air-purifier-app/air-purifier-common/include/temperature-sensor-manager.h b/examples/air-purifier-app/air-purifier-common/include/temperature-sensor-manager.h
index 339d02588f52bc..f7061393d76cb6 100644
--- a/examples/air-purifier-app/air-purifier-common/include/temperature-sensor-manager.h
+++ b/examples/air-purifier-app/air-purifier-common/include/temperature-sensor-manager.h
@@ -19,6 +19,7 @@
#pragma once
#include
+#include
namespace chip {
namespace app {
@@ -31,19 +32,19 @@ class TemperatureSensorManager
void Init()
{
- EmberAfStatus status = TemperatureMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, -500);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ Protocols::InteractionModel::Status status = TemperatureMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, -500);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MinMeasuredValue attribute"));
status = TemperatureMeasurement::Attributes::MaxMeasuredValue::Set(mEndpointId, 6000);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MaxMeasuredValue attribute"));
}
void OnTemperatureChangeHandler(int16_t newValue)
{
- EmberAfStatus status = TemperatureMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ Protocols::InteractionModel::Status status = TemperatureMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MeasuredValue attribute"));
ChipLogDetail(NotSpecified, "The new TemperatureMeasurement value: %d", newValue);
}
diff --git a/examples/air-purifier-app/air-purifier-common/src/air-purifier-manager.cpp b/examples/air-purifier-app/air-purifier-common/src/air-purifier-manager.cpp
index 7ce8ac5f338fcc..22e938ddfa4023 100644
--- a/examples/air-purifier-app/air-purifier-common/src/air-purifier-manager.cpp
+++ b/examples/air-purifier-app/air-purifier-common/src/air-purifier-manager.cpp
@@ -17,7 +17,6 @@
*/
#include
-#include
using namespace chip;
using namespace chip::app;
@@ -147,7 +146,7 @@ Status AirPurifierManager::HandleStep(FanControl::StepDirectionEnum aDirection,
}
}
- return ToInteractionModelStatus(FanControl::Attributes::SpeedSetting::Set(mEndpointId, newSpeedSetting));
+ return FanControl::Attributes::SpeedSetting::Set(mEndpointId, newSpeedSetting);
}
void AirPurifierManager::HandleFanControlAttributeChange(AttributeId attributeId, uint8_t type, uint16_t size, uint8_t * value)
@@ -197,12 +196,13 @@ void AirPurifierManager::PercentSettingWriteCallback(uint8_t aNewPercentSetting)
if (aNewPercentSetting != percentCurrent)
{
ChipLogDetail(NotSpecified, "AirPurifierManager::PercentSettingWriteCallback: %d", aNewPercentSetting);
- percentCurrent = aNewPercentSetting;
- EmberAfStatus status = FanControl::Attributes::PercentCurrent::Set(mEndpointId, percentCurrent);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ percentCurrent = aNewPercentSetting;
+ Status status = FanControl::Attributes::PercentCurrent::Set(mEndpointId, percentCurrent);
+ if (status != Status::Success)
{
ChipLogError(NotSpecified,
- "AirPurifierManager::PercentSettingWriteCallback: failed to set PercentCurrent attribute: %d", status);
+ "AirPurifierManager::PercentSettingWriteCallback: failed to set PercentCurrent attribute: %d",
+ to_underlying(status));
}
}
}
@@ -212,12 +212,12 @@ void AirPurifierManager::SpeedSettingWriteCallback(uint8_t aNewSpeedSetting)
if (aNewSpeedSetting != speedCurrent)
{
ChipLogDetail(NotSpecified, "AirPurifierManager::SpeedSettingWriteCallback: %d", aNewSpeedSetting);
- speedCurrent = aNewSpeedSetting;
- EmberAfStatus status = FanControl::Attributes::SpeedCurrent::Set(mEndpointId, speedCurrent);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ speedCurrent = aNewSpeedSetting;
+ Status status = FanControl::Attributes::SpeedCurrent::Set(mEndpointId, speedCurrent);
+ if (status != Status::Success)
{
ChipLogError(NotSpecified, "AirPurifierManager::SpeedSettingWriteCallback: failed to set SpeedCurrent attribute: %d",
- status);
+ to_underlying(status));
}
// Determine if the speed change should also change the fan mode
@@ -300,10 +300,11 @@ void AirPurifierManager::SetSpeedSetting(DataModel::Nullable aNewSpeedS
if (aNewSpeedSetting.Value() != speedCurrent)
{
- EmberAfStatus status = FanControl::Attributes::SpeedSetting::Set(mEndpointId, aNewSpeedSetting);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ Status status = FanControl::Attributes::SpeedSetting::Set(mEndpointId, aNewSpeedSetting);
+ if (status != Status::Success)
{
- ChipLogError(NotSpecified, "AirPurifierManager::SetSpeedSetting: failed to set SpeedSetting attribute: %d", status);
+ ChipLogError(NotSpecified, "AirPurifierManager::SetSpeedSetting: failed to set SpeedSetting attribute: %d",
+ to_underlying(status));
}
}
}
@@ -311,11 +312,12 @@ void AirPurifierManager::SetSpeedSetting(DataModel::Nullable aNewSpeedS
DataModel::Nullable AirPurifierManager::GetSpeedSetting()
{
DataModel::Nullable speedSetting;
- EmberAfStatus status = FanControl::Attributes::SpeedSetting::Get(mEndpointId, speedSetting);
+ Status status = FanControl::Attributes::SpeedSetting::Get(mEndpointId, speedSetting);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Status::Success)
{
- ChipLogError(NotSpecified, "AirPurifierManager::GetSpeedSetting: failed to get SpeedSetting attribute: %d", status);
+ ChipLogError(NotSpecified, "AirPurifierManager::GetSpeedSetting: failed to get SpeedSetting attribute: %d",
+ to_underlying(status));
}
return speedSetting;
@@ -324,11 +326,12 @@ DataModel::Nullable AirPurifierManager::GetSpeedSetting()
DataModel::Nullable AirPurifierManager::GetPercentSetting()
{
DataModel::Nullable percentSetting;
- EmberAfStatus status = FanControl::Attributes::PercentSetting::Get(mEndpointId, percentSetting);
+ Status status = FanControl::Attributes::PercentSetting::Get(mEndpointId, percentSetting);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Status::Success)
{
- ChipLogError(NotSpecified, "AirPurifierManager::GetPercentSetting: failed to get PercentSetting attribute: %d", status);
+ ChipLogError(NotSpecified, "AirPurifierManager::GetPercentSetting: failed to get PercentSetting attribute: %d",
+ to_underlying(status));
}
return percentSetting;
diff --git a/examples/air-purifier-app/air-purifier-common/src/thermostat-manager.cpp b/examples/air-purifier-app/air-purifier-common/src/thermostat-manager.cpp
index c2536e4d99e38b..8d511d24e550dc 100644
--- a/examples/air-purifier-app/air-purifier-common/src/thermostat-manager.cpp
+++ b/examples/air-purifier-app/air-purifier-common/src/thermostat-manager.cpp
@@ -17,6 +17,9 @@
*/
#include "thermostat-manager.h"
+#include
+
+using chip::Protocols::InteractionModel::Status;
using namespace chip;
using namespace chip::app;
@@ -26,19 +29,19 @@ void ThermostatManager::Init()
{
BitMask FeatureMap;
FeatureMap.Set(Thermostat::Feature::kHeating);
- EmberAfStatus status = Thermostat::Attributes::FeatureMap::Set(mEndpointId, FeatureMap.Raw());
+ Status status = Thermostat::Attributes::FeatureMap::Set(mEndpointId, FeatureMap.Raw());
status = Thermostat::Attributes::ControlSequenceOfOperation::Set(mEndpointId,
Thermostat::ControlSequenceOfOperationEnum::kHeatingOnly);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ VerifyOrReturn(Status::Success == status,
ChipLogError(NotSpecified, "Failed to set Thermostat ControlSequenceOfOperation attribute"));
status = Thermostat::Attributes::AbsMinHeatSetpointLimit::Set(mEndpointId, 500);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ VerifyOrReturn(Status::Success == status,
ChipLogError(NotSpecified, "Failed to set Thermostat MinHeatSetpointLimit attribute"));
status = Thermostat::Attributes::AbsMaxHeatSetpointLimit::Set(mEndpointId, 3000);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ VerifyOrReturn(Status::Success == status,
ChipLogError(NotSpecified, "Failed to set Thermostat MaxHeatSetpointLimit attribute"));
}
@@ -46,8 +49,8 @@ void ThermostatManager::HeatingSetpointWriteCallback(int16_t newValue)
{
ChipLogDetail(NotSpecified, "ThermostatManager::HeatingSetpointWriteCallback: %d", newValue);
Thermostat::SystemModeEnum systemMode;
- EmberAfStatus status = Thermostat::Attributes::SystemMode::Get(mEndpointId, &systemMode);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to get Thermostat SystemMode attribute"));
+ Status status = Thermostat::Attributes::SystemMode::Get(mEndpointId, &systemMode);
+ VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to get Thermostat SystemMode attribute"));
// A new setpoint has been set, so we shall infer that the we want to be in Heating mode
if (systemMode == Thermostat::SystemModeEnum::kOff)
@@ -58,7 +61,7 @@ void ThermostatManager::HeatingSetpointWriteCallback(int16_t newValue)
// Check the current temperature and turn on the heater if needed
DataModel::Nullable localTemperature;
status = Thermostat::Attributes::LocalTemperature::Get(mEndpointId, localTemperature);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ VerifyOrReturn(Status::Success == status,
ChipLogError(NotSpecified, "Failed to get TemperatureMeasurement MeasuredValue attribute"));
if (localTemperature.Value() < newValue)
@@ -81,14 +84,13 @@ void ThermostatManager::SystemModeWriteCallback(uint8_t newValue)
else if ((Thermostat::SystemModeEnum) newValue == Thermostat::SystemModeEnum::kHeat)
{
DataModel::Nullable localTemperature;
- EmberAfStatus status = Thermostat::Attributes::LocalTemperature::Get(mEndpointId, localTemperature);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ Status status = Thermostat::Attributes::LocalTemperature::Get(mEndpointId, localTemperature);
+ VerifyOrReturn(Status::Success == status,
ChipLogError(NotSpecified, "Failed to get TemperatureMeasurement MeasuredValue attribute"));
int16_t heatingSetpoint;
status = Thermostat::Attributes::OccupiedHeatingSetpoint::Get(mEndpointId, &heatingSetpoint);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
- ChipLogError(NotSpecified, "Failed to get Thermostat HeatingSetpoint attribute"));
+ VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to get Thermostat HeatingSetpoint attribute"));
if (localTemperature.Value() < heatingSetpoint)
{
@@ -99,8 +101,8 @@ void ThermostatManager::SystemModeWriteCallback(uint8_t newValue)
void ThermostatManager::OnLocalTemperatureChangeCallback(int16_t temperature)
{
- EmberAfStatus status = Thermostat::Attributes::LocalTemperature::Set(mEndpointId, temperature);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ Status status = Thermostat::Attributes::LocalTemperature::Set(mEndpointId, temperature);
+ VerifyOrReturn(Status::Success == status,
ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MeasuredValue attribute"));
}
@@ -122,14 +124,13 @@ void ThermostatManager::SetHeating(bool isHeating)
runningState.Clear(Thermostat::RelayStateBitmap::kHeat);
}
- EmberAfStatus status = Thermostat::Attributes::ThermostatRunningState::Set(mEndpointId, runningState);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
- ChipLogError(NotSpecified, "Failed to set Thermostat RunningState attribute"));
+ Status status = Thermostat::Attributes::ThermostatRunningState::Set(mEndpointId, runningState);
+ VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to set Thermostat RunningState attribute"));
}
void ThermostatManager::SetHeatMode(bool heat)
{
- EmberAfStatus status = Thermostat::Attributes::SystemMode::Set(
+ Status status = Thermostat::Attributes::SystemMode::Set(
mEndpointId, heat ? Thermostat::SystemModeEnum::kHeat : Thermostat::SystemModeEnum::kOff);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set Thermostat SystemMode attribute"));
+ VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to set Thermostat SystemMode attribute"));
}
diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/include/relative-humidity-sensor-manager.h b/examples/air-quality-sensor-app/air-quality-sensor-common/include/relative-humidity-sensor-manager.h
index 4759f6096c84fc..0de2fa76e5ba61 100644
--- a/examples/air-quality-sensor-app/air-quality-sensor-common/include/relative-humidity-sensor-manager.h
+++ b/examples/air-quality-sensor-app/air-quality-sensor-common/include/relative-humidity-sensor-manager.h
@@ -1,4 +1,5 @@
#include
+#include
#pragma once
@@ -11,19 +12,20 @@ class RelativeHumiditySensorManager
public:
RelativeHumiditySensorManager(EndpointId aEndpointId) : mEndpointId(aEndpointId)
{
- EmberAfStatus status = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, 0);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ Protocols::InteractionModel::Status status = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, 0);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MinMeasuredValue attribute"));
status = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Set(mEndpointId, 100);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MaxMeasuredValue attribute"));
};
void OnHumidityChangeHandler(uint16_t newValue)
{
- EmberAfStatus status = RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ Protocols::InteractionModel::Status status =
+ RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MeasuredValue attribute"));
ChipLogDetail(NotSpecified, "The new RelativeHumidityMeasurement value: %d", newValue);
}
diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/include/temperature-sensor-manager.h b/examples/air-quality-sensor-app/air-quality-sensor-common/include/temperature-sensor-manager.h
index 3a0fc0cd0f4646..37f26e1412a886 100644
--- a/examples/air-quality-sensor-app/air-quality-sensor-common/include/temperature-sensor-manager.h
+++ b/examples/air-quality-sensor-app/air-quality-sensor-common/include/temperature-sensor-manager.h
@@ -1,6 +1,8 @@
-#include
#pragma once
+#include
+
+#include
namespace chip {
namespace app {
@@ -11,19 +13,19 @@ class TemperatureSensorManager
public:
TemperatureSensorManager(EndpointId aEndpointId) : mEndpointId(aEndpointId)
{
- EmberAfStatus status = TemperatureMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, -5);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ Protocols::InteractionModel::Status status = TemperatureMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, -5);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MinMeasuredValue attribute"));
status = TemperatureMeasurement::Attributes::MaxMeasuredValue::Set(mEndpointId, 60);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MaxMeasuredValue attribute"));
};
void OnTemperatureChangeHandler(int16_t newValue)
{
- EmberAfStatus status = TemperatureMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
+ Protocols::InteractionModel::Status status = TemperatureMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MeasuredValue attribute"));
ChipLogDetail(NotSpecified, "The new TemperatureMeasurement value: %d", newValue);
}
diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
index 17d4637b212453..91ab01644ddc7b 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
@@ -2732,7 +2732,7 @@ provisional cluster OvenMode = 73 {
/** This cluster supports remotely monitoring and controling the different typs of
functionality available to a drying device, such as a laundry dryer. */
-cluster LaundryDryerControls = 74 {
+provisional cluster LaundryDryerControls = 74 {
revision 1;
enum DrynessLevelEnum : enum8 {
diff --git a/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h
index 0bcb76f324a1da..5c6f70bd28a50c 100644
--- a/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h
+++ b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h
@@ -20,7 +20,7 @@
#include
#include
-#include
+
#include
namespace chip {
diff --git a/examples/all-clusters-app/all-clusters-common/include/oven-operational-state-delegate.h b/examples/all-clusters-app/all-clusters-common/include/oven-operational-state-delegate.h
index 6d7338214f77ae..f68eec20692d0b 100644
--- a/examples/all-clusters-app/all-clusters-common/include/oven-operational-state-delegate.h
+++ b/examples/all-clusters-app/all-clusters-common/include/oven-operational-state-delegate.h
@@ -20,7 +20,7 @@
#include
#include
-#include
+
#include
namespace chip {
diff --git a/examples/all-clusters-app/all-clusters-common/include/rvc-operational-state-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/rvc-operational-state-delegate-impl.h
index 4417f9f5a3ab4a..60a2f5d530f9b9 100644
--- a/examples/all-clusters-app/all-clusters-common/include/rvc-operational-state-delegate-impl.h
+++ b/examples/all-clusters-app/all-clusters-common/include/rvc-operational-state-delegate-impl.h
@@ -20,7 +20,7 @@
#include
#include
-#include
+
#include
namespace chip {
diff --git a/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp b/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp
index cd16efd4a3f054..95f50acce7c4ef 100644
--- a/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp
+++ b/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp
@@ -73,13 +73,13 @@ static void BoundDeviceChangedHandler(const EmberBindingTableEntry & binding, ch
using namespace chip;
using namespace chip::app;
- if (binding.type == EMBER_MULTICAST_BINDING)
+ if (binding.type == MATTER_MULTICAST_BINDING)
{
ChipLogError(NotSpecified, "Group binding is not supported now");
return;
}
- if (binding.type == EMBER_UNICAST_BINDING && binding.local == 1 &&
+ if (binding.type == MATTER_UNICAST_BINDING && binding.local == 1 &&
(!binding.clusterId.HasValue() || binding.clusterId.Value() == Clusters::OnOff::Id))
{
auto onSuccess = [](const ConcreteCommandPath & commandPath, const StatusIB & status, const auto & dataResponse) {
diff --git a/examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp
index 58d393752c8bfd..f700df068b529f 100644
--- a/examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp
+++ b/examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp
@@ -17,7 +17,6 @@
*/
#include
#include
-#include
using namespace chip;
diff --git a/examples/all-clusters-app/all-clusters-common/src/electrical-power-measurement-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/electrical-power-measurement-stub.cpp
index bac73dd0441634..4bcea0e8ed9895 100644
--- a/examples/all-clusters-app/all-clusters-common/src/electrical-power-measurement-stub.cpp
+++ b/examples/all-clusters-app/all-clusters-common/src/electrical-power-measurement-stub.cpp
@@ -16,239 +16,25 @@
* limitations under the License.
*/
-#include
+#include
using namespace chip;
using namespace chip::app::Clusters;
using namespace chip::app::Clusters::ElectricalPowerMeasurement;
-using namespace chip::app::Clusters::ElectricalPowerMeasurement::Structs;
-namespace chip {
-namespace app {
-namespace Clusters {
-namespace ElectricalPowerMeasurement {
-
-static MeasurementAccuracyRangeStruct::Type activeCurrentAccuracyRanges[] = { { .rangeMin = 500, .rangeMax = 1000 } };
-
-class StubAccuracyIterator : public Delegate::AccuracyIterator
-{
-public:
- size_t Count() override;
- bool Next(MeasurementAccuracyStruct::Type & output) override;
- void Release() override;
-
-private:
- uint8_t mIndex;
-};
-
-size_t StubAccuracyIterator::Count()
-{
- return 1;
-}
-
-bool StubAccuracyIterator::Next(MeasurementAccuracyStruct::Type & output)
-{
- if (mIndex >= 1)
- {
- return false;
- }
- output.measurementType = MeasurementTypeEnum::kActiveCurrent;
- output.measured = true;
- output.minMeasuredValue = -10000000;
- output.maxMeasuredValue = 10000000;
- output.accuracyRanges = DataModel::List(activeCurrentAccuracyRanges);
- mIndex++;
- return true;
-}
-
-void StubAccuracyIterator::Release()
-{
- mIndex = 0;
-}
-
-class StubRangeIterator : public Delegate::RangeIterator
-{
-public:
- size_t Count() override;
- bool Next(MeasurementRangeStruct::Type & output) override;
- void Release() override;
-};
-
-size_t StubRangeIterator::Count()
-{
- return 0;
-}
-
-bool StubRangeIterator::Next(MeasurementRangeStruct::Type & output)
-{
- return false;
-}
-
-void StubRangeIterator::Release() {}
-
-class StubHarmonicMeasurementIterator : public Delegate::HarmonicMeasurementIterator
-{
-public:
- size_t Count() override;
- bool Next(HarmonicMeasurementStruct::Type & output) override;
- void Release() override;
-};
-
-size_t StubHarmonicMeasurementIterator::Count()
-{
- return 0;
-}
-
-bool StubHarmonicMeasurementIterator::Next(HarmonicMeasurementStruct::Type & output)
-{
- return false;
-}
-
-void StubHarmonicMeasurementIterator::Release() {}
-
-static StubAccuracyIterator accuracyIterator;
-static StubRangeIterator rangeIterator;
-static StubHarmonicMeasurementIterator harmonicMeasurementIterator;
-
-class ElectricalPowerMeasurementDelegate : public Delegate
-{
-public:
- PowerModeEnum GetPowerMode() override;
- uint8_t GetNumberOfMeasurementTypes() override;
- AccuracyIterator * IterateAccuracy() override;
- RangeIterator * IterateRanges() override;
- DataModel::Nullable GetVoltage() override;
- DataModel::Nullable GetActiveCurrent() override;
- DataModel::Nullable GetReactiveCurrent() override;
- DataModel::Nullable GetApparentCurrent() override;
- DataModel::Nullable GetActivePower() override;
- DataModel::Nullable GetReactivePower() override;
- DataModel::Nullable GetApparentPower() override;
- DataModel::Nullable GetRMSVoltage() override;
- DataModel::Nullable GetRMSCurrent() override;
- DataModel::Nullable GetRMSPower() override;
- DataModel::Nullable GetFrequency() override;
- HarmonicMeasurementIterator * IterateHarmonicCurrents() override;
- HarmonicMeasurementIterator * IterateHarmonicPhases() override;
- DataModel::Nullable GetPowerFactor() override;
- DataModel::Nullable GetNeutralCurrent() override;
-
- ~ElectricalPowerMeasurementDelegate() = default;
-};
-
-PowerModeEnum ElectricalPowerMeasurementDelegate::GetPowerMode()
-{
- return PowerModeEnum::kAc;
-}
-
-uint8_t ElectricalPowerMeasurementDelegate::GetNumberOfMeasurementTypes()
-{
- return 1;
-}
-
-Delegate::AccuracyIterator * ElectricalPowerMeasurementDelegate::IterateAccuracy()
-{
- return &accuracyIterator;
-}
-
-Delegate::RangeIterator * ElectricalPowerMeasurementDelegate::IterateRanges()
-{
- return &rangeIterator;
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetVoltage()
-{
- return {};
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetActiveCurrent()
-{
- return {};
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetReactiveCurrent()
-{
- return {};
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetApparentCurrent()
-{
- return {};
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetActivePower()
-{
- return DataModel::Nullable(10000);
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetReactivePower()
-{
- return {};
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetApparentPower()
-{
- return {};
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetRMSVoltage()
-{
- return {};
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetRMSCurrent()
-{
- return {};
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetRMSPower()
-{
- return {};
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetFrequency()
-{
- return {};
-}
-
-Delegate::HarmonicMeasurementIterator * ElectricalPowerMeasurementDelegate::IterateHarmonicCurrents()
-{
- return &harmonicMeasurementIterator;
-}
-
-Delegate::HarmonicMeasurementIterator * ElectricalPowerMeasurementDelegate::IterateHarmonicPhases()
-{
- return &harmonicMeasurementIterator;
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetPowerFactor()
-{
- return {};
-}
-
-DataModel::Nullable ElectricalPowerMeasurementDelegate::GetNeutralCurrent()
-{
- return {};
-}
-
-} // namespace ElectricalPowerMeasurement
-} // namespace Clusters
-} // namespace app
-} // namespace chip
-
-static std::unique_ptr gDelegate;
-static std::unique_ptr gInstance;
+static std::unique_ptr gEPMDelegate;
+static std::unique_ptr gEPMInstance;
void emberAfElectricalPowerMeasurementClusterInitCallback(chip::EndpointId endpointId)
{
VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1.
- VerifyOrDie(!gInstance);
+ VerifyOrDie(!gEPMInstance);
- gDelegate = std::make_unique();
- if (gDelegate)
+ gEPMDelegate = std::make_unique();
+ if (gEPMDelegate)
{
- gInstance = std::make_unique(
- endpointId, *gDelegate,
+ gEPMInstance = std::make_unique(
+ endpointId, *gEPMDelegate,
BitMask(Feature::kDirectCurrent, Feature::kAlternatingCurrent, Feature::kPolyphasePower,
Feature::kHarmonics, Feature::kPowerQuality),
BitMask(
@@ -260,6 +46,6 @@ void emberAfElectricalPowerMeasurementClusterInitCallback(chip::EndpointId endpo
OptionalAttributes::kOptionalAttributeFrequency, OptionalAttributes::kOptionalAttributePowerFactor,
OptionalAttributes::kOptionalAttributeNeutralCurrent));
- gInstance->Init();
+ gEPMInstance->Init();
}
}
diff --git a/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp
index 553532622ddcac..9a9fcccd73f4f2 100644
--- a/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp
+++ b/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp
@@ -22,7 +22,6 @@
#include
#include
#include
-#include
#include
#include
@@ -147,7 +146,7 @@ Status FanControlManager::HandleStep(StepDirectionEnum aDirection, bool aWrap, b
}
}
- return ToInteractionModelStatus(SpeedSetting::Set(mEndpoint, newSpeedSetting));
+ return SpeedSetting::Set(mEndpoint, newSpeedSetting);
}
CHIP_ERROR FanControlManager::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder)
diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake
index 6cc76ad25e7dd8..0d8b99c117716e 100755
--- a/examples/all-clusters-app/ameba/chip_main.cmake
+++ b/examples/all-clusters-app/ameba/chip_main.cmake
@@ -179,6 +179,7 @@ list(
${chip_dir}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp
+ ${chip_dir}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp
diff --git a/examples/all-clusters-app/ameba/main/BindingHandler.cpp b/examples/all-clusters-app/ameba/main/BindingHandler.cpp
index 64ccb619a2edf5..b00322b44e4f0b 100644
--- a/examples/all-clusters-app/ameba/main/BindingHandler.cpp
+++ b/examples/all-clusters-app/ameba/main/BindingHandler.cpp
@@ -58,7 +58,7 @@ void LightSwitchChangedHandler(const EmberBindingTableEntry & binding, Operation
if (data->isReadAttribute)
{
// It should always enter here if isReadAttribute is true
- if (binding.type == EMBER_UNICAST_BINDING && !data->isGroup)
+ if (binding.type == MATTER_UNICAST_BINDING && !data->isGroup)
{
switch (data->clusterId)
{
@@ -82,7 +82,7 @@ void LightSwitchChangedHandler(const EmberBindingTableEntry & binding, Operation
}
else
{
- if (binding.type == EMBER_MULTICAST_BINDING && data->isGroup)
+ if (binding.type == MATTER_MULTICAST_BINDING && data->isGroup)
{
switch (data->clusterId)
{
@@ -103,7 +103,7 @@ void LightSwitchChangedHandler(const EmberBindingTableEntry & binding, Operation
break;
}
}
- else if (binding.type == EMBER_UNICAST_BINDING && !data->isGroup)
+ else if (binding.type == MATTER_UNICAST_BINDING && !data->isGroup)
{
switch (data->clusterId)
{
@@ -190,7 +190,7 @@ CHIP_ERROR BindingGroupBindCommandHandler(int argc, char ** argv)
VerifyOrReturnError(argc == 2, CHIP_ERROR_INVALID_ARGUMENT);
EmberBindingTableEntry * entry = Platform::New();
- entry->type = EMBER_MULTICAST_BINDING;
+ entry->type = MATTER_MULTICAST_BINDING;
entry->fabricIndex = atoi(argv[0]);
entry->groupId = atoi(argv[1]);
entry->local = 1; // Hardcoded to endpoint 1 for now
@@ -205,7 +205,7 @@ CHIP_ERROR BindingUnicastBindCommandHandler(int argc, char ** argv)
VerifyOrReturnError(argc == 3, CHIP_ERROR_INVALID_ARGUMENT);
EmberBindingTableEntry * entry = Platform::New();
- entry->type = EMBER_UNICAST_BINDING;
+ entry->type = MATTER_UNICAST_BINDING;
entry->fabricIndex = atoi(argv[0]);
entry->nodeId = atoi(argv[1]);
entry->local = 1; // Hardcoded to endpoint 1 for now
diff --git a/examples/all-clusters-app/ameba/main/include/ManualDishWasherAlarmCommand.h b/examples/all-clusters-app/ameba/main/include/ManualDishWasherAlarmCommand.h
index c1a37be41d385a..0d87a0eefcf828 100644
--- a/examples/all-clusters-app/ameba/main/include/ManualDishWasherAlarmCommand.h
+++ b/examples/all-clusters-app/ameba/main/include/ManualDishWasherAlarmCommand.h
@@ -19,6 +19,7 @@
#include "controller/InvokeInteraction.h"
#include "controller/ReadInteraction.h"
#include
+#include
#if CONFIG_ENABLE_CHIP_SHELL
#include "lib/shell/Engine.h"
@@ -65,7 +66,7 @@ CHIP_ERROR ManualDishWasherAlarmSetRaiseCommandHandler(int argc, char ** argv)
}
CHIP_ERROR err = CHIP_NO_ERROR;
- EmberAfStatus status;
+ Protocols::InteractionModel::Status status;
DishwasherAlarmServer & serverInstance = DishwasherAlarmServer::Instance();
BitMask supported; // Set dishwasher alarm supported value
@@ -88,21 +89,21 @@ CHIP_ERROR ManualDishWasherAlarmSetRaiseCommandHandler(int argc, char ** argv)
state.SetField(AlarmMap::kTempTooLow, 1); // 0x08, 8
status = serverInstance.SetSupportedValue(1, supported); // 0x2F, 47
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
}
status = serverInstance.SetMaskValue(1, mask); // 0x2F, 47
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
}
status = serverInstance.SetStateValue(1, state); // 0x0E, 14
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
@@ -124,7 +125,7 @@ CHIP_ERROR ManualDishWasherAlarmSetLowerCommandHandler(int argc, char ** argv)
}
CHIP_ERROR err = CHIP_NO_ERROR;
- EmberAfStatus status;
+ Protocols::InteractionModel::Status status;
DishwasherAlarmServer & serverInstance = DishwasherAlarmServer::Instance();
BitMask supported; // Set dishwasher alarm supported value
@@ -142,21 +143,21 @@ CHIP_ERROR ManualDishWasherAlarmSetLowerCommandHandler(int argc, char ** argv)
mask.SetField(AlarmMap::kWaterLevelError, 1); // 0x20, 32
status = serverInstance.SetSupportedValue(1, supported); // 0x2F, 47
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
}
status = serverInstance.SetMaskValue(1, mask); // 0x2F, 47
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
}
status = serverInstance.SetStateValue(1, 0); // Set dishwasher alarm state value 0x00, 0
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
diff --git a/examples/all-clusters-app/ameba/main/include/ManualRefrigeratorAlarmCommand.h b/examples/all-clusters-app/ameba/main/include/ManualRefrigeratorAlarmCommand.h
index d2ec4224a5332f..b4f8974d123a55 100644
--- a/examples/all-clusters-app/ameba/main/include/ManualRefrigeratorAlarmCommand.h
+++ b/examples/all-clusters-app/ameba/main/include/ManualRefrigeratorAlarmCommand.h
@@ -16,9 +16,12 @@
* limitations under the License.
*/
+#pragma once
+
#include "controller/InvokeInteraction.h"
#include "controller/ReadInteraction.h"
#include
+#include
#if CONFIG_ENABLE_CHIP_SHELL
#include "lib/shell/Engine.h"
@@ -60,25 +63,25 @@ CHIP_ERROR ManualRefrigeratorAlarmCommandHandler(int argc, char ** argv)
CHIP_ERROR ManualRefrigeratorAlarmDoorOpenCommandHandler(int argc, char ** argv)
{
CHIP_ERROR err = CHIP_NO_ERROR;
- EmberAfStatus status;
+ Protocols::InteractionModel::Status status;
RefrigeratorAlarmServer & serverInstance = RefrigeratorAlarmServer::Instance();
status = serverInstance.SetMaskValue(1, 0);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
}
status = serverInstance.SetStateValue(1, 1);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
}
status = serverInstance.SetSupportedValue(1, 0);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
@@ -96,25 +99,25 @@ CHIP_ERROR ManualRefrigeratorAlarmDoorOpenCommandHandler(int argc, char ** argv)
CHIP_ERROR ManualRefrigeratorAlarmDoorCloseCommandHandler(int argc, char ** argv)
{
CHIP_ERROR err = CHIP_NO_ERROR;
- EmberAfStatus status;
+ Protocols::InteractionModel::Status status;
RefrigeratorAlarmServer & serverInstance = RefrigeratorAlarmServer::Instance();
status = serverInstance.SetMaskValue(1, 1);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
}
status = serverInstance.SetStateValue(1, 0);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
}
status = serverInstance.SetSupportedValue(1, 1);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
@@ -132,18 +135,18 @@ CHIP_ERROR ManualRefrigeratorAlarmDoorCloseCommandHandler(int argc, char ** argv
CHIP_ERROR ManualRefrigeratorAlarmSuppressCommandHandler(int argc, char ** argv)
{
CHIP_ERROR err = CHIP_NO_ERROR;
- EmberAfStatus status;
+ Protocols::InteractionModel::Status status;
RefrigeratorAlarmServer & serverInstance = RefrigeratorAlarmServer::Instance();
status = serverInstance.SetSupportedValue(1, 1);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
}
status = serverInstance.SetStateValue(1, 0);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
diff --git a/examples/all-clusters-app/asr/BUILD.gn b/examples/all-clusters-app/asr/BUILD.gn
index 263bd8cf7734b7..6f70452fa71bbe 100755
--- a/examples/all-clusters-app/asr/BUILD.gn
+++ b/examples/all-clusters-app/asr/BUILD.gn
@@ -84,6 +84,7 @@ asr_executable("clusters_app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
+ "${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${examples_plat_dir}/ButtonHandler.cpp",
diff --git a/examples/all-clusters-app/asr/src/AppTask.cpp b/examples/all-clusters-app/asr/src/AppTask.cpp
old mode 100755
new mode 100644
index 3f16789c40e69f..92b6aaef3dba49
--- a/examples/all-clusters-app/asr/src/AppTask.cpp
+++ b/examples/all-clusters-app/asr/src/AppTask.cpp
@@ -38,10 +38,13 @@
#include
#include
#include
+#include
#include
#include
#include
+using chip::Protocols::InteractionModel::Status;
+
using namespace ::chip;
using namespace ::chip::Credentials;
using namespace ::chip::DeviceManager;
@@ -265,11 +268,11 @@ void AppTask::OnOffUpdateClusterState(void)
uint8_t onoff = sLightLED.Get();
// write the new on/off value
- EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(1, onoff);
+ Status status = app::Clusters::OnOff::Attributes::OnOff::Set(1, onoff);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Status::Success)
{
- ASR_LOG("ERR: updating on/off %x", status);
+ ASR_LOG("ERR: updating on/off %x", to_underlying(status));
}
}
diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn
index 6ec6202ea21209..6cf5941e79d2c4 100644
--- a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn
+++ b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn
@@ -60,7 +60,7 @@ ti_sysconfig("sysconfig") {
#"ti_build_config.opt",
]
- public_configs = [ ":sdk_dmm_config" ]
+ public_configs = [ ":sdk_cc13x2x7_26x2x7_dmm_config" ]
cflags = [
"-Wno-comment",
@@ -89,6 +89,7 @@ ti_simplelink_executable("all-clusters-app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
+ "${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp",
diff --git a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn
index 02dbebf7e6d8c9..eb118372b7bd33 100644
--- a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn
+++ b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn
@@ -63,7 +63,7 @@ ti_sysconfig("sysconfig") {
#"ti_build_config.opt",
]
- public_configs = [ ":sdk_dmm_config" ]
+ public_configs = [ ":sdk_cc13x4_26x4_dmm_config" ]
cflags = [
"-Wno-comment",
@@ -92,6 +92,7 @@ ti_simplelink_executable("all-clusters-app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
+ "${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp",
diff --git a/examples/all-clusters-app/infineon/psoc6/BUILD.gn b/examples/all-clusters-app/infineon/psoc6/BUILD.gn
index f2b9ab939d6f38..9a0fbe3b3b37ac 100644
--- a/examples/all-clusters-app/infineon/psoc6/BUILD.gn
+++ b/examples/all-clusters-app/infineon/psoc6/BUILD.gn
@@ -120,6 +120,7 @@ psoc6_executable("clusters_app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
+ "${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${examples_plat_dir}/LEDWidget.cpp",
diff --git a/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp
index e9f9dc1a171484..b75b5abfc74294 100644
--- a/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp
+++ b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp
@@ -409,11 +409,11 @@ void AppTask::OnOffUpdateClusterState(intptr_t context)
uint8_t onoff = sLightLED.Get();
// write the new on/off value
- EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff);
+ Protocols::InteractionModel::Status status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
- P6_LOG("ERR: updating on/off %x", status);
+ P6_LOG("ERR: updating on/off %x", to_underlying(status));
}
}
diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp
index 2da7e0c8900f3d..3145bd605b518c 100644
--- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp
+++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp
@@ -296,8 +296,9 @@ void AllClustersAppCommandHandler::OnSwitchLatchedHandler(uint8_t newPosition)
{
EndpointId endpoint = 1;
- EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute"));
+ Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
+ ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute"));
ChipLogDetail(NotSpecified, "The latching switch is moved to a new position:%d", newPosition);
Clusters::SwitchServer::Instance().OnSwitchLatch(endpoint, newPosition);
@@ -307,8 +308,9 @@ void AllClustersAppCommandHandler::OnSwitchInitialPressedHandler(uint8_t newPosi
{
EndpointId endpoint = 1;
- EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute"));
+ Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
+ ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute"));
ChipLogDetail(NotSpecified, "The new position when the momentary switch starts to be pressed:%d", newPosition);
Clusters::SwitchServer::Instance().OnInitialPress(endpoint, newPosition);
@@ -318,8 +320,9 @@ void AllClustersAppCommandHandler::OnSwitchLongPressedHandler(uint8_t newPositio
{
EndpointId endpoint = 1;
- EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute"));
+ Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
+ ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute"));
ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed for a long time:%d", newPosition);
Clusters::SwitchServer::Instance().OnLongPress(endpoint, newPosition);
@@ -332,8 +335,9 @@ void AllClustersAppCommandHandler::OnSwitchShortReleasedHandler(uint8_t previous
{
EndpointId endpoint = 1;
- EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute"));
+ Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
+ ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute"));
ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released:%d",
previousPosition);
@@ -344,8 +348,9 @@ void AllClustersAppCommandHandler::OnSwitchLongReleasedHandler(uint8_t previousP
{
EndpointId endpoint = 1;
- EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute"));
+ Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
+ ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute"));
ChipLogDetail(NotSpecified,
"The the previous value of the CurrentPosition when the momentary switch has been released after having been "
"pressed for a long time:%d",
@@ -358,8 +363,9 @@ void AllClustersAppCommandHandler::OnSwitchMultiPressOngoingHandler(uint8_t newP
{
EndpointId endpoint = 1;
- EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute"));
+ Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
+ ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute"));
ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed in a multi-press sequence:%d",
newPosition);
ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count);
@@ -371,8 +377,9 @@ void AllClustersAppCommandHandler::OnSwitchMultiPressCompleteHandler(uint8_t pre
{
EndpointId endpoint = 1;
- EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0);
- VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute"));
+ Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0);
+ VerifyOrReturn(Protocols::InteractionModel::Status::Success == status,
+ ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute"));
ChipLogDetail(NotSpecified, "The previous position when the momentary switch has been pressed in a multi-press sequence:%d",
previousPosition);
ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count);
diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn
index 0d1c4ce8cc7ddd..998f98a19cd3de 100644
--- a/examples/all-clusters-app/linux/BUILD.gn
+++ b/examples/all-clusters-app/linux/BUILD.gn
@@ -19,6 +19,14 @@ import("${build_root}/config/compiler/compiler.gni")
import("${chip_root}/src/lib/lib.gni")
import("${chip_root}/src/platform/device.gni")
+import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
+
+if (chip_enable_pw_rpc) {
+ import("//build_overrides/pigweed.gni")
+ import("$dir_pw_build/target_types.gni")
+ import("${chip_root}/examples/common/pigweed/rpc_config.gni")
+}
+
source_set("chip-all-clusters-common") {
sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp",
@@ -51,6 +59,7 @@ source_set("chip-all-clusters-common") {
"${chip_root}/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
+ "${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/device-energy-management-mode.cpp",
@@ -77,7 +86,19 @@ source_set("chip-all-clusters-common") {
"${chip_root}/examples/energy-management-app/energy-management-common/include",
]
- cflags = [ "-Wconversion" ]
+ if (chip_enable_pw_rpc) {
+ defines = rpc_defines
+ sources += rpc_sources
+ deps += rpc_deps
+
+ deps += pw_build_LINK_DEPS
+
+ include_dirs += [ "${chip_root}/examples/common" ]
+ } else {
+ # The system_rpc_server.cc file is in pigweed and doesn't compile with
+ # -Wconversion, remove check for RPC build only.
+ cflags = [ "-Wconversion" ]
+ }
if (chip_build_libshell) {
defines = [ "ENABLE_CHIP_SHELL" ]
diff --git a/examples/all-clusters-app/linux/with_pw_rpc.gni b/examples/all-clusters-app/linux/with_pw_rpc.gni
new file mode 100644
index 00000000000000..0f1ab1ea89c121
--- /dev/null
+++ b/examples/all-clusters-app/linux/with_pw_rpc.gni
@@ -0,0 +1,42 @@
+# 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.
+
+# add this gni as import in your build args to use pigweed in the example
+# 'import("//with_pw_rpc.gni")'
+
+import("//build_overrides/chip.gni")
+
+import("${chip_root}/config/standalone/args.gni")
+
+import("//build_overrides/pigweed.gni")
+
+pw_log_BACKEND = "$dir_pw_log_basic"
+pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
+pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio"
+pw_trace_BACKEND = "$dir_pw_trace_tokenized"
+pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main"
+pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc"
+dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"
+pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock"
+pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend"
+pw_thread_YIELD_BACKEND = "$dir_pw_thread_stl:yield"
+pw_thread_SLEEP_BACKEND = "$dir_pw_thread_stl:sleep"
+
+pw_build_LINK_DEPS = [
+ "$dir_pw_assert:impl",
+ "$dir_pw_log:impl",
+]
+
+chip_enable_pw_rpc = true
+chip_use_pw_logging = true
diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt
index f2b6d9f5e88d27..3d1a179a93bbb2 100644
--- a/examples/all-clusters-app/mbed/CMakeLists.txt
+++ b/examples/all-clusters-app/mbed/CMakeLists.txt
@@ -72,6 +72,7 @@ target_sources(${APP_TARGET} PRIVATE
${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp
${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp
${ALL_CLUSTERS_COMMON}/src/static-supported-temperature-levels.cpp
+ ${ENERGY_MANAGEMENT_COMMON}/src/ElectricalPowerMeasurementDelegate.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseManager.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementDelegateImpl.cpp
diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt
index 49bf4fb7f95e3a..563295e059b46c 100644
--- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt
+++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt
@@ -72,6 +72,7 @@ target_sources(app PRIVATE
${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementManager.cpp
+ ${ENERGY_MANAGEMENT_COMMON_DIR}/src/ElectricalPowerMeasurementDelegate.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseManager.cpp
${NRFCONNECT_COMMON}/util/LEDWidget.cpp)
diff --git a/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp b/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp
index 2d3a6e4e32f270..eaf2bda516f23e 100644
--- a/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp
+++ b/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp
@@ -55,9 +55,9 @@ void emberAfDoorLockClusterInitCallback(EndpointId endpoint)
// Set FeatureMap to 0, default is:
// (kUser|kAccessSchedules|kRfidCredential|kPinCredential) 0x113
- EmberAfStatus status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ Protocols::InteractionModel::Status status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0);
+ if (status != Protocols::InteractionModel::Status::Success)
{
- LOG_ERR("Updating feature map %x", status);
+ LOG_ERR("Updating feature map %x", to_underlying(status));
}
}
diff --git a/examples/all-clusters-app/nxp/mw320/BUILD.gn b/examples/all-clusters-app/nxp/mw320/BUILD.gn
index a858c18e87fed2..65d2df0401dd62 100644
--- a/examples/all-clusters-app/nxp/mw320/BUILD.gn
+++ b/examples/all-clusters-app/nxp/mw320/BUILD.gn
@@ -88,6 +88,7 @@ mw320_executable("shell_mw320") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
+ "${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/src/lib/shell/streamer_mw320.cpp",
diff --git a/examples/all-clusters-app/nxp/mw320/binding-handler.cpp b/examples/all-clusters-app/nxp/mw320/binding-handler.cpp
index 6ad25c9d46bc34..ace7da026b253a 100644
--- a/examples/all-clusters-app/nxp/mw320/binding-handler.cpp
+++ b/examples/all-clusters-app/nxp/mw320/binding-handler.cpp
@@ -74,13 +74,13 @@ static void BoundDeviceChangedHandler(const EmberBindingTableEntry & binding, ch
using namespace chip;
using namespace chip::app;
- if (binding.type == EMBER_MULTICAST_BINDING)
+ if (binding.type == MATTER_MULTICAST_BINDING)
{
ChipLogError(NotSpecified, "Group binding is not supported now");
return;
}
- if (binding.type == EMBER_UNICAST_BINDING && binding.local == 1 &&
+ if (binding.type == MATTER_UNICAST_BINDING && binding.local == 1 &&
(!binding.clusterId.HasValue() || binding.clusterId.Value() == Clusters::OnOff::Id))
{
auto onSuccess = [](const ConcreteCommandPath & commandPath, const StatusIB & status, const auto & dataResponse) {
diff --git a/examples/all-clusters-app/nxp/mw320/main.cpp b/examples/all-clusters-app/nxp/mw320/main.cpp
index b778d95fc4430b..5f2df7b501e88d 100644
--- a/examples/all-clusters-app/nxp/mw320/main.cpp
+++ b/examples/all-clusters-app/nxp/mw320/main.cpp
@@ -286,7 +286,7 @@ void GPIO_IRQHandler(void)
#endif /* __cplusplus */
/*
-EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
+Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode,
uint8_t * buffer, uint16_t maxReadLength, int32_t index)
{
@@ -295,7 +295,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI
if(clusterId == Clusters::Switch::Id) {
*buffer = g_ButtonPress;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
*/
@@ -1616,20 +1616,21 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
return;
}
-EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
+Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer)
{
PRINTF("====> %s() \r\n", __FUNCTION__);
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer, uint16_t maxReadLength)
{
// Added for the pairing of TE9 to report the commission_info
// default function (in callback-stub.cpp)
//
PRINTF("-> %s()\n\r", __FUNCTION__);
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
diff --git a/examples/all-clusters-app/openiotsdk/CMakeLists.txt b/examples/all-clusters-app/openiotsdk/CMakeLists.txt
index 3b50f286b1683b..6d2fb76c0db919 100644
--- a/examples/all-clusters-app/openiotsdk/CMakeLists.txt
+++ b/examples/all-clusters-app/openiotsdk/CMakeLists.txt
@@ -65,6 +65,7 @@ target_sources(${APP_TARGET}
${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp
${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp
${ALL_CLUSTERS_COMMON}/src/binding-handler.cpp
+ ${ENERGY_MANAGEMENT_COMMON}/src/ElectricalPowerMeasurementDelegate.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseManager.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementDelegateImpl.cpp
diff --git a/examples/all-clusters-app/telink/CMakeLists.txt b/examples/all-clusters-app/telink/CMakeLists.txt
index ae715a8c41ebfb..2c59e658a7e6dc 100644
--- a/examples/all-clusters-app/telink/CMakeLists.txt
+++ b/examples/all-clusters-app/telink/CMakeLists.txt
@@ -85,6 +85,7 @@ target_sources(app PRIVATE
${ALL_CLUSTERS_COMMON_DIR}/src/device-energy-management-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/energy-evse-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp
+ ${ENERGY_MANAGEMENT_COMMON_DIR}/src/ElectricalPowerMeasurementDelegate.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseManager.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementDelegateImpl.cpp
diff --git a/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp b/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp
index 2d3a6e4e32f270..eaf2bda516f23e 100644
--- a/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp
+++ b/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp
@@ -55,9 +55,9 @@ void emberAfDoorLockClusterInitCallback(EndpointId endpoint)
// Set FeatureMap to 0, default is:
// (kUser|kAccessSchedules|kRfidCredential|kPinCredential) 0x113
- EmberAfStatus status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ Protocols::InteractionModel::Status status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0);
+ if (status != Protocols::InteractionModel::Status::Success)
{
- LOG_ERR("Updating feature map %x", status);
+ LOG_ERR("Updating feature map %x", to_underlying(status));
}
}
diff --git a/examples/all-clusters-app/tizen/BUILD.gn b/examples/all-clusters-app/tizen/BUILD.gn
index 6387c6446aced8..364e9ce857d5da 100644
--- a/examples/all-clusters-app/tizen/BUILD.gn
+++ b/examples/all-clusters-app/tizen/BUILD.gn
@@ -40,6 +40,7 @@ source_set("chip-all-clusters-common") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
+ "${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
]
diff --git a/examples/all-clusters-minimal-app/asr/src/AppTask.cpp b/examples/all-clusters-minimal-app/asr/src/AppTask.cpp
index ac9dfe7ba5d8d0..d6f77d2f28a836 100644
--- a/examples/all-clusters-minimal-app/asr/src/AppTask.cpp
+++ b/examples/all-clusters-minimal-app/asr/src/AppTask.cpp
@@ -221,11 +221,11 @@ void AppTask::OnOffUpdateClusterState(void)
uint8_t onoff = sLightLED.Get();
// write the new on/off value
- EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff);
+ Protocols::InteractionModel::Status status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
- ASR_LOG("ERR: updating on/off %x", status);
+ ASR_LOG("ERR: updating on/off %x", to_underlying(status));
}
}
diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp
index 3fcbc365fbc426..7cbaf6f447d405 100644
--- a/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp
+++ b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp
@@ -406,11 +406,11 @@ void AppTask::OnOffUpdateClusterState(intptr_t context)
uint8_t onoff = sLightLED.Get();
// write the new on/off value
- EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff);
+ Protocols::InteractionModel::Status status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
- P6_LOG("ERR: updating on/off %x", status);
+ P6_LOG("ERR: updating on/off %x", to_underlying(status));
}
}
diff --git a/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp b/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp
index 72fbcc663d8582..ab0f2ef3b707a1 100644
--- a/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp
+++ b/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp
@@ -103,8 +103,8 @@ CHIP_ERROR RemoveDeviceEndpoint(SubDevice * dev)
return CHIP_ERROR_INTERNAL;
}
-EmberAfStatus HandleReadBridgedDeviceBasicAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status HandleReadBridgedDeviceBasicAttribute(SubDevice * dev, chip::AttributeId attributeId,
+ uint8_t * buffer, uint16_t maxReadLength)
{
using namespace BridgedDeviceBasicInformation::Attributes;
ChipLogProgress(DeviceLayer, "HandleReadBridgedDeviceBasicAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId,
@@ -125,13 +125,14 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(SubDevice * dev, chip::Attri
}
else
{
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus HandleReadOnOffAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength)
+Protocols::InteractionModel::Status HandleReadOnOffAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer,
+ uint16_t maxReadLength)
{
ChipLogProgress(DeviceLayer, "HandleReadOnOffAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId, maxReadLength);
@@ -145,24 +146,25 @@ EmberAfStatus HandleReadOnOffAttribute(SubDevice * dev, chip::AttributeId attrib
}
else
{
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus HandleWriteOnOffAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer)
+Protocols::InteractionModel::Status HandleWriteOnOffAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer)
{
ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%" PRIu32, attributeId);
- ReturnErrorCodeIf((attributeId != OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), EMBER_ZCL_STATUS_FAILURE);
+ ReturnErrorCodeIf((attributeId != OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()),
+ Protocols::InteractionModel::Status::Failure);
dev->SetOnOff(*buffer == 1);
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer, uint16_t maxReadLength)
{
uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint);
@@ -181,11 +183,12 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI
}
}
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
-EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
+Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer)
{
uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint);
@@ -199,7 +202,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster
}
}
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
namespace {
diff --git a/examples/bridge-app/asr/subdevice/SubDeviceManager.h b/examples/bridge-app/asr/subdevice/SubDeviceManager.h
index 3a91527f33e99c..29ce5067fe7faf 100644
--- a/examples/bridge-app/asr/subdevice/SubDeviceManager.h
+++ b/examples/bridge-app/asr/subdevice/SubDeviceManager.h
@@ -68,8 +68,8 @@ extern "C" {
int AddDeviceEndpoint(SubDevice * dev, EmberAfEndpointType * ep, const Span & deviceTypeList,
const Span & dataVersionStorage, chip::EndpointId parentEndpointId);
CHIP_ERROR RemoveDeviceEndpoint(SubDevice * dev);
-EmberAfStatus HandleReadBridgedDeviceBasicAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer,
- uint16_t maxReadLength);
+Protocols::InteractionModel::Status HandleReadBridgedDeviceBasicAttribute(SubDevice * dev, chip::AttributeId attributeId,
+ uint8_t * buffer, uint16_t maxReadLength);
void HandleDeviceStatusChanged(SubDevice * dev, SubDevice::Changed_t itemChangedMask);
void Init_Bridge_Endpoint();
#ifdef __cplusplus
diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp
index 92298a488c3186..27cdb3c5e2dab5 100644
--- a/examples/bridge-app/esp32/main/main.cpp
+++ b/examples/bridge-app/esp32/main/main.cpp
@@ -213,8 +213,8 @@ CHIP_ERROR RemoveDeviceEndpoint(Device * dev)
return CHIP_ERROR_INTERNAL;
}
-EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId,
+ uint8_t * buffer, uint16_t maxReadLength)
{
using namespace BridgedDeviceBasicInformation::Attributes;
ChipLogProgress(DeviceLayer, "HandleReadBridgedDeviceBasicAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId,
@@ -236,13 +236,14 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut
}
else
{
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus HandleReadOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength)
+Protocols::InteractionModel::Status HandleReadOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer,
+ uint16_t maxReadLength)
{
ChipLogProgress(DeviceLayer, "HandleReadOnOffAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId, maxReadLength);
@@ -257,24 +258,25 @@ EmberAfStatus HandleReadOnOffAttribute(Device * dev, chip::AttributeId attribute
}
else
{
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus HandleWriteOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer)
+Protocols::InteractionModel::Status HandleWriteOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer)
{
ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%" PRIu32, attributeId);
- ReturnErrorCodeIf((attributeId != OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), EMBER_ZCL_STATUS_FAILURE);
+ ReturnErrorCodeIf((attributeId != OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()),
+ Protocols::InteractionModel::Status::Failure);
dev->SetOnOff(*buffer == 1);
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer, uint16_t maxReadLength)
{
uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint);
@@ -292,11 +294,12 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI
}
}
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
-EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
+Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer)
{
uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint);
@@ -310,7 +313,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster
}
}
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
namespace {
diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp
index 2c825fe8e5e010..80c8b17b7fbed5 100644
--- a/examples/bridge-app/linux/main.cpp
+++ b/examples/bridge-app/linux/main.cpp
@@ -436,8 +436,8 @@ void HandleDeviceTempSensorStatusChanged(DeviceTempSensor * dev, DeviceTempSenso
}
}
-EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId,
+ uint8_t * buffer, uint16_t maxReadLength)
{
using namespace BridgedDeviceBasicInformation::Attributes;
@@ -464,13 +464,14 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut
}
else
{
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus HandleReadOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength)
+Protocols::InteractionModel::Status HandleReadOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attributeId, uint8_t * buffer,
+ uint16_t maxReadLength)
{
ChipLogProgress(DeviceLayer, "HandleReadOnOffAttribute: attrId=%d, maxReadLength=%d", attributeId, maxReadLength);
@@ -485,13 +486,13 @@ EmberAfStatus HandleReadOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attr
}
else
{
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus HandleWriteOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attributeId, uint8_t * buffer)
+Protocols::InteractionModel::Status HandleWriteOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attributeId, uint8_t * buffer)
{
ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%d", attributeId);
@@ -508,14 +509,14 @@ EmberAfStatus HandleWriteOnOffAttribute(DeviceOnOff * dev, chip::AttributeId att
}
else
{
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId,
+ uint8_t * buffer, uint16_t maxReadLength)
{
using namespace TemperatureMeasurement::Attributes;
@@ -546,19 +547,19 @@ EmberAfStatus HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::A
}
else
{
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer, uint16_t maxReadLength)
{
uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint);
- EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE;
+ Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Failure;
if ((endpointIndex < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) && (gDevices[endpointIndex] != nullptr))
{
@@ -643,12 +644,13 @@ class BridgedPowerSourceAttrAccess : public AttributeAccessInterface
BridgedPowerSourceAttrAccess gPowerAttrAccess;
-EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
+Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer)
{
uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint);
- EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE;
+ Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Failure;
// ChipLogProgress(DeviceLayer, "emberAfExternalAttributeWriteCallback: ep=%d", endpoint);
diff --git a/examples/bridge-app/telink/src/AppTask.cpp b/examples/bridge-app/telink/src/AppTask.cpp
index 3b4066bd87c2c7..d21897bd2d36b6 100644
--- a/examples/bridge-app/telink/src/AppTask.cpp
+++ b/examples/bridge-app/telink/src/AppTask.cpp
@@ -36,8 +36,8 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span & dataVersionStorage, chip::EndpointId parentEndpointId);
CHIP_ERROR RemoveDeviceEndpoint(Device * dev);
void HandleDeviceTempSensorStatusChanged(DeviceTempSensor * dev, DeviceTempSensor::Changed_t itemChangedMask);
-EmberAfStatus HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId, uint8_t * buffer,
- uint16_t maxReadLength);
+Protocols::InteractionModel::Status HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId,
+ uint8_t * buffer, uint16_t maxReadLength);
static const int kNodeLabelSize = 32;
// Current ZCL implementation of Struct uses a max-size array of 254 bytes
@@ -236,8 +236,8 @@ CHIP_ERROR RemoveDeviceEndpoint(Device * dev)
return CHIP_ERROR_INTERNAL;
}
-EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId,
+ uint8_t * buffer, uint16_t maxReadLength)
{
using namespace chip::app::Clusters::BridgedDeviceBasicInformation::Attributes;
ChipLogProgress(DeviceLayer, "HandleReadBridgedDeviceBasicAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId,
@@ -264,13 +264,14 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut
}
else
{
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus HandleReadOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength)
+Protocols::InteractionModel::Status HandleReadOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer,
+ uint16_t maxReadLength)
{
ChipLogProgress(DeviceLayer, "HandleReadOnOffAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId, maxReadLength);
@@ -285,24 +286,25 @@ EmberAfStatus HandleReadOnOffAttribute(Device * dev, chip::AttributeId attribute
}
else
{
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus HandleWriteOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer)
+Protocols::InteractionModel::Status HandleWriteOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer)
{
ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%" PRIu32, attributeId);
- ReturnErrorCodeIf((attributeId != Clusters::OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), EMBER_ZCL_STATUS_FAILURE);
+ ReturnErrorCodeIf((attributeId != Clusters::OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()),
+ Protocols::InteractionModel::Status::Failure);
dev->SetOnOff(*buffer == 1);
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
-EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer, uint16_t maxReadLength)
{
using namespace Clusters;
@@ -327,11 +329,12 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI
}
}
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
-EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
+Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer)
{
uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint);
@@ -345,7 +348,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster
}
}
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
namespace {
@@ -488,8 +491,8 @@ void HandleDeviceTempSensorStatusChanged(DeviceTempSensor * dev, DeviceTempSenso
}
}
-EmberAfStatus HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId,
+ uint8_t * buffer, uint16_t maxReadLength)
{
using namespace Clusters::TemperatureMeasurement::Attributes;
@@ -520,10 +523,10 @@ EmberAfStatus HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::A
}
else
{
- return EMBER_ZCL_STATUS_FAILURE;
+ return Protocols::InteractionModel::Status::Failure;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
void AppTask::LightingActionEventHandler(AppEvent * aEvent)
@@ -590,16 +593,16 @@ void AppTask::UpdateClusterState(void)
bool isTurnedOn = sAppTask.mPwmRgbBlueLed.IsTurnedOn();
// write the new on/off value
- EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(kExampleEndpointId, isTurnedOn);
+ Protocols::InteractionModel::Status status = Clusters::OnOff::Attributes::OnOff::Set(kExampleEndpointId, isTurnedOn);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
- LOG_ERR("Update OnOff fail: %x", status);
+ LOG_ERR("Update OnOff fail: %x", to_underlying(status));
}
uint8_t setLevel = sAppTask.mPwmRgbBlueLed.GetLevel();
status = Clusters::LevelControl::Attributes::CurrentLevel::Set(kExampleEndpointId, setLevel);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
- LOG_ERR("Update CurrentLevel fail: %x", status);
+ LOG_ERR("Update CurrentLevel fail: %x", to_underlying(status));
}
}
diff --git a/examples/bridge-app/telink/src/ZclCallbacks.cpp b/examples/bridge-app/telink/src/ZclCallbacks.cpp
index b6f5ed558c584e..e83993165acb51 100644
--- a/examples/bridge-app/telink/src/ZclCallbacks.cpp
+++ b/examples/bridge-app/telink/src/ZclCallbacks.cpp
@@ -43,12 +43,12 @@ using namespace chip::app::Clusters::OnOff;
*/
void emberAfOnOffClusterInitCallback(EndpointId endpoint)
{
- EmberAfStatus status;
+ Protocols::InteractionModel::Status status;
bool storedValue;
// Read storedValue on/off value
status = Attributes::OnOff::Get(1, &storedValue);
- if (status == EMBER_ZCL_STATUS_SUCCESS)
+ if (status == Protocols::InteractionModel::Status::Success)
{
// Set actual state to stored before reboot
GetAppTask().GetPWMDevice().Set(storedValue);
diff --git a/examples/chef/chef.py b/examples/chef/chef.py
index 47d3c7ad3d34b7..688bdfef490761 100755
--- a/examples/chef/chef.py
+++ b/examples/chef/chef.py
@@ -730,7 +730,7 @@ def main() -> int:
shell.run_cmd(" ".join(nrf_build_cmds))
elif options.build_target == "silabs-thread":
- shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/efr32")
+ shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/silabs")
if options.do_clean:
shell.run_cmd(f"rm -rf out/{options.sample_device_type_name}")
efr32_cmd_args = []
diff --git a/examples/chef/common/chef-air-quality.cpp b/examples/chef/common/chef-air-quality.cpp
index 0770d0c185aa0c..eafff42d538fb6 100644
--- a/examples/chef/common/chef-air-quality.cpp
+++ b/examples/chef/common/chef-air-quality.cpp
@@ -40,15 +40,16 @@ void emberAfAirQualityClusterInitCallback(chip::EndpointId endpointId)
gAirQualityClusterInstance[endpointId] = clusterInstance;
}
-EmberAfStatus chefAirQualityWriteCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
+Protocols::InteractionModel::Status chefAirQualityWriteCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer)
{
- EmberAfStatus ret = EMBER_ZCL_STATUS_SUCCESS;
+ Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Success;
if (gAirQualityClusterInstance.find(endpoint) == gAirQualityClusterInstance.end())
{
ChipLogError(DeviceLayer, "Invalid Endpoind ID: %d", endpoint);
- return EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT;
+ return Protocols::InteractionModel::Status::UnsupportedEndpoint;
}
Instance * clusterInstance = gAirQualityClusterInstance[endpoint];
@@ -63,12 +64,12 @@ EmberAfStatus chefAirQualityWriteCallback(EndpointId endpoint, ClusterId cluster
{
break;
}
- ret = EMBER_ZCL_STATUS_UNSUPPORTED_WRITE;
+ ret = Protocols::InteractionModel::Status::UnsupportedWrite;
ChipLogError(DeviceLayer, "Invalid Attribute Update status: %d", static_cast(status));
}
break;
default:
- ret = EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE;
+ ret = Protocols::InteractionModel::Status::UnsupportedAttribute;
ChipLogError(DeviceLayer, "Unsupported Attribute ID: %d", static_cast(attributeId));
break;
}
@@ -76,11 +77,11 @@ EmberAfStatus chefAirQualityWriteCallback(EndpointId endpoint, ClusterId cluster
return ret;
}
-EmberAfStatus chefAirQualityReadCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status chefAirQualityReadCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
+ uint16_t maxReadLength)
{
- EmberAfStatus ret = EMBER_ZCL_STATUS_SUCCESS;
+ Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Success;
return ret;
}
diff --git a/examples/chef/common/chef-air-quality.h b/examples/chef/common/chef-air-quality.h
index 39019b03fbb781..2eaf3ef28fdf66 100644
--- a/examples/chef/common/chef-air-quality.h
+++ b/examples/chef/common/chef-air-quality.h
@@ -22,9 +22,10 @@
#include
#ifdef MATTER_DM_PLUGIN_AIR_QUALITY_SERVER
-EmberAfStatus chefAirQualityWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer);
-EmberAfStatus chefAirQualityReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
- uint16_t maxReadLength);
+Protocols::InteractionModel::Status chefAirQualityWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer);
+Protocols::InteractionModel::Status chefAirQualityReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
+ uint16_t maxReadLength);
#endif
diff --git a/examples/chef/common/chef-concentration-measurement.cpp b/examples/chef/common/chef-concentration-measurement.cpp
index 395d6604582edf..2d8b65ba2cad19 100644
--- a/examples/chef/common/chef-concentration-measurement.cpp
+++ b/examples/chef/common/chef-concentration-measurement.cpp
@@ -55,19 +55,19 @@ static std::map *>
template
-EmberAfStatus chefConcentrationMeasurementWriteCallback(
+Protocols::InteractionModel::Status chefConcentrationMeasurementWriteCallback(
std::map *> & map,
AttributeId measuredValueId, chip::EndpointId endpoint, chip::ClusterId clusterId,
const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
{
- EmberAfStatus ret = EMBER_ZCL_STATUS_SUCCESS;
+ Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Success;
if (map.find(endpoint) == map.end())
{
ChipLogError(DeviceLayer, "Invalid Endpoind ID: %d", endpoint);
- return EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT;
+ return Protocols::InteractionModel::Status::UnsupportedEndpoint;
}
Instance(attributeId));
}
return ret;
}
-EmberAfStatus chefConcentrationMeasurementWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
+Protocols::InteractionModel::Status chefConcentrationMeasurementWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer)
{
- EmberAfStatus ret = EMBER_ZCL_STATUS_SUCCESS;
+ Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Success;
switch (clusterId)
{
@@ -174,11 +175,11 @@ EmberAfStatus chefConcentrationMeasurementWriteCallback(chip::EndpointId endpoin
return ret;
}
-EmberAfStatus chefConcentrationMeasurementReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status chefConcentrationMeasurementReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer, uint16_t maxReadLength)
{
- EmberAfStatus ret = EMBER_ZCL_STATUS_SUCCESS;
+ Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Success;
return ret;
}
diff --git a/examples/chef/common/chef-concentration-measurement.h b/examples/chef/common/chef-concentration-measurement.h
index ddd004ebd7047e..9b8fc571872c6b 100644
--- a/examples/chef/common/chef-concentration-measurement.h
+++ b/examples/chef/common/chef-concentration-measurement.h
@@ -31,9 +31,10 @@
defined(MATTER_DM_PLUGIN_PM10_CONCENTRATION_MEASUREMENT_SERVER) || \
defined(MATTER_DM_PLUGIN_TOTAL_VOLATILE_ORGANIC_COMPOUNDS_CONCENTRATION_MEASUREMENT_SERVER) || \
defined(MATTER_DM_PLUGIN_RADON_CONCENTRATION_MEASUREMENT_SERVER)
-EmberAfStatus chefConcentrationMeasurementWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer);
-EmberAfStatus chefConcentrationMeasurementReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
- uint16_t maxReadLength);
+Protocols::InteractionModel::Status chefConcentrationMeasurementWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer);
+Protocols::InteractionModel::Status chefConcentrationMeasurementReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer, uint16_t maxReadLength);
#endif
diff --git a/examples/chef/common/chef-fan-control-manager.cpp b/examples/chef/common/chef-fan-control-manager.cpp
index 56576febd693d4..998491d4a61aeb 100644
--- a/examples/chef/common/chef-fan-control-manager.cpp
+++ b/examples/chef/common/chef-fan-control-manager.cpp
@@ -22,7 +22,6 @@
#include
#include
#include
-#include
#include
#include
@@ -57,9 +56,9 @@ CHIP_ERROR ChefFanControlManager::ReadPercentCurrent(AttributeValueEncoder & aEn
{
// Return PercentSetting attribute value for now
DataModel::Nullable percentSetting;
- EmberAfStatus status = PercentSetting::Get(mEndpoint, percentSetting);
+ Protocols::InteractionModel::Status status = PercentSetting::Get(mEndpoint, percentSetting);
- VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, CHIP_ERROR_READ_FAILED);
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, CHIP_ERROR_READ_FAILED);
return aEncoder.Encode(percentSetting.ValueOr(0));
}
@@ -68,9 +67,9 @@ CHIP_ERROR ChefFanControlManager::ReadSpeedCurrent(AttributeValueEncoder & aEnco
{
// Return SpeedCurrent attribute value for now
DataModel::Nullable speedSetting;
- EmberAfStatus status = SpeedSetting::Get(mEndpoint, speedSetting);
+ Protocols::InteractionModel::Status status = SpeedSetting::Get(mEndpoint, speedSetting);
- VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, CHIP_ERROR_READ_FAILED);
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, CHIP_ERROR_READ_FAILED);
return aEncoder.Encode(speedSetting.ValueOr(0));
}
@@ -82,19 +81,19 @@ Status ChefFanControlManager::HandleStep(StepDirectionEnum aDirection, bool aWra
VerifyOrReturnError(aDirection != StepDirectionEnum::kUnknownEnumValue, Status::InvalidCommand);
- EmberAfStatus status;
+ Protocols::InteractionModel::Status status;
uint8_t speedMax;
status = SpeedMax::Get(mEndpoint, &speedMax);
- VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, Status::InvalidCommand);
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, Status::InvalidCommand);
uint8_t speedCurrent;
status = SpeedCurrent::Get(mEndpoint, &speedCurrent);
- VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, Status::InvalidCommand);
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, Status::InvalidCommand);
DataModel::Nullable speedSetting;
status = SpeedSetting::Get(mEndpoint, speedSetting);
- VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, Status::InvalidCommand);
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, Status::InvalidCommand);
uint8_t newSpeedSetting = speedSetting.ValueOr(0);
uint8_t speedValue = speedSetting.ValueOr(speedCurrent);
@@ -115,7 +114,7 @@ Status ChefFanControlManager::HandleStep(StepDirectionEnum aDirection, bool aWra
});
}
- return ToInteractionModelStatus(SpeedSetting::Set(mEndpoint, newSpeedSetting));
+ return SpeedSetting::Set(mEndpoint, newSpeedSetting);
}
CHIP_ERROR ChefFanControlManager::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder)
diff --git a/examples/chef/common/chef-rvc-operational-state-delegate.h b/examples/chef/common/chef-rvc-operational-state-delegate.h
index c8d63c2bb6efc2..f487e38000771d 100644
--- a/examples/chef/common/chef-rvc-operational-state-delegate.h
+++ b/examples/chef/common/chef-rvc-operational-state-delegate.h
@@ -20,7 +20,7 @@
#include
#include
-#include
+
#include
namespace chip {
diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp
index 483919c1c9a952..cff7ffdee4679f 100644
--- a/examples/chef/common/stubs.cpp
+++ b/examples/chef/common/stubs.cpp
@@ -23,9 +23,9 @@ using chip::app::DataModel::Nullable;
using namespace chip;
-EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
- uint16_t maxReadLength)
+Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer, uint16_t maxReadLength)
{
switch (clusterId)
{
@@ -58,7 +58,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI
default:
break;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
/*
@@ -71,8 +71,9 @@ Thread 3 "rootnode_airqua" hit Breakpoint 1, emberAfExternalAttributeWriteCallba
48 '0', mask = 16 '\020'} (gdb)
*/
-EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
+Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
+ const EmberAfAttributeMetadata * attributeMetadata,
+ uint8_t * buffer)
{
switch (clusterId)
{
@@ -105,7 +106,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster
default:
break;
}
- return EMBER_ZCL_STATUS_SUCCESS;
+ return Protocols::InteractionModel::Status::Success;
}
// Include door lock callbacks only when the server is enabled
diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py
index 355a2b18433e31..f4e8e6711d7105 100644
--- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py
+++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py
@@ -148,6 +148,17 @@
}
},
+ 'Bdx': {
+ 'commands': {
+ 'Download': {
+ 'arguments': {
+ 'LogType': 'log-type',
+ },
+ 'has_endpoint': False,
+ }
+ }
+ },
+
'DelayCommands': {
'alias': 'delay',
'commands': {
diff --git a/examples/common/imgui_ui/windows/light.cpp b/examples/common/imgui_ui/windows/light.cpp
index 24f88212ae23a1..86899e044b2ed1 100644
--- a/examples/common/imgui_ui/windows/light.cpp
+++ b/examples/common/imgui_ui/windows/light.cpp
@@ -70,13 +70,13 @@ void Light::UpdateState()
{
if (mTargetLightIsOn.HasValue())
{
- EmberAfStatus status = OnOffServer::Instance().setOnOffValue(
+ chip::Protocols::InteractionModel::Status status = OnOffServer::Instance().setOnOffValue(
mEndpointId, mTargetLightIsOn.Value() ? OnOff::Commands::On::Id : OnOff::Commands::Off::Id,
false /* initiatedByLevelChange */);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != chip::Protocols::InteractionModel::Status::Success)
{
- ChipLogError(AppServer, "Failed to set on/off value: %d", status);
+ ChipLogError(AppServer, "Failed to set on/off value: %d", chip::to_underlying(status));
}
mTargetLightIsOn.ClearValue();
diff --git a/src/app/tests/suites/pics/PICSNormalizer.h b/examples/common/pigweed/nxp/PigweedLoggerMutex.cpp
similarity index 71%
rename from src/app/tests/suites/pics/PICSNormalizer.h
rename to examples/common/pigweed/nxp/PigweedLoggerMutex.cpp
index 04f5b028973683..ce5f5a9be0d21d 100644
--- a/src/app/tests/suites/pics/PICSNormalizer.h
+++ b/examples/common/pigweed/nxp/PigweedLoggerMutex.cpp
@@ -1,5 +1,7 @@
-/**
- * Copyright (c) 2022 Project CHIP Authors
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ * All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,15 +16,12 @@
* limitations under the License.
*/
-/**
- * @file
- * @brief Declaration of a method that normalizes a PICS code.
- */
+#include "PigweedLoggerMutex.h"
+
+namespace chip {
+namespace rpc {
-#include
+PigweedLoggerMutex logger_mutex;
-class PICSNormalizer
-{
-public:
- static std::string Normalize(std::string code);
-};
+} // namespace rpc
+} // namespace chip
diff --git a/examples/common/pigweed/nxp/PigweedLoggerMutex.h b/examples/common/pigweed/nxp/PigweedLoggerMutex.h
new file mode 100644
index 00000000000000..ecad8995bad61c
--- /dev/null
+++ b/examples/common/pigweed/nxp/PigweedLoggerMutex.h
@@ -0,0 +1,36 @@
+/*
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include "PigweedLogger.h"
+#include "RpcService.h"
+
+namespace chip {
+namespace rpc {
+class PigweedLoggerMutex : public chip::rpc::Mutex
+{
+
+public:
+ void Lock() override { PigweedLogger::Lock(); }
+ void Unlock() override { PigweedLogger::Unlock(); }
+};
+
+extern PigweedLoggerMutex logger_mutex;
+
+} // namespace rpc
+} // namespace chip
diff --git a/examples/common/pigweed/rpc_config.gni b/examples/common/pigweed/rpc_config.gni
new file mode 100644
index 00000000000000..ddd6b0863ebf70
--- /dev/null
+++ b/examples/common/pigweed/rpc_config.gni
@@ -0,0 +1,53 @@
+# 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/chip.gni")
+import("//build_overrides/pigweed.gni")
+
+rpc_defines = [
+ "PW_RPC_ENABLED",
+ "PW_RPC_ATTRIBUTE_SERVICE=1",
+ "PW_RPC_BUTTON_SERVICE=1",
+ "PW_RPC_DESCRIPTOR_SERVICE=1",
+ "PW_RPC_DEVICE_SERVICE=1",
+ "PW_RPC_LIGHTING_SERVICE=1",
+ "PW_RPC_TRACING_SERVICE=1",
+]
+
+rpc_sources = [
+ "${chip_root}/examples/platform/linux/Rpc.cpp",
+ "${chip_root}/examples/platform/linux/system_rpc_server.cc",
+]
+
+rpc_deps = [
+ "$dir_pw_hdlc:pw_rpc",
+ "$dir_pw_hdlc:rpc_channel_output",
+ "$dir_pw_log",
+ "$dir_pw_rpc:server",
+ "$dir_pw_rpc/system_server:facade",
+ "$dir_pw_rpc/system_server:socket",
+ "$dir_pw_stream:socket_stream",
+ "$dir_pw_stream:sys_io_stream",
+ "$dir_pw_sync:mutex",
+ "$dir_pw_trace",
+ "$dir_pw_trace_tokenized",
+ "$dir_pw_trace_tokenized:trace_rpc_service",
+ "${chip_root}/config/linux/lib/pw_rpc:pw_rpc",
+ "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc",
+ "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc",
+ "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc",
+ "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc",
+ "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc",
+ "${chip_root}/examples/common/pigweed:rpc_services",
+]
diff --git a/examples/common/pigweed/rpc_services/internal/StatusUtils.h b/examples/common/pigweed/rpc_services/internal/StatusUtils.h
index f92ee66afc44bb..3ea14d3f88923e 100644
--- a/examples/common/pigweed/rpc_services/internal/StatusUtils.h
+++ b/examples/common/pigweed/rpc_services/internal/StatusUtils.h
@@ -36,15 +36,15 @@
namespace chip {
namespace rpc {
-constexpr pw::Status ToPwStatus(EmberAfStatus ember_status)
+constexpr pw::Status ToPwStatus(Protocols::InteractionModel::Status ember_status)
{
switch (ember_status)
{
- case EMBER_ZCL_STATUS_SUCCESS:
+ case Protocols::InteractionModel::Status::Success:
return pw::OkStatus();
- case EMBER_ZCL_STATUS_NOT_FOUND:
+ case Protocols::InteractionModel::Status::NotFound:
return pw::Status::NotFound();
- case EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS:
+ case Protocols::InteractionModel::Status::UnsupportedAccess:
return pw::Status::PermissionDenied();
default:
return pw::Status::Unknown();
diff --git a/examples/common/websocket-server/WebSocketServer.cpp b/examples/common/websocket-server/WebSocketServer.cpp
index 6fbd47ddd94f9c..623dda3dc47527 100644
--- a/examples/common/websocket-server/WebSocketServer.cpp
+++ b/examples/common/websocket-server/WebSocketServer.cpp
@@ -26,6 +26,7 @@
constexpr uint16_t kDefaultWebSocketServerPort = 9002;
constexpr uint16_t kMaxMessageBufferLen = 8192;
+constexpr char kWebSocketServerReadyMessage[] = "== WebSocket Server Ready";
namespace {
lws * gWebSocketInstance = nullptr;
@@ -153,6 +154,10 @@ static int OnWebSocketCallback(lws * wsi, lws_callback_reasons reason, void * us
{
gWebSocketInstance = nullptr;
}
+ else if (LWS_CALLBACK_PROTOCOL_INIT == reason)
+ {
+ ChipLogProgress(chipTool, "%s", kWebSocketServerReadyMessage);
+ }
return 0;
}
diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp
index 5c942db19b3af5..a46ea5db28df64 100644
--- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp
+++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp
@@ -892,10 +892,10 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg)
uint8_t newValue = ContactSensorMgr().IsContactClosed();
// write the new on/off value
- EmberAfStatus status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ Protocols::InteractionModel::Status status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue);
+ if (status != Protocols::InteractionModel::Status::Success)
{
- ChipLogError(NotSpecified, "ERR: updating boolean status value %x", status);
+ ChipLogError(NotSpecified, "ERR: updating boolean status value %x", to_underlying(status));
}
logBooleanStateEvent(newValue);
}
diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/.gn b/examples/contact-sensor-app/nxp/k32w/k32w1/.gn
index dec954b4b9ff69..1e848295f6aa5b 100644
--- a/examples/contact-sensor-app/nxp/k32w/k32w1/.gn
+++ b/examples/contact-sensor-app/nxp/k32w/k32w1/.gn
@@ -26,4 +26,7 @@ default_args = {
target_os = "freertos"
import("//args.gni")
+
+ # Import default platform configs
+ import("${chip_root}/src/platform/nxp/k32w/k32w1/args.gni")
}
diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn b/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn
index 1404ad8dd36a1c..ed49c7bdd4f7a3 100644
--- a/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn
+++ b/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn
@@ -14,15 +14,19 @@
# limitations under the License.
import("//build_overrides/chip.gni")
-import("//build_overrides/k32w1_sdk.gni")
+import("//build_overrides/nxp_sdk.gni")
import("//build_overrides/openthread.gni")
-import("${k32w1_sdk_build_root}/k32w1_executable.gni")
-import("${k32w1_sdk_build_root}/k32w1_sdk.gni")
+import("${nxp_sdk_build_root}/nxp_sdk.gni")
+
+import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni")
+
+import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni")
import("${chip_root}/src/crypto/crypto.gni")
import("${chip_root}/src/lib/core/core.gni")
import("${chip_root}/src/platform/device.gni")
+import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni")
declare_args() {
chip_software_version = 0
@@ -85,7 +89,7 @@ k32w1_executable("contact_sensor_app") {
deps = [
":sdk",
"${chip_root}/examples/common/QRCode",
- "${chip_root}/examples/contact-sensor-app/contact-sensor-common",
+ "${chip_root}/examples/contact-sensor-app/nxp/zap",
"${chip_root}/examples/providers:device_info_provider",
"${chip_root}/src/lib",
"${chip_root}/src/platform:syscalls_stub",
@@ -116,7 +120,6 @@ k32w1_executable("contact_sensor_app") {
ldflags = [
"-Wl,--defsym=__heap_size__=0",
"-Wl,--defsym=__stack_size__=0x480",
- "-Wl,--defsym=gNvmSectors=8",
"-Wl,--defsym=lp_ram_lower_limit=0x04000000",
"-Wl,--defsym=lp_ram_upper_limit=0x2001C000",
"-Wl,-print-memory-usage",
@@ -124,6 +127,10 @@ k32w1_executable("contact_sensor_app") {
"-T" + rebase_path(ldscript, root_build_dir),
]
+ if (chip_with_factory_data == 1) {
+ ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ]
+ }
+
output_dir = root_out_dir
}
diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/README.md b/examples/contact-sensor-app/nxp/k32w/k32w1/README.md
index da6e3eb00f2f66..28983f45c89578 100644
--- a/examples/contact-sensor-app/nxp/k32w/k32w1/README.md
+++ b/examples/contact-sensor-app/nxp/k32w/k32w1/README.md
@@ -19,6 +19,7 @@ into an existing Matter network and can be controlled by this network.
- [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous)
- [Device UI](#device-ui)
- [Building](#building)
+- [Manufacturing data](#manufacturing-data)
- [Flashing](#flashing)
- [Flashing the NBU image](#flashing-the-nbu-image)
- [Flashing the host image](#flashing-the-host-image)
@@ -108,7 +109,9 @@ initiate a reboot. The reset action can be cancelled by press SW2 button at any
point before the 6 second limit.
**Button SW3** can be used to change the state of the simulated contact sensor.
-The button behaves as a toggle, swapping the state every time it is pressed.
+The button behaves as a toggle, swapping the state every time it is short
+pressed. When long pressed, it does a clean soft reset that takes into account
+Matter shutdown procedure.
## Building
@@ -134,8 +137,17 @@ In case that Openthread CLI is needed, chip_with_ot_cli build argument must be
set to 1.
After a successful build, the `elf` and `srec` files are found in `out/debug/` -
+`see the files prefixed with chip-k32w1-contact-example`. After a successful
+build, the `elf` and `srec` files are found in `out/debug/` -
`see the files prefixed with chip-k32w1-contact-example`.
+## Manufacturing data
+
+Use `chip_with_factory_data=1` in the gn build command to enable factory data.
+
+For a full guide on manufacturing flow, please see
+[Guide for writing manufacturing data on NXP devices](../../../../../docs/guides/nxp_manufacturing_flow.md).
+
## Flashing
Two images must be written to the board: one for the host (CM33) and one for the
diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/args.gni b/examples/contact-sensor-app/nxp/k32w/k32w1/args.gni
index c0497aa27421d2..18c41cb457bc86 100644
--- a/examples/contact-sensor-app/nxp/k32w/k32w1/args.gni
+++ b/examples/contact-sensor-app/nxp/k32w/k32w1/args.gni
@@ -15,7 +15,6 @@
import("//build_overrides/chip.gni")
import("${chip_root}/config/standalone/args.gni")
-import("${chip_root}/examples/platform/nxp/k32w/k32w1/args.gni")
# SDK target. This is overridden to add our SDK app_config.h & defines.
k32w1_sdk_target = get_label_info(":sdk", "label_no_toolchain")
@@ -23,3 +22,7 @@ k32w1_sdk_target = get_label_info(":sdk", "label_no_toolchain")
chip_enable_ota_requestor = true
chip_stack_lock_tracking = "fatal"
chip_enable_ble = true
+
+chip_enable_icd_server = true
+chip_persist_subscriptions = true
+chip_subscription_timeout_resumption = true
diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/include/CHIPProjectConfig.h b/examples/contact-sensor-app/nxp/k32w/k32w1/include/CHIPProjectConfig.h
index af3a7067c99e1a..8846799ed6edc9 100644
--- a/examples/contact-sensor-app/nxp/k32w/k32w1/include/CHIPProjectConfig.h
+++ b/examples/contact-sensor-app/nxp/k32w/k32w1/include/CHIPProjectConfig.h
@@ -28,6 +28,58 @@
#pragma once
+// Use hard-coded test certificates already embedded in generic chip code => set it to 0
+// Use real/development certificates => set it to 1 + file the provisioning section from
+// the internal flash
+#ifndef CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+#define CONFIG_CHIP_LOAD_REAL_FACTORY_DATA 0
+#endif
+
+#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+
+// VID/PID for product => will be used by Basic Information Cluster
+#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x1037
+#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0xA221
+
+// Set the following define to use the Certification Declaration from below and not use it stored in factory data section
+#ifndef CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION
+#define CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION 0
+#endif
+
+#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION
+//-> format_version = 1
+//-> vendor_id = 0x1037
+//-> product_id_array = [ 0xA221 ]
+//-> device_type_id = 0x0015
+//-> certificate_id = "ZIG20142ZB330003-24"
+//-> security_level = 0
+//-> security_information = 0
+//-> version_number = 0x2694
+//-> certification_type = 1
+//-> dac_origin_vendor_id is not present
+//-> dac_origin_product_id is not present
+#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \
+ { \
+ 0x30, 0x81, 0xe7, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x81, 0xd9, 0x30, 0x81, 0xd6, \
+ 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \
+ 0x44, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x37, 0x04, 0x35, 0x15, 0x24, 0x00, \
+ 0x01, 0x25, 0x01, 0x37, 0x10, 0x36, 0x02, 0x05, 0x21, 0xa2, 0x18, 0x24, 0x03, 0x15, 0x2c, 0x04, 0x13, 0x5a, 0x49, \
+ 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, 0x24, 0x05, \
+ 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x76, 0x98, 0x24, 0x08, 0x01, 0x18, 0x31, 0x7c, 0x30, 0x7a, 0x02, 0x01, 0x03, \
+ 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, 0xf5, 0x04, \
+ 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, \
+ 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x46, 0x30, 0x44, 0x02, 0x20, 0x1b, 0xf3, 0x13, 0x9b, \
+ 0x39, 0xb8, 0x3e, 0x87, 0xde, 0x2e, 0xdf, 0x51, 0xfb, 0xa3, 0xba, 0xcb, 0xc7, 0x4e, 0xef, 0x16, 0x6b, 0xa1, 0x04, \
+ 0xa0, 0x05, 0x7f, 0xc3, 0xd4, 0x15, 0x84, 0xd0, 0x44, 0x02, 0x20, 0x32, 0x98, 0xe2, 0x3c, 0x31, 0x16, 0x63, 0x60, \
+ 0x2e, 0x58, 0x93, 0x87, 0x50, 0x9e, 0x29, 0x10, 0x9d, 0xe5, 0x9b, 0xcd, 0xab, 0x64, 0x43, 0x08, 0xd6, 0xf6, 0x6f, \
+ 0x46, 0x7d, 0x22, 0x24, 0x42 \
+ }
+
+// All remaining data will be pulled from the provisioning region of flash.
+#endif
+
+#else
+
/**
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
*
@@ -56,18 +108,7 @@
*/
#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"
-/**
- * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
- *
- * 0xFFF1: Test vendor.
- */
-#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1
-
-/**
- * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
- *
- */
-#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8006
+#endif // CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
/**
* CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION
diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w/k32w1/main/AppTask.cpp
index c7acba0f3ee1cb..10039bb8c9270e 100644
--- a/examples/contact-sensor-app/nxp/k32w/k32w1/main/AppTask.cpp
+++ b/examples/contact-sensor-app/nxp/k32w/k32w1/main/AppTask.cpp
@@ -94,6 +94,9 @@ using namespace chip;
using namespace chip::app;
AppTask AppTask::sAppTask;
+#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+static AppTask::FactoryDataProvider sFactoryDataProvider;
+#endif
static Identify gIdentify = { chip::EndpointId{ 1 }, AppTask::OnIdentifyStart, AppTask::OnIdentifyStop,
Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator };
@@ -150,8 +153,14 @@ CHIP_ERROR AppTask::Init()
// Init ZCL Data Model and start server
PlatformMgr().ScheduleWork(InitServer, 0);
- // Initialize device attestation config
+#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+ ReturnErrorOnFailure(sFactoryDataProvider.Init());
+ SetDeviceInstanceInfoProvider(&sFactoryDataProvider);
+ SetDeviceAttestationCredentialsProvider(&sFactoryDataProvider);
+ SetCommissionableDataProvider(&sFactoryDataProvider);
+#else
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
+#endif // CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
// QR code will be used with CHIP Tool
AppTask::PrintOnboardingInfo();
@@ -358,7 +367,7 @@ void AppTask::AppTaskMain(void * pvParameter)
void AppTask::ButtonEventHandler(uint8_t pin_no, uint8_t button_action)
{
- if ((pin_no != RESET_BUTTON) && (pin_no != CONTACT_SENSOR_BUTTON) && (pin_no != OTA_BUTTON) && (pin_no != BLE_BUTTON))
+ if ((pin_no != RESET_BUTTON) && (pin_no != CONTACT_SENSOR_BUTTON) && (pin_no != SOFT_RESET_BUTTON) && (pin_no != BLE_BUTTON))
{
return;
}
@@ -376,10 +385,10 @@ void AppTask::ButtonEventHandler(uint8_t pin_no, uint8_t button_action)
{
button_event.Handler = ContactActionEventHandler;
}
- else if (pin_no == OTA_BUTTON)
+ else if (pin_no == SOFT_RESET_BUTTON)
{
- // Starting OTA by button functionality is not used.
- // button_event.Handler = OTAHandler;
+ // Soft reset ensures that platform manager shutdown procedure is called.
+ button_event.Handler = SoftResetHandler;
}
else if (pin_no == BLE_BUTTON)
{
@@ -432,7 +441,7 @@ button_status_t AppTask::KBD_Callback(void * buttonHandle, button_callback_messa
case CONTACT_SENSOR_BUTTON:
K32W_LOG("pb2 long press");
- ButtonEventHandler(OTA_BUTTON, OTA_BUTTON_PUSH);
+ ButtonEventHandler(SOFT_RESET_BUTTON, SOFT_RESET_BUTTON_PUSH);
break;
}
break;
@@ -561,29 +570,14 @@ void AppTask::ContactActionEventHandler(void * aGenericEvent)
}
}
-void AppTask::OTAHandler(void * aGenericEvent)
+void AppTask::SoftResetHandler(void * aGenericEvent)
{
AppEvent * aEvent = (AppEvent *) aGenericEvent;
- if (aEvent->ButtonEvent.PinNo != OTA_BUTTON)
+ if (aEvent->ButtonEvent.PinNo != SOFT_RESET_BUTTON)
return;
-#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
- if (sAppTask.mFunction != Function::kNoneSelected)
- {
- K32W_LOG("Another function is scheduled. Could not initiate OTA!");
- return;
- }
-
- PlatformMgr().ScheduleWork(StartOTAQuery, 0);
-#endif
-}
-
-#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
-void AppTask::StartOTAQuery(intptr_t arg)
-{
- GetRequestorInstance()->TriggerImmediateQuery();
+ PlatformMgrImpl().CleanReset();
}
-#endif
void AppTask::BleHandler(void * aGenericEvent)
{
@@ -794,11 +788,11 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg)
uint8_t newValue = ContactSensorMgr().IsContactClosed();
// write the new on/off value
- EmberAfStatus status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue);
+ Protocols::InteractionModel::Status status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ if (status != Protocols::InteractionModel::Status::Success)
{
- ChipLogError(NotSpecified, "ERR: updating boolean status value %x", status);
+ ChipLogError(NotSpecified, "ERR: updating boolean status value %x", to_underlying(status));
}
logBooleanStateEvent(newValue);
}
diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/main/include/AppTask.h b/examples/contact-sensor-app/nxp/k32w/k32w1/main/include/AppTask.h
index 47b644769cfb63..bc19b0a9862ebd 100644
--- a/examples/contact-sensor-app/nxp/k32w/k32w1/main/include/AppTask.h
+++ b/examples/contact-sensor-app/nxp/k32w/k32w1/main/include/AppTask.h
@@ -30,6 +30,10 @@
#include
#include
+#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+#include
+#endif
+
#include "FreeRTOS.h"
#include "fsl_component_button.h"
#include "timers.h"
@@ -45,6 +49,9 @@
class AppTask
{
public:
+#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+ using FactoryDataProvider = chip::DeviceLayer::FactoryDataProviderImpl;
+#endif
CHIP_ERROR StartAppTask();
static void AppTaskMain(void * pvParameter);
@@ -74,7 +81,7 @@ class AppTask
static void FunctionTimerEventHandler(void * aGenericEvent);
static button_status_t KBD_Callback(void * buttonHandle, button_callback_message_t * message, void * callbackParam);
static void HandleKeyboard(void);
- static void OTAHandler(void * aGenericEvent);
+ static void SoftResetHandler(void * aGenericEvent);
static void BleHandler(void * aGenericEvent);
static void BleStartAdvertising(intptr_t arg);
static void ContactActionEventHandler(void * aGenericEvent);
@@ -89,7 +96,6 @@ class AppTask
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
static void InitOTA(intptr_t arg);
- static void StartOTAQuery(intptr_t arg);
#endif
static void UpdateClusterStateInternal(intptr_t arg);
diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/main/include/app_config.h b/examples/contact-sensor-app/nxp/k32w/k32w1/main/include/app_config.h
index b62ce79567e8db..fbcf14fe7d88d7 100644
--- a/examples/contact-sensor-app/nxp/k32w/k32w1/main/include/app_config.h
+++ b/examples/contact-sensor-app/nxp/k32w/k32w1/main/include/app_config.h
@@ -23,12 +23,12 @@
#define RESET_BUTTON 1
#define CONTACT_SENSOR_BUTTON 2
-#define OTA_BUTTON 3
+#define SOFT_RESET_BUTTON 3
#define BLE_BUTTON 4
#define RESET_BUTTON_PUSH 1
#define CONTACT_SENSOR_BUTTON_PUSH 2
-#define OTA_BUTTON_PUSH 3
+#define SOFT_RESET_BUTTON_PUSH 3
#define BLE_BUTTON_PUSH 4
#define APP_BUTTON_PUSH 1
diff --git a/src/app/tests/suites/commands/log/BUILD.gn b/examples/contact-sensor-app/nxp/zap/BUILD.gn
similarity index 63%
rename from src/app/tests/suites/commands/log/BUILD.gn
rename to examples/contact-sensor-app/nxp/zap/BUILD.gn
index b873bf1c38d96d..be4913cf3552ee 100644
--- a/src/app/tests/suites/commands/log/BUILD.gn
+++ b/examples/contact-sensor-app/nxp/zap/BUILD.gn
@@ -1,4 +1,4 @@
-# Copyright (c) 2022 Project CHIP Authors
+# 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.
@@ -12,21 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
+import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
+import("${chip_root}/src/app/chip_data_model.gni")
-static_library("log") {
- output_name = "libLogCommands"
+chip_data_model("zap") {
+ zap_file = "contact-sensor-app.zap"
- sources = [
- "LogCommands.cpp",
- "LogCommands.h",
- ]
-
- cflags = [ "-Wconversion" ]
-
- public_deps = [
- "${chip_root}/src/app/common:simulated",
- "${chip_root}/src/lib/support",
- ]
+ zap_pregenerated_dir =
+ "${chip_root}/zzz_generated/contact-sensor-app/nxp/zap-generated"
+ is_server = true
}
diff --git a/examples/contact-sensor-app/nxp/zap/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap/contact-sensor-app.matter
new file mode 100644
index 00000000000000..03736833bb02d3
--- /dev/null
+++ b/examples/contact-sensor-app/nxp/zap/contact-sensor-app.matter
@@ -0,0 +1,1646 @@
+// This IDL was generated automatically by ZAP.
+// It is for view/code review purposes only.
+
+/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
+cluster Identify = 3 {
+ revision 4;
+
+ enum EffectIdentifierEnum : enum8 {
+ kBlink = 0;
+ kBreathe = 1;
+ kOkay = 2;
+ kChannelChange = 11;
+ kFinishEffect = 254;
+ kStopEffect = 255;
+ }
+
+ enum EffectVariantEnum : enum8 {
+ kDefault = 0;
+ }
+
+ enum IdentifyTypeEnum : enum8 {
+ kNone = 0;
+ kLightOutput = 1;
+ kVisibleIndicator = 2;
+ kAudibleBeep = 3;
+ kDisplay = 4;
+ kActuator = 5;
+ }
+
+ attribute int16u identifyTime = 0;
+ readonly attribute IdentifyTypeEnum identifyType = 1;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct IdentifyRequest {
+ int16u identifyTime = 0;
+ }
+
+ request struct TriggerEffectRequest {
+ EffectIdentifierEnum effectIdentifier = 0;
+ EffectVariantEnum effectVariant = 1;
+ }
+
+ /** Command description for Identify */
+ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0;
+ /** Command description for TriggerEffect */
+ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64;
+}
+
+/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */
+cluster Descriptor = 29 {
+ revision 2;
+
+ bitmap Feature : bitmap32 {
+ kTagList = 0x1;
+ }
+
+ struct DeviceTypeStruct {
+ devtype_id deviceType = 0;
+ int16u revision = 1;
+ }
+
+ struct SemanticTagStruct {
+ nullable vendor_id mfgCode = 0;
+ enum8 namespaceID = 1;
+ enum8 tag = 2;
+ optional nullable char_string label = 3;
+ }
+
+ readonly attribute DeviceTypeStruct deviceTypeList[] = 0;
+ readonly attribute cluster_id serverList[] = 1;
+ readonly attribute cluster_id clientList[] = 2;
+ readonly attribute endpoint_no partsList[] = 3;
+ readonly attribute optional SemanticTagStruct tagList[] = 4;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+}
+
+/** The Access Control Cluster exposes a data model view of a
+ Node's Access Control List (ACL), which codifies the rules used to manage
+ and enforce Access Control for the Node's endpoints and their associated
+ cluster instances. */
+cluster AccessControl = 31 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum AccessControlEntryAuthModeEnum : enum8 {
+ kPASE = 1;
+ kCASE = 2;
+ kGroup = 3;
+ }
+
+ enum AccessControlEntryPrivilegeEnum : enum8 {
+ kView = 1;
+ kProxyView = 2;
+ kOperate = 3;
+ kManage = 4;
+ kAdminister = 5;
+ }
+
+ enum ChangeTypeEnum : enum8 {
+ kChanged = 0;
+ kAdded = 1;
+ kRemoved = 2;
+ }
+
+ struct AccessControlTargetStruct {
+ nullable cluster_id cluster = 0;
+ nullable endpoint_no endpoint = 1;
+ nullable devtype_id deviceType = 2;
+ }
+
+ fabric_scoped struct AccessControlEntryStruct {
+ fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1;
+ fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2;
+ nullable fabric_sensitive int64u subjects[] = 3;
+ nullable fabric_sensitive AccessControlTargetStruct targets[] = 4;
+ fabric_idx fabricIndex = 254;
+ }
+
+ fabric_scoped struct AccessControlExtensionStruct {
+ fabric_sensitive octet_string<128> data = 1;
+ fabric_idx fabricIndex = 254;
+ }
+
+ fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 {
+ nullable node_id adminNodeID = 1;
+ nullable int16u adminPasscodeID = 2;
+ ChangeTypeEnum changeType = 3;
+ nullable AccessControlEntryStruct latestValue = 4;
+ fabric_idx fabricIndex = 254;
+ }
+
+ fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 {
+ nullable node_id adminNodeID = 1;
+ nullable int16u adminPasscodeID = 2;
+ ChangeTypeEnum changeType = 3;
+ nullable AccessControlExtensionStruct latestValue = 4;
+ fabric_idx fabricIndex = 254;
+ }
+
+ attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
+ attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1;
+ readonly attribute int16u subjectsPerAccessControlEntry = 2;
+ readonly attribute int16u targetsPerAccessControlEntry = 3;
+ readonly attribute int16u accessControlEntriesPerFabric = 4;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+}
+
+/** This cluster provides attributes and events for determining basic information about Nodes, which supports both
+ Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number,
+ which apply to the whole Node. Also allows setting user device information such as location. */
+cluster BasicInformation = 40 {
+ revision 3;
+
+ enum ColorEnum : enum8 {
+ kBlack = 0;
+ kNavy = 1;
+ kGreen = 2;
+ kTeal = 3;
+ kMaroon = 4;
+ kPurple = 5;
+ kOlive = 6;
+ kGray = 7;
+ kBlue = 8;
+ kLime = 9;
+ kAqua = 10;
+ kRed = 11;
+ kFuchsia = 12;
+ kYellow = 13;
+ kWhite = 14;
+ kNickel = 15;
+ kChrome = 16;
+ kBrass = 17;
+ kCopper = 18;
+ kSilver = 19;
+ kGold = 20;
+ }
+
+ enum ProductFinishEnum : enum8 {
+ kOther = 0;
+ kMatte = 1;
+ kSatin = 2;
+ kPolished = 3;
+ kRugged = 4;
+ kFabric = 5;
+ }
+
+ struct CapabilityMinimaStruct {
+ int16u caseSessionsPerFabric = 0;
+ int16u subscriptionsPerFabric = 1;
+ }
+
+ struct ProductAppearanceStruct {
+ ProductFinishEnum finish = 0;
+ nullable ColorEnum primaryColor = 1;
+ }
+
+ critical event StartUp = 0 {
+ int32u softwareVersion = 0;
+ }
+
+ critical event ShutDown = 1 {
+ }
+
+ info event Leave = 2 {
+ fabric_idx fabricIndex = 0;
+ }
+
+ info event ReachableChanged = 3 {
+ boolean reachableNewValue = 0;
+ }
+
+ readonly attribute int16u dataModelRevision = 0;
+ readonly attribute char_string<32> vendorName = 1;
+ readonly attribute vendor_id vendorID = 2;
+ readonly attribute char_string<32> productName = 3;
+ readonly attribute int16u productID = 4;
+ attribute access(write: manage) char_string<32> nodeLabel = 5;
+ attribute access(write: administer) char_string<2> location = 6;
+ readonly attribute int16u hardwareVersion = 7;
+ readonly attribute char_string<64> hardwareVersionString = 8;
+ readonly attribute int32u softwareVersion = 9;
+ readonly attribute char_string<64> softwareVersionString = 10;
+ readonly attribute optional char_string<16> manufacturingDate = 11;
+ readonly attribute optional char_string<32> partNumber = 12;
+ readonly attribute optional long_char_string<256> productURL = 13;
+ readonly attribute optional char_string<64> productLabel = 14;
+ readonly attribute optional char_string<32> serialNumber = 15;
+ attribute access(write: manage) optional boolean localConfigDisabled = 16;
+ readonly attribute optional boolean reachable = 17;
+ readonly attribute optional char_string<32> uniqueID = 18;
+ readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
+ readonly attribute optional ProductAppearanceStruct productAppearance = 20;
+ readonly attribute int32u specificationVersion = 21;
+ readonly attribute int16u maxPathsPerInvoke = 22;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ command MfgSpecificPing(): DefaultSuccess = 0;
+}
+
+/** Provides an interface for providing OTA software updates */
+cluster OtaSoftwareUpdateProvider = 41 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum ApplyUpdateActionEnum : enum8 {
+ kProceed = 0;
+ kAwaitNextAction = 1;
+ kDiscontinue = 2;
+ }
+
+ enum DownloadProtocolEnum : enum8 {
+ kBDXSynchronous = 0;
+ kBDXAsynchronous = 1;
+ kHTTPS = 2;
+ kVendorSpecific = 3;
+ }
+
+ enum StatusEnum : enum8 {
+ kUpdateAvailable = 0;
+ kBusy = 1;
+ kNotAvailable = 2;
+ kDownloadProtocolNotSupported = 3;
+ }
+
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct QueryImageRequest {
+ vendor_id vendorID = 0;
+ int16u productID = 1;
+ int32u softwareVersion = 2;
+ DownloadProtocolEnum protocolsSupported[] = 3;
+ optional int16u hardwareVersion = 4;
+ optional char_string<2> location = 5;
+ optional boolean requestorCanConsent = 6;
+ optional octet_string<512> metadataForProvider = 7;
+ }
+
+ response struct QueryImageResponse = 1 {
+ StatusEnum status = 0;
+ optional int32u delayedActionTime = 1;
+ optional char_string<256> imageURI = 2;
+ optional int32u softwareVersion = 3;
+ optional char_string<64> softwareVersionString = 4;
+ optional octet_string<32> updateToken = 5;
+ optional boolean userConsentNeeded = 6;
+ optional octet_string<512> metadataForRequestor = 7;
+ }
+
+ request struct ApplyUpdateRequestRequest {
+ octet_string<32> updateToken = 0;
+ int32u newVersion = 1;
+ }
+
+ response struct ApplyUpdateResponse = 3 {
+ ApplyUpdateActionEnum action = 0;
+ int32u delayedActionTime = 1;
+ }
+
+ request struct NotifyUpdateAppliedRequest {
+ octet_string<32> updateToken = 0;
+ int32u softwareVersion = 1;
+ }
+
+ /** Determine availability of a new Software Image */
+ command QueryImage(QueryImageRequest): QueryImageResponse = 0;
+ /** Determine next action to take for a downloaded Software Image */
+ command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2;
+ /** Notify OTA Provider that an update was applied */
+ command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4;
+}
+
+/** Provides an interface for downloading and applying OTA software updates */
+cluster OtaSoftwareUpdateRequestor = 42 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum AnnouncementReasonEnum : enum8 {
+ kSimpleAnnouncement = 0;
+ kUpdateAvailable = 1;
+ kUrgentUpdateAvailable = 2;
+ }
+
+ enum ChangeReasonEnum : enum8 {
+ kUnknown = 0;
+ kSuccess = 1;
+ kFailure = 2;
+ kTimeOut = 3;
+ kDelayByProvider = 4;
+ }
+
+ enum UpdateStateEnum : enum8 {
+ kUnknown = 0;
+ kIdle = 1;
+ kQuerying = 2;
+ kDelayedOnQuery = 3;
+ kDownloading = 4;
+ kApplying = 5;
+ kDelayedOnApply = 6;
+ kRollingBack = 7;
+ kDelayedOnUserConsent = 8;
+ }
+
+ fabric_scoped struct ProviderLocation {
+ node_id providerNodeID = 1;
+ endpoint_no endpoint = 2;
+ fabric_idx fabricIndex = 254;
+ }
+
+ info event StateTransition = 0 {
+ UpdateStateEnum previousState = 0;
+ UpdateStateEnum newState = 1;
+ ChangeReasonEnum reason = 2;
+ nullable int32u targetSoftwareVersion = 3;
+ }
+
+ critical event VersionApplied = 1 {
+ int32u softwareVersion = 0;
+ int16u productID = 1;
+ }
+
+ info event DownloadError = 2 {
+ int32u softwareVersion = 0;
+ int64u bytesDownloaded = 1;
+ nullable int8u progressPercent = 2;
+ nullable int64s platformCode = 3;
+ }
+
+ attribute access(write: administer) ProviderLocation defaultOTAProviders[] = 0;
+ readonly attribute boolean updatePossible = 1;
+ readonly attribute UpdateStateEnum updateState = 2;
+ readonly attribute nullable int8u updateStateProgress = 3;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct AnnounceOTAProviderRequest {
+ node_id providerNodeID = 0;
+ vendor_id vendorID = 1;
+ AnnouncementReasonEnum announcementReason = 2;
+ optional octet_string<512> metadataForNode = 3;
+ endpoint_no endpoint = 4;
+ }
+
+ /** Announce the presence of an OTA Provider */
+ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0;
+}
+
+/** This cluster is used to manage global aspects of the Commissioning flow. */
+cluster GeneralCommissioning = 48 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum CommissioningErrorEnum : enum8 {
+ kOK = 0;
+ kValueOutsideRange = 1;
+ kInvalidAuthentication = 2;
+ kNoFailSafe = 3;
+ kBusyWithOtherAdmin = 4;
+ }
+
+ enum RegulatoryLocationTypeEnum : enum8 {
+ kIndoor = 0;
+ kOutdoor = 1;
+ kIndoorOutdoor = 2;
+ }
+
+ struct BasicCommissioningInfo {
+ int16u failSafeExpiryLengthSeconds = 0;
+ int16u maxCumulativeFailsafeSeconds = 1;
+ }
+
+ attribute access(write: administer) int64u breadcrumb = 0;
+ readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
+ readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2;
+ readonly attribute RegulatoryLocationTypeEnum locationCapability = 3;
+ readonly attribute boolean supportsConcurrentConnection = 4;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct ArmFailSafeRequest {
+ int16u expiryLengthSeconds = 0;
+ int64u breadcrumb = 1;
+ }
+
+ response struct ArmFailSafeResponse = 1 {
+ CommissioningErrorEnum errorCode = 0;
+ char_string<128> debugText = 1;
+ }
+
+ request struct SetRegulatoryConfigRequest {
+ RegulatoryLocationTypeEnum newRegulatoryConfig = 0;
+ char_string<2> countryCode = 1;
+ int64u breadcrumb = 2;
+ }
+
+ response struct SetRegulatoryConfigResponse = 3 {
+ CommissioningErrorEnum errorCode = 0;
+ char_string debugText = 1;
+ }
+
+ response struct CommissioningCompleteResponse = 5 {
+ CommissioningErrorEnum errorCode = 0;
+ char_string debugText = 1;
+ }
+
+ /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */
+ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
+ /** Set the regulatory configuration to be used during commissioning */
+ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
+ /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */
+ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
+}
+
+/** Functionality to configure, enable, disable network credentials and access on a Matter device. */
+cluster NetworkCommissioning = 49 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum NetworkCommissioningStatusEnum : enum8 {
+ kSuccess = 0;
+ kOutOfRange = 1;
+ kBoundsExceeded = 2;
+ kNetworkIDNotFound = 3;
+ kDuplicateNetworkID = 4;
+ kNetworkNotFound = 5;
+ kRegulatoryError = 6;
+ kAuthFailure = 7;
+ kUnsupportedSecurity = 8;
+ kOtherConnectionFailure = 9;
+ kIPV6Failed = 10;
+ kIPBindFailed = 11;
+ kUnknownError = 12;
+ }
+
+ enum WiFiBandEnum : enum8 {
+ k2G4 = 0;
+ k3G65 = 1;
+ k5G = 2;
+ k6G = 3;
+ k60G = 4;
+ k1G = 5;
+ }
+
+ bitmap Feature : bitmap32 {
+ kWiFiNetworkInterface = 0x1;
+ kThreadNetworkInterface = 0x2;
+ kEthernetNetworkInterface = 0x4;
+ kPerDeviceCredentials = 0x8;
+ }
+
+ bitmap ThreadCapabilitiesBitmap : bitmap16 {
+ kIsBorderRouterCapable = 0x1;
+ kIsRouterCapable = 0x2;
+ kIsSleepyEndDeviceCapable = 0x4;
+ kIsFullThreadDevice = 0x8;
+ kIsSynchronizedSleepyEndDeviceCapable = 0x10;
+ }
+
+ bitmap WiFiSecurityBitmap : bitmap8 {
+ kUnencrypted = 0x1;
+ kWEP = 0x2;
+ kWPAPersonal = 0x4;
+ kWPA2Personal = 0x8;
+ kWPA3Personal = 0x10;
+ kWPA3MatterPDC = 0x20;
+ }
+
+ struct NetworkInfoStruct {
+ octet_string<32> networkID = 0;
+ boolean connected = 1;
+ optional nullable octet_string<20> networkIdentifier = 2;
+ optional nullable octet_string<20> clientIdentifier = 3;
+ }
+
+ struct ThreadInterfaceScanResultStruct {
+ int16u panId = 0;
+ int64u extendedPanId = 1;
+ char_string<16> networkName = 2;
+ int16u channel = 3;
+ int8u version = 4;
+ octet_string<8> extendedAddress = 5;
+ int8s rssi = 6;
+ int8u lqi = 7;
+ }
+
+ struct WiFiInterfaceScanResultStruct {
+ WiFiSecurityBitmap security = 0;
+ octet_string<32> ssid = 1;
+ octet_string<6> bssid = 2;
+ int16u channel = 3;
+ WiFiBandEnum wiFiBand = 4;
+ int8s rssi = 5;
+ }
+
+ readonly attribute access(read: administer) int8u maxNetworks = 0;
+ readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1;
+ readonly attribute optional int8u scanMaxTimeSeconds = 2;
+ readonly attribute optional int8u connectMaxTimeSeconds = 3;
+ attribute access(write: administer) boolean interfaceEnabled = 4;
+ readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5;
+ readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6;
+ readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7;
+ readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8;
+ readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9;
+ readonly attribute optional int16u threadVersion = 10;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct ScanNetworksRequest {
+ optional nullable octet_string<32> ssid = 0;
+ optional int64u breadcrumb = 1;
+ }
+
+ response struct ScanNetworksResponse = 1 {
+ NetworkCommissioningStatusEnum networkingStatus = 0;
+ optional char_string debugText = 1;
+ optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2;
+ optional ThreadInterfaceScanResultStruct threadScanResults[] = 3;
+ }
+
+ request struct AddOrUpdateWiFiNetworkRequest {
+ octet_string<32> ssid = 0;
+ octet_string<64> credentials = 1;
+ optional int64u breadcrumb = 2;
+ optional octet_string<140> networkIdentity = 3;
+ optional octet_string<20> clientIdentifier = 4;
+ optional octet_string<32> possessionNonce = 5;
+ }
+
+ request struct AddOrUpdateThreadNetworkRequest {
+ octet_string<254> operationalDataset = 0;
+ optional int64u breadcrumb = 1;
+ }
+
+ request struct RemoveNetworkRequest {
+ octet_string<32> networkID = 0;
+ optional int64u breadcrumb = 1;
+ }
+
+ response struct NetworkConfigResponse = 5 {
+ NetworkCommissioningStatusEnum networkingStatus = 0;
+ optional char_string<512> debugText = 1;
+ optional int8u networkIndex = 2;
+ optional octet_string<140> clientIdentity = 3;
+ optional octet_string<64> possessionSignature = 4;
+ }
+
+ request struct ConnectNetworkRequest {
+ octet_string<32> networkID = 0;
+ optional int64u breadcrumb = 1;
+ }
+
+ response struct ConnectNetworkResponse = 7 {
+ NetworkCommissioningStatusEnum networkingStatus = 0;
+ optional char_string debugText = 1;
+ nullable int32s errorValue = 2;
+ }
+
+ request struct ReorderNetworkRequest {
+ octet_string<32> networkID = 0;
+ int8u networkIndex = 1;
+ optional int64u breadcrumb = 2;
+ }
+
+ request struct QueryIdentityRequest {
+ octet_string<20> keyIdentifier = 0;
+ optional octet_string<32> possessionNonce = 1;
+ }
+
+ response struct QueryIdentityResponse = 10 {
+ octet_string<140> identity = 0;
+ optional octet_string<64> possessionSignature = 1;
+ }
+
+ /** Detemine the set of networks the device sees as available. */
+ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0;
+ /** Add or update the credentials for a given Wi-Fi network. */
+ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2;
+ /** Add or update the credentials for a given Thread network. */
+ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3;
+ /** Remove the definition of a given network (including its credentials). */
+ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4;
+ /** Connect to the specified network, using previously-defined credentials. */
+ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6;
+ /** Modify the order in which networks will be presented in the Networks attribute. */
+ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8;
+ /** Retrieve details about and optionally proof of possession of a network client identity. */
+ command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9;
+}
+
+/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
+cluster GeneralDiagnostics = 51 {
+ revision 2;
+
+ enum BootReasonEnum : enum8 {
+ kUnspecified = 0;
+ kPowerOnReboot = 1;
+ kBrownOutReset = 2;
+ kSoftwareWatchdogReset = 3;
+ kHardwareWatchdogReset = 4;
+ kSoftwareUpdateCompleted = 5;
+ kSoftwareReset = 6;
+ }
+
+ enum HardwareFaultEnum : enum8 {
+ kUnspecified = 0;
+ kRadio = 1;
+ kSensor = 2;
+ kResettableOverTemp = 3;
+ kNonResettableOverTemp = 4;
+ kPowerSource = 5;
+ kVisualDisplayFault = 6;
+ kAudioOutputFault = 7;
+ kUserInterfaceFault = 8;
+ kNonVolatileMemoryError = 9;
+ kTamperDetected = 10;
+ }
+
+ enum InterfaceTypeEnum : enum8 {
+ kUnspecified = 0;
+ kWiFi = 1;
+ kEthernet = 2;
+ kCellular = 3;
+ kThread = 4;
+ }
+
+ enum NetworkFaultEnum : enum8 {
+ kUnspecified = 0;
+ kHardwareFailure = 1;
+ kNetworkJammed = 2;
+ kConnectionFailed = 3;
+ }
+
+ enum RadioFaultEnum : enum8 {
+ kUnspecified = 0;
+ kWiFiFault = 1;
+ kCellularFault = 2;
+ kThreadFault = 3;
+ kNFCFault = 4;
+ kBLEFault = 5;
+ kEthernetFault = 6;
+ }
+
+ bitmap Feature : bitmap32 {
+ kDataModelTest = 0x1;
+ }
+
+ struct NetworkInterface {
+ char_string<32> name = 0;
+ boolean isOperational = 1;
+ nullable boolean offPremiseServicesReachableIPv4 = 2;
+ nullable boolean offPremiseServicesReachableIPv6 = 3;
+ octet_string<8> hardwareAddress = 4;
+ octet_string IPv4Addresses[] = 5;
+ octet_string IPv6Addresses[] = 6;
+ InterfaceTypeEnum type = 7;
+ }
+
+ critical event HardwareFaultChange = 0 {
+ HardwareFaultEnum current[] = 0;
+ HardwareFaultEnum previous[] = 1;
+ }
+
+ critical event RadioFaultChange = 1 {
+ RadioFaultEnum current[] = 0;
+ RadioFaultEnum previous[] = 1;
+ }
+
+ critical event NetworkFaultChange = 2 {
+ NetworkFaultEnum current[] = 0;
+ NetworkFaultEnum previous[] = 1;
+ }
+
+ critical event BootReason = 3 {
+ BootReasonEnum bootReason = 0;
+ }
+
+ readonly attribute NetworkInterface networkInterfaces[] = 0;
+ readonly attribute int16u rebootCount = 1;
+ readonly attribute optional int64u upTime = 2;
+ readonly attribute optional int32u totalOperationalHours = 3;
+ readonly attribute optional BootReasonEnum bootReason = 4;
+ readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5;
+ readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6;
+ readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7;
+ readonly attribute boolean testEventTriggersEnabled = 8;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct TestEventTriggerRequest {
+ octet_string<16> enableKey = 0;
+ int64u eventTrigger = 1;
+ }
+
+ response struct TimeSnapshotResponse = 2 {
+ systime_ms systemTimeMs = 0;
+ nullable posix_ms posixTimeMs = 1;
+ }
+
+ request struct PayloadTestRequestRequest {
+ octet_string<16> enableKey = 0;
+ int8u value = 1;
+ int16u count = 2;
+ }
+
+ response struct PayloadTestResponse = 4 {
+ octet_string payload = 0;
+ }
+
+ /** Provide a means for certification tests to trigger some test-plan-specific events */
+ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0;
+ /** Take a snapshot of system time and epoch time. */
+ command TimeSnapshot(): TimeSnapshotResponse = 1;
+ /** Request a variable length payload response. */
+ command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3;
+}
+
+/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
+cluster SoftwareDiagnostics = 52 {
+ revision 1; // NOTE: Default/not specifically set
+
+ bitmap Feature : bitmap32 {
+ kWatermarks = 0x1;
+ }
+
+ struct ThreadMetricsStruct {
+ int64u id = 0;
+ optional char_string<8> name = 1;
+ optional int32u stackFreeCurrent = 2;
+ optional int32u stackFreeMinimum = 3;
+ optional int32u stackSize = 4;
+ }
+
+ info event SoftwareFault = 0 {
+ int64u id = 0;
+ optional char_string name = 1;
+ optional octet_string faultRecording = 2;
+ }
+
+ readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0;
+ readonly attribute optional int64u currentHeapFree = 1;
+ readonly attribute optional int64u currentHeapUsed = 2;
+ readonly attribute optional int64u currentHeapHighWatermark = 3;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */
+ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0;
+}
+
+/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */
+cluster ThreadNetworkDiagnostics = 53 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum ConnectionStatusEnum : enum8 {
+ kConnected = 0;
+ kNotConnected = 1;
+ }
+
+ enum NetworkFaultEnum : enum8 {
+ kUnspecified = 0;
+ kLinkDown = 1;
+ kHardwareFailure = 2;
+ kNetworkJammed = 3;
+ }
+
+ enum RoutingRoleEnum : enum8 {
+ kUnspecified = 0;
+ kUnassigned = 1;
+ kSleepyEndDevice = 2;
+ kEndDevice = 3;
+ kREED = 4;
+ kRouter = 5;
+ kLeader = 6;
+ }
+
+ bitmap Feature : bitmap32 {
+ kPacketCounts = 0x1;
+ kErrorCounts = 0x2;
+ kMLECounts = 0x4;
+ kMACCounts = 0x8;
+ }
+
+ struct NeighborTableStruct {
+ int64u extAddress = 0;
+ int32u age = 1;
+ int16u rloc16 = 2;
+ int32u linkFrameCounter = 3;
+ int32u mleFrameCounter = 4;
+ int8u lqi = 5;
+ nullable int8s averageRssi = 6;
+ nullable int8s lastRssi = 7;
+ int8u frameErrorRate = 8;
+ int8u messageErrorRate = 9;
+ boolean rxOnWhenIdle = 10;
+ boolean fullThreadDevice = 11;
+ boolean fullNetworkData = 12;
+ boolean isChild = 13;
+ }
+
+ struct OperationalDatasetComponents {
+ boolean activeTimestampPresent = 0;
+ boolean pendingTimestampPresent = 1;
+ boolean masterKeyPresent = 2;
+ boolean networkNamePresent = 3;
+ boolean extendedPanIdPresent = 4;
+ boolean meshLocalPrefixPresent = 5;
+ boolean delayPresent = 6;
+ boolean panIdPresent = 7;
+ boolean channelPresent = 8;
+ boolean pskcPresent = 9;
+ boolean securityPolicyPresent = 10;
+ boolean channelMaskPresent = 11;
+ }
+
+ struct RouteTableStruct {
+ int64u extAddress = 0;
+ int16u rloc16 = 1;
+ int8u routerId = 2;
+ int8u nextHop = 3;
+ int8u pathCost = 4;
+ int8u LQIIn = 5;
+ int8u LQIOut = 6;
+ int8u age = 7;
+ boolean allocated = 8;
+ boolean linkEstablished = 9;
+ }
+
+ struct SecurityPolicy {
+ int16u rotationTime = 0;
+ int16u flags = 1;
+ }
+
+ info event ConnectionStatus = 0 {
+ ConnectionStatusEnum connectionStatus = 0;
+ }
+
+ info event NetworkFaultChange = 1 {
+ NetworkFaultEnum current[] = 0;
+ NetworkFaultEnum previous[] = 1;
+ }
+
+ readonly attribute nullable int16u channel = 0;
+ readonly attribute nullable RoutingRoleEnum routingRole = 1;
+ readonly attribute nullable char_string<16> networkName = 2;
+ readonly attribute nullable int16u panId = 3;
+ readonly attribute nullable int64u extendedPanId = 4;
+ readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
+ readonly attribute optional int64u overrunCount = 6;
+ readonly attribute NeighborTableStruct neighborTable[] = 7;
+ readonly attribute RouteTableStruct routeTable[] = 8;
+ readonly attribute nullable int32u partitionId = 9;
+ readonly attribute nullable int16u weighting = 10;
+ readonly attribute nullable int16u dataVersion = 11;
+ readonly attribute nullable int16u stableDataVersion = 12;
+ readonly attribute nullable int8u leaderRouterId = 13;
+ readonly attribute optional int16u detachedRoleCount = 14;
+ readonly attribute optional int16u childRoleCount = 15;
+ readonly attribute optional int16u routerRoleCount = 16;
+ readonly attribute optional int16u leaderRoleCount = 17;
+ readonly attribute optional int16u attachAttemptCount = 18;
+ readonly attribute optional int16u partitionIdChangeCount = 19;
+ readonly attribute optional int16u betterPartitionAttachAttemptCount = 20;
+ readonly attribute optional int16u parentChangeCount = 21;
+ readonly attribute optional int32u txTotalCount = 22;
+ readonly attribute optional int32u txUnicastCount = 23;
+ readonly attribute optional int32u txBroadcastCount = 24;
+ readonly attribute optional int32u txAckRequestedCount = 25;
+ readonly attribute optional int32u txAckedCount = 26;
+ readonly attribute optional int32u txNoAckRequestedCount = 27;
+ readonly attribute optional int32u txDataCount = 28;
+ readonly attribute optional int32u txDataPollCount = 29;
+ readonly attribute optional int32u txBeaconCount = 30;
+ readonly attribute optional int32u txBeaconRequestCount = 31;
+ readonly attribute optional int32u txOtherCount = 32;
+ readonly attribute optional int32u txRetryCount = 33;
+ readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34;
+ readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35;
+ readonly attribute optional int32u txErrCcaCount = 36;
+ readonly attribute optional int32u txErrAbortCount = 37;
+ readonly attribute optional int32u txErrBusyChannelCount = 38;
+ readonly attribute optional int32u rxTotalCount = 39;
+ readonly attribute optional int32u rxUnicastCount = 40;
+ readonly attribute optional int32u rxBroadcastCount = 41;
+ readonly attribute optional int32u rxDataCount = 42;
+ readonly attribute optional int32u rxDataPollCount = 43;
+ readonly attribute optional int32u rxBeaconCount = 44;
+ readonly attribute optional int32u rxBeaconRequestCount = 45;
+ readonly attribute optional int32u rxOtherCount = 46;
+ readonly attribute optional int32u rxAddressFilteredCount = 47;
+ readonly attribute optional int32u rxDestAddrFilteredCount = 48;
+ readonly attribute optional int32u rxDuplicatedCount = 49;
+ readonly attribute optional int32u rxErrNoFrameCount = 50;
+ readonly attribute optional int32u rxErrUnknownNeighborCount = 51;
+ readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52;
+ readonly attribute optional int32u rxErrSecCount = 53;
+ readonly attribute optional int32u rxErrFcsCount = 54;
+ readonly attribute optional int32u rxErrOtherCount = 55;
+ readonly attribute optional nullable int64u activeTimestamp = 56;
+ readonly attribute optional nullable int64u pendingTimestamp = 57;
+ readonly attribute optional nullable int32u delay = 58;
+ readonly attribute nullable SecurityPolicy securityPolicy = 59;
+ readonly attribute nullable octet_string<4> channelPage0Mask = 60;
+ readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61;
+ readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ /** Reception of this command SHALL reset the OverrunCount attributes to 0 */
+ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
+}
+
+/** Commands to trigger a Node to allow a new Administrator to commission it. */
+cluster AdministratorCommissioning = 60 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum CommissioningWindowStatusEnum : enum8 {
+ kWindowNotOpen = 0;
+ kEnhancedWindowOpen = 1;
+ kBasicWindowOpen = 2;
+ }
+
+ enum StatusCode : enum8 {
+ kBusy = 2;
+ kPAKEParameterError = 3;
+ kWindowNotOpen = 4;
+ }
+
+ bitmap Feature : bitmap32 {
+ kBasic = 0x1;
+ }
+
+ readonly attribute CommissioningWindowStatusEnum windowStatus = 0;
+ readonly attribute nullable fabric_idx adminFabricIndex = 1;
+ readonly attribute nullable vendor_id adminVendorId = 2;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct OpenCommissioningWindowRequest {
+ int16u commissioningTimeout = 0;
+ octet_string PAKEPasscodeVerifier = 1;
+ int16u discriminator = 2;
+ int32u iterations = 3;
+ octet_string<32> salt = 4;
+ }
+
+ request struct OpenBasicCommissioningWindowRequest {
+ int16u commissioningTimeout = 0;
+ }
+
+ /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */
+ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0;
+ /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */
+ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1;
+ /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */
+ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2;
+}
+
+/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */
+cluster OperationalCredentials = 62 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum CertificateChainTypeEnum : enum8 {
+ kDACCertificate = 1;
+ kPAICertificate = 2;
+ }
+
+ enum NodeOperationalCertStatusEnum : enum8 {
+ kOK = 0;
+ kInvalidPublicKey = 1;
+ kInvalidNodeOpId = 2;
+ kInvalidNOC = 3;
+ kMissingCsr = 4;
+ kTableFull = 5;
+ kInvalidAdminSubject = 6;
+ kFabricConflict = 9;
+ kLabelConflict = 10;
+ kInvalidFabricIndex = 11;
+ }
+
+ fabric_scoped struct FabricDescriptorStruct {
+ octet_string<65> rootPublicKey = 1;
+ vendor_id vendorID = 2;
+ fabric_id fabricID = 3;
+ node_id nodeID = 4;
+ char_string<32> label = 5;
+ fabric_idx fabricIndex = 254;
+ }
+
+ fabric_scoped struct NOCStruct {
+ fabric_sensitive octet_string noc = 1;
+ nullable fabric_sensitive octet_string icac = 2;
+ fabric_idx fabricIndex = 254;
+ }
+
+ readonly attribute access(read: administer) NOCStruct NOCs[] = 0;
+ readonly attribute FabricDescriptorStruct fabrics[] = 1;
+ readonly attribute int8u supportedFabrics = 2;
+ readonly attribute int8u commissionedFabrics = 3;
+ readonly attribute octet_string trustedRootCertificates[] = 4;
+ readonly attribute int8u currentFabricIndex = 5;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct AttestationRequestRequest {
+ octet_string<32> attestationNonce = 0;
+ }
+
+ response struct AttestationResponse = 1 {
+ octet_string<900> attestationElements = 0;
+ octet_string<64> attestationSignature = 1;
+ }
+
+ request struct CertificateChainRequestRequest {
+ CertificateChainTypeEnum certificateType = 0;
+ }
+
+ response struct CertificateChainResponse = 3 {
+ octet_string<600> certificate = 0;
+ }
+
+ request struct CSRRequestRequest {
+ octet_string<32> CSRNonce = 0;
+ optional boolean isForUpdateNOC = 1;
+ }
+
+ response struct CSRResponse = 5 {
+ octet_string NOCSRElements = 0;
+ octet_string attestationSignature = 1;
+ }
+
+ request struct AddNOCRequest {
+ octet_string<400> NOCValue = 0;
+ optional octet_string<400> ICACValue = 1;
+ octet_string<16> IPKValue = 2;
+ int64u caseAdminSubject = 3;
+ vendor_id adminVendorId = 4;
+ }
+
+ request struct UpdateNOCRequest {
+ octet_string NOCValue = 0;
+ optional octet_string ICACValue = 1;
+ }
+
+ response struct NOCResponse = 8 {
+ NodeOperationalCertStatusEnum statusCode = 0;
+ optional fabric_idx fabricIndex = 1;
+ optional char_string<128> debugText = 2;
+ }
+
+ request struct UpdateFabricLabelRequest {
+ char_string<32> label = 0;
+ }
+
+ request struct RemoveFabricRequest {
+ fabric_idx fabricIndex = 0;
+ }
+
+ request struct AddTrustedRootCertificateRequest {
+ octet_string rootCACertificate = 0;
+ }
+
+ /** Sender is requesting attestation information from the receiver. */
+ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0;
+ /** Sender is requesting a device attestation certificate from the receiver. */
+ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2;
+ /** Sender is requesting a certificate signing request (CSR) from the receiver. */
+ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4;
+ /** Sender is requesting to add the new node operational certificates. */
+ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6;
+ /** Sender is requesting to update the node operational certificates. */
+ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7;
+ /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */
+ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9;
+ /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */
+ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
+ /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */
+ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
+}
+
+/** The Group Key Management Cluster is the mechanism by which group keys are managed. */
+cluster GroupKeyManagement = 63 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum GroupKeySecurityPolicyEnum : enum8 {
+ kTrustFirst = 0;
+ kCacheAndSync = 1;
+ }
+
+ bitmap Feature : bitmap32 {
+ kCacheAndSync = 0x1;
+ }
+
+ fabric_scoped struct GroupInfoMapStruct {
+ group_id groupId = 1;
+ endpoint_no endpoints[] = 2;
+ optional char_string<16> groupName = 3;
+ fabric_idx fabricIndex = 254;
+ }
+
+ fabric_scoped struct GroupKeyMapStruct {
+ group_id groupId = 1;
+ int16u groupKeySetID = 2;
+ fabric_idx fabricIndex = 254;
+ }
+
+ struct GroupKeySetStruct {
+ int16u groupKeySetID = 0;
+ GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1;
+ nullable octet_string<16> epochKey0 = 2;
+ nullable epoch_us epochStartTime0 = 3;
+ nullable octet_string<16> epochKey1 = 4;
+ nullable epoch_us epochStartTime1 = 5;
+ nullable octet_string<16> epochKey2 = 6;
+ nullable epoch_us epochStartTime2 = 7;
+ }
+
+ attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0;
+ readonly attribute GroupInfoMapStruct groupTable[] = 1;
+ readonly attribute int16u maxGroupsPerFabric = 2;
+ readonly attribute int16u maxGroupKeysPerFabric = 3;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct KeySetWriteRequest {
+ GroupKeySetStruct groupKeySet = 0;
+ }
+
+ request struct KeySetReadRequest {
+ int16u groupKeySetID = 0;
+ }
+
+ response struct KeySetReadResponse = 2 {
+ GroupKeySetStruct groupKeySet = 0;
+ }
+
+ request struct KeySetRemoveRequest {
+ int16u groupKeySetID = 0;
+ }
+
+ response struct KeySetReadAllIndicesResponse = 5 {
+ int16u groupKeySetIDs[] = 0;
+ }
+
+ /** Write a new set of keys for the given key set id. */
+ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0;
+ /** Read the keys for a given key set id. */
+ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1;
+ /** Revoke a Root Key from a Group */
+ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3;
+ /** Return the list of Group Key Sets associated with the accessing fabric */
+ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4;
+}
+
+/** This cluster provides an interface to a boolean state called StateValue. */
+cluster BooleanState = 69 {
+ revision 1;
+
+ info event StateChange = 0 {
+ boolean stateValue = 0;
+ }
+
+ readonly attribute boolean stateValue = 0;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+}
+
+/** Allows servers to ensure that listed clients are notified when a server is available for communication. */
+cluster IcdManagement = 70 {
+ revision 2;
+
+ enum OperatingModeEnum : enum8 {
+ kSIT = 0;
+ kLIT = 1;
+ }
+
+ bitmap Feature : bitmap32 {
+ kCheckInProtocolSupport = 0x1;
+ kUserActiveModeTrigger = 0x2;
+ kLongIdleTimeSupport = 0x4;
+ }
+
+ bitmap UserActiveModeTriggerBitmap : bitmap32 {
+ kPowerCycle = 0x1;
+ kSettingsMenu = 0x2;
+ kCustomInstruction = 0x4;
+ kDeviceManual = 0x8;
+ kActuateSensor = 0x10;
+ kActuateSensorSeconds = 0x20;
+ kActuateSensorTimes = 0x40;
+ kActuateSensorLightsBlink = 0x80;
+ kResetButton = 0x100;
+ kResetButtonLightsBlink = 0x200;
+ kResetButtonSeconds = 0x400;
+ kResetButtonTimes = 0x800;
+ kSetupButton = 0x1000;
+ kSetupButtonSeconds = 0x2000;
+ kSetupButtonLightsBlink = 0x4000;
+ kSetupButtonTimes = 0x8000;
+ kAppDefinedButton = 0x10000;
+ }
+
+ fabric_scoped struct MonitoringRegistrationStruct {
+ fabric_sensitive node_id checkInNodeID = 1;
+ fabric_sensitive int64u monitoredSubject = 2;
+ fabric_idx fabricIndex = 254;
+ }
+
+ readonly attribute int32u idleModeDuration = 0;
+ readonly attribute int32u activeModeDuration = 1;
+ readonly attribute int16u activeModeThreshold = 2;
+ readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3;
+ readonly attribute access(read: administer) optional int32u ICDCounter = 4;
+ readonly attribute optional int16u clientsSupportedPerFabric = 5;
+ readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6;
+ readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7;
+ readonly attribute optional OperatingModeEnum operatingMode = 8;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct RegisterClientRequest {
+ node_id checkInNodeID = 0;
+ int64u monitoredSubject = 1;
+ octet_string<16> key = 2;
+ optional octet_string<16> verificationKey = 3;
+ }
+
+ response struct RegisterClientResponse = 1 {
+ int32u ICDCounter = 0;
+ }
+
+ request struct UnregisterClientRequest {
+ node_id checkInNodeID = 0;
+ optional octet_string<16> verificationKey = 1;
+ }
+
+ response struct StayActiveResponse = 4 {
+ int32u promisedActiveDuration = 0;
+ }
+
+ /** Register a client to the end device */
+ fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0;
+ /** Unregister a client from an end device */
+ fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
+ /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
+ command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
+}
+
+endpoint 0 {
+ device type ma_rootdevice = 22, version 2;
+
+ binding cluster OtaSoftwareUpdateProvider;
+
+ server cluster Descriptor {
+ callback attribute deviceTypeList;
+ callback attribute serverList;
+ callback attribute clientList;
+ callback attribute partsList;
+ callback attribute featureMap;
+ callback attribute clusterRevision;
+ }
+
+ server cluster AccessControl {
+ emits event AccessControlEntryChanged;
+ emits event AccessControlExtensionChanged;
+ callback attribute acl;
+ callback attribute subjectsPerAccessControlEntry;
+ callback attribute targetsPerAccessControlEntry;
+ callback attribute accessControlEntriesPerFabric;
+ callback attribute attributeList;
+ ram attribute featureMap default = 0;
+ callback attribute clusterRevision;
+ }
+
+ server cluster BasicInformation {
+ emits event StartUp;
+ emits event ShutDown;
+ emits event Leave;
+ callback attribute dataModelRevision;
+ callback attribute vendorName;
+ callback attribute vendorID;
+ callback attribute productName;
+ callback attribute productID;
+ persist attribute nodeLabel;
+ callback attribute location;
+ callback attribute hardwareVersion;
+ callback attribute hardwareVersionString;
+ callback attribute softwareVersion;
+ callback attribute softwareVersionString;
+ callback attribute capabilityMinima;
+ callback attribute specificationVersion;
+ callback attribute maxPathsPerInvoke;
+ ram attribute featureMap default = 0;
+ ram attribute clusterRevision default = 2;
+ }
+
+ server cluster OtaSoftwareUpdateRequestor {
+ emits event StateTransition;
+ emits event VersionApplied;
+ emits event DownloadError;
+ callback attribute defaultOTAProviders;
+ ram attribute updatePossible default = 1;
+ ram attribute updateState default = 0;
+ ram attribute updateStateProgress default = 0;
+ ram attribute featureMap default = 0;
+ ram attribute clusterRevision default = 1;
+
+ handle command AnnounceOTAProvider;
+ }
+
+ server cluster GeneralCommissioning {
+ ram attribute breadcrumb default = 0x0000000000000000;
+ callback attribute basicCommissioningInfo;
+ callback attribute regulatoryConfig;
+ callback attribute locationCapability;
+ callback attribute supportsConcurrentConnection;
+ ram attribute featureMap default = 0;
+ ram attribute clusterRevision default = 1;
+
+ handle command ArmFailSafe;
+ handle command ArmFailSafeResponse;
+ handle command SetRegulatoryConfig;
+ handle command SetRegulatoryConfigResponse;
+ handle command CommissioningComplete;
+ handle command CommissioningCompleteResponse;
+ }
+
+ server cluster NetworkCommissioning {
+ ram attribute maxNetworks;
+ callback attribute networks;
+ ram attribute scanMaxTimeSeconds;
+ ram attribute connectMaxTimeSeconds;
+ ram attribute interfaceEnabled;
+ ram attribute lastNetworkingStatus;
+ ram attribute lastNetworkID;
+ ram attribute lastConnectErrorValue;
+ ram attribute featureMap default = 2;
+ ram attribute clusterRevision default = 1;
+
+ handle command ScanNetworks;
+ handle command ScanNetworksResponse;
+ handle command AddOrUpdateThreadNetwork;
+ handle command RemoveNetwork;
+ handle command NetworkConfigResponse;
+ handle command ConnectNetwork;
+ handle command ConnectNetworkResponse;
+ handle command ReorderNetwork;
+ }
+
+ server cluster GeneralDiagnostics {
+ emits event BootReason;
+ callback attribute networkInterfaces;
+ callback attribute rebootCount;
+ callback attribute activeNetworkFaults;
+ callback attribute testEventTriggersEnabled default = false;
+ callback attribute featureMap;
+ callback attribute clusterRevision;
+
+ handle command TestEventTrigger;
+ }
+
+ server cluster SoftwareDiagnostics {
+ callback attribute threadMetrics;
+ callback attribute currentHeapFree;
+ callback attribute currentHeapUsed;
+ callback attribute currentHeapHighWatermark;
+ callback attribute featureMap;
+ ram attribute clusterRevision default = 1;
+
+ handle command ResetWatermarks;
+ }
+
+ server cluster ThreadNetworkDiagnostics {
+ callback attribute channel;
+ callback attribute routingRole;
+ callback attribute networkName;
+ callback attribute panId;
+ callback attribute extendedPanId;
+ callback attribute meshLocalPrefix;
+ callback attribute overrunCount;
+ callback attribute neighborTable;
+ callback attribute routeTable;
+ callback attribute partitionId;
+ callback attribute weighting;
+ callback attribute dataVersion;
+ callback attribute stableDataVersion;
+ callback attribute leaderRouterId;
+ callback attribute detachedRoleCount;
+ callback attribute childRoleCount;
+ callback attribute routerRoleCount;
+ callback attribute leaderRoleCount;
+ callback attribute attachAttemptCount;
+ callback attribute partitionIdChangeCount;
+ callback attribute betterPartitionAttachAttemptCount;
+ callback attribute parentChangeCount;
+ callback attribute txTotalCount;
+ callback attribute txUnicastCount;
+ callback attribute txBroadcastCount;
+ callback attribute txAckRequestedCount;
+ callback attribute txAckedCount;
+ callback attribute txNoAckRequestedCount;
+ callback attribute txDataCount;
+ callback attribute txDataPollCount;
+ callback attribute txBeaconCount;
+ callback attribute txBeaconRequestCount;
+ callback attribute txOtherCount;
+ callback attribute txRetryCount;
+ callback attribute txDirectMaxRetryExpiryCount;
+ callback attribute txIndirectMaxRetryExpiryCount;
+ callback attribute txErrCcaCount;
+ callback attribute txErrAbortCount;
+ callback attribute txErrBusyChannelCount;
+ callback attribute rxTotalCount;
+ callback attribute rxUnicastCount;
+ callback attribute rxBroadcastCount;
+ callback attribute rxDataCount;
+ callback attribute rxDataPollCount;
+ callback attribute rxBeaconCount;
+ callback attribute rxBeaconRequestCount;
+ callback attribute rxOtherCount;
+ callback attribute rxAddressFilteredCount;
+ callback attribute rxDestAddrFilteredCount;
+ callback attribute rxDuplicatedCount;
+ callback attribute rxErrNoFrameCount;
+ callback attribute rxErrUnknownNeighborCount;
+ callback attribute rxErrInvalidSrcAddrCount;
+ callback attribute rxErrSecCount;
+ callback attribute rxErrFcsCount;
+ callback attribute rxErrOtherCount;
+ callback attribute securityPolicy;
+ callback attribute channelPage0Mask;
+ callback attribute operationalDatasetComponents;
+ callback attribute activeNetworkFaultsList;
+ ram attribute featureMap default = 0x000F;
+ ram attribute clusterRevision default = 1;
+
+ handle command ResetCounts;
+ }
+
+ server cluster AdministratorCommissioning {
+ callback attribute windowStatus;
+ callback attribute adminFabricIndex;
+ callback attribute adminVendorId;
+ ram attribute featureMap default = 0;
+ ram attribute clusterRevision default = 1;
+
+ handle command OpenCommissioningWindow;
+ handle command RevokeCommissioning;
+ }
+
+ server cluster OperationalCredentials {
+ callback attribute NOCs;
+ callback attribute fabrics;
+ callback attribute supportedFabrics;
+ callback attribute commissionedFabrics;
+ callback attribute trustedRootCertificates;
+ callback attribute currentFabricIndex;
+ ram attribute featureMap default = 0;
+ ram attribute clusterRevision default = 1;
+
+ handle command AttestationRequest;
+ handle command AttestationResponse;
+ handle command CertificateChainRequest;
+ handle command CertificateChainResponse;
+ handle command CSRRequest;
+ handle command CSRResponse;
+ handle command AddNOC;
+ handle command UpdateNOC;
+ handle command NOCResponse;
+ handle command UpdateFabricLabel;
+ handle command RemoveFabric;
+ handle command AddTrustedRootCertificate;
+ }
+
+ server cluster GroupKeyManagement {
+ callback attribute groupKeyMap;
+ callback attribute groupTable;
+ callback attribute maxGroupsPerFabric;
+ callback attribute maxGroupKeysPerFabric;
+ callback attribute featureMap;
+ callback attribute clusterRevision;
+
+ handle command KeySetWrite;
+ handle command KeySetRead;
+ handle command KeySetReadResponse;
+ handle command KeySetRemove;
+ handle command KeySetReadAllIndices;
+ handle command KeySetReadAllIndicesResponse;
+ }
+
+ server cluster IcdManagement {
+ callback attribute idleModeDuration;
+ callback attribute activeModeDuration;
+ callback attribute activeModeThreshold;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute eventList;
+ callback attribute attributeList;
+ ram attribute featureMap default = 0x0000;
+ ram attribute clusterRevision default = 1;
+ }
+}
+endpoint 1 {
+ device type ma_contactsensor = 21, version 1;
+
+
+ server cluster Identify {
+ ram attribute identifyTime default = 0x0000;
+ ram attribute identifyType default = 0x0;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute attributeList;
+ ram attribute featureMap default = 0;
+ ram attribute clusterRevision default = 4;
+
+ handle command Identify;
+ handle command TriggerEffect;
+ }
+
+ server cluster Descriptor {
+ callback attribute deviceTypeList;
+ callback attribute serverList;
+ callback attribute clientList;
+ callback attribute partsList;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute attributeList;
+ callback attribute featureMap;
+ callback attribute clusterRevision;
+ }
+
+ server cluster BooleanState {
+ emits event StateChange;
+ ram attribute stateValue default = 0;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute attributeList;
+ ram attribute featureMap default = 0;
+ ram attribute clusterRevision default = 1;
+ }
+}
+
+
diff --git a/examples/contact-sensor-app/nxp/zap/contact-sensor-app.zap b/examples/contact-sensor-app/nxp/zap/contact-sensor-app.zap
new file mode 100644
index 00000000000000..bf037957bd2629
--- /dev/null
+++ b/examples/contact-sensor-app/nxp/zap/contact-sensor-app.zap
@@ -0,0 +1,3576 @@
+{
+ "fileFormat": 2,
+ "featureLevel": 99,
+ "creator": "zap",
+ "keyValuePairs": [
+ {
+ "key": "commandDiscovery",
+ "value": "1"
+ },
+ {
+ "key": "defaultResponsePolicy",
+ "value": "always"
+ },
+ {
+ "key": "manufacturerCodes",
+ "value": "0x1002"
+ }
+ ],
+ "package": [
+ {
+ "pathRelativity": "relativeToZap",
+ "path": "../../../../src/app/zap-templates/zcl/zcl.json",
+ "type": "zcl-properties",
+ "category": "matter",
+ "version": 1,
+ "description": "Matter SDK ZCL data"
+ },
+ {
+ "pathRelativity": "relativeToZap",
+ "path": "../../../../src/app/zap-templates/app-templates.json",
+ "type": "gen-templates-json",
+ "version": "chip-v1"
+ }
+ ],
+ "endpointTypes": [
+ {
+ "id": 1,
+ "name": "MA-rootdevice",
+ "deviceTypeRef": {
+ "code": 22,
+ "profileId": 259,
+ "label": "MA-rootdevice",
+ "name": "MA-rootdevice"
+ },
+ "deviceTypes": [
+ {
+ "code": 22,
+ "profileId": 259,
+ "label": "MA-rootdevice",
+ "name": "MA-rootdevice"
+ }
+ ],
+ "deviceVersions": [
+ 2
+ ],
+ "deviceIdentifiers": [
+ 22
+ ],
+ "deviceTypeName": "MA-rootdevice",
+ "deviceTypeCode": 22,
+ "deviceTypeProfileId": 259,
+ "clusters": [
+ {
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "attributes": [
+ {
+ "name": "DeviceTypeList",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ServerList",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClientList",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "PartsList",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Access Control",
+ "code": 31,
+ "mfgCode": null,
+ "define": "ACCESS_CONTROL_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "attributes": [
+ {
+ "name": "ACL",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "SubjectsPerAccessControlEntry",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "TargetsPerAccessControlEntry",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AccessControlEntriesPerFabric",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ],
+ "events": [
+ {
+ "name": "AccessControlEntryChanged",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "AccessControlExtensionChanged",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ }
+ ]
+ },
+ {
+ "name": "Basic Information",
+ "code": 40,
+ "mfgCode": null,
+ "define": "BASIC_INFORMATION_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "attributes": [
+ {
+ "name": "DataModelRevision",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "VendorName",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "VendorID",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "vendor_id",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ProductName",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ProductID",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "NodeLabel",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "Location",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "HardwareVersion",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "HardwareVersionString",
+ "code": 8,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SoftwareVersion",
+ "code": 9,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SoftwareVersionString",
+ "code": 10,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CapabilityMinima",
+ "code": 19,
+ "mfgCode": null,
+ "side": "server",
+ "type": "CapabilityMinimaStruct",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "SpecificationVersion",
+ "code": 21,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "MaxPathsPerInvoke",
+ "code": 22,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "2",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ],
+ "events": [
+ {
+ "name": "StartUp",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "ShutDown",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "Leave",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ }
+ ]
+ },
+ {
+ "name": "OTA Software Update Provider",
+ "code": 41,
+ "mfgCode": null,
+ "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER",
+ "side": "client",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "QueryImage",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "QueryImageResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "ApplyUpdateRequest",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "ApplyUpdateResponse",
+ "code": 3,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "NotifyUpdateApplied",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 0,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "OTA Software Update Requestor",
+ "code": 42,
+ "mfgCode": null,
+ "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "AnnounceOTAProvider",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "DefaultOTAProviders",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "UpdatePossible",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "UpdateState",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "UpdateStateEnum",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "UpdateStateProgress",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ],
+ "events": [
+ {
+ "name": "StateTransition",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "VersionApplied",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "DownloadError",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ }
+ ]
+ },
+ {
+ "name": "General Commissioning",
+ "code": 48,
+ "mfgCode": null,
+ "define": "GENERAL_COMMISSIONING_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "ArmFailSafe",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "ArmFailSafeResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "SetRegulatoryConfig",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "SetRegulatoryConfigResponse",
+ "code": 3,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "CommissioningComplete",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "CommissioningCompleteResponse",
+ "code": 5,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "Breadcrumb",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "BasicCommissioningInfo",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "BasicCommissioningInfo",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RegulatoryConfig",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "RegulatoryLocationTypeEnum",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "LocationCapability",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "RegulatoryLocationTypeEnum",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "SupportsConcurrentConnection",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Network Commissioning",
+ "code": 49,
+ "mfgCode": null,
+ "define": "NETWORK_COMMISSIONING_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "ScanNetworks",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "ScanNetworksResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "AddOrUpdateThreadNetwork",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "RemoveNetwork",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "NetworkConfigResponse",
+ "code": 5,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "ConnectNetwork",
+ "code": 6,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "ConnectNetworkResponse",
+ "code": 7,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "ReorderNetwork",
+ "code": 8,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "MaxNetworks",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "Networks",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ScanMaxTimeSeconds",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ConnectMaxTimeSeconds",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "InterfaceEnabled",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "LastNetworkingStatus",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "NetworkCommissioningStatusEnum",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "LastNetworkID",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "octet_string",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "LastConnectErrorValue",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32s",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "2",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "General Diagnostics",
+ "code": 51,
+ "mfgCode": null,
+ "define": "GENERAL_DIAGNOSTICS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "TestEventTrigger",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "NetworkInterfaces",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RebootCount",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveNetworkFaults",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "TestEventTriggersEnabled",
+ "code": 8,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "false",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ],
+ "events": [
+ {
+ "name": "BootReason",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ }
+ ]
+ },
+ {
+ "name": "Software Diagnostics",
+ "code": 52,
+ "mfgCode": null,
+ "define": "SOFTWARE_DIAGNOSTICS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "ResetWatermarks",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ThreadMetrics",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentHeapFree",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentHeapUsed",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentHeapHighWatermark",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Thread Network Diagnostics",
+ "code": 53,
+ "mfgCode": null,
+ "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "ResetCounts",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "Channel",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RoutingRole",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "RoutingRoleEnum",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "NetworkName",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "PanId",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ExtendedPanId",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "MeshLocalPrefix",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "octet_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "OverrunCount",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "NeighborTable",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RouteTable",
+ "code": 8,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "PartitionId",
+ "code": 9,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "Weighting",
+ "code": 10,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "DataVersion",
+ "code": 11,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "StableDataVersion",
+ "code": 12,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "LeaderRouterId",
+ "code": 13,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "DetachedRoleCount",
+ "code": 14,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ChildRoleCount",
+ "code": 15,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RouterRoleCount",
+ "code": 16,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "LeaderRoleCount",
+ "code": 17,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttachAttemptCount",
+ "code": 18,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "PartitionIdChangeCount",
+ "code": 19,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "BetterPartitionAttachAttemptCount",
+ "code": 20,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ParentChangeCount",
+ "code": 21,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxTotalCount",
+ "code": 22,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxUnicastCount",
+ "code": 23,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxBroadcastCount",
+ "code": 24,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxAckRequestedCount",
+ "code": 25,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxAckedCount",
+ "code": 26,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxNoAckRequestedCount",
+ "code": 27,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxDataCount",
+ "code": 28,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxDataPollCount",
+ "code": 29,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxBeaconCount",
+ "code": 30,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxBeaconRequestCount",
+ "code": 31,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxOtherCount",
+ "code": 32,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxRetryCount",
+ "code": 33,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxDirectMaxRetryExpiryCount",
+ "code": 34,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxIndirectMaxRetryExpiryCount",
+ "code": 35,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxErrCcaCount",
+ "code": 36,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxErrAbortCount",
+ "code": 37,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxErrBusyChannelCount",
+ "code": 38,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxTotalCount",
+ "code": 39,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxUnicastCount",
+ "code": 40,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxBroadcastCount",
+ "code": 41,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxDataCount",
+ "code": 42,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxDataPollCount",
+ "code": 43,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxBeaconCount",
+ "code": 44,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxBeaconRequestCount",
+ "code": 45,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxOtherCount",
+ "code": 46,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxAddressFilteredCount",
+ "code": 47,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxDestAddrFilteredCount",
+ "code": 48,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxDuplicatedCount",
+ "code": 49,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrNoFrameCount",
+ "code": 50,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrUnknownNeighborCount",
+ "code": 51,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrInvalidSrcAddrCount",
+ "code": 52,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrSecCount",
+ "code": 53,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrFcsCount",
+ "code": 54,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrOtherCount",
+ "code": 55,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SecurityPolicy",
+ "code": 59,
+ "mfgCode": null,
+ "side": "server",
+ "type": "SecurityPolicy",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ChannelPage0Mask",
+ "code": 60,
+ "mfgCode": null,
+ "side": "server",
+ "type": "octet_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "OperationalDatasetComponents",
+ "code": 61,
+ "mfgCode": null,
+ "side": "server",
+ "type": "OperationalDatasetComponents",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveNetworkFaultsList",
+ "code": 62,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x000F",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Administrator Commissioning",
+ "code": 60,
+ "mfgCode": null,
+ "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "OpenCommissioningWindow",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "RevokeCommissioning",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "WindowStatus",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "CommissioningWindowStatusEnum",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AdminFabricIndex",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "fabric_idx",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AdminVendorId",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "vendor_id",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Operational Credentials",
+ "code": 62,
+ "mfgCode": null,
+ "define": "OPERATIONAL_CREDENTIALS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "AttestationRequest",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "AttestationResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "CertificateChainRequest",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "CertificateChainResponse",
+ "code": 3,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "CSRRequest",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "CSRResponse",
+ "code": 5,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "AddNOC",
+ "code": 6,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "UpdateNOC",
+ "code": 7,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "NOCResponse",
+ "code": 8,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "UpdateFabricLabel",
+ "code": 9,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "RemoveFabric",
+ "code": 10,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "AddTrustedRootCertificate",
+ "code": 11,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "NOCs",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "Fabrics",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SupportedFabrics",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CommissionedFabrics",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TrustedRootCertificates",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentFabricIndex",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Group Key Management",
+ "code": 63,
+ "mfgCode": null,
+ "define": "GROUP_KEY_MANAGEMENT_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "KeySetWrite",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "KeySetRead",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "KeySetReadResponse",
+ "code": 2,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "KeySetRemove",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "KeySetReadAllIndices",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "KeySetReadAllIndicesResponse",
+ "code": 5,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "GroupKeyMap",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "GroupTable",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "MaxGroupsPerFabric",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "MaxGroupKeysPerFabric",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "ICD Management",
+ "code": 70,
+ "mfgCode": null,
+ "define": "ICD_MANAGEMENT_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "attributes": [
+ {
+ "name": "IdleModeDuration",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveModeDuration",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveModeThreshold",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": 2,
+ "name": "MA-dimmablelight",
+ "deviceTypeRef": {
+ "code": 21,
+ "profileId": 259,
+ "label": "MA-contactsensor",
+ "name": "MA-contactsensor"
+ },
+ "deviceTypes": [
+ {
+ "code": 21,
+ "profileId": 259,
+ "label": "MA-contactsensor",
+ "name": "MA-contactsensor"
+ }
+ ],
+ "deviceVersions": [
+ 1
+ ],
+ "deviceIdentifiers": [
+ 21
+ ],
+ "deviceTypeName": "MA-contactsensor",
+ "deviceTypeCode": 21,
+ "deviceTypeProfileId": 259,
+ "clusters": [
+ {
+ "name": "Identify",
+ "code": 3,
+ "mfgCode": null,
+ "define": "IDENTIFY_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "Identify",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "TriggerEffect",
+ "code": 64,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "IdentifyTime",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "IdentifyType",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "IdentifyTypeEnum",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "attributes": [
+ {
+ "name": "DeviceTypeList",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ServerList",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClientList",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "PartsList",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Boolean State",
+ "code": 69,
+ "mfgCode": null,
+ "define": "BOOLEAN_STATE_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "attributes": [
+ {
+ "name": "StateValue",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ],
+ "events": [
+ {
+ "name": "StateChange",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "endpoints": [
+ {
+ "endpointTypeName": "MA-rootdevice",
+ "endpointTypeIndex": 0,
+ "profileId": 259,
+ "endpointId": 0,
+ "networkId": 0
+ },
+ {
+ "endpointTypeName": "MA-dimmablelight",
+ "endpointTypeIndex": 1,
+ "profileId": 259,
+ "endpointId": 1,
+ "networkId": 0
+ }
+ ],
+ "log": []
+}
\ No newline at end of file
diff --git a/examples/contact-sensor-app/telink/src/AppTask.cpp b/examples/contact-sensor-app/telink/src/AppTask.cpp
index ba6a8d8118a897..dbcf9e1ce48405 100644
--- a/examples/contact-sensor-app/telink/src/AppTask.cpp
+++ b/examples/contact-sensor-app/telink/src/AppTask.cpp
@@ -95,10 +95,10 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg)
ChipLogProgress(NotSpecified, "StateValue::Set : %d", newValue);
// write the new boolean state value
- EmberAfStatus status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue);
- if (status != EMBER_ZCL_STATUS_SUCCESS)
+ Protocols::InteractionModel::Status status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue);
+ if (status != Protocols::InteractionModel::Status::Success)
{
- ChipLogError(NotSpecified, "ERR: updating boolean status value %x", status);
+ ChipLogError(NotSpecified, "ERR: updating boolean status value %x", to_underlying(status));
}
}
diff --git a/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.h b/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.h
index ce48270d28b6ac..27bbdd676d4971 100644
--- a/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.h
+++ b/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.h
@@ -32,14 +32,23 @@ class DownloadLogCommand : public CHIPCommandBridge
"The timeout for getting the log. If the timeout expires, completion will be called with whatever has been "
"retrieved by that point (which might be none or a partial log). If the timeout is set to 0, the request will "
"not expire and completion will not be called until the log is fully retrieved or an error occurs.");
+ AddArgument("async", 0, 1, &mIsAsyncCommand,
+ "By default the command waits for the download to finish before returning. If async is true the command will "
+ "not wait and the download will proceed in the background");
+ AddArgument("filepath", &mFilePath, "An optional filepath to save the download log content to.");
}
/////////// CHIPCommandBridge Interface /////////
CHIP_ERROR RunCommand() override;
- chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(10); }
+ chip::System::Clock::Timeout GetWaitDuration() const override
+ {
+ return chip::System::Clock::Seconds16(mTimeout > 0 ? mTimeout + 10 : 300);
+ }
private:
chip::NodeId mNodeId;
uint8_t mLogType;
uint16_t mTimeout;
+ chip::Optional mFilePath;
+ chip::Optional mIsAsyncCommand;
};
diff --git a/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm b/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm
index 494ec964f14b63..b105b6cb3098c8 100644
--- a/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm
+++ b/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm
@@ -21,6 +21,7 @@
#import "MTRError_Utils.h"
#include "DownloadLogCommand.h"
+#include "RemoteDataModelLogger.h"
CHIP_ERROR DownloadLogCommand::RunCommand()
{
@@ -32,27 +33,62 @@
auto logType = static_cast(mLogType);
auto queue = dispatch_queue_create("com.chip.bdx.downloader", DISPATCH_QUEUE_SERIAL);
+ bool shouldWaitForDownload = !mIsAsyncCommand.ValueOr(false);
+ mIsAsyncCommand.ClearValue();
+
+ bool dumpToFile = mFilePath.HasValue();
+ auto * dumpFilePath = dumpToFile ? [NSString stringWithUTF8String:mFilePath.Value()] : nil;
+ mFilePath.ClearValue();
+
auto * self = this;
auto completion = ^(NSURL * url, NSError * error) {
// A non-nil url indicates the presence of content, which can occur even in error scenarios like timeouts.
+ NSString * logContent = nil;
if (nil != url) {
NSError * readError = nil;
auto * data = [NSData dataWithContentsOfURL:url options:NSDataReadingUncached error:&readError];
- VerifyOrReturn(nil == readError, self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(readError)));
+ if (nil != readError) {
+ if (shouldWaitForDownload) {
+ self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(readError));
+ }
+ return;
+ }
+
+ logContent = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+ NSLog(@"Content: %@", logContent);
- auto * content = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
- NSLog(@"Content: %@", content);
+ if (dumpToFile) {
+ NSError * writeError = nil;
+ auto * fileManager = [NSFileManager defaultManager];
+ [fileManager copyItemAtPath:[url path] toPath:dumpFilePath error:&writeError];
+ if (nil != writeError) {
+ if (shouldWaitForDownload) {
+ self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(readError));
+ }
+ return;
+ }
+ }
}
- VerifyOrReturn(nil == error, self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(error)));
+ ChipLogProgress(chipTool, "Diagnostic logs transfer: %s", error ? "Error" : "Success");
+ auto err = RemoteDataModelLogger::LogBdxDownload(logContent, error);
- // The url is nil when there are no logs on the target device.
- if (nil == url) {
- NSLog(@"No logs has been found onto node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId));
+ if (CHIP_NO_ERROR != err) {
+ if (shouldWaitForDownload) {
+ self->SetCommandExitStatus(err);
+ }
+ return;
+ }
+
+ if (shouldWaitForDownload) {
+ self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(error));
}
- self->SetCommandExitStatus(CHIP_NO_ERROR);
};
[device downloadLogOfType:logType timeout:mTimeout queue:queue completion:completion];
+
+ if (!shouldWaitForDownload) {
+ SetCommandExitStatus(CHIP_NO_ERROR);
+ }
return CHIP_NO_ERROR;
}
diff --git a/examples/darwin-framework-tool/commands/common/MTRError.mm b/examples/darwin-framework-tool/commands/common/MTRError.mm
index 770c947e05d94b..f7680e822d323d 100644
--- a/examples/darwin-framework-tool/commands/common/MTRError.mm
+++ b/examples/darwin-framework-tool/commands/common/MTRError.mm
@@ -20,8 +20,6 @@
#import
#import
-#import
-#import
#import
#import
diff --git a/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.h b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.h
index 39605e6fb56390..b2cd92df859deb 100644
--- a/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.h
+++ b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.h
@@ -32,5 +32,6 @@ CHIP_ERROR LogCommandAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumbe
CHIP_ERROR LogAttributeErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, NSError * error);
CHIP_ERROR LogCommandErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, NSError * error);
CHIP_ERROR LogGetCommissionerNodeId(NSNumber * nodeId);
+CHIP_ERROR LogBdxDownload(NSString * content, NSError * error);
void SetDelegate(RemoteDataModelLoggerDelegate * delegate);
}; // namespace RemoteDataModelLogger
diff --git a/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm
index 760fe0bc998ed5..ff12cdc022e515 100644
--- a/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm
+++ b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm
@@ -35,6 +35,7 @@
constexpr char kClusterErrorIdKey[] = "clusterError";
constexpr char kValueKey[] = "value";
constexpr char kNodeIdKey[] = "nodeId";
+constexpr char kLogContentIdKey[] = "logContent";
constexpr char kBase64Header[] = "base64:";
@@ -204,5 +205,33 @@ CHIP_ERROR LogGetCommissionerNodeId(NSNumber * value)
return gDelegate->LogJSON(valueStr.c_str());
}
+CHIP_ERROR LogBdxDownload(NSString * content, NSError * error)
+{
+ VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR);
+
+ Json::Value rootValue;
+ rootValue[kValueKey] = Json::Value();
+
+ Json::Value jsonValue;
+ VerifyOrDie(CHIP_NO_ERROR == AsJsonValue(content, jsonValue));
+ rootValue[kValueKey][kLogContentIdKey] = jsonValue;
+
+ if (error) {
+ auto err = MTRErrorToCHIPErrorCode(error);
+ auto status = chip::app::StatusIB(err);
+
+#if CHIP_CONFIG_IM_STATUS_CODE_VERBOSE_FORMAT
+ auto statusName = chip::Protocols::InteractionModel::StatusName(status.mStatus);
+ rootValue[kValueKey][kErrorIdKey] = statusName;
+#else
+ auto statusName = status.mStatus;
+ rootValue[kValueKey][kErrorIdKey] = chip::to_underlying(statusName);
+#endif // CHIP_CONFIG_IM_STATUS_CODE_VERBOSE_FORMAT
+ }
+
+ auto valueStr = JsonToString(rootValue);
+ return gDelegate->LogJSON(valueStr.c_str());
+}
+
void SetDelegate(RemoteDataModelLoggerDelegate * delegate) { gDelegate = delegate; }
}; // namespace RemoteDataModelLogger
diff --git a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm
index ec0b48b6903fc1..abcde3f021cfcf 100644
--- a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm
+++ b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm
@@ -19,6 +19,7 @@
#include "InteractiveCommands.h"
#include
+#include
#include
#include
@@ -72,7 +73,7 @@ void ClearLine()
void ENFORCE_FORMAT(3, 0) LoggingCallback(const char * module, uint8_t category, const char * msg, va_list args)
{
ClearLine();
- chip::Logging::Platform::LogV(module, category, msg, args);
+ dft::logging::LogRedirectCallback(module, category, msg, args);
ClearLine();
}
@@ -244,7 +245,7 @@ void ENFORCE_FORMAT(3, 0) InteractiveServerLoggingCallback(const char * module,
va_list args_copy;
va_copy(args_copy, args);
- chip::Logging::Platform::LogV(module, category, msg, args);
+ dft::logging::LogRedirectCallback(module, category, msg, args);
char message[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE];
vsnprintf(message, sizeof(message), msg, args_copy);
diff --git a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h
deleted file mode 100644
index 0c87c96cfe65d1..00000000000000
--- a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h
+++ /dev/null
@@ -1,678 +0,0 @@
-/*
- * Copyright (c) 2022 Project CHIP Authors
- * All rights reserved.
- *
- * 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.
- *
- */
-
-#pragma once
-
-#include "../common/CHIPCommandBridge.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include